choptoolutils module

choptoolutils.adjustRate(n)

Adjust the rate of the chop node if one of the parent chopnet has a chopnet_rate parameter.

choptoolutils.buildFBXPath(filename, take_name='', convert_units=True, minimal_nodes=True, keep_deforming_shape_xforms=True, sample_rate=None)

Assembles an FBX clip path with import options after the ‘#’ character.

choptoolutils.chooseAndOpenClipFile(scriptargs)

Opens a file chooser that allows the user to select a CHOP file(s). For each chosen file, a File CHOP node is created to open that file.

choptoolutils.clearPose(node)

Button callback to clear the Pose parameters with identity.

choptoolutils.createClipForParmObjects(parms, name_prefix, parent=None, current_value_only=False)

Returns a CHOP node representing the given lists of hou.Parm and hou.ParmTuple objects owned by ‘node’.

choptoolutils.createPose(parms, lock_clip=False, name_prefix=None, parent=None)

Creates a Channel CHOP representing the current values of the given parameters. If parent is None, then it will create a motionFX network.

choptoolutils.disableEffect(parms)

Function to disable a parm effect given a list of hou.Parm objects

choptoolutils.enableEffect(parms)

Function to enable a parm effect given a list of hou.Parm objects. For this to work, the parm must have an Export CHOP overriding it.

choptoolutils.findChopnetWithRate(n)

Recursively search for a chopnet with a chopnet_rate parameter Returns the rate hou.Param.

choptoolutils.findParentChopnetWithRate(n)

Recursively search for a parent chopnet with a chopnet_rate parameter Returns the rate hou.Param.

choptoolutils.genericTool(scriptargs, nodetypename, nodename=None, exact_node_type=True)

Calls the generic tool handler for all nodes, which allows the user to lay down a node in the network editor.

choptoolutils.getTrackParmNames(tracks, parm_from_track)

Given a list of hou.Track objects, return the export node.

choptoolutils.groupIntoParmTuples(parms)

Given a list of hou.Parm objects, we aggregate them into hou.ParmTuple objects wherever possible, modifying parms.

choptoolutils.groupTracksByChop(tracks, chop_nodes)

Groups the list of tracks according to their track owners. This function adds to a dictionary of chops where each entry is a list of its tracks.

choptoolutils.modifyObjectTool(label, source, target, modify_func, clipnet=None)

This function allows one to easily perform CHOP modifications of object transforms. It creates CHOPs that will fetch the source’s object transform, call modify_chop = modify_func(input_chop), to further modify the transforms, and then push the results onto a target object taking into account pretransforms. Returns (obj_chop, modify_chop, output_chop).

choptoolutils.parmAddEffect(kwargs, chop_type, name_prefix=None)

High-level utility function for creating a parm effect where the effect node is added to the parameter animation. The kwargs parameter is a dictionary given to scripts within the PARMmenu context. It returns a tuple of (effect_node, output_node).

choptoolutils.parmFilterEffect(kwargs, chop_type, name_prefix=None)

High-level utility function for creating a parm effect where the effect filters the parameter animation. It returns the created hou.ChopNode.

kwargs
A dictionary containing the keyword ‘parms’, mapping to a tuple of hou.Parm objects that is to be affected.
chop_type
The type name of the CHOP to create.
name_prefix
The name prefix used for the created node.
choptoolutils.scopeTracks(chop, chop_tracks, keep, name_prefix)
choptoolutils.sumChopNodes(source_node, add_node, name_prefix)

Returns a CHOP node representing the sum of the two given chop nodes. The result will be trimmed to the range of the source node. NOTE: The two nodees must share the same parent.

choptoolutils.transformChopNodes(input1, input2, name_prefix, reverse=False)

Returns a CHOP node representing the transform of the two given chop nodes with transform channels, multiplied in the order given. NOTE: The two nodees must share the same parent.

choptoolutils.updatePose(node)

Button callback to update the Pose parameters with the values from the parent CHOP.

choptoolutils.visualizeParmEffect(chop_node, display_chop_node=None)

This brings up a floating panel to visualize the given chop node. The node will then be made to be the only displayed node in its parent network. It will do nothing if the UI is not available. If display_chop_node is given, it will be made the only node in its network to be displayed instead of chop_node.