See Crowd Agents for more information.
Methods ¶
__init__(filename, rig, keep_external_ref = True)
Creates a new transform group by loading it from the specified JSON file.
Raises hou.OperationFailed if the file does not exist or otherwise cannot be loaded.
filename
A path to a JSON file.
rig
The hou.AgentRig that the group will be associated with.
keep_external_ref
A bool
indicating whether the external reference should be maintained when the agent is saved to a geometry file.
If the reference is maintained, then the JSON file needs to be available when the saved geometry is used (only the path to the JSON file is saved in the geometry file).
Otherwise, a copy of the rig will be inlined when saving out the geometry so that the original file is no longer needed.
__init__(name, transforms, rig)
Creates a new transform group containing the specified transforms.
name
The name of the new transform group.
transforms
An int
sequence containing the index of each transform in the group.
rig
The hou.AgentRig that the group will be associated with.
__init__(name, transforms, rig, weights)
Creates a new transform group containing the specified transforms.
This signature allows specifying a float
sequence with the weight (between 0 and 1) of each transform in the group.
name
The name of the new transform group.
transforms
An int
sequence containing the index of each transform in the group.
rig
The hou.AgentRig that the group will be associated with.
weights
A float
sequence specifying the weight (between 0 and 1) of each transform in the group.
__init__(name, transforms, rig, weights, channels)
Creates a new transform group containing the specified transforms and channels.
name
The name of the new transform group.
transforms
An int
sequence containing the index of each transform in the group.
rig
The hou.AgentRig that the group will be associated with.
weights
A float
sequence specifying the weight (between 0 and 1) of each transform in the group.
channels
An int
sequence containing the index of each channel in the group.
asJSON()
→ str
Returns a string containing the JSON representation of the group.
channelIndices()
→ tuple of int
Returns a list containing the index of each channel in the group.
fileName(expanded = False)
→ str
If the transform group is an external reference, returns the path to the file on disk.
expanded
Specifies whether to expand any variables in the path, such as $HIP
.
isExternalReference()
→ bool
Returns a bool
indicating whether the transform group references a file on disk.
name()
→ str
Returns the name of the transform group.
transformIndices()
→ tuple of int
Returns a list containing the index of each transform in the group.
weights()
→ tuple of float
Returns a list containing the weight of each transform in the group.