Space Switching¶
Space switching without constraints or extra DAG nodes.
Contains functions to create a space switching network as well as seamlessly switching between spaces.
Example Usage¶
import cmt.rig.spaceswitch as spaceswitch
# Create the space switch
spaceswitch.create_space_switch(
pole_vector_control,
[(ik_control, "foot"), (root_control, "root"), (world_control, "world")],
switch_attribute="space",
use_rotate=False,
)
# Seamless switch
spaceswitch.switch_space(pole_vector_control, "space", 1, create_keys=False)
-
cmt.rig.spaceswitch.
create_space_switch
(node, drivers, switch_attribute=None, use_translate=True, use_rotate=True)[source]¶ Creates a space switch network.
The network uses the offsetParentMatrix attribute and does not create any constraints or new dag nodes.
- Parameters
node – Transform to drive
drivers – List of tuples: [(driver1, “spaceName1”), (driver2, “spaceName2”)]
switch_attribute – Name of the switch attribute to create on the target node.