dopsbdtoolutils module

dopsbdtoolutils.attachConstraint(scriptargs, mode)

Selects existing SBD constraints and changes their goal. The “mode” parameter describes the new type of goal. Mode can be one of: “animation”, “point”, “worldspace”, or “rbd”. If the mode is “point” or “rbd” a goal object is also selected.

dopsbdtoolutils.createConstraint(container, nodetypename, nodename, group, ptgroup, useanimationdefault, exact_node_type)

Appends an SBD Constraint to the displayed DOP node.

dopsbdtoolutils.createSBDAttachmentConstraints(scriptargs, nodetype, objecttypename, goalseltype)

Create spring/pin constraints between a set of points and the nearest points on a selected dynamics object.

dopsbdtoolutils.createSBDConstraint(container, nodetype, nodename, group, ptgroup, useanimationdefault, exact_node_type)

Appends an SBD Constraint to the displayed DOP node.

dopsbdtoolutils.deleteConstraint(scriptargs)

Selects existing SBD constraints and deletes them.

dopsbdtoolutils.farmSimulation(sbdobjects)

Sets up the SBD object to be run on a farm. Creates a new place holder to import the object, save it to disk, and then reload it. Creates HQueue node setup pointing to this resulting node. Since we don’t have multi-machine distribution, no controls node is necessary.

dopsbdtoolutils.generateConstraintSelection(scriptargs)

Selects existing SBD constraints and validates selection.

dopsbdtoolutils.generateSBDAttachmentGoalPTGroup(goalSelectionData, constrainedDopObject, constrainedGroup, constrainedPTgroup)

Generate a closest-point point group based on a given dynamics object selection.

dopsbdtoolutils.generateSBDAttachmentGoalSelection(activepane, prompt, seltype)

Generate a selection specific to SBD Attachment Constraints.

dopsbdtoolutils.generateSelectionString(selection)

Generate a selection string from a selection. If everything is selected (e.g., all points, all primitives), then the “*” string is returned.

dopsbdtoolutils.genericConstraintTool(scriptargs, nodetypename, nodename=None, exact_node_type=True)

This function is similar to the standard DOP filter tool, but is for DOP constraints, which allow selecting a set of points from an object. Unlike the genericRelationship function, only one selection is requested of the user.

dopsbdtoolutils.getParm(node, name, value)

Safely get a parameter, checking if it exists first.

dopsbdtoolutils.groupCentroid(dopnet, objname, ptgroup)

Calculates the centroid of a group of points.

dopsbdtoolutils.modifierGroupCentroid(modifier)

Returns the centroid of the point selection of a particular node.

dopsbdtoolutils.performTwoStepDynamicsPointSelection(activepane, alsoselconstraints, use_existing_selection, objprompt, specprompt, specseltype)
dopsbdtoolutils.selectedPointNumbers(geopath, pattern)

Turns a point selection string into an array of point numbers. The * pattern represents all points here.

dopsbdtoolutils.selectionPrompt(element_type)

Generates a selection prompt string for functions in this module.

dopsbdtoolutils.setParm(node, name, value)

Safely set a parameter, checking if it exists first.

dopsbdtoolutils.setParmTuple(node, name, value)

Safely set a parameter tuple, checking if it exists first.