def loadPreset(presetName):
    p = Preset(LOCAL, skeletonBuilder.TOOL_NAME, presetName, XTN)
    if not p.exists:
        p = Preset(GLOBAL, skeletonBuilder.TOOL_NAME, presetName, XTN)

    assert p.exists, "Cannot find a %s preset called %s" % (XTN, presetName)

    return loadPresetFile(p)
Example #2
0
def savePostTraceScheme(presetName):
    '''
	stores all post trace commands found in the current scene out to disk
	'''

    #grab a list of transforms with post trace commands on them
    postTraceNodes = cmd.ls("*.%s" % POST_TRACE_ATTR_NAME, r=True)

    postTraceDict = {}
    for n in postTraceNodes:
        noNS = n.split(':')[-1]  #strip the namespace
        noNS = noNS.split('.')[0]  #strip the attribute
        postTraceDict[noNS] = cmd.getAttr(n)

    xportDict = api.writeExportDict(TOOL_NAME, 0)

    p = Preset(GLOBAL, TOOL_NAME, presetName, EXTENSION)
    p.pickle((xportDict, postTraceDict))
Example #3
0
def savePostTraceScheme( presetName ):
	'''
	stores all post trace commands found in the current scene out to disk
	'''

	#grab a list of transforms with post trace commands on them
	postTraceNodes = cmd.ls( "*.%s" % POST_TRACE_ATTR_NAME, r=True )

	postTraceDict = {}
	for n in postTraceNodes:
		noNS = n.split( ':' )[ -1 ]  #strip the namespace
		noNS = noNS.split( '.' )[ 0 ]  #strip the attribute
		postTraceDict[ noNS ] = cmd.getAttr( n )

	xportDict = api.writeExportDict( TOOL_NAME, 0 )

	p = Preset( GLOBAL, TOOL_NAME, presetName, EXTENSION )
	p.pickle( (xportDict, postTraceDict) )