charactertoolutils module

charactertoolutils.addPoseScopeValues(attribname, geo, primgrouppattern, channels, pickscripts)

adds the channels and pickscripts to the pose scope attribute on the primitives specified by the primgrouppattern. attribname is a string, geo is a hou.Geometry object, primgrouppattern is a string (the pattern format is the same one used by the group fields on SOP nodes that take primitive selections), channels is a list of strings (full path to given channels - Ie. /obj/null1/tx), and pickscripts is a list of strings (in json format as specified in createPoseScopePickscript).

charactertoolutils.changePathRelToOwner(sop_node, channels)

Given a list of channel pattern strings and a hou.SopNode, expand to a list of paths relative to the owner object. If add_warnings is True, then patterns which expand to nothing will get warnings added to sop_node.

charactertoolutils.createPoseScopeAttrib(attribname, geo)

create the pose scope attribute, if it does not already exist, using the given attribname or the default ‘pose_scope’ otherwise. attribname should be a string and geo should be a hou.Geometry object

charactertoolutils.createPoseScopePickscript(label, language, script)

create the correctly formatted json string for the pose scope pickscript. label, language, and script are all strings. The correct format is: { “label”: “…”, “language”: “…”, “script”: “…” }

charactertoolutils.genericPointMuscleTool(scriptargs, nodetypename, exact_node_type=True)

Creates a Point Muscle asset and allows the user to select the parent objects.

charactertoolutils.multiTypeSelectionTool(scriptargs, type_list, default=None)

Generate a list of node type descriptions that can be selected from when a shift click from a tool is detected.

charactertoolutils.selectInteriorPoint(method)

Based on a point selection within the viewport, it returns the world space coordinate of the center/interior of the selected geometry based on either the viewing direction or the normal of the first intersection point. If the selected point does not intersect any geometry, nothing will be returned. The selection method (view or normal) must be specified as an argument. Ie. import charactertoolutils as c

view = c.placementMethod.get(‘view’) normal = c.placementMethod.get(‘normal’) view_pt = c.selectInteriorPoint(view) normal_pt = c.selectInteriorPoint(normal)