paya.runtime.rigs.Rig#
- class Rig#
Inheritance
Warning
This is a stub / beta class, and should not be relied on for production purposes.
- classmethod getAssetName()#
- Returns
A basename for the asset associated with this rig class. In this implementation, this is merely the non-capitalized name of this class, but can be overriden freely.
- Return type
- classmethod findTrunkScene(name)#
Convenience method. Looks for a Maya scene dependency across this rig’s
trunk
directories.
- classmethod exportAllToTrunkScene(name)#
Exports the full contents of the currently-open scene to the
trunk
directory for this rig class.- Example
cls.exportAllToTrunkScene('layout.ma')
- classmethod referenceTrunkScene(name, namespace=None, **kwargs)#
Locates and references the specified trunk scene.
- Parameters
- Returns
The retrieved file path.
- Return type
- classmethod unreferenceTrunkScene(name)#
Looks for any matches for the specified trunk scene amongst current references and removes them.
- classmethod getSnapshotsDir(create=False)#
- Returns
The directory for rig build snapshots. In this implementation, it’s
'<maya project>/rig_build_snapshots'
, but can be overriden freely.- Return type
- classmethod snapshotExists(stageName)#
- classmethod removeSnapshot(stageName)#
Removes the snapshot for the specified stage name, if it exists.
- Parameters
stageName (str) – the build stage for the snapshot
- classmethod clearSnapshots()#
Deletes the snapshots directory along with its contents.
- classmethod getSnapshotScene(stageName)#
- classmethod pruneSnapshots(dirtyStages=None)#
Performs housekeeping on build-stage snapshots. For every stage, if there isn’t a snapshot, snapshots for all downstream stages are also deleted.
- classmethod getBuildGraph()#
- Returns
An evaluation graph built off the connection segments in the
__graph__
attribute on this class.- Return type
- classmethod build(targetStages=None, rebuildDependencies=True, clearSnapshots=False, dirtyStages=None)#
Runs a rig-building sequence.
- Parameters
targetStages (
str
, [str
]) – one or more build stages to evaluate for; if this is omitted, the entire build graph will be evaluated; defaults toNone
rebuildDependencies (bool) – rebuild stage dependencies instead of relying on snapshots; defaults to
True
clearSnapshots (bool) – clear all snapshots before building; defaults to
False
dirtyStages (
str
, [str
]) – one or more stages which should be considered ‘dirty’, meaning their snapshots, and those of their descendants, should be cleared before building; defaults toNone