doptoolutils module

class doptoolutils.ObjectTypeInfo
doptoolutils.addMeltOutputProcessing(dopobjectnode, inputnode)
doptoolutils.addObjectToSolver(dopobjectnode, solvernode, mergeobjects)

Adds a DOP Object to an existing DOP Solver node. This function creates a merge node if necessary.

doptoolutils.addTemperatureToEmitColor(inputnode)
doptoolutils.addTemperatureToViscosity(fluidnode, solvernode)
doptoolutils.buildControlNull(ownernode, name, parmlist)

Builds a null of the given name and coloured a pleasant blue. Then populates it with parmlist, a list of tuples of (type, name, label, vectorsize, default) type is a string from ‘toggle’, ‘string’, ‘int’, ‘float’. default must be a tuple. Resulting node returned.

doptoolutils.checkDopNetworkIsPlayer(dopnet)
doptoolutils.chooseImportNodeForDistribution(creator)

Lets the user choose a node that is importing the given creator node.

Returns None if there are no such nodes.

doptoolutils.convertToDeformingObject(scriptargs, isdeforming)

Create a StaticObject DOP setup for deforming geometry.

doptoolutils.convertToGrains(dopobjectnode)

Customize particle fluid dopnet for grains

doptoolutils.createLavaMaterial()
doptoolutils.createNewDopNetwork(root=<hou.Node at /obj>, name=None, init_dopnet=True)

Creates the AutoDopNetwork.

By default, the dop network is created at ‘/obj’ with the name ‘AutoDopNetwork’.

doptoolutils.createNewSimulation()

This method is called by the Create New Simulation menu button under the simulation (brain) icon.

doptoolutils.createObjectImportingDop(dopobjectnode, objname, sopnode=None)

Creates a new object that will hold a DOP import SOP for pulling the infomation from a DOP object.

doptoolutils.createSolver(dopsolvertype, mergeobjects, secondarysolvers=None)

Creates a DOP Solver node for the specified solver type. If the mergeobjects parameter is True, then all object for this solver type should be fed through the same solver node, and so we will return any existing DOP Solver node of this type. Otherwise we create a new solver node for each object. The secondarysolvers parameter specifies a list of additional solver types to use when searching for an existing solver.

doptoolutils.dopModifiersRemoveFromSimulation(dopmodifiers)
doptoolutils.dopObjectsRemoveFromSimulation(dopobjects)

Remove all specified DOP Objects from the simulation. This involves deleting DOP nodes associated with these DOP Object, and deleting any SOP nodes that extract information about these DOP Objects.

doptoolutils.enforceWiringOrder(firstnode, secondnode)

Mandates that first node is to the left of second node in the merge node that first accepts the two instances. One trick is that we want this in the direction of the displayNode, this simplifies the problem a fair bit

doptoolutils.ensureAllOrNoneObjectsListed(dopobjects)

Go through every selected DOP object and make sure that for each creator DOP node, either all or none of the objects on that node have been selected.

doptoolutils.findOrCreateMergeInput(solvernode, inputnum)

Creates a merge node as inputnum input to the solvernode. If a merge node already exists, return it. If a non merge node exists, it is made the first input of the new merge node.

doptoolutils.findOrCreateNamedMerge(solvernode, mergetype)

Creates a merge node as an input to the given solvernode. This function tries to resolve the different meanings of green inputs as they aren’t always at the same absolute offset.

Valid mergetypes are pre,advect, vel, post, and force.

doptoolutils.findSolverInInput(dopnode, solvertype)

Finds a node of the given solver type attached to the inputs of dopnode. Will detect if the dopnode is a multisolver, in which case the first input is ignored. This function looks for node type name component matches, which means that if solvertype specifies only a basename, eg ‘hda’, then it will also find higher versions and operators in non-global namespace, eg ‘hda::1.5’, ‘userx::hda’, ‘usery::hda::1.2’, etc.

doptoolutils.findSolverNode(dopnode, solvertype)

Checks all the ouputs of dopnode to see if their is a node of solver type. It also, however, will detect multisolvers and then chase up their solver branches looking for any solvers attached of this type. This function looks for a node whose type base name matches the given solvertype, which means that, for example, solvertype ‘hda’ will try to find higher versions and operators in non-global namespace as well, eg ‘hda::1.5’, ‘userx::hda’, ‘usery::hda::1.5’, etc.

doptoolutils.genericConvertToDopObject(objectnode, dopobjecttype, nodename, exact_node_type=True, nosopcooking=False, subtype=None)

Creates a DOP Object from a scene level object. The specific type of DOP Object to create is determined by the dopobjecttype parameter, which is the name od a DOP node type.

doptoolutils.genericDopConverterTool(sceneviewer, dopobjecttype, nodename, prompt=None, exact_node_type=True, subtype=None)

Creates DOP Objects of a particular type from a scene level object selection.

doptoolutils.genericDopFilterCreate(dopobjects, nodetypename, nodename, setgroup, exact_node_type=True)

Creates a generic DOP node that modifies a group of DOP Objects. This includes most forces like Gravity and Fan, as well as many other simple DOP nodes which don’t require extra selections or user input.

doptoolutils.genericDopFilterTool(sceneviewer, nodetypename, nodename, prompt=None, exact_node_type=True)

A generic tool for creating DOP nodes that modify a group of DOP Objects. This function prompts the user to select a group of DOP Objects, then creates the filter DOP node.

doptoolutils.genericDopObjectImport(dopobjectnode, objectnode, sopnode)

Creates a DOP Import SOP for pulling the information from a DOP Object back into the source scene level object.

doptoolutils.genericDopObjectInit(info, dopobjectnode, solvernode, objectnode, sopnode, subtype=None)

Generic initialization of dop objects. Creates a dopimport and sets up the usetransform flag. Returns the resulting dopimport.

doptoolutils.genericSetDopObjectActiveState(info, dopobject, active)

There is no standard method for changing the active state of a DOP object. Only specialized versions of this function can actually change an object’s active state.

doptoolutils.getCurrentDopNetwork(name=None)

Find the DOP Network that is to contain the automatically generated DOP nodes for our interactive DOP tools.

doptoolutils.getDopDataCreator(dopdata)

Returns the DOP node that created the supplied piece of DOP data.

doptoolutils.getDopNodeSolverNode(dopnode)
doptoolutils.getDopObjectCreator(dopobject)

Returns the DOP node that created the supplied DOP Object.

doptoolutils.getDopObjectSolverNode(dopobject)

Returns the node for the solver attached to a given DOP Object.

doptoolutils.getGroupString(dopobjects, useglob)

Determine if the selected DOP objects are all the objects in the simulation.

doptoolutils.getNodesImportingCreator(creator_object)

Finds all the nodes that are importing the given object and have the the render flag set.

doptoolutils.getNodesToDestroyWhenRemovingModifiers(dopmodifiers)
doptoolutils.getObjectSolverType(dopobject)

Returns the name of the DOP data type for the solver attached to a given DOP Object. This will return the multisolver, if present, so likely you should use hasObjectSolverType instead.

doptoolutils.getSimulatedDopNode(objectnode)

Checks to see if the object is associated with a DOP object. If so, returns the DOP Node it is associated with.

doptoolutils.getSimulatedDopObject(objectnode)

Checks to see if the object is associated with a DOP object. If so, returns the DOP Object it is associated with.

doptoolutils.getSolverPosition(dopsolvernode)

Returns the position of the supplied solver in the standard ordering of DOP Solver types. This ordering is designed to provide the best results in the majority of situations for having solvers that interact with each other.

doptoolutils.getSourceObjectNode(dopobject)

Returns the top level DOP node that created the supplied DOP Object. This starts with the DOP node that created the object, but this will almost always be an Empty Object DOP. From that starting point we climb up out of digital assets to find the node we really want (such as the RBD Object node).

doptoolutils.hasObjectSolverType(dopobject, searchsolvertype)

Returns true if the given dop data type exists as solver data on the given dop object. This includes all subdata of the Solver, so this works through multisolvers

doptoolutils.initDopNetwork(dopnet)

Initializes a dopnetwork with gravity

doptoolutils.isObjectSimulated(objectnode)

Check if the object is already associated with a DOP object. Any geometry with a dopobject attribute and an DOP Import SOP in the SOP cook chain is assumed to be simulated. Empty geometry isn’t simulated.

doptoolutils.makeMoltenLiquid(fluidnode, solvernode)
doptoolutils.mergeSolver(solvernode)

Connects a DOP Solver node into the final merge node in a generated DOP Network. Solvers are connected in a particular order based on the solver type, so we can’t simply connect the solver to the merge node.

doptoolutils.nodeFluidSolverNode(dopnode)

Heuristics to determine the fluid solver node attached most directly to the given dopnode.

doptoolutils.nodeFluidType(dopnode)

Heuristics to determine the type of fluid you have. Results are particlefluid, fluid, smoke, fire.

doptoolutils.nodeHasSolverNode(dopnode, solvertype)

Check if the given dop node has the given solver connected as a descendent. This is likely the safest way to see if something is a particle fluid, for example.

doptoolutils.objectFluidType(dopobject)

Heuristics to determine the type of fluid you have. Results are particlefluid, fluid, smoke, fire.

doptoolutils.objectHasGeometry(objectnode)

Check if a scene level object node contains any SOP nodes, and therefore creates any geometry.

doptoolutils.objectHasSolverNode(dopobject, solvertype)

Check if the given dop object’s node creator has the given solver connected as a descendent. This is likely the safest way to see if something is a particle fluid, for example.

doptoolutils.particlefluidDopInit(info, dopobjectnode, solvernode, subtype=None)
doptoolutils.particlefluidDopObjectInit(info, dopobjectnode, solvernode, objectnode, sopnode, subtype=None)

Setup the particle fluid specific parameters Note that info, objectnode, and sopnode may be None. A None for objectnode implies an empty fluid should be created.

doptoolutils.removeDopObjectsFromSimulation(dopnode, dopobjects, changes)

This function destroys nodes or changes their group fields to eliminate all processing of the objects being removed.

doptoolutils.selectedDopObjectsRemoveFromSimulation(scriptargs, prompt=None)
doptoolutils.selectedDopObjectsSetActiveState(scriptargs, active, prompt=None)

Set the active state of a group of DOP Objects.

doptoolutils.wireNodeAtEnd(dopnet, newdopnode, set_current=True)

Wires up the node after the current display DOP, but keeps it above the Output DOP (if one exists).