mmSolver.tools.createcontroller2#

Tool#

mmSolver.tools.createcontroller2.tool.create_world_controllers()#

Create controllers for all selected nodes.

Usage:

1) Select transform node(s).

2) Run 'create_world_controllers' tool, new world-space
   transform is created at same position as input transform
   nodes.

3) New nodes are selected.

4) User manipulates newly created nodes.

5) Run 'remove_controllers' tool, selected transform nodes are
    deleted and animation is transfered back onto original
    nodes.

This is to provide a simple tool to select many nodes and create (world-space) controllers for each node. The user may then do whatever is needed to transform and re-parent the controllers.

Return type:

None

mmSolver.tools.createcontroller2.tool.open_window()#

Library#

mmSolver.tools.createcontroller2.lib.create_controller(name, pivot_node, main_node, loc_grp_nodes, start_frame, end_frame, controller_space, smart_bake=False, camera=None, dynamic_pivot=False)#

Create Controller of a node.

Parameters:
  • name (str) – The name of the rig.

  • pivot_node (str) – The controller uses the pivot node’s transform as the parent of the controller.

  • main_node (str) – The node to be controlled

  • loc_grp_nodes ([str]) – The nodes for the Locator or Group node that will be used to create rig. If a Locator is used, a list of both transform and shape nodes should be provided. If a Group is provided, just use a list with the transform node.

  • start_frame (int) – bake range start frame

  • end_frame (int) – bake range end frame

  • controller_space – In which space rig to be created? A value in mmSolver.tools.createcontroller2.constant.CONTROLLER_SPACE_LIST.

  • smart_bake – Enable or disable baking only “smart” keyframe times.

  • camera – Camera transform node for screen space rig

  • dynamic_pivot – When True, the pivot_node is considered animated.

Type:

str

Type:

bool

Type:

str or None

Type:

bool

Returns:

The controller node locator/group created. This should be the same as ‘loc_grp_nodes’ given to the function.

Return type:

[str]

mmSolver.tools.createcontroller2.lib.remove_controller(controller_node, start_frame, end_frame, attrs=None)#

Bake the affects of the controller node, and delete the controller.

Parameters:
  • controller_node (str) – The controller node.

  • start_frame (int) – First frame to bake.

  • end_frame (int) – Last frame to bake.

  • attrs ([str, ..] or None) – List of attributes to bake. If None, all transform, rotate and scale attributes are baked.

Returns:

The list of transform nodes that were controlled by the given controller.

Return type:

[str, ..]

Library#

Constant#