hou.DopObject class

A type of DOP data that contains an object in the simulation.

Inheritence: hou.DopData >

This object might be a rigid body, a fluid, cloth, etc. The type and properties of the DOP object are determined by the subdata attached to the object.

Methods

name(self)str

Return the name of this DOP object.

matches(self, pattern)bool

Return whether or not this object’s name matches a pattern. * will match any number of characters and ? will match any single character. The pattern string contains only one pattern, so spaces in the pattern will be compared against the object name.

>>> obj = hou.node("/obj/AutoDopNetwork").simulation().objects()[0]
>>> obj.name()
'box_object1'
>>> obj.matches("box*")
True
>>> obj.matches("c*")
False
>>> obj.matches("box* b*")
False
>>> obj.matches("b?x_object1")
True
objid(self)int

Return the index of this object in the output from hou.DopSimulation.objects. This method is a shortcut for self.options().field("objid").

See hou.DopData.id for an example.

Some fields in DOP records store an objid to refer to other objects. The following function looks up an object by objid:

def findObjectByObjid(dopnet_node, objid):
    return dopnet_node.simulation().objects()[objid]

areObjectsAffectors(self, object_sequence)

Not implemented yet

Given a sequence of DOP objects, return whether or not all of those obejcts are affectors of this object.

velocityAtPosition(self, position, use_point_velocity=True, use_volume_velocity=False)hou.Vector4

Not implemented yet

Given a hou.Vector3 position, return the velocity at that position in the simulation. This method accounts for the velocity and angular velocity store in the object’s “Position” data.

use_volume_velocity

Whether or not the velocity is affected by the volumetric representation of the geometry.

use_point_velocity

Whether or not the velocity is affected by the velocity attribute on the object’s geometry. When used, Houdini adds this velocity to the velocity in the Position data.

If both use_volume_velocity and use_point_velocity are set then the volume velocity is used.