paya.runtime.nodes.BlendShape#
- class BlendShape(*args, **kwargs)#
Inheritance
BlendShape
GeometryFilter
GeometryFilter
DependNode
DependNode
PyNode
ProxyUnicode
Use the
.targets
/.t
interface to edit targets. SeeTargets
.Instead of passing complete Maya arguments to
create()
, it may be easier to reserve the constructor for base initialisation and use.targets
for everything else:bsn = r.nodes.BlendShape.create(baseGeo, pre=True) bsn.targets.add(sadGeo) bsn.targets.add(happyGeo) # etc.
- classmethod create(*args, name=None, post=False, pre=False, after=False, automatic=False, parallel=False, before=False, split=False, frontOfChain=False, afterReference=False, **kwargs)#
Wrapper for
blendShape()
. Two new flags,pre
andpost
, can be used for easier / clearer configuration of the two mos common configurations (pre-deformation and post- deformation). When provided, they will override all the standard Maya deformation options.- Parameters
*args – forwarded to
blendShape()
name/n (str) – a name for the blendShape node; defaults to
None
post (bool) – if True, set all deformation flags for post- deformation; defaults to False
pre (bool) – if True, set all deformation flags for pre- deformation; defaults to False
**kwargs – forwarded to
blendShape()
- Returns
The blend shape node.
- Return type
If you’d rather skip ‘post’ / ‘pre’ and use the standard Maya flags, here’s a reference:
UI Option
Command Flag
Description
‘Automatic’
-automatic
Maya makes a guess.
‘Pre-deformation’
-frontOfChain
Pre-skin (typical use)
‘Post-deformation’
-before
Post-skin, same end shape
‘After’
-after
Post-skin, new end shape
‘Split’
-split
Deforms origShape into new end shape
‘Parallel’
-parallel
Deforms origShape, adds-in with second blend
‘After Reference’
afterReference
For ref-friendly boundary
- getIndexFromAlias(alias)#
- inPostMode()#
- Returns
True if the blend shape node is configured for ‘post-deformation’, otherwise False.
- Return type
- exportTargets(*targets, filepath)#
Exports target data.
Note
Data for inbetweens is not included. This is a Maya limitation.
- Parameters
- Returns
self
- Return type
- importTargets(filepath)#
Imports targets exported using
exportTargets()
.- Parameters
filepath (str) – the source file path
- Returns
self
- Return type