def save_skin_weights(character_name, geo_list=[]):
    """
    save weights for character geometry objects
    """

    for obj in geo_list:
        #get the weights file
        wt_file = os.path.join(project.main_project_path, character_name,
                               skin_weights_dir, obj + skin_weights_ext)

        #save the weights file
        cmds.select(obj)
        bSkinSaver.bSaveSkinValues(wt_file)
def saveSkinWeights(characterName, geoList=[]):
    """
    save weights for character geometry objects
    """

    for obj in geoList:

        # weights file
        wtFile = os.path.join(project.mainProjectPath, characterName,
                              skinWeightsDir, obj + swExt)

        # save skin weight file
        mc.select(obj)
        bSkinSaver.bSaveSkinValues(wtFile)
Exemplo n.º 3
0
def saveSkinWeights(characterName, geoList=[]):
    '''
    save weights for character geometry objects
    :param characterName: 
    :param geoList: 
    :return: 
    '''

    for obj in geoList:
        #weights file

        wtFile = os.path.join(project.mainProjectPath, characterName,
                              skinWeightsDir, obj + swExt)

        #save skin weight file
        cmds.select(obj)
        bSkinSaver.bSaveSkinValues(wtFile)
Exemplo n.º 4
0
def saveSkinWeights(characterName, geoList=[]):
    """
    save skin weight information.
    :param characterName: string
    :param geoList: Select skinned mesh in scene to save.
    :return:None.
    """
    geoList = cmds.ls(sl=True)
    # TODO automatically find skinned mesh in scene. Then export.
    if geoList:
        for geo in geoList:
            cmds.listHistory()
            # save weights file
            wtFile = os.path.join(project.projectPath,
                                  project.category[0],
                                  characterName,
                                  skinWeightsFolder,
                                  geo+skinWeightExt)
            print (wtFile)
            cmds.select(geo)
            bSkinSaver.bSaveSkinValues(wtFile)
    else:
        cmds.warning("No mesh has been selected.")