objecttoolutils module

class objecttoolutils.AutoPaneState(pane)

Auto Scope class to keep a Pane State

class objecttoolutils.ConstraintBlendToolbox

Bases: toolutils.ToolboxTemplateGroup

Toolbox for blend constraints

add_key = 0
blend_mask = 511
blend_mode = 1
blend_value = 1.0
keep_offset = 0
updateGlobals()
class objecttoolutils.ConstraintMenuEntry(name, icon, cb)
class objecttoolutils.ConstraintParentToolbox

Bases: toolutils.ToolboxTemplateGroup

Toolbox for parent constraints

add_key = 1
blend_mask = 511
blend_mode = 3
blend_value = 1.0
keep_offset = 1
updateGlobals()
class objecttoolutils.ConstraintToolbox(do_update=True)

Bases: toolutils.ToolboxTemplateGroup

Common toolbox for all constraints

blend_mode = 0
keep_offset = 0
update()

All constraints have a keep_offset toggle at the end

class objecttoolutils.ConstraintTransformToolbox

Bases: toolutils.ToolboxTemplateGroup

Toolbox for transform constraints

pmode = 2
updateGlobals()
class objecttoolutils.RightToolbox

Bases: toolutils.ToolboxTemplateGroup

Empty Right Toolbox to fill the right side of the toolbox

objecttoolutils.bakeanimationStateTool(scriptargs)
objecttoolutils.checkShiftDown()
objecttoolutils.constraintaddkey(add_key, prm, f, v0, v1)
objecttoolutils.constraintaddkeyoffset(add_key, keep_offset, bld, f, v0, v1)
objecttoolutils.constraintbakeStateTool(scriptargs)
objecttoolutils.constraintblendStateTool(kwargs)

Blend Constraint Shelf Tool

objecttoolutils.constraintblendStateToolApply(input_nodes, arg_nodes, keep_offset=0, blend_mode=0, add_key=0, blend_value=1.0, blend_mask=511)

Blend Constraint Shelf Tool without Picking session

objecttoolutils.constraintdeleteStateTool(scriptargs)
objecttoolutils.constraintdisableStateTool(scriptargs)
objecttoolutils.constraintenableStateTool(scriptargs)
objecttoolutils.constraintgamepadStateTool(scriptargs)
objecttoolutils.constraintlookatStateTool(kwargs)

Look At Constraint Shelf Tool

objecttoolutils.constraintlookatStateToolApply(input_nodes, lookat_nodes, lookup_nodes, keep_offset)

Look At Constraint Shelf Tool without Picking session

objecttoolutils.constraintnetworkStateToolApply(scriptargs)
objecttoolutils.constraintparentblendLayout(chop, parent, blend, blend_target, targets)
objecttoolutils.constraintparentblendLayouts(chops, parents, blends, blend_targets, targets)
objecttoolutils.constraintparentblendStateTool(kwargs)

Parent Blend Constraint Shelf Tool

objecttoolutils.constraintparentblendStateToolApply(input_nodes, arg_nodes, keep_offset, blend_mode, add_key=False, blend_value=1.0, blend_mask=511)

Parent Blend Constraint Shelf Tool without Picking session

objecttoolutils.constraintpathStateTool(kwargs)

Path Constraint Shelf Tool

objecttoolutils.constraintpathStateToolApply(input_nodes, path_nodes, lookat_nodes, lookup_nodes, keep_offset)

Path Constraint Shelf Tool without Picking session

objecttoolutils.constraintpointsSelect(n)
objecttoolutils.constraintpointsStateTool(kwargs)

Points Constraint Shelf Tool

objecttoolutils.constraintpointsStateToolApply(input_nodes, soppath_nodes, lookat_nodes, lookup_nodes, keep_offset=False, select_points=None)

Points Constraint Shelf Tool without Picking session

objecttoolutils.constraintsMenu(kwargs)

Callback for the constraint_path extra button

objecttoolutils.constraintsMenuBuiltinEntries()
objecttoolutils.constraintsMenuEntries()
objecttoolutils.constraintsMenuUserEntries()
objecttoolutils.constraintsequenceStateToolApply(input_nodes, arg_nodes, keep_offset=0, add_key=0, blend_value=1.0, blend_mask=511)

Sequence Constraint Shelf Tool without Picking session

objecttoolutils.constraintsimpleblendStateToolApply(input_nodes, arg_nodes, keep_offset=0, add_key=0, blend_value=1.0, blend_mask=511)

Simple Blend Constraint Shelf Tool without Picking session

objecttoolutils.constraintsurfacePicked(n, npr, picked, new_sop, new_prim, new_pos, new_uvw)
objecttoolutils.constraintsurfaceSelect(n)
objecttoolutils.constraintsurfaceStateTool(kwargs)

Surface Constraint Shelf Tool

objecttoolutils.constraintsurfaceStateToolApply(input_nodes, lookat_nodes, lookup_nodes, keep_offset, select_location)

Surface Constraint Shelf Tool without Picking session

objecttoolutils.constrainttoggleStateTool(scriptargs)
objecttoolutils.constrainttransformStateTool(kwargs)

Transform Constraint Shelf Tool

objecttoolutils.constrainttransformStateToolApply(input_nodes, pivot_nodes, pmode)

Transform Constraint Shelf Tool without Picking session

objecttoolutils.createChopWithRate(n, node_type, name=None)

Creates a CHOP node and add rate references.

objecttoolutils.createChopnetWithRate(n, name)

Creates a CHOPnet and add rate spare parameter if one of its parents doesn’t have it already.

objecttoolutils.createObjNode(container, nodetypename, inputnodes, nodename, exact_node_type)

Creates an Object node inside the specified container network.

objecttoolutils.createSkyLight(kwargs)

Creates a linked sky light and sunlight pair.

objecttoolutils.customStateTool(scriptargs, statename, nodename=None, clicktoplace=None, translate_parm_name=None)

Invokes a custom object state if invoked from a scene viewer. This allows the custom state to control the creation and configuration of the object node. In a network editor this function calls the standard node creation code.

objecttoolutils.fixupArgNodes(arg_nodes)
objecttoolutils.forceList(l)
objecttoolutils.forceObject(o)
objecttoolutils.freeze(selected_obj)

Freezes the transforms of the given list of geometry objects. Transform SOPs are added in order to move the world transforms of the objects to the geometry level.

objecttoolutils.genericCameraLightTool(scriptargs, nodetypename, nodename=None, clicktoplace=None)

A generic function for creating Camera or Light object nodes of various types. This tool handles the initialization of the node transforms to match the current view if the Ctrl key was used to invoke the tool. Otherwise the user is prompted for a location.

objecttoolutils.genericObjNodeFilterTool(scriptargs, nodetypename, nodename, prompt=None, exact_node_type=True)

Creates an Object node that requires other object nodes as input.

objecttoolutils.genericObjNodeGeneratorTool(scriptargs, nodetypename, nodename, clicktoplace, translate_parm_name=None, prompt=None, exact_node_type=True)

Creates an Object Generator node. The node is either created at the origin, or asks the user to select a location in the viewport depending on the value of the clicktoplace parameter.

objecttoolutils.getConstraintsOnParms(objs, valid_values)
objecttoolutils.getInputsRecursively(n, a)
objecttoolutils.getObjNodeContainer(cwd)

Returns the scene level object that is or contains the specified node (which should be a SOP node or Object node).

objecttoolutils.getViewportPivotDistance(viewport)
objecttoolutils.initConstraint(cname, clabel, chop, targets, setflag, useSetNextInput=True)
objecttoolutils.initConstraints(cname, clabel, chops, targets, setflag=True, useSetNextInput=True)
objecttoolutils.initEmptyGeometryObject(objectnode)

Destroy the File SOP that gets created inside a default Geometry Object.

objecttoolutils.initLookAtTargets(chops, lookat_nodes, lookup_nodes)
objecttoolutils.initOBJConstraints(objs)
objecttoolutils.initOBJTarget(chop, arg_nodes, nodetype='constraintobject', obj=None)
objecttoolutils.initOBJTargets(chops, arg_nodes, nodetype='constraintobject')
objecttoolutils.initOBJTargetsOffset(chops, arg_nodes, keep_offset)
objecttoolutils.initOffset(cname, clabel, obj, constraint)
objecttoolutils.initOffsetBlends(input_nodes, constraints, chops, add_key, keep_offset)
objecttoolutils.initOffsetParents(input_nodes, blends)
objecttoolutils.initOffsetTarget(obj, n, parent, parent_outputidx)
objecttoolutils.initOffsets(input_nodes, constraints)
objecttoolutils.initParentTargets(chops, objs)
objecttoolutils.layoutInputs(n)
objecttoolutils.matchTransform(kwargs, option)

Called when a match transform button is clicked.

objecttoolutils.normalizeLightExposure(lightnode, dist)

Sets the light exposure such that brightness at a distance ‘dist’ equals the value of the light_intensity parameter. This compensates for physical attenuation, if set.

objecttoolutils.objectsFromScriptArgs(scriptargs)
objecttoolutils.promoteParm(target_node, source_node, parm_name, folder, has_menu=False, label=None)
objecttoolutils.selectPrimtiveUVs(orisop, prompt, icon, label)
objecttoolutils.setGoodLightExposure(scriptargs, lightnode)

Sets the light exposure such that brightness is 1.0 at the viewport pivot, compensating for physical attenuation, if set. Does nothing when scriptargs indicate that ctrl or cmd weren’t being held, since that means the light wasn’t created from the viewport camera. In that case we don’t currently have a good estimate of the required exposure.