class Agent(PackedPrim): """ hou.Agent An agent primitive. See Crowd Agents for more information. """ def setClipTimes(times): """ setClipTimes(times) Sets the current times for the agent's animation clips. Raises hou.GeometryPermissionError if this geometry is not modifiable. times A float sequence. """ pass def layers(self): """ layers(self) -> tuple of hou.AgentLayer Returns all of the layers that are available. This is equivalent to definition().layers(). """ pass def setDefinition(definition): """ setDefinition(definition) Changes the agent's definition. If the new definition's rig has a different number of transforms, the agent's current transforms will be reset. The agent's current clips will be reset if the new definition does not contain clips with the same names. Raises hou.GeometryPermissionError if this geometry is not modifiable. definition A hou.AgentDefinition. """ pass def collisionLayer(): """ collisionLayer(self) -> hou.AgentLayer Returns the current collision layer of the agent. """ pass def setWorldTransform(xform, index): """ setWorldTransform(xform, index) Sets the current world space transform of an agent primitive's bone. Raises hou.GeometryPermissionError if this geometry is not modifiable. xform A hou.Matrix4. index Index of a transform in the agent's rig. """ pass def clipWeights(): """None""" pass def rig(self): """ rig(self) -> hou.AgentRig Returns the agent's rig. This is equivalent to definition().rig(). """ pass def setClips(clips): """ setClips(clips) Sets the agent's current animation clips. Raises hou.GeometryPermissionError if this geometry is not modifiable. clips A hou.AgentClip sequence. """ pass def setCollisionLayer(layer): """ setCollisionLayer(layer) Sets the agent's current collision layer. Raises hou.GeometryPermissionError if this geometry is not modifiable. layer A hou.AgentLayer. """ pass def setLocalTransform(xform, index): """ setLocalTransform(xform, index) Sets the current local space transform of an agent primitive's bone. Raises hou.GeometryPermissionError if this geometry is not modifiable. xform A hou.Matrix4. index Index of a transform in the agent's rig. """ pass def localTransform(transform): """ localTransform(self, transform) -> hou.Matrix4 Returns the current local space transform of an agent primitive's bone. transform Index of a transform in the agent's rig. """ pass def clipCatalog(self): """ clipCatalog(self) -> tuple of hou.AgentClip Returns all of the animation clips that are available. This is equivalent to definition().clips(). """ pass def clipTimes(): """ clipWeights(self) -> tuple of float Returns the blend weights for the agent's animation clips. """ pass def shapeLibrary(self): """ shapeLibrary(self) -> hou.AgentShapeLibrary Returns the agent's shape library. This is equivalent to definition().shapeLibrary(). """ pass def worldTransform(transform): """ worldTransform(self, transform) -> hou.Matrix4 Returns the current world space transform of an agent primitive's bone. transform Index of a transform in the agent's rig. """ pass def setCurrentLayer(layer): """ setCurrentLayer(layer) Sets the agent's current display layer. Raises hou.GeometryPermissionError if this geometry is not modifiable. layer A hou.AgentLayer. """ pass def clips(): """ clips(self) -> tuple of hou.AgentClip Returns the agent's current animation clips. """ pass def setClipWeights(weights): """ setClipWeights(weights) Sets the blend weights for the agent's animation clips. Raises hou.GeometryPermissionError if this geometry is not modifiable. weights A float sequence. """ pass def definition(): """ definition(self) -> hou.AgentDefinition Returns the shared agent definition. """ pass def currentLayer(): """ currentLayer(self) -> hou.AgentLayer Returns the current display layer of the agent. """ pass class AgentClip(object): """ hou.AgentClip An agent's animation clip. See Crowd Animation Clips for more information. """ def sampleCount(): """ sampleCount(self) -> int Returns the number of samples in the clip. """ pass def setLocalTransforms(sample, xforms): """ setLocalTransforms(self, sample, xforms) Edits the local transforms for a sample in the clip. Raises hou.GeometryPermissionError if the clip is not modifiable. sample Index of a sample in the clip. xforms A sequence of hou.Matrix4, with a local space transform for each joint in the rig. Raises hou.InvalidSize if the length does not match hou.AgentRig.transformCount. """ pass def freeze(): """ freeze(self) -> hou.AgentClip Creates a modifiable copy of the clip. The copy will not be marked as an external reference. """ pass def sample(time, channel_name): """ sample(self, time, channel_name) -> float time The time (in seconds) to evaluate the clip at. channel_name Name of a channel in the clip. See hou.AgentClip.channelNames. Evaluates the clip at the given time and returns the value of the specified channel. For sampling the clip's transforms, use hou.AgentClip.sampleLocal or hou.AgentClip.sampleWorld. """ pass def sampleWorld(time, transform): """ sampleWorld(self, time, transform) -> hou.Matrix4 time The time (in seconds) to evaluate the clip at. transform Index of a transform in the agent's rig. Evaluates the clip at the given time and returns the world transform. """ pass def isExternalReference(self): """ isExternalReference(self) -> bool Returns a bool indicating whether the clip references a file on disk. """ pass def sampleLocal(time, transform): """ sampleLocal(self, time, transform) -> hou.Matrix4 time The time (in seconds) to evaluate the clip at. transform Index of a transform in the agent's rig. Evaluates the clip at the given time and returns the local transform. """ pass def fileName(expanded, =, False): """ fileName(self, expanded = False) -> str If the clip is an external reference, returns the path to the file on disk. expanded Specifies whether to expand any variables in the path, such as $HIP. """ pass def worldTransforms(sample): """ worldTransforms(self, sample) -> tuple of hou.Matrix4 Returns the world space transforms for the specified sample. The number of entries matches hou.AgentRig.transformCount. sample Index of a sample in the clip. """ pass def addChannel(name, samples): """ addChannel(self, name, samples) Creates an additional channel in the clip. If a channel already exists with the same name, the previous samples will be overwritten. Raises hou.GeometryPermissionError if the clip is not modifiable. name The name of the channel. `samples A float sequence containing the channel's data. Raises hou.InvalidSize if the length does not match hou.AgentClip.sampleCount. """ pass def name(): """ name(self) -> str Returns the name of the clip. """ pass def data(binary, worldspace, =, False): """ data(self, binary, worldspace = False) -> str Returns the clip data in ASCII or binary. binary Specifies whether the clip data should be saved in ASCII (.clip) or binary (.bclip) format. worldspace Specifies whether the transform channels should be saved in local or world space. """ pass def channelNames(): """ channelNames(self) -> tuple of str Returns the names of the additional (non-transform) channels in the clip. These channels can be sampled with hou.AgentClip.sample. """ pass def localTransforms(sample): """ localTransforms(self, sample) -> tuple of hou.Matrix4 Returns the local space transforms for the specified sample. The number of entries matches hou.AgentRig.transformCount. sample Index of a sample in the clip. """ pass def length(): """ length(self) -> float Returns the length (in seconds) of the clip. """ pass def sampleRate(): """ sampleRate(self) -> float Returns the sample rate of the clip. """ pass def AgentClip_swigregister(): """None""" pass class AgentDefinition(object): """ hou.AgentDefinition The shared data for an agent primitive. An agent definition includes a rig, shape library, layers, and clips, and can be shared between agent primitives. See Agent Primitives for more information. Since an agent definition is shared between copies of an agent primitive (such as agents in an upstream SOP's geometry), the definition returned by hou.Agent.definition is read-only. The hou.AgentDefinition.freeze method can be used to create a modifiable copy of an agent definition. RELATED * hou.crowds.findAgentDefinitions """ def removeClip(name): """ removeClip(self, name) Removes a clip from the agent definition. Raises hou.GeometryPermissionError if the agent definition is not modifiable. name The name of the clip to remove. """ pass def addClip(clip): """ addClip(self, clip) Adds a clip to the agent definition. Raises hou.GeometryPermissionError if the agent definition is not modifiable. Raises hou.OperationFailed if the clip is associated with a different rig. clip A hou.AgentClip. """ pass def freeze(new_shapelib, =, None): """ freeze(self, new_shapelib = None) -> hou.AgentDefinition Creates a modifiable copy of the agent definition. Use hou.Agent.setDefinition to change one or more agents to use the new agent definition. new_shapelib If specified, the copied agent definition and its layers will reference the new shape library. """ pass def findTransformGroup(name): """ findTransformGroup(self, name) -> hou.AgentTransformGroup Finds the transform group with the specified name, or None if no such group exists. """ pass def removeLayer(name): """ removeLayer(self, name) Removes a layer from the agent definition. Raises hou.GeometryPermissionError if the agent definition is not modifiable. name The name of the layer to remove. """ pass def rig(): """ rig(self) -> hou.AgentRig Returns the agent definition's rig. """ pass def layers(): """ layers(self) -> tuple of hou.AgentLayer Returns a list of the layers in the agent definition. """ pass def transformGroups(): """ transformGroups(self) -> tuple of hou.AgentTransformGroup Returns a list of the transform groups in the agent definition. """ pass def findLayer(name): """ findLayer(self, name) -> hou.AgentLayer Finds the layer with the specified name, or None if no such layer exists. """ pass def findClip(name): """ findClip(self, name) -> hou.AgentClip Finds the clip with the specified name, or None if no such clip exists. """ pass def removeTransformGroup(name): """ removeTransformGroup(self, name) Removes a transform group from the agent definition. Raises hou.GeometryPermissionError if the agent definition is not modifiable. name The name of the transform group to remove. """ pass def shapeLibrary(): """ shapeLibrary(self) -> hou.AgentShapeLibrary Returns the agent definition's shape library. """ pass def clips(): """ clips(self) -> tuple of hou.AgentClip Returns a list of the clips in the agent definition. """ pass def addTransformGroup(group): """ addTransformGroup(self, group) Adds a transform group to the agent definition. Raises hou.GeometryPermissionError if the agent definition is not modifiable. Raises hou.OperationFailed if the group is associated with a different rig. group A hou.AgentTransformGroup. """ pass def addLayer(layer): """ addLayer(self, layer) Adds a layer to the agent definition. Raises hou.GeometryPermissionError if the agent definition is not modifiable. Raises hou.OperationFailed if the layer is associated with a different rig or shape library. layer A hou.AgentLayer. """ pass def AgentDefinition_swigregister(): """None""" pass class AgentLayer(object): """ hou.AgentLayer An agent's layer. See Agent Layers for more information. """ def asJSON(): """ asJSON(self) -> str Returns a string containing the JSON that represents the layer. """ pass def fileName(expanded, =, False): """ fileName(self, expanded = False) -> str If the layer is an external reference, returns the path to the file on disk. expanded Specifies whether to expand any variables in the path, such as $HIP. """ pass def staticBindings(): """ staticBindings(self) -> tuple of hou.AgentShapeBinding Returns the shape bindings in the layer which reference static shapes. """ pass def isExternalReference(self): """ isExternalReference(self) -> bool Returns a bool indicating whether the layer references a file on disk. """ pass def deformingBindings(): """ deformingBindings(self) -> tuple of hou.AgentShapeBinding Returns the shape bindings in the layer which reference deforming shapes. """ pass def bindings(transform, =, None): """ bindings(self, transform = None) -> tuple of hou.AgentShapeBinding Returns the list of shape bindings in the layer. transform Index of a transform in the agent's rig. If specified, only the shape bindings attached to the specified transform will be returned. """ pass def name(): """ name(self) -> str Returns the name of the layer. """ pass def AgentLayer_swigregister(): """None""" pass class AgentRig(object): """ hou.AgentRig The rig of an agent primitive. See Crowd Agents for more information. """ def transformName(transform): """ transformName(self, transform) -> str Returns the name of the specified transform. transform Index of a transform in the rig. """ pass def findTransform(transform_name): """ findTransform(self, transform_name) -> int Returns the index of the transform with the given name, or -1 if the transform name is invalid. transform_name Name of a transform in the rig. """ pass def fileName(expanded, =, False): """ fileName(self, expanded = False) -> str If the rig is an external reference, returns the path to the file on disk. expanded Specifies whether to expand any variables in the path, such as $HIP. """ pass def isExternalReference(self): """ isExternalReference(self) -> bool Returns a bool indicating whether the rig references a file on disk. """ pass def parentIndex(transform): """ parentIndex(self, transform) -> int Returns the parent of the specified transform, or -1 if the transform is a root of the transform hierarchy. transform Index of a transform in the rig. """ pass def name(): """ name(self) -> str Returns the name or filename of the rig. """ pass def asJSON(): """ asJSON(self) -> str Returns a string containing the JSON that represents the rig. """ pass def transformCount(): """ transformCount(self) -> int Returns the number of transforms in the rig. """ pass def childIndices(transform): """ childIndices(self, transform) -> tuple of int Returns the children of the specified transform. transform Index of a transform in the rig. """ pass def AgentRig_swigregister(): """None""" pass class AgentShape(object): """ hou.AgentShape An agent's shape. See Crowd Agents for more information. """ def geometry(): """ geometry(self) -> hou.Geometry Returns the shape's geometry. """ pass def uniqueId(): """ uniqueId(self) -> int Returns the shape's globally unique id. """ pass def name(): """ name(self) -> str Returns the shape's name, which is unique within a shape library. """ pass class AgentShapeBinding(object): """ hou.AgentShapeBinding A shape binding in an agent's layer. A shape binding attaches a shape from the agent's shape library to a transform in the agent's rig. See Agent Layers for more information. """ def transformId(): """ transformId(self) -> int Returns the index of the transform in the agent's rig that the shape is attached to. """ pass def isAttachedToTransform(self): """ isAttachedToTransform(self) -> bool Returns whether the shape is attached to a transform in the agent's rig. """ pass def shapeId(): """ shapeId(self) -> int Returns the unique id of the shape. This is equivalent to shape().uniqueId(). """ pass def boundsScale(): """ boundsScale(self) -> float Returns the scale factor for the shape's bounding box. """ pass def isDeforming(): """ isDeforming(self) -> bool Returns whether the shape is static or deforming. """ pass def shape(): """ shape(self) -> hou.AgentShape Returns the referenced shape. """ pass def shapeName(): """ shapeName(self) -> str Returns the name of the shape. This is equivalent to shape().name(). """ pass def deformer(): """ deformer(self) -> hou.AgentShapeDeformer Returns the deformer used for the shape, or None if the shape binding is static. """ pass def AgentShapeBinding_swigregister(): """None""" pass class AgentShapeDeformer(object): """ hou.AgentShapeDeformer A deformer for agent shapes. Agent shape deformers are used to provide different deformation methods for shapes, such as linear skinning or dual quaternion skinning. Each shape binding can specify the deformer that should be used. The hou.crowds.shapeDeformers method provides a list of the available deformers. """ def name(): """ name(self) -> str Returns the unique name for the deformer. """ pass def AgentShapeDeformer_swigregister(): """None""" pass class AgentShapeLibrary(object): """ hou.AgentShapeLibrary The shape library of an agent primitive. See Crowd Agents for more information. """ def freeze(keep_external_ref, =, False): """ freeze(self, keep_external_ref = False) -> hou.AgentShapeLibrary Creates a modifiable copy of the shape library. keep_external_ref If the original shape library referenced a file on disk, specifies whether the new shape library should be marked as _including_ the original library. In this situation, saving out the new shape library will only write out shapes that were not included from the original library, along with the path to the included shape library. Otherwise, saving out the new shape library will produce a standalone library containing all of the shapes. """ pass def isExternalReference(self): """ isExternalReference(self) -> bool Returns a bool indicating whether the shape library references a file on disk. """ pass def fileName(expanded, =, False): """ fileName(self, expanded = False) -> str If the shape library is an external reference, returns the path to the file on disk. expanded Specifies whether to expand any variables in the path, such as $HIP. """ pass def data(): """ data(self) -> hou.Geometry Returns the geometry representation of the shape library, which can be saved to disk. """ pass def name(): """ name(self) -> str Returns the name or filename of the shape library. """ pass def addShape(name, geometry): """ addShape(self, name, geometry) -> hou.AgentShape Adds a new shape to the shape library. Raises hou.GeometryPermissionError if the shape library is not modifiable. name The name for the new shape. geometry A hou.Geometry containing the shape's geometry. """ pass def shapes(): """ shapes(self) -> tuple of hou.AgentShape Returns a list of all shapes in the shape library. """ pass def findShape(shape_name): """ findShape(self, shape_name) -> hou.AgentShape Finds the shape with the specified name, or None if no such shape exists. """ pass def AgentShapeLibrary_swigregister(): """None""" pass def AgentShape_swigregister(): """None""" pass class AgentTransformGroup(object): """ hou.AgentTransformGroup A group of transforms in an agent's rig. See Crowd Agents for more information. """ def asJSON(): """ asJSON(self) -> str Returns a string containing the JSON representation of the group. """ pass def transformIndices(): """ transformIndices(self) -> tuple of int Returns a list containing the index of each transform in the group. """ pass def fileName(expanded, =, False): """ fileName(self, expanded = False) -> str If the transform group is an external reference, returns the path to the file on disk. expanded Specifies whether to expand any variables in the path, such as $HIP. """ pass def weights(): """ weights(self) -> tuple of float Returns a list containing the weight of each transform in the group. """ pass def isExternalReference(self): """ isExternalReference(self) -> bool Returns a bool indicating whether the transform group references a file on disk. """ pass def name(): """ name(self) -> str Returns the name of the transform group. """ pass def AgentTransformGroup_swigregister(): """None""" pass def Agent_swigregister(): """None""" pass class AssetBrowser(PathBasedPaneTab): """None""" def storeSyncSessionKey(): """None""" pass def installRequiredDefinitionsForNodeTypeName(): """None""" pass def reload(): """None""" pass def storeUpdateSessionKey(): """None""" pass def updateAssetDownloadFraction(): """None""" pass def AssetBrowser_swigregister(): """None""" pass class Attrib(object): """ hou.Attrib This class stores information about a Geometry attribute. An attribute describes extra data you can attach to different elements of geometry. The attribute values are the individual instances of that data, and for each attribute there is exactly one attribute value per geometry element. For example, if you look at the points in Houdini's geometry spreadsheet, the point numbers are listed down the side, the point attributes are listed across the top, and the point attribute values are contained in the table. The attribute specifies which elements store the attribute values: points, primitives, or vertices. An attribute can also be global (also known as a detail attribute), in which case there is one instance of the attribute value in the geometry. The attribute also specifies the data type of the attribute values. To look up existing attributes, use hou.Geometry.findPointAttrib, hou.Geometry.findPrimAttrib, hou.Geometry.findVertexAttrib, and hou.Geometry.findGlobalAttrib. To add a new attribute, use hou.Geometry.addAttrib. NOTE Point positions are stored in a point attribute named P and point weights are stored in Pw. See hou.Point.position and hou.Point.weight for more information. """ def optionType(name): """ optionType(self, name) -> hou.fieldType enum value Return a hou.fieldType enumerated value that describes the type of data stored in an option. Returns hou.fieldType.NoSuchField if no field exists with that name. """ pass def option(): """None""" pass def removeOption(name): """ removeOption(self, name) Remove an entry in the dictionary of options. See hou.Attrib.options for more information. Raises hou.OperationFailed if there is no entry in the dictionary with this name. """ pass def dataType(): """ dataType(self) -> hou.attribData enum value Return the attribute's data type (int, float or string). The size of the attribute also determines the format of the attribute values. For example, if the data type is int and the size is 3, the attribute value will be a tuple of 3 ints. If the size was 1, the attribute value would simply be an int. Note that a string attribute's size must be 1. """ pass def isTransformedAsNormal(): """ isTransformedAsNormal(self) -> bool Return whether attribute values in the geometry are automatically transformed as a normal when Houdini transforms (e.g. rotates) the geometry. For more information, see the hou.Geometry.addAttrib, in the transform_as_normal parameter documentation. """ pass def defaultValue(): """ defaultValue(self) -> int or float or str or tuple Return the attribute's default value. Returns a single int/float/string for attributes of size 1 and a tuple of values for attributes with more than one component. This method is useful when duplicating an attribute. See hou.Geometry.addAttrib for an example. """ pass def strings(): """ strings(self) -> tuple of str Return the string table for this attribute. If the attribute is not a string, returns an empty tuple. A string attribute does not store each string value inside the attribute element (i.e. point, primitive, etc.). Instead, the unique string attribute values are stored in a table inside the attribute, and each attribute value stores an index to that string. For example, suppose this attribute stores strings on points. If all points have the attribute value "foo" then the string table will be just ("foo",) and each point will store the index 0. When you set some points' values to "bar", Houdini adds sets the string table to ("foo", "bar") and sets stores the index 1 in those points. When you set one of those points back to "foo", Houdini leaves the string table unchanged and stores the index 0 in that point. When using string attribute values, this implementation is hidden from you, and you get and set those attributes as strings. This method is provided only in case you need access to the string table. """ pass def size(): """ size(self) -> int Return the number of data components in the attribute value. See hou.Attrib.dataType for more information. """ pass def name(): """ name(self) -> str Return the attribute's name. Each attribute in the geometry has a unique name. """ pass def geometry(): """ geometry(self) -> hou.Geometry Return the Geometry object containing this attribute. """ pass def setSize(): """ setSize(self) Sets the number of data components in the attribute value. See hou.Attrib.dataType for more information. """ pass def setOption(name, value, type_hint, =, hou.fieldType::NoSuchField): """ setOption(self, name, value, type_hint = hou.fieldType::NoSuchField) Set an entry in the dictionary of options. See hou.Attrib.options for more information. name The name of the option to set. value An integer, float, string, hou.Vector2, hou.Vector3, hou.Vector4, hou.Quaternion, hou.Matrix3, hou.matrix4, or sequence of numbers. type_hint Used to determine the exact hou.fieldType desired when the specified value type is not enough to unambiguously determine it. """ pass def indexPairPropertyTables(): """ indexPairPropertyTables(self) -> tuple of hou.IndexPairPropertyTable Return the property tables for this attribute. If the attribute is not an index pair, returns an empty tuple. """ pass def qualifier(): """ qualifier(self) -> str Return the attribute's type qualifier. The qualifier is a description of the data contained in the attribute. An empty string is returned if the attribute has no numeric representation or if the attribute is the pseudo Pw point attribute. """ pass def options(name): """ option(self, name) -> bool, int, float, str, hou.Vector2, hou.Vector3, hou.Vector4, hou.Quaternion, hou.Matrix3, hou.Matrix4, tuple of int, or tuple of float Return the value of an individual option, on None if no such option exists. See also hou.Attrib.options, hou.Attrib.setOption and hou.Attrib.removeOption. """ pass def boostAnyDefaultValue(): """None""" pass def isArrayType(): """ isArrayType(self) -> bool Return True if the attribute is a type that contains array data (i.e. Float Array, Integer Array, String Array) and False otherwise. """ pass def destroy(): """ destroy(self) Remove this attribute from the geometry. You would typically call this method from the code of a Python-defined SOP. Raises hou.GeometryPermissionError if this geometry is not modifiable. Raises hou.OperationFailed if you try to destroy the P or Pw point attributes. """ pass def isTransformedAsVector(): """None""" pass def type(): """ type(self) -> hou.attribType enum value Return the type of attribute (point, primitive, vertex, or global). """ pass def Attrib_swigregister(): """None""" pass class BaseKeyframe(object): """ hou.BaseKeyframe Abstract base class for all keyframe class. REPLACES * chkey * chkeyls * chkey * chround * chsraw() * lock() * opscript """ def isExpressionSet(): """ isExpressionSet(self) -> bool Returns whether the keyframe's expression is set. See setExpression() and expression(). """ pass def frame(): """ frame(self) -> double Returns the keyframe's frame number. This function raises hou.KeyframeValueNotSet if the frame or time has not been set. See setFrame() and setTime(). """ pass def expressionLanguage(): """ expressionLanguage(self) -> hou.exprLanguage enum value Returns the keyframe's expression's language. This function raises hou.KeyframeValueNotSet if an expression language has not ben set. See setExpression(), and isExpressionLanguageSet(). """ pass def evaluatedType(): """ evaluatedType(self) -> hou.parmData enum value Returns the type that the keyframe evaluates to. """ pass def setTime(time): """ setTime(self, time) Sets the keyframe's time in seconds. Using the number of frames per second (hou.fps), setting the time also sets the frame number. For example, with an fps of 24, then setting the time to 2 seconds will set the frame number to 49. See time(). """ pass def setExpression(expression, language=None): """ setExpression(self, expression, language=None) Sets the keyframe's expression and language. This function raises hou.TypeError if language is not a value from hou.exprLanguage. See expression(), expressionLanguage(), isExpressionSet(), isExpressionLanguageSet(). """ pass def setFrame(frame): """ setFrame(self, frame) Sets the keyframe's frame number. Using the number of frames per second (hou.fps), setting the frame number also sets the time. For example, with an fps of 24, then setting the frame number to 49 will set the time to 2 seconds. See frame(). """ pass def asCode(brief=False, save_keys_in_frames=False, function_name=None): """ asCode(self, brief=False, save_keys_in_frames=False, function_name=None) -> str Returns a script of Python statements that can be executed to create the keyframe. To run the script, use either Python's exec or execfile functions. brief When is True, the output script omits commands for setting unused values, slopes and accelerations. This parameter only applies to non-string keyframes. The value of must be either True or False. save_keys_in_frames When is True, asCode outputs commands for setting channel and key times in samples (frames) instead of seconds. The value of must be either True or False. function_name If is specified, then the output script is wrapped in a Python function definition with the given name. must be a non-zero length string consisting of only alphanumeric and underscore characters. Any invalid characters are internally converted to underscores. The function returns a reference to the newly created keyframe object. Here is an example of saving the output to a file and then loading it back into Houdini: > # Get a reference to the target keyframe. > tx_parm = hou.parm("/obj/geo1/tx") > key = tx_parm.keyframes()[0] > > # Execute asCode and write the output script to file. > script = key.asCode() > f = open("create_key.py", "w") > f.write(script) > f.close() > > # Execute the script. The new keyframe will be stored > # in the 'hou_keyframe' variable. > execfile("create_key.py") > > # Commit the keyframe back into the node parameter. > tx_parm.setKeyframe(hou_keyframe) Here is an example of saving the output into a function and then calling it in Houdini: > # Get a reference to the target keyframe. > tx_parm = hou.Node("/obj/geo1").Parm("tx") > key = tx_parm.keyframes()[0] > > # Execute asCode and write the function definition to file. > func = key.asCode(function_name="createKeyframe") > f = open("keylib.py", "w") > f.write(func) > f.close() > > # Call the function definition. > import keylib > hou_keyframe = keylib.createKeyframe() > > # Commit the keyframe back into the node parameter. > tx_parm.setKeyframe(hou_keyframe) """ pass def isTimeSet(): """ isTimeSet(self) -> bool Returns whether the keyframe's time is set. See setTime() and time(). """ pass def time(): """ time(self) -> double Returns the keyframe's time in seconds. This function raises hou.KeyframeValueNotSet if the time or frame has not been set. See setTime() and setFrame(). """ pass def expression(): """ expression(self) -> str Returns the keyframe's expression. For example, in cases where the keyframe has had two values set the interpolating function is returned e.g. "bezier()", "spline()" etc. This function raises hou.KeyframeValueNotSet if an expression has not been set. See setExpression() and isExpressionSet(). """ pass def isExpressionLanguageSet(): """ isExpressionLanguageSet(self) -> bool Returns whether the keyframe expression's language is set. See setExpression() and expressionLanguage(). """ pass def BaseKeyframe_swigregister(): """None""" pass class BoundingBox(object): """ hou.BoundingBox An axis-aligned 3D rectangular region. For example, a bounding box might describe a piece of geometry's minimum and maximum values on each of the coordinate axes. See hou.Geometry.boundingBox for an example of a function that returns a bounding box. """ def almostEqual(): """None""" pass def isValid(): """ isValid(self) -> bool Returns whether this bounding box is valid. """ pass def enlargeToContain(point_or_bbox): """ enlargeToContain(self, point_or_bbox) Enlarge the bounding box to contain the given element. The element may be a sequence of 3 floats (such as a hou.Vector3) describing a position or another bounding box. If this box does not need to grow because it already completely contains the element, it won't be modified. """ pass def sizevec(): """ sizevec(self) -> hou.Vector3 Return a vector describing the size of the box in each of the x, y, and z axes. This method can be implemented as follows: > def sizevec(self): > return self.maxvec() - self.minvec() """ pass def setTo(bounds_sequence): """ setTo(self, bounds_sequence) Given a sequence of (xmin, ymin, zmin, xmax, ymax, zmax) values, set the position of the bounding box. Raises hou.InvalidSize if the tuple does not contain six elements. """ pass def isAlmostEqual(bbox, tolerance=0.00001): """ isAlmostEqual(self, bbox, tolerance=0.00001) -> bool Returns whether this bounding box is equal to another, subject to numerical tolerances. """ pass def minvec(): """ minvec(self) -> hou.Vector3 Return a vector describing the corner of the box with the smallest x, y, and z values. """ pass def center(): """ center(self) -> hou.Vector3 Return the position of the center of the bounding box. This method can be implemented as follows: > def sizevec(self): > return (self.minvec() + self.maxvec()) * 0.5 """ pass def _asVoidPointer(): """None""" pass def contains(point): """ contains(self, point) Given a sequence of 3 floats (such as a hou.Vector3) describing a position, return whether the position is inside the box. """ pass def maxvec(): """ maxvec(self) -> hou.Vector3 Return a vector describing the corner of the box with the largest x, y, and z values. """ pass def BoundingBox_swigregister(): """None""" pass class BoundingRect(object): """ hou.BoundingRect An axis-aligned 2D rectangular region. A bounding rectangle can describe the size and location of a node in a network, or the visible area or a network editor pane. """ def intersects(rect): """ intersects(self, rect) -> bool Given a hou.BoundingRect object, return whether that rectangle partially or fully overlaps the one described by this object. > >>> unitrect = hou.BoundingRect(0, 0, 1, 1) > >>> unitrect.intersects(hou.BoundingRect(0.5, 0.5, 1.0, 1.0)) > True > >>> unitrect.intersects(hou.BoundingRect(0.5, 0.5, 1.5, 1.5)) > True > >>> unitrect.intersects(hou.BoundingRect(1.5, 1.5, 2.5, 2.5)) > False """ pass def max(): """ max(self) -> hou.Vector2 Return a vector describing the corner of the rectangle with the largest x and y values. """ pass def enlargeToContain(point_or_rect): """ enlargeToContain(self, point_or_rect) Enlarge the bounding rectangle to contain the given element. The element may be a sequence of 2 floats (such as a hou.Vector2) describing a position or another bounding rectangle. If this rectangle does not need to grow because it already completely contains the element, it won't be modified. > >>> unitrect = hou.BoundingRect(0, 0, 1, 1) > >>> unitrect.enlargeToContain((2, 0.5)) > >>> unitrect > > >>> unitrect = hou.BoundingRect(0, 0, 1, 1) > >>> unitrect.enlargeToContain(hou.BoundingRect(0.5, 0.5, 2, 1.5)) > >>> unitrect > """ pass def setTo(bounds_sequence): """ setTo(self, bounds_sequence) Given a sequence of (xmin, ymin, xmax, ymax) values, set the position of the bounding rectangle. Raises hou.InvalidSize if the tuple does not contain four elements. """ pass def isAlmostEqual(rect, tolerance=0.00001): """ isAlmostEqual(self, rect, tolerance=0.00001) -> bool Returns whether this bounding rectangle is equal to another, subject to numerical tolerances. > >>> unitrect = hou.BoundingRect(0, 0, 1, 1) > >>> subrect = hou.BoundingRect(0.001, 0.001, 0.999, 1.001) > >>> unitrect.isAlmostEqual(subrect) > False > >>> unitrect.isAlmostEqual(subrect, 0.01) > True """ pass def size(): """ size(self) -> hou.Vector2 Return a vector describing the size of the rectangle in each of the x and y axes. This method can be implemented as follows: > def size(self): > return self.max() - self.min() """ pass def scale(scale): """ scale(self, scale) Scales this rectangle by the amount specified in the two float tuple or hou.Vector2 passed as the scale parameter. Note that scaling the rectangle by a negative value will result in an invlalid rectangle where the lower left corner is above or to the right of the upper right corner. > >>> rect = hou.BoundingRect(1, 1, 2, 2) > >>> rect.scale(hou.Vector2(2, 3)) > >>> rect > > >>> rect.scale((-1, -1)) > >>> rect > > >>> rect.isValid() > False """ pass def center(): """ center(self) -> hou.Vector2 Return the position of the center of the bounding rectangle. This method can be implemented as follows: > def center(self): > return (self.min() + self.max()) * 0.5 """ pass def min(): """ min(self) -> hou.Vector2 Return a vector describing the corner of the rectangle with the smallest x and y values. """ pass def getOffsetToAvoid(bounds, direction, =, None): """ getOffsetToAvoid(self, bounds, direction = None) -> hou.Vector2 Return a vector describing the minimum distance this rectangle must be translated to avoid any overlap with the bounds rectangle. If direction is provided as a hou.Vector2, it indicates the specific direction the returned offset should be. If the rectangles do not overlap, the result will be hou.Vector2(0.0, 0.0). > >>> unitrect = hou.BoundingRect(0, 0, 1, 1) > >>> subrect = hou.BoundingRect(0.2, 0.4, 0.8, 0.6) > >>> unitrect.getOffsetToAvoid(subrect) > > >>> unitrect.getOffsetToAvoid(subrect, hou.Vector2(1.0, 0.0)) > > >>> unitrect.getOffsetToAvoid(subrect, hou.Vector2(1.0, 1.0)) > """ pass def _asVoidPointer(): """None""" pass def contains(rect): """ contains(self, rect) -> bool Given a hou.BoundingRect object, return whether that rectangle is inside the one described by this object. > >>> unitrect = hou.BoundingRect(0, 0, 1, 1) > >>> unitrect.contains(hou.BoundingRect(0.5, 0.5, 1.0, 1.0)) > True > >>> unitrect.contains(hou.BoundingRect(0.5, 0.5, 1.5, 1.5)) > False """ pass def closestPoint(point): """ closestPoint(self, point) -> hou.Vector2 Given a sequence of 2 floats (such as a hou.Vector2) describing a position, return the position inside the rectangle that is closest to the provided point. > >>> unitrect = hou.BoundingRect(0, 0, 1, 1) > >>> unitrect.closestPoint((0.5, 0.5)) > > >>> unitrect.closestPoint((100, 0.5)) > > >>> unitrect.closestPoint((-10, -5)) > """ pass def intersect(rect): """ intersect(self, rect) Given a hou.BoundingRect object, updates the rectangle in this object to be the region where the two rectangles overlap. > >>> rect = hou.BoundingRect(0, 0, 1, 1) > >>> rect.intersect(hou.BoundingRect(0.5, 0.5, 1.5, 1.5)) > >>> rect > """ pass def isValid(): """ isValid(self) -> bool Returns whether this bounding rectangle is valid, indicating it has been initialized in any way. > >>> hou.BoundingRect().isValid() > False > >>> hou.BoundingRect(0, 0, 0, 0).isValid() > True > >>> hou.BoundingRect(0, 0, 0, 0).isValid() > True """ pass def expand(offset): """ expand(self, offset) Moves the edges of the rectangle away from its center by the distances specified in the two float tuple or hou.Vector2 passed as the offset parameter. The offset is applied to both sides of the rectangle so actually changes the width and height of the rectangle by twice the passed in values. Negative values can be passed into the offset to shrink the rectangle, but shrinking the rectangle by more than its current size will result in an invliad rectangle. > >>> rect = hou.BoundingRect(1, 1, 2, 2) > >>> rect.expand((1, 1)) > >>> rect > > >>> rect.expand((0, -2)) > >>> rect > > >>> rect.isValid() > False """ pass def translate(offset): """ translate(self, offset) Moves this rectangle by the amount specified in the two float tuple or hou.Vector2 passed as the offset parameter. > >>> rect = hou.BoundingRect(1, 1, 2, 2) > >>> rect.translate(hou.Vector2(1, -1)) > >>> rect > """ pass def BoundingRect_swigregister(): """None""" pass class Bundle(object): """ hou.NodeBundle A named set of nodes whose contents can be from different networks. A bundle's contents may be fixed or may be determined from a pattern, and the contents may be filtered by node type. Unlike node groups, the nodes in a bundle may be from different node networks. For example, the same bundle may contain /obj/geo1 and /obj/subnet1/geo2. Node groups are primarily used to organize and display very large networks, while node bundles are normally used to track which objects are lit by a light, which objects are visible in a scene, etc. There are two types of node bundles: regular and smart. You can add and remove individual nodes to and from a regular bundle. The nodes in a smart bundle, on the other hand, are determined from a pattern stored in the bundle. As nodes matching the pattern are created or deleted in Houdini, the contents of the bundle will update automatically. You can use hou.NodeBundle.pattern to determine if the bundle is a smart bundle or a regular one. When a node matches the pattern in a smart bundle, that node and its children will be added to the bundle. For example, if the pattern in "/obj/*" and /obj/box_object1 is a geometry object, all the nodes inside /obj/box_object1 will be added to the bundle, recursively. Carets (^) in the pattern can be used to remove nodes; for example, "/obj/* ^/obj/geo1" will match everything in /obj except for /obj/geo1. A bundle may also have a filter to specify what types of nodes may be in the bundle. See hou.nodeTypeFilter for the possible filters. If you try to add a node to a regular bundle but the node does not match the filter, Houdini will fail to add the node. For smart bundles, the filter is applied after doing any pattern matching. For example, if the pattern is "/obj/*" and the filter is hou.nodeTypeFilter.Obj, the bundle will contain only the objects in /obj, without any SOPs, etc. inside them. Because the pattern is applied recursively, however, any objects inside object subnets will also be in the bundle. To specify a bundle in a node parameter that expects a list of nodes, prefix the bundle name with @. For example, you can enter @bundle1 in the light mask parameter of an object so it is lit by the nodes inside the bundle named bundle1. You can view and edit node bundles in Houdini's Bundle List pane. Use hou.nodeBundle_ and hou.nodeBundles to access existing node bundles, and hou.addNodeBundle to create a new bundle. """ def setPattern(pattern_or_none): """ setPattern(self, pattern_or_none) Change the pattern of this bundle. Setting the pattern to None changes the bundle into a regular bundle. In this case, the bundle's contents are unchanged, but Houdini will no longer do pattern matching to determine the bundle's contents. If the pattern is a string, the bundle becomes a smart bundle and its contents immediately change to match the pattern. The bundle's contents will update as nodes are created and deleted in Houdini. See hou.NodeBundle.pattern and the class documentation for more information. """ pass def addNode(node): """ addNode(self, node) Add a node to the bundle. Raises hou.OperationFailed if this bundle is a smart bundle, since the contents of smart bundles are automatically determined by their pattern. """ pass def setSelected(on, clear_all_selected=false): """ setSelected(self, on, clear_all_selected=false) Select this bundle in the bundle list pane. If clear_all_selected is True, only this bundle will remain selected. Otherwise, this bundle will be added to the existing selection. """ pass def convertToSmartBundle(): """ convertToSmartBundle(self) Convert the bundle into a smart bundle. A regular expression is constructed from the contents of the bundle and then set as the bundle pattern. Do nothing if the bundle is already a smart bundle. """ pass def setName(name): """ setName(self, name) Change the name of the bundle. Raises hou.OperationFailed if the name contains non-alphanumeric characters other than _, or if a bundle with that name already exists. """ pass def containsNode(node): """ containsNode(self, node) -> bool Return True if the node is in the bundle and False otherwise. node must be a hou.Node object. This method is a shortcut for node in bundle.nodes(). For bundles with many nodes, this method will be slightly faster. """ pass def setFilter(node_type_filter): """ setFilter(self, node_type_filter) Set this bundle's filter to a hou.nodeTypeFilter enumerated value. Use hou.nodeTypeFilter.NoFilter to clear the filter. See hou.NodeBundle.filter and the class documentation for more information. """ pass def name(): """ name(self) -> str Return the name of the bundle. """ pass def removeNode(node): """ removeNode(self, node) Remove a node from the bundle. Raises hou.OperationFailed if this bundle is a smart bundle, since the contents of smart bundles are automatically determined by their pattern. """ pass def pattern(): """ pattern(self) -> str or None Return None if this bundle is a regular bundle, or a string pattern if the bundle is a smart bundle. See the class documentation for more information on smart bundles. Note that if a node matches the pattern, all its subchildren will be in the bundle, as long as they match the filter. For example, if the pattern is "/obj/*" and the filter is hou.nodeTypeFilter.NoFilter, the bundle will contain all nodes under /obj, recursively. """ pass def clear(): """ clear(self) Remove all nodes from the bundle. Raises hou.OperationFailed if this bundle is a smart bundle, since the contents of smart bundles are automatically determined by their pattern. """ pass def findBestFilter(): """ findBestFilter(self) -> hou.nodeTypeFilter enum value Return the most restrictive bundle filter that matches all the nodes in the bundle. See hou.nodeTypeFilter for the possible filters. hou.nodeTypeFilter.NoFilter is a special value to indicate that there is no filtering. """ pass def filter(): """ filter(self) -> hou.nodeTypeFilter enum value Return the bundle's filter. For smart bundles, the filter is applied after matching nodes to the pattern, and nodes whose types do not match the filter are removed from the bundle. See hou.nodeTypeFilter for the possible filters. hou.nodeTypeFilter.NoFilter is a special value to indicate that there is no filtering. See the class documentation for more information about filtering. """ pass def isSelected(): """ isSelected(self) -> bool Return True if the bundle is selected in the bundle list pane and False otherwise. """ pass def convertToNormalBundle(): """ convertToNormalBundle(self) Convert the bundle into a normal bundle. The smart bundle pattern is removed. Do nothing if the bundle is already a normal bundle. """ pass def destroy(): """ destroy(self) Remove this bundle. """ pass def nodes(): """ nodes(self) -> tuple of hou.Node Return a tuple of the nodes in this bundle. """ pass def Bundle_swigregister(): """None""" pass class ButtonParmTemplate(ParmTemplate): """ hou.ButtonParmTemplate Describes a parameter tuple containing a button. """ def ButtonParmTemplate_swigregister(): """None""" pass class ChannelEditorPane(PaneTab): """ hou.ChannelEditorPane REPLACES * chanlist * chaneditor """ def colorsCallback(): """ colorsCallback(self) -> string Return the active channel colors callback name. """ pass def channelListSplitFraction(): """ channelListSplitFraction(self) -> double Return the width of the embedded channel list as fraction (0-1 value) of the pane's width. """ pass def templateFilter(): """ templateFilter(self) -> string Return the filter pattern for which channels are templated. """ pass def unregisterColorsCallback(callback_name): """ unregisterColorsCallback(self, callback_name) -> bool Unregister a callback by name. It also resets the active callback if the callback to remove was the active one. Return True if the callback was successfully removed. Return False if the callback name was invalid. """ pass def setDisplayFilter(filter): """ setDisplayFilter(self, filter) Set the filter pattern for which channels are displayed. The channel name is used to match against the pattern. """ pass def colorsCallbacks(): """ colorsCallbacks(self) -> tuple of string Return the list of registered channel colors callback. """ pass def displayFilter(): """ displayFilter(self) -> string Return the filter pattern for which channels are displayed. """ pass def setChannelListSplitFraction(value): """ setChannelListSplitFraction(self, value) Set the width of the embedded channel list as fraction (0-1 value) of the pane's width. """ pass def graph(): """ graph(self) -> hou.ChannelGraph Return the channel graph for this pane. """ pass def editorMode(): """ editorMode(self) -> hou.channelEditorMode enum value Return the animation editor mode. """ pass def setEditorMode(mode): """ setEditorMode(self, mode) Set the animation editor mode. """ pass def registerColorsCallback(callback_name, callback_object): """ registerColorsCallback(self, callback_name, callback_object ) -> bool Registers a callback to generate custom channel colors based on the node and parameter names. callback_name A name for the custom color scheme. You can use this to remove the callback with the unregisterColorsCallback method. callback_object A Python object with a getChannelColor method. For example: > > class MyChannelColors(object): > def getChannelColor(self, node_path, channel_name): > return 0, 0, 0 The node argument is the path to the node (for example, /obj/table). The parm argument is the internal name of the channel (for example, tx). The method must return a 3-tuple representing normalized (0-1, not 0-255) red, green, and blue values. If the method returns (0, 0, 0) Houdini uses the default channel color. You should register the callback in a session-independent startup script. When you register the callback, Houdini will call it once with empty string arguments to make sure it returns a triple. Your getChannelColor() method needs to handle this case. The following example object uses the custom color tint of a node to color its channels: > > import hou > > class NodeColors: > ''' > Use hue variants of a node's color for parameter names > ending in x, y or z. > ''' > > def getChannelColor(self, node_path, channel_name): > # Handle the empty string case > if not node_path: > return 0, 0, 0 > > # Get a Node object from the path > n = hou.node(node_path) > # Get the node's color as a hou.Color object > color = n.color() > # Get the color's HSV values as a triple > hue, sat, val = n.color().hsv() > > # If the color is gray, use the default > if not sat: > return 0, 0, 0 > > # Hue-shift the node color for X, Y, and Z channels: > if channel_name.endswith("x"): > color.setHSV(hue - 50, sat * 2, val * 1.2) > elif channel_name.endswith("y"): > color.setHSV(hue, sat * 2, val * 1.2) > elif channel_name.endswith("z"): > color.setHSV(hue + 50, sat * 2, val * 1.2) > > # Return the color as normalized (r, g, b) > return color.rgb() """ pass def setTemplateFilter(filter): """ setTemplateFilter(self, filter) Set the filter pattern for which channels are templated. The channel name is used to match against the pattern. """ pass def setColorsCallback(callback_name): """ setColorsCallback(self, callback_name) -> bool Set the active channel colors callback name. If the callback name is invalid, the active callback will be reset to default. Return True if the callback was successfully changed. Return False if the callback name was invalid. """ pass def ChannelEditorPane_swigregister(): """None""" pass class ChannelGraph(object): """ hou.ChannelGraph REPLACES * chaneditor """ def selectedKeyframes(): """ selectedKeyframes(self) -> dictionary of (, tuple of hou.BaseKeyframe) pairs Returns a dictionary of (hou.Parm, keyframes) which are currently selected in the playbar. TIP: Here is an example of how to scale the selected key values by 2: > keyframes = hou.playbar.selectedKeyframes() > for parm in keyframes.keys(): > for key in keyframes[parm]: > key.setValue(2 * key.value()) > parm.setKeyframe(key) """ pass def ChannelGraph_swigregister(): """None""" pass class ChopNode(Node): """ hou.ChopNode Class representing a CHOP node. REPLACES * chopls * opget * opsave * opset * chop() * chope() * chopn() * chopr() * chops() * ic() * ice() * icl() * icmax() * icmin() * icn() * icr() * ics() * oc() * opflag() """ def samplesToTime(samples): """ samplesToTime(self, samples) -> double Converts a value expressed as samples to a value expressed in seconds. """ pass def setCurrentFlag(on): """ setCurrentFlag(self, on) Turns the node's audio flag on or off. """ pass def timeToSamples(time): """ timeToSamples(self, time) -> double Converts a value expressed in seconds to a value expressed in samples. """ pass def track(track_name): """ track(self, track_name) -> hou.Track or None Return the track of the given name, or None if it doesn't exist. """ pass def setClipData(data, binary): """ setClipData(self, data, binary) Sets the clip data for the CHOP node. Should only be called on locked nodes. """ pass def setDisplayFlag(on): """ setDisplayFlag(self, on) Turns the node's display flag to on or off. """ pass def setUnloadFlag(on): """ setUnloadFlag(self, on) Turns the node's unload flag to on or off. """ pass def tracks(): """ tracks(self) -> tuple of Tracks Returns a tuple of all the tracks in this node. """ pass def isCurrentFlagSet(): """ isCurrentFlagSet(self) -> bool Returns whether the node's current flag is on. """ pass def isBypassed(): """ isBypassed(self) -> bool Returns whether the node's bypass flag is on. """ pass def samplesToFrame(samples): """ samplesToFrame(self, samples) -> double Converts a value expressed as samples to a value expressed in frames. """ pass def clipData(binary): """ clipData(self, binary) -> str Returns the clip data for the CHOP node in ASCII or binary, depending on the value of the binary parameter. """ pass def isExportFlagSet(): """ isExportFlagSet(self) -> bool Returns whether the node's export flag is on. """ pass def isDisplayFlagSet(): """ isDisplayFlagSet(self) -> bool Returns whether the node's display flag is on. """ pass def sampleRange(): """ sampleRange(self) -> (start, end) Return a 2-tuple containing the start and end values of the sample range. The number of samples for each track in this node is start- end+1. Note that samples start from 0, not 1. """ pass def setLocked(on): """ setLocked(self, on) Turn this node's lock flag on or off. Locking a node saves its current cooked channel data into the node. If you unlock a locked node, it will discard its locked channel data and recook, computing its channel data from its inputs and parameters. """ pass def frameToSamples(frame): """ frameToSamples(self, frame) -> double Converts a value expressed as frames to a value expressed in samples. """ pass def isAudioFlagSet(): """ isAudioFlagSet(self) -> bool Returns whether the node's audio flag is on. """ pass def setAudioFlag(on): """ setAudioFlag(self, on) Turns the node's audio flag on or off. """ pass def isLocked(): """ isLocked(self) -> bool Returns whether this node's lock flag is on. """ pass def bypass(on): """ bypass(self, on) Turn the node's bypass flag on or off, making this node have no effect. """ pass def saveClip(file_name): """ saveClip(self, file_name) Saves the node's output clip to a file. The filename extension determines the file format to use. """ pass def sampleRate(): """ sampleRate(self) -> double Returns the sample rate used by this node in number of samples per second. """ pass def isUnloadFlagSet(): """ isUnloadFlagSet(self) -> bool Returns whether the node's unload flag is on. """ pass def setExportFlag(on): """ setExportFlag(self, on) Turns the node's export flag to on or off. """ pass def ChopNode_swigregister(): """None""" pass class Color(object): """ hou.Color Represents a color value. You can get and set the internal values using different color representations such as RGB and L*a*b*. Note that the constructor takes a single _tuple_ of RGB values, not three arguments. So, for example, to create red you would say: > red = hou.Color((1.0, 0, 0)) You can set the color in one color space and get the color in a different color space to convert between spaces. See HSL and HSV, Lab color space, CIE 1931 color space, and Color temperature for an introduction to the concepts the methods are based on. REPLACES * rgb() """ def setLAB(tuple): """ setLAB(self, tuple) Sets the color as a tuple of (L, a, b) as defined in the L*a*b* model. See the lab() method. """ pass def xyz(): """ xyz(self) -> (float, float, float) Returns the color as a tuple of (x, y, z) "tristimulus" values, where each component is 0.0 to 1.0 (but may go out of bounds from conversion). """ pass def hsl(): """ hsl(self) -> (float, float, float) Returns the color as a tuple of (hue, saturation, lightness), where hue is 0 - 360, and saturation and lightness are 0.0 - 1.0. """ pass def hsv(): """ hsv(self) -> (float, float, float) Returns the color as a tuple of (hue, saturation, value), where hue is 0 - 360, and saturation and value are 0.0 - 1.0. """ pass def lab(): """ lab(self) -> (float, float, float) Returns the color as a tuple of (L, a, b) as defined in the L*a*b* model, where L is 0 - 100, and a and b are unbound. (Note that a and b are restricted to -128 - 127 in TIFF files). """ pass def setRGB(tuple): """ setRGB(self, tuple) Sets the color using a tuple of (red, green, blue) floating point values. See the rgb() method. """ pass def staticmethod(function): """staticmethod(function) -> method Convert a function to be a static method. A static method does not receive an implicit first argument. To declare a static method, use this idiom: class C: @staticmethod def f(arg1, arg2, ...): ... It can be called either on the class (e.g. C.f()) or on an instance (e.g. C().f()). The instance is ignored except for its class. Static methods in Python are similar to those found in Java or C++. For a more advanced concept, see the classmethod builtin.""" pass def setTMI(tuple): """ setTMI(self, tuple) Sets the color as a tuple of (temperature, magenta, intensity). See the tmi() method. """ pass def _asVoidPointer(): """None""" pass def setHSL(tuple): """ setHSL(self, tuple) Sets the color as a tuple of (hue, saturation, lightness). See the hsl() method. """ pass def setXYZ(tuple): """ setXYZ(self, tuple) Sets the color as a tuple of (x, y, z) "tristimulus" values. See the xyz() method. """ pass def setHSV(tuple): """ setHSV(self, tuple) Sets the color as a tuple of (hue, saturation, value). See the hsv() method. """ pass def rgb(): """ rgb(self) -> (float, float, float) Returns the color as a tuple of (red, green, blue) floating point values, where each value is in the range 0.0 to 1.0. """ pass def tmi(): """ tmi(self) -> (float, float, float) Returns the color as a tuple of (temperature, magenta, intensity), where each component is -1.0 to 1.0. """ pass def Color_ocio_spaces(): """ ocio_spaces() Returns a list of the color spaces defined in the Open Color IO configuration in Houdini. """ pass def Color_swigregister(): """None""" pass class CompositorViewer(PathBasedPaneTab): """ hou.CompositorViewer Minimal class representing a compositing view pane. This class is currently very simple, implementing a minimal number of methods necessary to support compositing shelf tools. It does not currently allow programmatic control of most functions available in the UI. You should probably avoid using this object. If you are writing custom tools for the compositing view, the higher-level functions in the cop2toolutils module are more useful. """ def enterViewState(wait_for_exit=False): """ enterViewState(self, wait_for_exit=False) Switch to the view tool. """ pass def setCurrentState(state, wait_for_exit=False): """ setCurrentState(self, state, wait_for_exit=False) Sets the currently active tool in the view. state is a string containing an internal, undocumented designation. See currentState(). """ pass def currentState(): """ currentState(self) -> str Returns the name of the tool currently in use in the view. This is an internal, undocumented designation but usually corresponds to the name of a node. You can change to a different tool using setCurrentState. """ pass def CompositorViewer_swigregister(): """None""" pass class ConstructionPlane(object): """ hou.ConstructionPlane The grid (a.k.a. construction plane) in the scene viewer pane tab. REPLACES * cplane """ def setTransform(matrix): """ setTransform(self, matrix) Set the transformation matrix for this plane to a hou.Matrix4. This matrix is used to translate and rotate the plane. See the transform method for more information. Note that scale information inside the transformation matrix is ignored. Use the setCellSize and setNumberOfCells methods to adjust the size of the plane. The following function will change the position of the center of the plane: > def set_origin(construction_plane, new_origin): > translation = hou.hmath.buildTranslate(hou.Vector3(new_origin) - origin(construction_plane)) > construction_plane.setTransform(construction_plane.transform() * translation) > > def origin(construction_plane): > return hou.Vector3(0, 0, 0) * construction_plane.transform() The following function will change the normal of the plane: > def set_normal(construction_plane, normal_vector): > existing_rotation = hou.Matrix4(construction_plane.transform().extractRotationMatrix3()) > rotation = existing_rotation * normal(construction_plane).matrixToRotateTo(normal_vector) > translation = hou.hmath.buildTranslate(origin(construction_plane)) > construction_plane.setTransform(rotation * translation) > > def normal(construction_plane): > return hou.Vector3(0, 0, 1) * construction_plane.transform().inverted().transposed() > > def origin(construction_plane): > return hou.Vector3(0, 0, 0) * construction_plane.transform() """ pass def setNumberOfCells(): """None""" pass def sceneViewer(): """ sceneViewer(self) -> hou.SceneViewer Return the scene viewer containing this plane. """ pass def setNumberOfCellsPerRulerLine(): """None""" pass def cellSize(): """ cellSize(self) -> tuple of float Return the x and y sizes (width and height) of one cell in the grid of cells. The return value is a tuple of two floats. """ pass def setIsVisible(on): """ setIsVisible(self, on) Make this grid visible or invisible in the viewer. """ pass def numberOfCellsPerRulerLine(): """ numberOfCellsPerRulerLine(self) -> tuple of int Return the number of cells in the x and y directions between ruler lines. Ruler lines are darker than the normal lines drawn between grid cells. """ pass def setCellSize(size): """ setCellSize(self, size) Change the x and y sizes (width and height) of each cell in the grid of cells. size is a sequence of two floats. Changing the size of each cell will change the total size of the grid. """ pass def transform(): """ transform(self) -> hou.Matrix4 Return the transformation matrix for this plane. When the transformation matrix is the identity matrix, the plane's bottom-left corner is at the origin and it sits in the XY plane. In this orientation, increasing the number of cells in x or the size of a cell in x grows the plane outward from the origin along the x-axis. Similarly, increasing the number of cells or size of a cell in y grows the plane along the y-axis. Note that the transformation matrix does not contain any scale information. Use the cellSize and numberOfCells methods to get the size of the plane. The following function will return the position of the center of the plane: > def origin(construction_plane): > return hou.Vector3(0, 0, 0) * construction_plane.transform() The following function will return the normal of the plane: > def normal(construction_plane): > return hou.Vector3(0, 0, 1) * construction_plane.transform().inverted().transposed() """ pass def numberOfCells(): """ numberOfCells(self) -> tuple of int Return the number of cells in the x and y directions of the grid. In other words, return the number of columns and rows. """ pass def isVisible(): """ isVisible(self) -> bool Return whether the grid is visible in the viewer. """ pass def ConstructionPlane_swigregister(): """None""" pass class ContextViewer(PathBasedPaneTab): """ hou.ContextViewer A class representing a context viewer pane tab. """ def compositorViewer(): """ compositorViewer(self) -> hou.CompositorViewer Returns a CompositorViewer if the ContextViewer is displaying a compositor viewer. If not, returns None. """ pass def sceneViewer(): """ sceneViewer(self) -> hou.SceneViewer Returns a SceneViewer if the ContextViewer is displaying a scene viewer. If not, returns None. """ pass def ContextViewer_swigregister(): """None""" pass class CopNode(Node): """ hou.CopNode Represents a compositing node. REPLACES * pic() * picni() * opflag() * opget * opsave * res() * seqanim() * seqend() * seqlength() * seqstart() * copmeta() * copmetas() """ def setCompressFlag(on): """ setCompressFlag(self, on) Turns the node's compress flag on or off. If the compress flag is True, this node will not show a preview image in the Network View. If the compress flag is False, a preview image will be shown in the Network View. The value of the on argument must be True or False. Raises hou.PermissionError if the node is unwritable. """ pass def imageBounds(plane="C"): """ imageBounds(self, plane="C") -> tuple of int Returns the x and y boundaries of the given plane in the form of (xmin, ymin, xmax, ymax). The value of the plane argument is the plane name. By default, the image bounds of the color plane is returned. Note that the image bounds is not the same as the image resolution. For example, the image bounds for a Font COP is the bounding rectangle around the displayed letters while the resolution is the size of the node's image. Note that the returned image bounds is for the current frame. Raises ValueError if plane is None or empty. Raises hou.OperationFailed if the node could not be cooked or opened for processing. Raises hou.OperationFailed if the given plane does not exist. """ pass def yRes(): """ yRes(self) Returns the y-resolution of the node's image for the current frame. Raises hou.OperationFailed if the node could not be cooked or opened for processing. """ pass def isRenderFlagSet(): """ isRenderFlagSet(self) -> bool Returns True if the node's render flag is turned on. Returns False otherwise. """ pass def isDisplayFlagSet(): """ isDisplayFlagSet(self) -> bool Returns True if the node's display flag is turned on. Returns False otherwise. """ pass def getMetaDataFloat(metadata_name, index=0): """ getMetaDataFloat(self, metadata_name, index=0) -> double Returns numeric metadata as a single double precision value. In the case of vectors, matrices and arrays, index indicates the component to fetch. """ pass def setPixelsOfCookingPlaneFromString(values, component=None, interleaved=True, depth=None, flip_vertically=False): """ setPixelsOfCookingPlaneFromString(self, values, component=None, interleaved=True, depth=None, flip_vertically=False) Set the pixels of the plane being cooked by the currently-running Python COP. This method is like hou.CopNode.setPixelsOfCookingPlane except values contains a binary string representation of the data instead of a sequence of floats. Consequently, this method is faster. The depth parameter specifies how to interpret the values in the binary string, and is a hou.imageDepth enumerated value. If depth is None, the depth is assumed to be in the depth of the plane being cooked. Note that, by specifying depth explicitly, you can provide data in any depth, regardless of the actual depth stored by the COP. Note that this method can accept more types that just a string: it can receive any Python object that supports the buffer interface. In particular, arrays from the array and numpy Python modules are supported, so there is no need to first construct strings from those arrays. See hou.CopNode.setPixelsOfCookingPlane and hou.CopNode.allPixelsAsString for more information. """ pass def sequenceFrameLength(): """ sequenceFrameLength(self) -> float Returns the frame length of the node's image sequence. Raises hou.OperationFailed if the node could not be cooked or opened for processing. """ pass def getPixelByUV(plane, u, v, component=None, interpolate=True): """ getPixelByUV(self, plane, u, v, component=None, interpolate=True) -> tuple of float Returns plane values for a single pixel in the node's image. The plane is defined by the plane argument which must be set to the plane's name. The pixel is defined by (u, v) coordinates where u and v are values between 0.0 and 1.0. If the optional component argument is specified, then the value for that particular component is returned. Otherwise, all of the plane's component values are returned. The value of component should be the component's name (i.e. "r", "g", "b", etc.). If the (u, v) coordinates do not fall exactly on a pixel, then the return values are calculated by linear blending of the values for the surrounding pixels. This can be disabled by setting the interpolate argument to False, in which case the values of the pixel located immediately to the bottom-left of (u, v) are returned. Note that the returned values are for the node's image at the current frame. Raises ValueError if either u or v is outside of the 0.0-1.0 range. Raises ValueError if plane is None or empty. Raises hou.OperationFailed if the node could not be cooked or opened for processing. Raises hou.OperationFailed if the given plane does not exist. Raises hou.OperationFailed if the given component does not exist in the plane. """ pass def isCompressFlagSet(): """ isCompressFlagSet(self) -> bool Returns True if the node's compress flag is turned on. Returns False otherwise. The compress flag controls whether or not a preview image is shown for this node in the Network View. """ pass def hasMetaData(metadata_name): """ hasMetaData(self, metadata_name) -> bool Returns True if the metadata with name metadata_name exists, False otherwise. """ pass def bypass(on): """ bypass(self, on) Turns the node's bypass flag on or off. When the bypass flag is on, the node will have no effect on the scene. The value of the on argument must be True or False. Raises hou.PermissionError if the node is unwritable. """ pass def isTemplateFlagSet(): """ isTemplateFlagSet(self) -> bool Returns True if the node's template flag is turned on. Returns False otherwise. """ pass def saveImage(file_name, frame_range=(): """ saveImage(self, file_name, frame_range=()) Saves the node's cooked image sequence to disk. For multiple images, make sure that the file_name argument contains $F so that the sequence is written to multiple files. The optional frame_range argument can be specified to write only a subset of frames in the image sequence. frame_range must be a 2-tuple or a 3-tuple, where the first element is the start frame, the second element is the end frame and the third element is the frame increment. If frame_range is not given, then every frame in the image sequence is saved to disk. Raises ValueError if the frame increment in frame_range is 0. Raises hou.InvalidSize if the size of frame_range is not 0, 2 or 3. Raises hou.OperationFailed if the node could not be cooked or opened for processing. Raises hou.OperationFailed if the image could not be saved to disk. """ pass def sequenceStartFrame(): """ sequenceStartFrame(self) -> float Returns the start frame in the node's image sequence. Raises hou.OperationFailed if the node could not be cooked or opened for processing. """ pass def components(plane): """ components(self, plane) -> tuple of str Returns a tuple of component names for the specified plane in the node's image sequence. The value of the plane argument must be a plane name. Raises ValueError if plane is None or empty. Raises hou.OperationFailed if the node could not be cooked or opened for processing. Raises hou.OperationFailed if the given plane does not exist. """ pass def isSingleImage(): """ isSingleImage(self) -> bool Returns True if the node has a single image. Returns False if the node has an image sequence. """ pass def allPixelsAsString(plane="C", component=None, interleaved=True, time=-1.0, depth=None): """ allPixelsAsString(self, plane="C", component=None, interleaved=True, time=-1.0, depth=None) -> str Return a binary string representation of the floats containing all the values of all voxels. This method is faster than hou.CopNode.allPixels, and you can use the array module to convert the string into a Python sequence. Note that this method returns binary float data, so there are 4 bytes per R, G, and B component, not 1 byte. If depth is hou.imageDepth.Float32, this method provides a faster implementation of the following: > import array > def allPixelsAsString(self): > return array.array("f", self.allPixels()).tostring() If depth is None and this method is called from the code implementing a Python COP to get an input plane, the depth will be the same as the plane's native depth. If depth is None and this method is called from outside a Python COP, the depth will be hou.imageDepth.Float32. Otherwise, if depth is a hou.imageDepth enumerated value the result will be converted to the specified depth. See hou.CopNode.allPixels for more information. See also hou.Volume.setVoxelSliceFromString. Raises hou.OperationFailed if the time argument is set to a value greater than or equal to 0.0 and allPixelsAsString is called from a cooking Python COP. """ pass def getMetaDataInt(metadata_name, index=0): """ getMetaDataInt(self, metadata_name, index=0) -> int Returns numeric metadata as a single integer. In the case of vectors, matrices and arrays, index indicates the component to fetch. Floating point metadata will be truncated. """ pass def xRes(): """ xRes(self) Returns the x-resolution of the node's image for the current frame. Raises hou.OperationFailed if the node could not be cooked or opened for processing. """ pass def isBypassed(): """ isBypassed(self) -> bool Returns True if the node's bypass flag is turned on. Returns False otherwise. """ pass def setRenderFlag(on): """ setRenderFlag(self, on) Turns the node's render flag on or off. The render flag controls which node in a compositing network will be rendered to or to disk. The value of the on argument must be True or False. Raises hou.PermissionError if the node is unwritable. """ pass def getMetaDataString(metadata_name): """ getMetaDataString(self, metadata_name) -> str Returns string metadata from metadata_name. """ pass def setDisplayFlag(on): """ setDisplayFlag(self, on) Turns the node's display flag on or off. When the display flag is on, the node's image will appear in the image viewport. The value of the on argument must be True or False. Raises hou.PermissionError if the node is unwritable. """ pass def setPixelsOfCookingPlane(values, component=None, interleaved=True, flip_vertically=False): """ setPixelsOfCookingPlane(self, values, component=None, interleaved=True, flip_vertically=False) Set the pixels of the plane being cooked by the currently-running Python COP. values A sequence of floats, organized with the contents of the bottom scanline first. If component is None, the length of the sequence of floats must be the number of pixels in the image times the number of components. Otherwise, it must be the number of pixels in the image. component Either the name of one component in the plane being cooked, or None. If a component name is given, values will contain only the values for that component. Otherwise, it will contain the values for all components of all pixels in the plane. interleaved If component is None and interleaved is True, values is contains the first component of the first pixel, followed by the second component of the first pixel, until the last component of the first pixel, then the first component of the second pixel, etc. If it is False, values contains all the values of the first component for all pixels, followed by all the values of the second component, etc. For example, if the plane is "C" and interleaved is True, the values will be organized as rgbrgbrgb.... If it is not interleaved, it will be organized as rrr...ggg...bbb.... If component is not None, this parameter is ignored. flip_vertically The default value for this parameter is False, so the first scanline in the values array is assumed to be the bottom scanline. If flip_vertically is True, the input values are assumed to oriented starting at the top scanline. If you call this method from outside the cook function in a Python COP, raises hou.OperationFailed. See also hou.CopNode.allPixels and hou.CopNode.setPixelsOfCookingPlaneFromString. Also see the HOM cookbook and the Python COP documentation for examples. """ pass def getPixelHSVByUV(u, v, interpolate=True): """ getPixelHSVByUV(self, u, v, interpolate=True) -> tuple of float Returns a 3-tuple containing the hue, saturation and value for a single pixel in the node's image. The pixel is defined by (u, v) coordinates where u and v are values between 0.0 and 1.0. If the (u, v) coordinates do not fall exactly on a pixel, then the return values are calculated by linear blending of the values for the surrounding pixels. This can be disabled by setting the interpolate argument to False, in which case the values of the pixel located immediately to the bottom-left of (u, v) are returned. Note that the returned hue, saturation and value are for the node's image at the current frame. Raises ValueError if either u or v is outside of the 0.0-1.0 range. Raises hou.OperationFailed if the node could not be cooked or opened for processing. """ pass def getPixelLuminanceByUV(u, v, interpolate=True): """ getPixelLuminanceByUV(self, u, v, interpolate=True) -> float Returns the luminance value for a single pixel in the node's image. The pixel is defined by (u, v) coordinates where u and v are values between 0.0 and 1.0. If the (u, v) coordinates do not fall exactly on a pixel, then the luminance is calculated by linear blending of the luminance values for the surrounding pixels. This can be disabled by setting the interpolate argument to False, in which case the luminance of the pixel located immediately to the bottom-left of (u, v) is returned. Note that the returned luminance value is for the node's image at the current frame. Raises ValueError if either u or v is outside of the 0.0-1.0 range. Raises hou.OperationFailed if the node could not be cooked or opened for processing. """ pass def allPixels(plane="C", component=None, interleaved=True, time=-1.0): """ allPixels(self, plane="C", component=None, interleaved=True, time=-1.0) -> tuple of float Return a tuple of floats containing all pixel values for a particular image plane. The pixels in the bottom scanline of the image are first in the result, followed by the second-last scanline, etc. Floating point values in the color plane ("C"), for example, are typically in the range 0.0 to 1.0. plane The name of the image plane to return. All images have "C" (color) and "A" (alpha) planes. Deep raster images may contain other planes, such as "Pz" (depth), "N" (normal), etc. component A particular subcomponent of the plane. For example, for the "C" plane you could specify one of the "r", "g", or "b" subcomponents. Specify None to indicate all components. interleaved Whether the different components of the plane are interleaved in the result. For example, if the plane is "C", the interleaved result would be organized as rgbrgbrgb... while the uninterleaved result would be rrr...ggg...bbb.... This parameter has no effect when a particular component is specified. time The time at which to cook the COP node. If this value is negative, Houdini uses the current time. Note that this argument does not apply if allPixels is called from a Python COP that is cooking. In that case allPixels evaluates at the current cooking time. This method does not accept a depth parameter like allPixelsAsString does. The values are converted to floating point data, regardless of the actual depth of the image plane. Raises hou.OperationFailed if the time argument is set to a value greater than or equal to 0.0 and allPixels is called from a cooking Python COP. """ pass def sequenceEndFrame(): """ sequenceEndFrame(self) -> float Returns the last frame in the node's image sequence. Raises hou.OperationFailed if the node could not be cooked or opened for processing. """ pass def depth(plane): """ depth(self, plane) -> hou.imageDepth enum value Return the data format used to represent one component of one pixel in the given image plane. For example, if the depth of the "C" (color) plane is hou.imageDepth.Int8, each of the red, green, and blue components is stored as an (unsigned) 8-bit integer, occupying one byte. If, for example, it is instead hou.imageDepth.Float32, each of the red, green, and blue components is a 32-bit float and occupies 4 bytes (12 bytes total for all 3 components combined). """ pass def setTemplateFlag(on): """ setTemplateFlag(self, on) Turns the node's template flag on or off. The value of the on argument must be True or False. Raises hou.PermissionError if the node is unwritable. """ pass def maskInputIndex(): """ maskInputIndex(self) -> int Return the input index of the mask input for this node. Return -1 if this node type does not provide a mask input. """ pass def planes(): """ planes(self) -> tuple of strings Returns a tuple of plane names in the node's image sequence. Raises hou.OperationFailed if the node could not be cooked or opened for processing. """ pass def getMetaDataIntArray(metadata_name): """ getMetaDataIntArray(self, metadata_name) -> tuple of int Returns numeric metadata as an array of integers. Floating point metadata values will be truncated. """ pass def getMetaDataFloatArray(metadata_name): """ getMetaDataFloatArray(self, metadata_name) -> tuple of double Returns numeric metadata as an array of double-precision values. """ pass def CopNode_swigregister(): """None""" pass class DataParmTemplate(ParmTemplate): """ hou.DataParmTemplate Describes a parameter tuple containing data values. """ def defaultExpression(): """ defaultExpression(self) -> tuple of strings Return the default expression for new parameter instances. The default expression takes precedence over the default value. If a component has no default expression (i.e. an empty string), then the default value is used for new parameter instances. Note that the default expression language is needed to interpret the meaning of the default expression. For example, suppose this parm template is named "t", the naming scheme is XYZW, it has 3 components, the default value is (1.0, 2.0, 3.0), the default expression is ("$F", "hou.frame()", "") and the default expression language is (hou.scriptLanguage.Hscript, hou.scriptLanguage.Python, hou.scriptLanguage.Hscript). Then the corresponding parm tuple instance on a node would be named "t" and would contain parameters "tx", "ty", "tz". When the node is created, "tx" would have a default Hscript expression of "$F", "ty" would have a default Python expression of "hou.frame()", and "tz" would have a default value of 3.0. """ pass def setDataParmType(): """None""" pass def dataParmType(): """ dataParmType(self) -> hou.dataParmType enum value Return the type of this data parameter. This type determines whether the parameter stores geometry data or a JSON map structure. See hou.dataParmType for more information. """ pass def setDefaultExpressionLanguage(default_expression_language): """ setDefaultExpressionLanguage(self, default_expression_language) Set the default expression language for new parameter instances to a sequence of hou.scriptLanguage values. See the defaultExpressionLanguage method for more information. Note that if the number of hou.scriptLanguage values in the sequence is different from the number of components in the parm template, any extra values will be discarded and any missing expression languages will become hou.scriptLanguage.Hscript. """ pass def defaultExpressionLanguage(): """ defaultExpressionLanguage(self) -> tuple of hou.scriptLanguage Return the default expression language for new parameter instances. The default expression language only applies if the default expression is set. If the default expression of a component is not set, then the expression language is set to hou.scriptLanguage.Hscript. """ pass def setDefaultExpression(default_expression): """ setDefaultExpression(self, default_expression) Set the default expression for new parameter instances to a sequence of strings. See the hou.DataParmTemplate.defaultExpression method for more information. Note that if the number of strings in the sequence is different from the number of components in the parm template, any extra values will be discarded and any missing expressions will become the empty string. """ pass def DataParmTemplate_swigregister(): """None""" pass class DataTree(PaneTab): """ hou.DataTree Represents a Data Tree panetab. """ def setTreeType(tree_type): """ setTreeType(self, tree_type) -> bool Changes the tree type being displayed in the Data Tree. Valid values are any strings returned by the treeTypes function. Returns True if the tree type was successfully changed, otherwise False. """ pass def setTreeExpanded(expanded): """ setTreeExpanded(self, expanded) Recursively sets the expanded state of the entire data tree. """ pass def setCurrentNodeExpanded(expanded): """ setCurrentNodeExpanded(self, expanded) Sets the expanded state of the currently selected node in the tree. If there is no selected node the method has no effect on the tree. """ pass def currentPath(): """ currentPath(self) -> str Returns the path to the current node in the tree. """ pass def treeTypes(): """ treeTypes(self) -> tuple of str Returns a tuple of strings that represent the different tree types that can be shown in the Data Tree pane. """ pass def setCurrentPath(path, multi=False, index=-1): """ setCurrentPath(self, path, multi=False, index=-1) Sets the currently selected node in the tree. If the provided path does not match a node in the tree, the tree will still attempt to set the current node to the best possible match of the provided path. If multi is set to True, the previous selection will not be cleared before selecting the new the node. This allows multiple nodes to be selected in the tree. """ pass def treeType(): """ treeType(self) -> str Returns the current tree type being shown in the Data Tree. This function may return an empty string if no tree type has been chosen yet. """ pass def setCurrentPaths(paths, expand): """ setCurrentPaths(self, paths, expand) Selects mutliple nodes in the data tree based on the array of paths passed in. If the expand flag is set to True the tree nodes will be expanded after selection. """ pass def clearCurrentPath(): """ clearCurrentPath(self) -> str Clears the node(s) currently selected in the tree. """ pass def DataTree_swigregister(): """None""" pass class Desktop(object): """ hou.Desktop Class representing a Houdini desktop (a pane layout). A desktop contains one or more panes. Each pane contains one or more pane tabs of various types (scene viewer, parameters, network editor, etc.) The main desktop window can be split horizontally or vertically into two panes, and each pane can itself be split horizontally or vertically. Note that a floating panel also contains one or more panes and a floating panel may optionally be attached to a desktop. The methods in this class that return pane tabs, panes, and floating panels only return those objects that are attached to (i.e. saved with) the desktop. To access all the visible pane tabs, panes, and floating panels, including those not attached to any desktop, use the functions in hou.ui. See also hou.ui.curDesktop, hou.ui.desktops, hou.Pane, hou.PaneTab, and hou.FloatingPanel. """ def displayHelp(node_type): """ displayHelp(self, node_type) Loads the help for the specified node type in the last opened help browser pane tab. Creates a help browser pane tab if no such pane tab already exists. """ pass def panes(): """ panes(self) -> tuple of hou.Pane Return the panes inside this desktop. Note that the result includes panes in floating panels as long as they are attached to the desktop. The following function will return all visible panes, regardless of whether or not they are attached to a desktop: > def allPanes(): > '''Return a tuple of all visible panes, regardless of whether or not > they are attached to a desktop.''' > # Loop through all the pane tabs and add each tab's pane to the result > # if it's not already there. Note that the only way to uniquely > # identify a pane is using its id. > ids_to_panes = {} > for pane_tab in hou.ui.paneTabs(): > pane = pane_tab.pane() > if pane.id() not in ids_to_panes: > ids_to_panes[pane.id()] = pane > return ids_to_panes.values() """ pass def createFloatingPaneTab(pane_tab_type, position=(): """ createFloatingPaneTab(self, pane_tab_type, position=(), size=(), python_panel_interface=None) -> hou.PaneTab Create and return a new floating window containing a single pane tab. Note that this method creates a floating panel with a single pane tab, and the graphical interface to add more tabs or split the pane inside the panel is not exposed. pane_tab_type A hou.paneTabType enumerated variable. position A tuple of two floats specifying the X and Y positions of the new window, respectively. The window will open near this position, not necessarily exactly at this position. If this value is an empty tuple, Houdini will choose a default location. size A tuple of two floats specifying the width and height of the new window, respectively. If this value is an empty tuple, Houdini will choose a default size. python_panel_interface The name of the Python Panel interface to be displayed in the floating pane tab. Specifying the interface name additionally hides the Python Panel toolbar. If python_panel_interface is None or points to an interface that does not exist then the default Python Panel pane tab is displayed along with the toolbar. This argument is ignored if pane_tab_type is not set to hou.paneTabType.PythonPanel. Also note that the floating panel containing the new pane tab does not contain any panes: calling hou.PaneTab.pane on the pane tab returns None, and calling hou.FloatingPanel.panes on its floating panel returns an empty tuple. See hou.FloatingPanel for more information on these stripped down floating panels. See also hou.Desktop.createFloatingPanel. The following example function takes a hou.Node and opens a floating parameter pane pinned to that node. > def openParmPane(node): > '''Open a floating parameter pane for a particular node.''' > pane_tab = hou.ui.curDesktop().createFloatingPaneTab(hou.paneTabType.Parm) > pane_tab.setCurrentNode(node) > pane_tab.setPin(True) > return pane_tab """ pass def displayHelpPyPanel(interface_name): """ displayHelpPyPanel(self, interface_name) Loads the help for the python panel with the specified name in the last opened help browser pane tab. Creates a help browser pane tab if no such pane tab already exists. Raises HOM_Error if the interface name is invalid. """ pass def findPaneTab(name): """ findPaneTab(self, name) -> hou.PaneTab or None Return the pane tab with the given name, or None if no such tab exists. Like hou.Desktop.paneTabs, this method searches pane tabs in the desktop or in floating panels attached to the desktop. The name may optionally be prefixed by the desktop name and a period. Use hou.ui.findPaneTab to search all the visible pane tabs, regardless of whether they are attached to this desktop. """ pass def shelfDock(): """ shelfDock(self) -> hou.ShelfDock Return the shelf dock for the current desktop. """ pass def paneTabOfType(type, index=0): """ paneTabOfType(self, type, index=0) -> hou.PaneTab or None Find and return the pane tab with the desired type. If no such tab exists, return None. Like hou.Desktop.paneTabs, this method searches pane tabs in the desktop or in floating panels attached to the desktop. Use hou.ui.paneTabOfType to search all the visible pane tabs, regardless of whether they are attached to this desktop. type A hou.paneTabType enumerated variable. index If there are multiple tabs with the desired type, this parameter determines which one is returned. Use index=0 to return the first found tab, index=1 to return the second found tab, etc. By default, index is 0. This method can be approximately implemented as follows: > def paneTabOfType(self, tab_type, index=0): > pane_tabs = [t for t in self.paneTabs() if t.type() == tab_type] > > if max(index, 0) > len(pane_tabs): > return None > return pane_tabs[max(index, 0)] """ pass def findPane(pane_id): """ findPane(self, pane_id) -> hou.Pane or None Return the pane with the given unique id, or None if no such pane exists. Like hou.Desktop.panes, this method searches panes in the desktop or in floating panels attached to the desktop. Use hou.ui.findPane to search all the visible panes, regardless of whether they are attached to this desktop. """ pass def displaySideHelp(show=True): """ displaySideHelp(self, show=True) -> hou.PaneTab Show or hide the side help pane. If show is set to True (default) this method displays the help pane and returns a help browser pane tab. If set to False then this method hides the help browser pane at the side of the desktop and returns None. """ pass def floatingPaneTabs(): """ floatingPaneTabs(self) -> tuple of hou.PaneTab Return all the pane tabs in floating panels that are attached to this desktop. """ pass def currentPaneTabs(): """ currentPaneTabs(self) -> tuple of hou.PaneTab Return the pane tabs that are contained in this desktop or are in floating panels attached to this desktop and are currently selected in their containing panes. This method does not return floating pane tabs that are not attached to this desktop. Use hou.ui.currentPaneTabs to get all the selected pane tabs, regardless of whether they are attached to this desktop. """ pass def floatingPanels(): """ floatingPanels(self) -> tuple of hou.FloatingPanel Return all the floating panels attached to this desktop. Use hou.ui.floatingPanels to get all the visible floating panels, including those not attached to this desktop. See also hou.Desktop.floatingPaneTabs. """ pass def paneTabs(): """ paneTabs(self) -> tuple of hou.PaneTab Return the pane tabs that are contained in this desktop or are in floating panels attached to this desktop. This method does not return floating pane tabs that are not attached to this desktop. Use hou.ui.paneTabs to get all the visible pane tabs, regardless of whether they are attached to this desktop. """ pass def name(): """ name(self) -> str Return the desktop's name. Each desktop has a unique name. The desktop's name cannot be changed through either the scripting interface or through Houdini. """ pass def paneUnderCursor(): """ paneUnderCursor(self) Return the hou.Pane object located under the mouse cursor. Return None if no pane is located under the mouse cursor. This method does not search floating panes that are not attached to this desktop. Use hou.ui.paneUnderCursor to search all the visible panes, regardless of whether they are attached to this desktop. """ pass def displayHelpPath(help_path): """ displayHelpPath(self, help_path) Loads the help for the specified help path in the last opened help browser pane tab. Creates a help browser pane tab if no such pane tab already exists. The path can either be a Houdini help URL (i.e. op:Sop/copy, tool:curve) or a raw help path (i.e. /nodes/sop/copy, shelf/curve). """ pass def setAsCurrent(): """ setAsCurrent(self) Make this desktop the currently selected one. See also hou.ui.desktops. This example changes to the animate desktop: > desktops_dict = dict((d.name(), d) for d in hou.ui.desktops()) > desktops_dict['Animate'].setAsCurrent() """ pass def createFloatingPanel(pane_tab_type, position=(): """ createFloatingPanel(self, pane_tab_type, position=(), size=(), python_panel_interface=None) -> hou.FloatingPanel Create a floating panel and return it. The returned floating panel contains one pane which contains one pane tab of the desired type. See hou.Desktop.createFloatingPaneTab for a description of the parameters. This method differs from createFloatingPaneTab in two ways: First, it returns the floating panel instead of the pane tab. Second, the floating panel that is created from this method is not locked down, and the user can add more pane tabs and split the panes. The following example creates a floating panel with a parameters pane tab and a channel viewer (motion viewer) pane tab: > panel = hou.ui.curDesktop().createFloatingPanel(hou.paneTabType.Parm) > pane1 = panel.panes()[0] > pane2 = pane1.splitVertically() > pane2.tabs()[0].setType(hou.paneTabType.ChannelViewer) """ pass def createFloatingPane(): """None""" pass def paneTabUnderCursor(): """ paneTabUnderCursor(self) Similar to hou.Desktop.paneUnderCursor but return the hou.PaneTab object instead located under the mouse cursor. Return None if no pane tab is located under the mouse cursor. This method does not search floating pane tabs that are not attached to this desktop. Use hou.ui.paneTabUnderCursor to search all the visible pane tabs, regardless of whether they are attached to this desktop. """ pass def Desktop_swigregister(): """None""" pass class Dialog(object): """ hou.Dialog Class representing a Houdini dialog. This class represents only dialogs created by hou..ui.createDialog. Custom dialogs can be created with Houdini's User Interface Script Language. An overview of the language can be found in the Houdini Development Kit (HDK) documentation, specifically in the "Houdini User Interface -> The .ui Script Language" section. """ def setValue(name, value): """ setValue(self, name, value) Set the value of the specified UI variable. Raises hou.TypeError if either name or value is None. Raises hou.OperationFailed if no UI variable with the specified name exists. """ pass def menuItems(name): """ menuItems(self, name) -> tuple of str Return the menu entries for the specified UI variable. Raises hou.TypeError if name is None. Raises hou.OperationFailed if no UI variable with the specified name exists. Raises hou.OperationFailed if the UI variable does not point to a menu. """ pass def waitForValueToChangeTo(name, new_value): """ waitForValueToChangeTo(self, name, new_value) Wait for the specified UI variable to change its value to new_value. This is a blocking call. The method will return execution when the variable has changed to the desired value. Note that Houdini will remain responsive even when this method is blocked waiting. If the variable's current value is already set to new_value then this method will return immediately. Raises hou.TypeError if name is None. Raises hou.OperationFailed if no UI variable with the specified name exists. """ pass def enableValue(name, onoff): """ enableValue(self, name, onoff) Enable or disable the specified UI variable. Set onoff to True to enable the variable. Set onoff to False to disable the variable. Raises hou.TypeError if either name is None. Raises hou.OperationFailed if no UI variable with the specified name exists. """ pass def value(name): """ value(self, name) Return the value of the given UI variable. Raises hou.TypeError if name is None. Raises hou.OperationFailed if no UI variable with the specified name exists. """ pass def setMenuItems(name, items): """ setMenuItems(self, name, items) Set the menu entries in the specified UI variable. Raises hou.TypeError if name is None. Raises hou.OperationFailed if no UI variable with the specified name exists. Raises hou.OperationFailed if the UI variable does not point to a menu. """ pass def callbacks(name): """ callbacks(self, name) -> tuple of callbacks Return all callback functions registered with the given UI variable. Raises hou.TypeError if name is None. Raises hou.OperationFailed if no UI variable with the specified name exists. """ pass def destroy(): """ destroy(self) Delete this dialog. If you call methods on a Dialog instance after it has been destroyed, Houdini will raise hou.ObjectWasDeleted. """ pass def addCallback(name, callback): """ addCallback(self, name, callback) Register a callback function for the specified UI variable. The function is invoked when the value of the UI variable changes and receives no arguments. Raises hou.TypeError if name is None. Raises hou.OperationFailed if no UI variable with the specified name exists. """ pass def removeCallback(name, callback): """ removeCallback(self, name, callback) Remove the specified callback function from the UI variable. Raises hou.TypeError if name is None. Raises hou.OperationFailed if no UI variable with the specified name exists. Raises hou.OperationFailed if the specified callback is not registered with the UI variable. """ pass def Dialog_swigregister(): """None""" pass class DopData(object): """ hou.DopData A piece of data stored inside a DOP network's simulation. Each DOP network builds a tree of data, and then Houdini examines and updates this tree when it runs the simulation. DOP data elements can be DOP objects, geometry, volumes, forces, solvers, etc. The data is arranged in a tree structure, where child nodes are called subdata and are said to be attached to their parent nodes. Under the root of the tree are usually the DOP objects and data describing their relationships. Note that the same piece of data can appear in the tree in multiple locations, with different names. DopData objects thus do not store their name, and the name of a piece of data in the tree is instead stored with its parent data(s). By default, DopData objects store the path within the tree to the data. As a consequence, if the time changes and the solvers within the simulation change the contents of the tree of data, the Python DopData object will update to refer to the simulation's new state. If the data path no longer refers to valid data, Houdini raises hou.ObjectWasDeleted when you try to access the DopData object from Python. If you do not want the DopData to update with changes to the simulation, you can call hou.DopData.freeze. freeze returns another DopData object that refers the simulation's state at the current time, and will not change when the simulation time changes. Each piece of data can contain records, and each record stores a list of name and value pairs called fields. Each record has a name, but it's possible for multiple records with the same name to exist in the same piece of data. In this case, the record also has an index, and you can think of the records as rows of a spreadsheet. """ def removeSubData(data_spec): """ removeSubData(self, data_spec) Remove subdata with the given name. Raises hou.PermissionError if called from outside a script solver DOP. Raises hou.OperationFailed if data with that name already exists. """ pass def creator(): """ creator(self) -> hou.DopNode Return the DOP node that created this DOP data inside the DOP network. """ pass def dataType(): """ dataType(self) -> str Return a string describing the type of data this object contains. > >>> obj = hou.node("/obj/AutoDopNetwork").simulation().objects()[0] > >>> obj.dataType() > 'SIM_Object' See also hou.DopData.dataTypeObject. """ pass def attachSubData(data, new_data_name, avoid_name_collisions=False): """ attachSubData(self, data, new_data_name, avoid_name_collisions=False) Make existing data become subdata of this data. Houdini does not create a duplicate of the data. Instead, the data's parent(s) and this data will both refer to the same instance of subdata. You would call this method from a script solver DOP. data The DopData that will become subdata of this data. new_data_name The name of the new subdata. avoid_name_collisions If True and data with the specified name exists, Houdini will create a unique name that does not conflict with any existing data. Raises hou.OperationFailed if data with this name already exists. If you want to replace existing data it is up to you to first call hou.DopData.removeData. Raises hou.PermissionError if called from outside a script solver DOP. See hou.DopData.copyContentsFrom for an example of how to create a copy of existing data. """ pass def freeze(): """ freeze(self) -> hou.DopData Return a frozen version of this DopData. Frozen versions of the data will not update when the simulation updates. Instead, they will refer to the state of the simulation at the time they were frozen. It is ok to call this method on a DopData object that is already frozen. """ pass def records(record_type): """ records(self, record_type) -> tuple of hou.DopRecord Return a tuple of all the records of this record type. See also hou.DopData.record. This example lists the input affectors for a rigid body box that collides with a ground plane: > >>> obj = hou.node("/obj/AutoDopNetwork").simulation().objects()[-1] > >>> obj.records("RelInAffectors") > (, ) > >>> [record.field("relname") for record in obj.records("RelInAffectors")] > ['merge1', 'staticsolver1_staticsolver1'] > >>> obj.record("RelInAffectors", 1).field("relname") > 'staticsolver1_staticsolver1' """ pass def findAllSubData(data_spec, recurse=False): """ findAllSubData(self, data_spec, recurse=False) -> dict of str to hou.DopData Given a pattern, return a dictionary mapping subdata paths to DOP data instances for all the subdatas whose name matches the pattern. If recurse is True, all grandchildren subdata will be added to the result. > # The following code assumes you have created a box from the shelf and used > # Rigid Bodies > RBD Object on the shelf to make it a rigid body. > >>> obj = hou.node("/obj/AutoDopNetwork").simulation().objects()[0] > >>> obj.findAllSubData("S*").keys() > ['SolverParms', 'Solver'] > >>> obj.findAllSubData("S*", recurse=True).keys() > ['SolverParms', 'Solver/Random', 'SolverParms/ActiveValue', 'Solver'] > >>> obj.findAllSubData("S*/*", recurse=True).keys() > ['SolverParms/ActiveValue', 'Solver/Random'] """ pass def recordTypes(): """ recordTypes(self) -> tuple of str Return a tuple of strings containing the record types stored inside this DOP data. Each DOP data contains records named "Basic" and "Options", and some types of DOP data contain additional records. """ pass def path(): """ path(self) -> str Return the path to this object within the tree of DOP data. This path includes the DOP object or relationship as the first part of the path. Note that the same piece of DOP data can exist in multiple places of the tree. The path returned is the path stored inside this Python DopData object, since the Python object uses the path to look up the underlying data each time you call a method on it. Note that the path is only available for unfrozen objects. If you call this method on a frozen DopData object it raises hou.OperationFailed. """ pass def selectionPath(): """ selectionPath(self) -> str For DopData objects returned from a hou.SceneViewer.selectDynamics function call, this will return the a string that contains both the path to the DOP Network that created the data, and the path within the DOP data tree which uniquely identifies this DopData. This string is specifically intended to be passed in the prior_selection_paths argument of the hou.SceneViewer selection methods. """ pass def id(): """ id(self) -> str Return the globally unique identifier (GUID) for this DOP data. This method is a shortcut for self.record("Basic").field("uniqueid"). If you want an object's index, hou.DopObject.objid. > >>> obj = hou.node("/obj/AutoDopNetwork").simulation().objects()[0] > >>> obj.id() > '0xD011E41C-0x000034AE-0x494C12E4-0x000018B9' > >>> obj.objid() > 0 """ pass def dopNetNode(): """ dopNetNode(self) -> hou.Node Return the DOP network node containing this DOP data. """ pass def findSubData(data_spec): """ findSubData(self, data_spec) -> hou.DopData or None Return the DOP data with the given name that is attached to this DOP data, or None if no such data exists. Note that the name may also be a slash-separated path to nested subdata. See hou.DopData.subData for an example. This method can be approximately implemented as follows: > def findSubData(self, data_spec): > data = self > for name in data_spec.split("/"): > if name not in data.subData(): > return None > data = data.subData()[name] > return data """ pass def subData(): """ subData(self) -> dict of str to hou.DopData Return a dictionary mapping names to DOP data instances for the subdata attached to this data. > # The following code assumes you have created a box from the shelf and used > # Rigid Bodies > RBD Object on the shelf to make it a rigid body. > >>> obj = hou.node("/obj/AutoDopNetwork").simulation().objects()[0] > >>> obj > > >>> obj.recordTypes() > ('Basic', 'Options', 'RelInGroup', 'RelInAffectors') > >>> record = obj.record("Options") > >>> record.fieldNames() > ('name', 'groups', 'affectors', 'affectorids', 'objid') > >>> record.field("name") > 'box_object1' > > >>> obj.subData().keys() > ['PhysicalParms', 'ODE_Body', 'Solver', 'Geometry', 'SolverParms', 'ODE_Geometry', 'Forces', 'Position', 'Colliders'] > >>> obj.findSubData("Forces/Gravity_gravity1") > > >>> obj.findSubData("Forces/Gravity_gravity1").options().field("force") > """ pass def _asVoidPointer(): """None""" pass def copyContentsFrom(data): """ copyContentsFrom(self, data) Copy the contents of the given DopData into this one, adapting the data if it is of a different type. You would call this method from a script solver DOP. Raises hou.PermissionError if called from outside a script solver DOP. Use this method along with hou.DopData.createSubData to copy existing subdata: > def copySubData(new_parent_data, data_to_copy, new_data_name, avoid_name_collisions=False): > '''Create a copy of data and attach it to other data.''' > new_data = new_parent_data.createSubData(new_data_name, data_to_copy.dataType(), avoid_name_collisions) > new_data.copyContentsFrom(data_to_copy) > return new_data """ pass def isFrozen(): """ isFrozen(self) -> bool Return whether or not this data is frozen. See hou.DopData.freeze for more information. """ pass def simulation(): """ simulation(self) -> hou.DopSimulation Return the DOP simulation containing this DOP data. This method is a shortcut for self.dopNetNode().simulation(). """ pass def record(record_type, record_index=0): """ record(self, record_type, record_index=0) -> hou.DopRecord Given a record type name return that record, or None if no record exists with that name. If this DOP data contains multiple records with this record type name you can think of each record as a row in a spreadsheet, and record_index determines which one is returned. Use len(self.records(record_type)) to determine how many records of this type are in this DOP data. Use hou.DopData.recordTypes to get a tuple of record types in a DOP data. See also hou.DopData.records for an example, and see hou.DopData.options for a way to easily access the "Options" record. """ pass def options(): """ options(self) -> hou.DopRecord Return the Options record. This method is a shortcut for self.record("Options"). """ pass def createSubData(data_name, data_type="SIM_EmptyData", avoid_name_collisions=False): """ createSubData(self, data_name, data_type="SIM_EmptyData", avoid_name_collisions=False) -> hou.DopData Create subdata under this data with the specified name and type. You would call this method from a script solver DOP. data_name The name of the new data. Note that this name may contain slashes to create subdata on existing data. data_type Either the name of the data type to create or a hou.DopDataType instance. If you simply want something containing an empty options record, use "SIM_EmptyData". avoid_name_collisions If True and data with the specified name exists, Houdini will create a unique name that does not conflict with any existing data. Raises hou.OperationFailed if data with this name already exists. If you want to replace existing data it is up to you to first call hou.DopData.removeData. Raises hou.PermissionError if called from outside a script solver DOP. Use hou.DopData.attachSubData to create a reference to existing data. See hou.DopData.copyContentsFrom for an example of how to create a copy of existing data. """ pass def DopData_swigregister(): """None""" pass class DopNode(Node): """ hou.DopNode Represents a dynamics node. """ def objectsToProcess(): """ objectsToProcess(self) -> tuple of hou.DopObject Return a tuple of DOP objects that this node should process. Raises hou.PermissionError if called from outside a DOP implemented in Python. """ pass def processedObjects(): """ processedObjects(self) -> tuple of hou.DopObject Return a tuple of DOP objects that this DOP node processes. """ pass def isBypassed(): """ isBypassed(self) -> bool Returns whether the node's bypass flag is on. """ pass def createdObjects(): """ createdObjects(self) -> tuple of hou.DopObject Return a tuple of DOP objects that this DOP node creates. """ pass def setDisplayFlag(on): """ setDisplayFlag(self, on) Turn the node's display flag on or off. This the orange Output flag in the interface. """ pass def dopNetNode(): """ dopNetNode(self) -> hou.Node Return the DOP network node that contains this DOP node. """ pass def isDisplayFlagSet(): """ isDisplayFlagSet(self) -> bool Return whether this node's display flag is on. This is the orange Output flag in the interface. """ pass def renderNode(): """None""" pass def simulation(): """ simulation(self) -> hou.DopSimulation Return the simulation that this node contributes to. This method is a shortcut for self.dopNetNode().simulation(). """ pass def setTemplateFlag(on): """ setTemplateFlag(self, on) Turns this node's template flag on or off. This is the brown Hidden flag in the interface. """ pass def bypass(on): """ bypass(self, on) Turn the node's bypass flag on or off, making this node have no effect. """ pass def pythonSolverData(): """ pythonSolverData(self) -> hou.DopData If this node is a Python DOP solver, return the solver data added to the DOP network by this node. Otherwise, raises hou.PermissionError. This method is called from Python DOP solvers when the solver is not running, to copy data from the DOP parameters into the solver data. See also hou.dop.scriptSolverData. """ pass def isTemplateFlagSet(): """ isTemplateFlagSet(self) -> bool Returns whether this node's template flag is on. This is the brown Hidden flag in the interface. """ pass def displayNode(): """ displayNode(self) -> hou.Node or None If this node is a subnet (i.e. it contains child nodes), return the child that has its display flag set, or None if there are no children. Otherwise, return None. """ pass def DopNode_swigregister(): """None""" pass class DopObject(DopData): """ hou.DopObject A type of DOP data that contains an object in the simulation. 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. """ def matches(pattern): """ 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 """ pass def transform(include_geometry_transform=True): """ transform(self, include_geometry_transform=True) -> hou.Matrix4 Return the transformation matrix for this object. If include_geometry_transform is False, the result is determined only by the object's Position data. Otherwise, it is the transform in the object's Geometry data, followed by the position transform. For simple DopData types, this method can be approximately implemented as follows: > def transform(self, include_geometry_transform=True): > result = hou.hmath.identityTransform() > > geometry = self.findSubData("Geometry") > if include_geometry_transform and geometry is not None: > result *= geometry.record("Transform").field("transform") > > # Retrieve the position. If there is Geometry data, use its > # positionpath field to get the SIM_Position subdata. If not, look > # for data named Position. > position = None > if geometry is not None: > position = geometry.findSubData( > geometry.options().field("positionpath")) > if position is None: > position = self.findSubData("Position") > > # If we found position data, build a transformation from the pivot, > # rotation quaternion, and translate. > if position is not None: > options = position.options() > rotation = hou.Matrix4(options.field("orient").extractRotationMatrix3()) > result *= (hou.hmath.buildTranslate(-options.field("p")) * > rotation * > hou.hmath.buildTranslate(options.field("p")) * > hou.hmath.buildTranslate(options.field("t"))) > > return result """ pass def name(): """ name(self) -> str Return the name of this DOP object. """ pass def geometry(name="Geometry"): """ geometry(self, name="Geometry") -> hou.Geometry or None If this DOP object has SIM_Geometry subdata with the given name, return its corresponding read-only hou.Geometry object. Otherwise, this method returns None. """ pass def editableGeometry(name="Geometry"): """ editableGeometry(self, name="Geometry") -> hou.EditableDopGeometryGuard or None If this method is called from a Python solver DOP and it has SIM_Geometry (or SIM_GeometryCopy) subdata with the given name, it returns a Python guard object that can be used with the "with" statement to access and modify the corresponding hou.Geometry object. In Python 2.5, the with statement is not enabled by default. To enable it, you need to add the following line at the beginning of your script/module: > from __future__ import with_statement For example, the following code in a Python solver DOP will add a point at the origin of the geometry: > with dop_object.editableGeometry() as geo: > geo.createPoint() Raises hou.PermissionError if not called from a Python solver DOP. """ pass def objid(): """ 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] """ pass def DopObject_swigregister(): """None""" pass class DopRecord(object): """ hou.DopRecord A table of values stored inside a DopData. See hou.DopData for a description of DOP data, records, and fields. """ def recordType(): """ recordType(self) -> str Return the name of this record. See hou.DopData.recordTypes for more information. """ pass def setFieldBool(field_name, value): """ setFieldBool(self, field_name, value) Set a field to the specified boolean value. You would call this method from a script solver DOP. To set a field to a different type, use hou.DopRecord.setField. Raises hou.PermissionError if called from outside a script solver DOP. """ pass def fieldType(field_name): """ fieldType(self, field_name) -> hou.fieldType enum value Return a hou.fieldType enumerated value that describes the type of data stored in a field. Returns hou.fieldType.NoSuchField if no field exists with that name. See hou.DopRecord.field for an example. """ pass def setField(field_name, value): """ setField(self, field_name, value) Set a field to the specified value. You would call this method from a script solver DOP. value may be an int, float, str, hou.Vector2, hou.Vector3, hou.Vector4, hou.Quaternion, hou.Matrix3, or hou.Matrix4. Unfortunately, this method cannot be used to set a field to a boolean (True or False) value. If you pass a boolean to this method, it will set the field to the integer 1 or 0. To properly set it to a boolean value, use hou.DopRecord.setFieldBool. Raises hou.PermissionError if called from outside a script solver DOP. """ pass def fieldNames(): """ fieldNames(self) -> tuple of str Return the names of all the fields inside this record. See hou.DopRecord.field for an example. """ pass def field(): """ field(self) -> int, bool, float, str, hou.Vector2, hou.Vector3, hou.Vector4, hou.Quaternion, hou.Matrix3, or hou.Matrix4 Return the value of a field inside this record, or None if no such field exists. Note that you can add the suffixes "x", "y", and "z" to a vector field's name to access the individual float values. > # The following code assumes you have created a box from the shelf and used > # Rigid Bodies > RBD Object on the shelf to make it a rigid body. > >>> record = hou.node("/obj/AutoDopNetwork").simulation().findData("box_object1/Forces/Gravity_gravity1").options() > >>> record.fieldNames() > ('force', 'handlepos') > >>> record.field("force") > > >>> record.field("forcey") > -9.8066501617431641 > >>> record.fieldType("force") > fieldType.Vector3 > >>> record.fieldType("forcey") > fieldType.Float This example function creates a dict out of a record: > def recordAsDict(record): > return dict((field_name, record.field(field_name)) > for field_name in record.fieldNames()) The following function returns the geometry transform of an object: > def dopGeometryTransform(dopnet_node, object_name): > subdata = dopnet_node.simulation().findObject(object_name).findSubData("Geometry") > return subdata.record("Transform").field("transform") """ pass def recordIndex(): """ recordIndex(self) -> int Return the index of this record. See hou.DopData.record and hou.DopData.records for more information. """ pass def DopRecord_swigregister(): """None""" pass class DopRelationship(DopData): """ hou.DopRelationship A type of DOP data that stores which DOP objects affect one another. In addition to the "Basic" and "Options" records, a DopRelationship contains "ObjInAffectors" and "ObjInGroup" records. The former contains the objects doing the affecting and the latter contains the objects being affected. See hou.DopSimulation.relationships for an example. """ def matches(pattern): """ matches(self, pattern) -> bool Return whether or not this relationship's name matches a pattern. See hou.DopObject.matches for more information. """ pass def setGroup(objects): """ setGroup(self, objects) Sets the list of objects that are being affected. This corresponds to the "ObjInGroup" record. objects: A list of DOP objects. Raises hou.PermissionError if called from outside a Python DOP. """ pass def name(): """ name(self) -> str Return the name of this DOP relationship. """ pass def setAffectorGroup(objects): """ setAffectorGroup(self, objects) Sets the list of objects that are doing the affecting. This corresponds to the "ObjInAffectors" record. objects: A list of DOP objects. Raises hou.PermissionError if called from outside a Python DOP. """ pass def DopRelationship_swigregister(): """None""" pass class DopSimulation(object): """ hou.DopSimulation A dynamics simulation contained inside a DOP network node. See hou.DopData for more information about the contents of a DOP simulation. Note that methods of this class implicitly use the simulation data from the current frame. """ def relationships(): """ relationships(self) -> tuple of hou.DopRelationship Return a tuple of hou.DopRelationship objects for all the DOP relationships in the simulation. > # The following example assumes you have created two box objects and made > # them rigid bodies. > >>> simulation = hou.node("/obj/AutoDopNetwork").simulation() > >>> relationship = simulation.relationships()[1] > >>> affecting_objects = [ > ... simulation.objects()[record.field("objid")] > ... for record in relationship.records("ObjInAffectors")] > >>> [obj.name() for obj in affecting_objects] > ['box_object1'] > >>> affected_objects = [ > ... simulation.objects()[record.field("objid")] > ... for record in relationship.records("ObjInGroup")] > >>> [obj.name() for obj in affected_objects] > ['box_object2'] """ pass def findRelationship(rel_spec): """ findRelationship(self, rel_spec) -> hou.DopRelationship Find a DOP relationship by name. Return None if no such relationship with that name exists. See also hou.DopSimulation.relationships. """ pass def findAllObjects(obj_spec): """ findAllObjects(self, obj_spec) -> tuple of hou.DopObject Given a pattern, return a tuple of DOP objects whose names match the pattern. > >>> simulation = hou.node("/obj/AutoDopNetwork").simulation() > >>> [obj.name() for obj in simulation.findAllObjects("box_object?")] > ['box_object1', 'box_object2'] > >>> [obj.name() for obj in simulation.findAllObjects("o* b*")] > ['obj1', 'obj2', 'box_object1', 'box_object2'] """ pass def memoryUsage(): """ memoryUsage(self) Return the simulation's total memory usage. """ pass def findAllData(data_spec): """ findAllData(self, data_spec) -> tuple of hou.DopData Given a pattern, return a tuple of DOP data whose names match the pattern. See also hou.DopSimulation.findData. """ pass def objects(): """ objects(self) -> tuple of hou.DopData Return a tuple of all the DOP objects in the simulation. You cannot index into this list using the object ID (see hou.DopObject.objid). To create a dictionary mapping object IDs to hou.DopObjects, do this: > id_dict = dict((obj.objid(), obj) for obj in simulation.objects()) """ pass def findAllRelationships(rel_spec): """ findAllRelationships(self, rel_spec) -> tuple of hou.DopRelationship Return a tuple of hou.DopRelationship objects whose names match a pattern. See also hou.DopSimulation.relationships and hou.DopSimulation.findRelationship. """ pass def findData(data_spec): """ findData(self, data_spec) -> hou.DopData or None Return the DOP data with the given name. Note that the name may also be a slash-separated path to nested subdata. If the data path refers to a DOP object, this method returns a hou.DopObject instance. If it refers to a DOP relationship, it returns a hou.DopRelationship instance. Otherwise, it returns a hou.DopData instance. Note this method implicitly uses the simulation data from the current frame. See also hou.DopData.findSubData. """ pass def createRelationship(name): """ createRelationship(self, name) -> hou.DopRelationship Create and return a new DOP relationship, or return None if the relationship was not created successfully. name The name of the new relationship. Raises hou.PermissionError if called from outside a Python DOP. Use hou.DopData.copyContentsFrom to clone data from an existing relationship, and use hou.DopRelationship.setGroup and hou.DopRelationship.setAffectorGroup to update the "ObjInGroup" and "ObjInAffectors" records. """ pass def removeRelationship(rel): """ removeRelationship(self, rel) Remove the given DOP relationship from the simulation. rel The hou.DopRelationship to remove. Raises hou.PermissionError if called from outside a Python DOP. """ pass def dopNetNode(): """ dopNetNode(self) -> hou.Node Return the DOP network node containing this simulation. """ pass def createObject(name, solve_on_creation_frame): """ createObject(self, name, solve_on_creation_frame) -> hou.DopObject Create and return a new DOP object, or return None if the object was not created successfully. name The name of the new object. solve_on_creation_frame If True, the object will be solved on its first frame of existance. Raises hou.PermissionError if called from outside a Python DOP. Use hou.DopData.copyContentsFrom to clone data from an existing object. """ pass def time(): """ time(self) Return the simulation's current time. This value is often the same as hou.time, unless it is called from a Python solver DOP or the Time Scale or Offset Time parameters of the DOP network have been changed from their default values. """ pass def removeObject(object): """ removeObject(self, object) Remove the given DOP object from the simulation. object The hou.DopObject to remove. Raises hou.PermissionError if called from outside a Python DOP. """ pass def findObject(obj_spec): """ findObject(self, obj_spec) -> hou.DopObject or None Return the DOP object with the given name, or None if no object exists with that name. See also hou.DopSimulation.findData and hou.DopSimulation.objects. """ pass def DopSimulation_swigregister(): """None""" pass class Drawable(object): """ hou.Drawable Represents extra geometry to draw in the viewer alongside user content (for example, as guide geometry). OVERVIEW You can attach geometry to a viewer in a Drawable object, causing the geometry to appear in the viewer even though the geometry is not actually part of the scene. This is useful to show _guide geometry_ in a custom Python state. > import hou > # Create an empty geometry object > geo = hou.Geometry() > # Get the verb from the Box node > box_verb = hou.sopNodeTypeCategory().nodeVerb("box") > # Set the verb's parameters > box_verb.setParms({ > "t": hou.Vector3(0.5, 0.5, -0.5), > "scale": 0.5, > }) > # Execute the verb and put its output in the Geometry object > box_verb.execute(geo, []) > > # Grab a reference to the viewer > scene_viewer = hou.ui.paneTabOfType(hou.paneTabType.SceneViewer) > # Create a Drawable object > drawable = hou.Drawable(scene_viewer, geo, "my_guide") > # Set the Drawable display mode as wireframe (this is the default) > drawable.setDisplayMode(hou.drawableDisplayMode.WireframeMode) > # Enable and show the drawable geometry > drawable.enable(True) > drawable.show(True) > # Tumble the view to see the geometry > import hou > # Create a geometry from the Sphere node > sphere_verb = hou.sopNodeTypeCategory().nodeVerb("sphere") > geo = hou.Geometry() > sphere_verb.execute(geo, []) > > # Add color and alpha attributes to the sphere > color_attrib = geo.addAttrib(hou.attribType.Prim, "Cd", (1.0, 1.0, 1.0)) > alpha_attrib = geo.addAttrib(hou.attribType.Prim, "Alpha", 1.0) > > color = hou.Color(1.0, 0.0, 0.0) > for prim in geo.prims(): > prim.setAttribValue(color_attrib, color.rgb()) > prim.setAttribValue(alpha_attrib, 0.7) > > # Create a Drawable object > scene_viewer = hou.ui.paneTabOfType(hou.paneTabType.SceneViewer) > drawable = hou.Drawable(scene_viewer, geo, "my_sphere") > # Set the Drawable display mode with the current viewport shading mode > drawable.setDisplayMode(hou.drawableDisplayMode.CurrentViewportMode) > # Set the size of the sphere > drawable.setTransform(hou.hmath.buildScale(0.5, 0.5, 0.5)) > drawable.enable(True) > drawable.show(True) TIPS AND NOTES * The Drawable object keeps a reference to the Geometry object you pass. You can change the Geometry object's contents and the next time the viewer redraws it will draw the new contents. * When you create the Drawable object, it is disabled and hidden. You need to call enable(True) and then show(True) for the geometry to appear. * Even after they are activated and shown, Drawable geometry does not appear in the viewer until the next redraw (for example, when the user changes the view). You can force an individual viewport to redraw using hou.GeometryViewport.draw. > scene_viewer.curViewport().draw() * You can generate the contents of a Geometry object from scratch using verbs, or grab a copy of the output of a SOP node using hou.SopNode.geometry. * You can also use hou.drawablePrimitive to specify a built-in shape to generate the content of a Drawable object. * enabling/disabling a drawable may cause performances issues if performed too often, especially with large geometries. It's good practice to use show instead of enable for hiding and showing a drawable. * It's also good practice to disable drawables when they are not actively used in a viewer. * The drawable geometry will appear in the viewer until you disable it, or the Drawable object is deleted. If there are no references to the object, Python will automatically delete it during garbage collection, and the guide geometry will disappear. So, you need to make sure to keep a live reference to the object as long as you want it to appear. If you're using Drawable to draw guide geometry for a custom state, you will generally store a reference to the Drawable object on the state implementation object. """ def enable(selfvalue): """ show(self,value) Shows or hides the handle. value Bool value, True to show the handle, False to hide it. """ pass def show(value): """ show(self, value) Displays or hides the geometry in the viewport. The object must be enabled first. It will appear the next time the viewer redraws. value True to show the geometry or False to hide it. """ pass def setTransform(xform): """ setTransform(self, xform) Sets the transform matrix of the geometry. The changes will appear the next time the viewer redraws. xform A hou.Matrix4 transformation matrix to set the geometry's tranlation, rotation, and scale. """ pass def setDisplayMode(): """ displayMode(self): -> hou.drawableDisplayMode Returns the display mode of the geometry. """ pass def displayMode(): """None""" pass def setWireframeColor(color): """ setWireframeColor(self, color) Updates the color of the geometry when the drawable display mode is set to hou.drawableDisplayMode.WireframeMode. The change will appear the next time the viewer redraws. color A hou.Color value to specify the primitive color. """ pass def transform(): """ transform(self): -> hou.Matrix4 Returns the geometry transform matrix. """ pass def name(): """ name(self) The name of this drawable. """ pass def Drawable_swigregister(): """None""" pass class Edge(object): """ hou.Edge Each Edge object resides inside a Geometry object and stores an edge. Edges are reprsented as pairs of points. """ def edgeId(): """ edgeId(self) -> str Return a string such as p8-9 that identifies the edge """ pass def geometry(): """None""" pass def length(): """ length(self) -> float Returns the length of this edge """ pass def points(): """ points(self) -> tuple of hou.Point Return a tuple of the points that make up this edge. """ pass def prims(): """ prims(self) -> tuple of hou.Prim Return a tuple of the prims that has this edge """ pass class EdgeGroup(object): """ hou.EdgeGroup A named group of edges inside a Geometry object. Edge groups reside inside the geometry, and each edge group has a unique name. See hou.Edge for more information about edges. See also hou.PrimGroup and hou.PointGroup. REPLACES """ def edges(): """ edges(self) -> tuple of hou.Edge Return the contents of this group. """ pass def name(): """ name(self) Return the name of the group. Each edge group has a unique name. """ pass def geometry(): """ geometry(self) -> hou.Geometry Return the geometry object containing this group. """ pass def clear(): """None""" pass def contains(edge): """ contains(self, edge) -> bool Return whether or not an edge is in this group. Raises hou.OperationFailed if the edge belongs to a different geometry object than this group. """ pass def remove(edge_or_list_or_edge_group): """ remove(self, edge_or_list_or_edge_group) If given a hou.Edge or a list of hou.Edge's, remove the edge(s) from the group. If given a hou.EdgeGroup, remove all edges in the other group from this group (the other group is unaffected). You would typically call this method from the code of a Python-defined SOP. It is not an error to try to remove an edge from the group that wasn't already in the group. Raises hou.GeometryPermissionError if this geometry is not modifiable. Raises hou.OperationFailed if the edge belongs to a different geometry object than this group. """ pass def add(edge_or_list_or_edge_group): """ add(self, edge_or_list_or_edge_group) If given a hou.Edge or a list of hou.Edge's, add the edge(s) to the group. If given a hou.EdgeGroup, merge the contents of the other edge group with this group (the other group is unaffected). You would typically call this method from the code of a Python-defined SOP. It is ok to add edges to the group that were already in the group. Raises hou.GeometryPermissionError if this geometry is not modifiable. Raises hou.OperationFailed if the edge or edge group belong to a different geometry object than this group. """ pass def destroy(): """ destroy(self) Remove this group from the geometry. You would typically call this method from the code of a Python-defined SOP. Raises hou.GeometryPermissionError if this geometry is not modifiable. """ pass def EdgeGroup_swigregister(): """None""" pass def Edge_swigregister(): """None""" pass class EditableDopGeometryGuard(object): """None""" def EditableDopGeometryGuard_swigregister(): """None""" pass class EnumValue(object): """ hou.EnumValue This class is the base class for an enumeration value. It cannot be instanced and is not meant to be used directly by the user. All the built-in HOM enumeration values are derived from this class such as hou.paneTabType.*, hou.severityType.*, and hou.connectivityType.*. """ def name(): """ name(self) -> string Returns the name of the enumeration value. """ pass def EnumValue_swigregister(): """None""" pass class Error(Error): """ hou.Error Base class for all exceptions in the hou module. You can check if an exception instance is a Houdini-specific exception using isinstance(ex, hou.Error). """ def exceptionTypeName(): """ exceptionTypeName(self) -> str Return the name of the exception type. Instances of different subclasses of hou.Error will return different names. Instances of the base class will return "Error". You can also use str(e.__class__) to get the name of the subclass. """ pass def instanceMessage(): """ instanceMessage(self) -> str Return a message specific to the exception instance. """ pass def description(): """ description(self) -> str Return a description of the class of exception. The description is not related to the exception instance. """ pass def Error_swigregister(): """None""" pass class Face(Prim): """ hou.Face A Face is a kind of geometry primitive (Prim object) that contains a sequence of vertices (Vertex objects). How these vertices are used depends on the type of face; polygons, for example, use the vertices to define the edges of the polygon, while NURBS curves use them as control points. A hou.Surface, on the other hand, stores a two dimension grid of vertices, and might be a NURBS surface, Bezier surface, or quadrilateral mesh. """ def normal(): """ normal(self) -> hou.Vector3 Return the vector that's perpendicular to the face. """ pass def positionAt(u): """ positionAt(self, u) -> hou.Vector3 Given a normalized (i.e. from 0 to 1) u value, return the position of the curve at that parametric location. """ pass def vertex(index): """ vertex(self, index) -> hou.Vertex A shortcut for self.vertices()[index]. You probably don't need to call this method. This method supports negative indices to index from the end, just like self.vertices()[index] would. Also, like Python's indexing operator, it will raise IndexError when the index is out of range. """ pass def attribValueAt(attrib_or_name, u, du=0): """ attribValueAt(self, attrib_or_name, u, du=0) -> int, float, str or tuple Return an attribute value at a normalized u parametric position on the curve. If du is 0, returns the interpolated attribute value; otherwise, returns the derivative of the attribute value. Raises hou.OperationFailed if the attribute is not a point or vertex attribute. If you want a primitive attribute value, it doesn't vary across the surface, so use hou.Prim.attribValue. """ pass def addVertex(point): """ addVertex(self, point) -> hou.Vertex Create a new vertex inside this face, adding it to the end of the vertex list. You would typically call this method from the code of a Python-defined SOP. point is a hou.Point object that the new vertex will refer to. See hou.Vertex for information on the relationship between points and vertices. Raises hou.GeometryPermissionError if this geometry is not modifiable. > # These arrays define point positions and a set of polygons composed > # of those points. Note that the point positions could also be floating > # point values. > point_positions = ((0,0,0), (1,0,0), (1,1,0), (0,1,0)) > poly_point_indices = ((0,1,2), (2,3,0)) > > geo = hou.pwd().geometry() > > # Create all the points. > points = [] > for position in point_positions: > points.append(geo.createPoint()) > points[-1].setPosition(position) > > # Now create the polygons, adding vertices that refer to the points. > for point_indices in poly_point_indices: > poly = geo.createPolygon() > for point_index in point_indices: > poly.addVertex(points[point_index]) See also: * hou.Geometry.createPoint * hou.Geometry.createPolygon """ pass def arcLength(u_start, u_stop, divs=10): """ arcLength(self, u_start, u_stop, divs=10) ->float Given normalized (i.e. from 0 to 1) u_start and u_stop values, return the length of the arc of curve. divs represents the number of divisions per spans. Increasing it increases the precision of the computation. """ pass def isClosed(): """ isClosed(self) -> bool Return whether the first and last vertex are connected. An open face forms a multi-segment line or curve, since the first and last vertices are not connected. A closed face forms a very thin surface. """ pass def setIsClosed(on): """ setIsClosed(self, on) Set whether the face is open or closed. See hou.Face.isClosed for more information. You would typically call this method from the code of a Python-defined SOP. Note that this method will raise hou.OperationFailed on a Bezier curve. See hou.Geometry.createBezierCurve for more information. Raises hou.GeometryPermissionError if this geometry is not modifiable. """ pass def closed(): """None""" pass def Face_swigregister(): """None""" pass class FlipbookSettings(object): """ hou.FlipbookSettings A collection of options for the viewport flipbook dialog. The viewport flipbook has a set of options beyond the Display Options provided by the viewport itself. This object contains all these settings. * Use hou.SceneViewer.flipbookSettings to get this object representing the current flipbook settings for the viewer. Changing the options on this object changes the settings for future interactive flipbooks generated from the viewer. * You can also pass the settings object directly to hou.SceneViewer.flipbook to generate a flipbook using the current settings. * To generate a flipbook using custom settings, first use hou.SceneViewer.flipbookSettings to get the current settings, and call hou.FlipbookSettings.stash to create a copy (so changing the options won't affect the viewer's interactive options). Then modify the settings and pass the object to hou.SceneViewer.flipbook. > # Copy the viewer's current flipbook settings > flipbook_options = scene.flipbookSettings().stash() > > # Change the settings however you need > # (for example, set the frame range and output filename) > flipbook_options.frameRange( (frame, frame) ) > flipbook_options.output(filename) > > # Generate the flipbook using the modified settings > scene.flipbook(scene.curViewport(), flip_options) """ def LUT(): """ LUT(self) -> str The current LUT used for flipbooking. """ pass def frameIncrement(): """ frameIncrement(self) -> int The current frame increment of the flipbook. """ pass def visibleTypes(): """ visibleTypes(self) -> hou.flipbookObjectType The current visible object types. """ pass def initializeSimulations(): """ initializeSimulations(self) -> bool The current state of simulation initialization. True indicates that simulations will be reset, and False indicates that any cached results will be used. """ pass def focusDistance(): """ focusDistance(self) -> double Query the focus distance setting, the distance from the camera where objects are perfectly in focus. """ pass def copy(from_settings): """ copy(self, from_settings) Copy all settings in from_settings into this object. """ pass def cropOutMaskOverlay(): """ cropOutMaskOverlay(self) -> bool Query if the resulting image will be cropped to the camera area. """ pass def useResolution(): """ useResolution(self) -> bool Query if the resolution is defined by the flipbook dialog (True) or by the current size of the viewport (False). """ pass def depthOfFieldFromCamera(): """ depthOfFieldFromCamera(self) -> bool Query if the depth of field parameters (focusDistance, aperture, fStop) are sourced from a camera (True) or the flipbook dialog settings """ pass def visibleObjects(): """ visibleObjects(self) -> str The current visibility list for objects to be rendered. """ pass def aperture(): """ aperture(self) -> double Query the default aperture setting. """ pass def backgroundImage(): """ backgroundImage(self) -> str The pathname of the background image or images. """ pass def shutterFromCamera(): """ shutterFromCamera(self) -> bool Query if the shutter is sourced from the camera or the flipbook dialog. """ pass def audioFrameStart(): """ audioFrameStart(self) -> double The frame where the audio will be playing audioTimeOffset seconds. """ pass def useMotionBlur(): """ useMotionBlur(self) -> bool Query if motion blur is enabled. """ pass def sessionLabel(): """ sessionLabel(self) -> str The current flipbook session label. """ pass def motionBlurFrameRange(): """ motionBlurFrameRange(self) -> hou.flipbookMotionBlurBias Query the subframe range for motion blur: * hou.flipbookMotionBlurBias.Centered: Subframe range is centered around the currently rendering frame. * hou.flipbookMotionBlurBias.Forward: Subframe range starts at the currently rendering frame. * hou.flipbookMotionBlurBias.Previous: Subframe range ends at the currently rendering frame. """ pass def outputZoom(): """ outputZoom(self) -> int Query the output zoom level. Valid settings are 100, 75, 50, and 25. """ pass def useDepthOfField(): """ useDepthOfField(self) -> bool Query if depth of field rendering is on. """ pass def fStop(): """ fStop(self) -> double Query the f-stop setting. """ pass def motionBlurSegments(): """ motionBlurSegments(self) -> int Query the number of subframes currently used for motion blur. """ pass def leaveFrameAtEnd(): """ leaveFrameAtEnd(self) -> bool Query if the playbar frame is being left at the last frame (True) or restored to the previous frame (False). """ pass def audioFilename(audio_file): """ audioFilename(self, audio_file) The current audio file used by the flipbook. """ pass def frameRange(): """ frameRange(self) -> tuple of double The current frame range of the flipbook, as a tuple of 2 ints (start, end). """ pass def fromAudioPanel(): """ fromAudioPanel(self) -> bool When enabled, the flipbook gets it's audio settings from the Audio Panel. """ pass def audioTimeOffset(): """ audioTimeOffset(self) -> double The audio time that will be playing at audioFrameStart frames. """ pass def beautyPassOnly(): """ beautyPassOnly(self) -> bool The current state of the beauty pass render flag. """ pass def overrideLUT(): """ overrideLUT(self) -> bool The current state of the LUT override. """ pass def outputToMPlay(): """ outputToMPlay(self) -> bool Query if images are being sent to an interactive MPlay sesion. """ pass def renderAllViewports(): """ renderAllViewports(self) -> bool Render all visible viewports (True), or only the currently selected one. """ pass def scopeChannelKeyframesOnly(): """ scopeChannelKeyframesOnly(self) -> bool The current state of scoped keyframe mode. """ pass def overrideGamma(): """ overrideGamma(self) -> bool The current state of the gamma override. """ pass def stash(): """ stash(self) -> hou.FlipbookSettings Return a new copy of this FlipbookSettings object. Changes to this new object will not update the flipbook dialog, but can be passed to hou.SceneViewer.flipbook() as the settings to use. """ pass def shutter(): """ shutter(self) -> double Query the current camera shutter for motion blur. """ pass def depthOfFieldQuality(): """ depthOfFieldQuality(self) -> double Return the number of images rendered to simulate depth of field blur. """ pass def blockEditing(): """ blockEditing(self) -> bool The current state of block editing mode. """ pass def output(): """ output(self) -> str The current output destination for flipbooking. """ pass def antialias(): """ antialias(self) -> hou.flipbookAntialias Query the current flipbook antialiasing setting: * hou.flipbookAntialias.UseViewportSetting: Use the current viewport setting. * hou.flipbookAntialias.Off: No antialiasing. * hou.flipbookAntialias.Fast: Minimal 2-sample antialiasing. * hou.flipbookAntialias.Good: 4-sample antialiasing. * hou.flipbookAntialias.HighQuality: 8-sample antialiasing. """ pass def resolution(): """ resolution(self) -> tuple of int Returns a 2-tuple of ints representing the width and height of the flipbook dialog image output resolution. This is not used unless useResolution is enabled. """ pass def appendFramesToCurrent(): """ appendFramesToCurrent(self) -> bool The current state of the flipbook append mode, either Append (True) or Overwrite (False). """ pass def gamma(): """ gamma(self) -> double The current gamma value. """ pass def FlipbookSettings_swigregister(): """None""" pass class FloatParmTemplate(ParmTemplate): """ hou.FloatParmTemplate Describes a parameter tuple containing floating point values. """ def setDefaultExpression(tuple_of_default_expressions): """ setDefaultExpression(self, tuple_of_default_expressions) Set the default expression for new parameter instances to a sequence of strings. See the hou.FloatParmTemplate.defaultExpression method for more information. Note that if the number of strings in the sequence is different from the number of components in the parm template, any extra values will be discarded and any missing expressions will become the empty string. """ pass def setDefaultValue(tuple_of_default_values): """ setDefaultValue(self, tuple_of_default_values) Set the default value for new parameter instances to a sequence of floats. See the defaultValue method for more information. Note that if the number of floats in the sequence is different from the number of components in the parm template, any extra values will be discarded and any missing values will become zeros. """ pass def setDefaultExpressionLanguage(tuple_of_default_expression_languages): """ setDefaultExpressionLanguage(self, tuple_of_default_expression_languages) Set the default expression language for new parameter instances to a sequence of hou.scriptLanguage values. See the defaultExpressionLanguage method for more information. Note that if the number of hou.scriptLanguage values in the sequence is different from the number of components in the parm template, any extra values will be discarded and any missing expression languages will become hou.scriptLanguage.Hscript. """ pass def maxValue(): """ maxValue(self) -> float Return the minimum value of the parameter. See also the minIsStrict method. """ pass def minValue(): """ minValue(self) -> float Return the minimum value of the parameter. See also the minIsStrict method. """ pass def setMaxValue(max_value): """ setMaxValue(self, max_value) Set the maximum value of the parameter. See the maxValue method for more information. """ pass def setMinIsStrict(on): """ setMinIsStrict(self, on) Set whether the minimum value is strictly enforced. See the minIsStrict method for more information. """ pass def setMaxIsStrict(on): """ setMaxIsStrict(self, on) Set whether the maximum value is strictly enforced. See the maxIsStrict method for more information. """ pass def defaultExpression(): """ defaultExpression(self) -> tuple of strings Return the default expression for new parameter instances. The default expression takes precedence over the default value. If a component has no default expression (i.e. an empty string), then the default value is used for new parameter instances. Note that the default expression language is needed to interpret the meaning of the default expression. For example, suppose this parm template is named "t", the naming scheme is XYZW, it has 3 components, the default value is (1.0, 2.0, 3.0), the default expression is ("$F", "hou.frame()", "") and the default expression language is (hou.scriptLanguage.Hscript, hou.scriptLanguage.Python, hou.scriptLanguage.Hscript). Then the corresponding parm tuple instance on a node would be named "t" and would contain parameters "tx", "ty", "tz". When the node is created, "tx" would have a default Hscript expression of "$F", "ty" would have a default Python expression of "hou.frame()", and "tz" would have a default value of 3.0. """ pass def defaultValue(): """ defaultValue(self) -> tuple of float Return the default value for new parameter instances. For example, suppose this parm template is named "t", the naming scheme is XYZW, it has 3 components, and the default value is (1.0, 2.0, 3.0). The corresponding parm tuple instance on a node would be named "t" and would contain parameters "tx", "ty", and "tz". When the node is created, "tx" would be 1.0, "ty" would be 2.0, and "tz" would be 3.0. """ pass def setMinValue(min_value): """ setMinValue(self, min_value) Set the minimum value of the parameter. See the minValue method for more information. """ pass def defaultExpressionLanguage(): """ defaultExpressionLanguage(self) -> tuple of hou.scriptLanguage Return the default expression language for new parameter instances. The default expression language only applies if the default expression is set. If the default expression of a component is not set, then the expression language is set to hou.scriptLanguage.Hscript. """ pass def minIsStrict(): """ minIsStrict(self) -> bool Return whether the minimum value is strictly enforced. If a minimum value is not strictly enforced, the slider will not let you change the value below the minimum, but you can set the value to be lower than the minimum by typing it in, changing it via hou.Parm.setValue, or using the ladder handle. If it is strictly enforced and you try to change it below the minimum value using any mechanism, Houdini will set it to the minimum value. See also the minValue method. """ pass def maxIsStrict(): """ maxIsStrict(self) -> bool Return whether the maximum value is strictly enforced. See the minIsStrict method for more information. """ pass def FloatParmTemplate_swigregister(): """None""" pass class FloatingPanel(object): """ hou.FloatingPanel A floating window that contains one or more panes. Much like a desktop, a floating panel contains panes. A floating panel may be attached to a desktop, in which case it is saved with the desktop, hidden when the desktop is closed, and shown when the desktop is opened. You can use floating panels to create desktops that span multiple monitors. When you create a new floating panel, for example, it contains a single pane, which in turn contains a single pane tab showing the network editor. Note that a floating panel may be locked to one particular pane tab. These stripped down panels do not display the interface for adding new pane tabs or splitting panes. In fact, these stripped down floating panels do not contain any panes at all, and hou.FloatingPanel.panes will return an empty tuple. You can create such a stripped down floating panel with hou.Desktop.createFloatingPaneTab. See hou.Desktop for more information about panes and pane tabs. """ def panes(): """ panes(self) -> tuple of hou.Pane Return all the panes inside the panel. As mentioned in the documentation for this class, a floating panel may be stripped down and locked to one particular pane tab, and these stripped down floating panels do not contain any panes. """ pass def setName(name): """ setName(self, name) Set this panel's name. Any characters in the name that are not letters, numbers, or underscores are replaced with underscores. Raises hou.OperationFailed if the name is an empty string. """ pass def findPaneTab(name): """ findPaneTab(self, name) -> hou.PaneTab or None Return the pane tab with the given name, or None if no such tab exists. """ pass def isAttachedToDesktop(): """ isAttachedToDesktop(self) -> bool Return whether or not this panel is attached to the desktop. Panels attached to the desktop are saved with the desktop and are opened when the desktop is opened and closed when the desktop is closed. See also hou.FloatingPanel.attachToDesktop. """ pass def setIsFullscreen(on): """ setIsFullscreen(self, on) Set whether or not this panel is in full screen mode. See also hou.FloatingPanel.isFullscreen. """ pass def containsMenuBar(): """ containsMenuBar(self) -> bool Return whether or not this panel contains Houdini's main menu bar. See also hou.FloatingPanel.setContainsMenuBar. """ pass def paneTabOfType(type, index=0): """ paneTabOfType(self, type, index=0) -> hou.PaneTab or None Find and return the pane tab with the desired type or None if no such pane tab exists. type A hou.paneTabType enumerated variable. index If there are multiple tabs with the desired type, this parameter determines which one is returned. Use index=0 to return the first found tab, index=1 to return the second found tab, etc. By default, index is 0. """ pass def setContainsPlaybar(on): """ setContainsPlaybar(self, on) If on is True, move Houdini's playbar to this panel. Otherwise, move it back to the main desktop window. See also hou.FloatingPanel.containsPlaybar. """ pass def setContainsStatusBar(on): """ setContainsStatusBar(self, on) If on is True, move Houdini's status bar to this panel. Otherwise, move it back to the main desktop window. See also hou.FloatingPanel.containsStatusBar. """ pass def close(): """ close(self) Close the floating panel's window, closing all the pane tabs inside it. """ pass def setPosition(position): """ setPosition(self, position) Move the floating panel window to the specified desktop position (in pixels). Raise hou.TypeError if position does not contain exactly two values. """ pass def containsPlaybar(): """ containsPlaybar(self) -> bool Return whether or not this panel contains Houdini's playbar. See also hou.FloatingPanel.setContainsPlaybar. """ pass def setContainsShelf(on): """ setContainsShelf(self, on) If on is True, move Houdini's shelf to this panel. Otherwise, move it back to the main desktop window. See also hou.FloatingPanel.containsShelf. """ pass def size(): """ size(self) -> hou.Vector2 Return the floating panel window's size (in pixels). """ pass def name(): """ name(self) -> str Return the name of the floating panel. The panel's name is displayed in its window's title. """ pass def isFullscreen(): """ isFullscreen(self) -> bool Return whether or not this panel is in full screen mode. See also hou.FloatingPanel.setIsFullscreen. """ pass def containsShelf(): """ containsShelf(self) -> bool Return whether or not this panel contains Houdini's shelf. See also hou.FloatingPanel.setContainsShelf. """ pass def attachToDesktop(on): """ attachToDesktop(self, on) Attach this panel to the desktop. See hou.FloatingPanel.isAttachedToDesktop for more information. """ pass def paneTabs(): """ paneTabs(self) -> tuple of hou.PaneTab Return all the pane tabs that are in this floating panel, regardless of which pane they are in. """ pass def position(): """ position(self) -> hou.Vector2 Return the desktop position (in pixels) of the floating panel window. """ pass def setContainsMenuBar(on): """ setContainsMenuBar(self, on) If on is True, move Houdini's main menu bar to this panel. Otherwise, move it back to the main desktop window. See also hou.FloatingPanel.containsMenuBar. """ pass def setSize(size): """ setSize(self, size) Resize the floating panel window (in pixels). Raise hou.TypeError if size does not contain exactly two values. Raise hou.TypeError if size contains a value that is less than or equal to zero. """ pass def containsStatusBar(): """ containsStatusBar(self) -> bool Return whether or not this panel contains Houdini's status bar (the bar at the bottom of the desktop for status messages). See also hou.FloatingPanel.setContainsStatusBar. """ pass def FloatingPanel_swigregister(): """None""" pass class FolderParmTemplate(ParmTemplate): """ hou.FolderParmTemplate Describes a folder in a parameter dialog. Unlike all other hou.ParmTemplate subclasses, a folder does not correspond to an individual hou.ParmTuple. Instead, the set of adjacent folders form a folder set, and there is one parameter for this set that controls which folder is currently visible. These folder sets correspond to hou.FolderSetParmTemplate objects. Folder parm template objects are useful when manipulating the parameter interface of a node or a digital asset definition. Unlike folder set parm templates, they contain the parm templates inside the folder. They also let you add, remove, or hide an individual folder or move it from set one to another using hou.ParmTemplateGroup objects. Doing these individual folder-level operations is not possible with folder set parm templates. Note that folder parm templates are also used to represent multiparm blocks, much like the dialog does. The folder parm template's hou.folderType determines whether it is a folder or a multiparm block. Unlike folder parm templates, which do not correspond directly to parameter instances, a multiparm parm template does correspond to an integer parameter that controls the number of instances of the multiparm. """ def endsTabGroup(): """ endsTabGroup(self) -> bool Return whether this folder will be the last in the folder set, even if the next parameter is also a folder. In that case, the next parameter will begin a new folder set. This parameter only has meaning if the parm template is for an actual folder and not for a multiparm block. """ pass def setTabConditional(type, conditional): """ setTabConditional(self, type, conditional) Set a conditional string of the given hou.parmCondType type that affects the folder tab generated by this parameter template. The string consists of rules on how this parameter's folder tab's display behaves when other parameters change. See the Conditionals section of the help for more information on conditional strings. Raises hou.OperationFailed if this parameter template is for a multi-parameter or import block. """ pass def setDefaultValue(tuple_of_default_values): """ setDefaultValue(self, tuple_of_default_values) Set the default value to an integer. The default value is only used for folders that are multiparm blocks. See the defaultValue method for more information. """ pass def addParmTemplate(parm_template): """ addParmTemplate(self, parm_template) Append a parm template to the end of the list of parm templates inside the folder. Note that hou.ParmTemplateGroup provides a number of methods to insert parm templates inside folders, including hou.ParmTemplateGroup.appendToFolder. """ pass def parmTemplates(): """ parmTemplates(self) -> tuple of hou.ParmTemplate Return a tuple of copies of the parm templates stored inside this folder. Because copies are returned, you cannot change the contents of the parm templates inside this folder by modifying the parm templates returned. Instead, use methods in hou.ParmTemplateGroup to modify parm templates in this folder. """ pass def tabConditionals(): """ tabConditionals(self) -> dict of [Hom:hou.parmCondType] enum value to string Returns the set of conditionals that affect the folder tab generated by this parameter template. The conditionals correspond to the Tab disable when and Tab hide when properties that appear Edit Parameter Interface window for folder parameters. See the Conditionals section of the help for more information on conditional strings. This method returns an empty dictionary if this parameter template is for a multi-parameter or import block. """ pass def folderType(): """ folderType(self) -> hou.folderType enum value Return the type of folder. Note that the folder may actually be a multiparm block. """ pass def setEndsTabGroup(): """None""" pass def folderStyle(): """None""" pass def defaultValue(): """ defaultValue(self) -> int Return the integer default value. The default value is only used for folders that are multiparm blocks, and controls the default number of multiparm instances in newly created nodes. """ pass def isActualFolder(): """ isActualFolder(self) -> bool Return whether or not this parm template corresponds to an actual folder, as opposed to a multiparm or import block. This method can be implemented as follows: > def isActualFolder(self): > return self.folderType() in ( > hou.folderType.Tabs, hou.folderType.RadioButtons) """ pass def setFolderType(folder_type): """ setFolderType(self, folder_type) Set the type of folder to a hou.folderType enum value. """ pass def setParmTemplates(parm_templates): """ setParmTemplates(self, parm_templates) Replace the parm templates inside this folder with a new sequence of parm templates. """ pass def FolderParmTemplate_swigregister(): """None""" pass class FolderSetParmTemplate(ParmTemplate): """ hou.FolderSetParmTemplate Describes a set of folders. A folder set is a group of adjacent folders, and only one of those folders can be displayed at a time. A folder set corresponds to one parameter, and the value of that parameter determines which folder is displayed. Note that there is also a hou.FolderParmTemplate class. Folder sets are used when there is a mapping to a parameter; for example, asking a hou.ParmTuple for its parm template may return a folder set, but it will never return a folder. Folder parm templates are used by hou.ParmTemplateGroup because they easily let you add, remove, and move individual folders, and they let you easily place parameters inside folders. Attempting to place folder set parm templates in hou.ParmTemplateGroup objects will raise hou.OperationFailed. """ def folderStyle(): """ folderStyle(self) -> hou.folderType enum value This method is deprecated. It is an alias for the folderType method. """ pass def setFolderNames(): """None""" pass def folderNames(folder_names): """ setFolderNames(self, folder_names) Set the names of the folders in this set to the given sequence of strings. See the folderNames method for more information. Raises hou.OperationFailed if folder_names is an empty sequence. """ pass def setFolderType(folder_type): """ setFolderType(self, folder_type) Set the type of folder to a hou.folderType enum value. Raises TypeError if the folder type is for a multiparm or import block. """ pass def folderType(): """ folderType(self) -> hou.folderType enum value Return the type of folder. """ pass def FolderSetParmTemplate_swigregister(): """None""" pass class Gallery(object): """ hou.Gallery A collection of gallery entries that can be applied to operator nodes to set their parameters to predefined values. In Houdini, a gallery is a collection of node templates and their parameter presets, which are represented by a hou.GalleryEntry. A gallery corresponds to a file where such templates are saved. Galleries can be managed with a hou.galleries module. """ def createEntry(): """None""" pass def galleryEntries(name_pattern=None, label_pattern=None, keyword_pattern=None, category=None, node_type=None): """ galleryEntries(self, name_pattern=None, label_pattern=None, keyword_pattern=None, category=None, node_type=None) -> tuple of hou.GalleryEntry Return a tuple of entries that are stored in the gallery. See also hou.galleries.galleryEntries. name_pattern A pattern that the gallery entry name must match to be included in the returned tuple. The pattern can contain '?' to match a single character, '*' to match any number of characters, and '' to match any character in the set. If None, all gallery entries are considered to match it. label_pattern A pattern that the gallery entry label must match to be included in the returned tuple. See the name_pattern above for special characters in the pattern. If None, all gallery entries are considered to match it. keyword_pattern A pattern that any of the the gallery entry keywords needs to match for the entry to be included in the returned tuple. See the name_pattern above for special characters in the pattern. If None, all gallery entries are considered to match it. category If not None, only gallery entries in the specified category will be included in the returned tuple. node_type If not None, only gallery entries for a given node type will be included in the returned tuple. """ pass def deleteEntry(): """None""" pass class GalleryEntry(object): """ hou.GalleryEntry A gallery entry that can be applied to operator nodes to set their parameters to predefined values. A gallery entry is an entity containing data about an operator node setup. It has information about the node's parameter values, any additional spare parameters, channels, and for subnet nodes the information about the children, etc. Thus, a gallery entry is like a node template or a parameter preset. Such templates can be created from and applied to existing nodes. A gallery entry is identified by a unique, and has a non-unique label, and is usually associated with a specific hou.NodeType (or several node types) of the nodes to which it applies. In addition to the node information, gallery entries can have own categories that organize them into manageable sets and also can have keywords that identify their purpose. For more information about gallery entries, please see a gallery entry editor. In order for your gallery entries to appear in the Material Palette pane, they must satisfy two conditions. First, the node category must be set to indicate the gallery entry creates a SHOP node. Use code like: > hou.galleries.galleryEntries("entry_name")[0].setNodeTypeCategory(hou.shopNodeTypeCategory()) The second condition is that the entry must contain one or more keywords that indicate what renderer the SHOP works with. This affects whether the gallery entry appears when a specific renderer is chosen in the Material Palette renderer menu. Even if "All" is chosen in that menu, the gallery entry must contain a keyword that matches one of the renderers that appears in that menu. To associate a gallery entry with the Mantra renderer, do the following: > hou.galleries.galleryEntries("entry_name")[0].setKeywords(('Mantra',)) In HOM the gallery entries can be managed using hou.Gallery. """ def setContentsFromNode(node): """ setContentsFromNode(self, node) Save the information about the node contents (i.e., child nodes). When applying the node entry later on, these nodes will be reconstructed in a new parent to match the contents of the current parent. node The parent of the nodes whose data should be saved. """ pass def setScript(script): """ setScript(self, script) Set a script that modifies the parameters when the gallery entry is applied to a node. script A string that contains the commands setting the node's parameters. """ pass def setLabel(label): """ setLabel(self, label) Set the gallery entry label. label The label string. """ pass def setHelpURL(helpurl): """ setHelpURL(self, helpurl) Set the URL of the help document for this gallery entry. """ pass def keywords(): """ keywords(self) -> tuple of strings Return the keywords that describe this gallery entry. """ pass def setNodeTypeNames(nodetypes): """ setNodeTypeNames(self, nodetypes) Set the names of the node types this gallery should be associated with. nodetypes A string containing white-space separated list of node type names. """ pass def setDescription(description): """ setDescription(self, description) Set the description of the gallery entry. description The text briefly describing the gallery entry purpose. """ pass def nodeTypeNames(): """ nodeTypeNames(self) -> tuple of strings Return the names of the node type this gallery is associated with. The gallery can be safely applied to the nodes of these types. """ pass def script(): """ script(self) -> string Return a script that modifies the node parameters to match the information stored in the gallery entry. """ pass def label(): """ label(self) -> str Return the gallery entry label. """ pass def setScriptFromNode(node): """ setScriptFromNode(self, node) Set a script that modifies node parameters. Later on, when applying this gallery entry to a node, the script will reconstruct that node's parameters to match exactly the parameters of a node passed to this method. node A node object from which to build the script. """ pass def setCategories(categories): """ setCategories(self, categories) Set the categories this gallery entry subscribes to. categories A string with comma separated categories to set the gallery entry to. """ pass def setIcon(icon): """ setIcon(self, icon) Set the icon name or an icon file path that should be used for this gallery entry. """ pass def setEqual(entry): """ setEqual(self, entry) Set this gallery entry to be exactly the same as the given entry, except for the name, which is left unchanged. entry The gallery entry to copy the information from. """ pass def description(): """ description(self) -> string Return a description of the gallery entry. A description is a short string that states the gallery entry purpose. It is used for tool- tip pop-ups. """ pass def setName(name): """ setName(self, name) Set the gallery entry name. name The name string. """ pass def setNodeTypeCategory(category): """ setNodeTypeCategory(self, category) Set the category of the node types this gallery entry should be associated with. category A hou.NodeTypeCategory to associate this gallery entry with. """ pass def createChildNode(parent): """ createChildNode(self, parent) -> Node Create a new node in the parent network and then apply this gallery entry to that newly created node. parent A subnetwork within which the new node should be created. If None, an implicit natural parent is chosen using a node type this gallery entry is associated with. """ pass def setRequiredHDAFile(hda_file): """ setRequiredHDAFile(self, hda_file) Set a file path to an HDA library on which this gallery entry depends. hda_file A path of the HDA library file (OTL). """ pass def categories(): """ categories(self) -> tuple of strings Return the categories this gallery entry subscribes to. """ pass def icon(): """ icon(self) -> string Return the icon name or a icon file path that should be used for this gallery entry. """ pass def requiredHDAFile(): """ requiredHDAFile(self) -> string Return a file path to an HDA library that should be loaded before trying to apply this gallery entry. It is often used for gallery entries associated with a non-native operator type. """ pass def canCreateChildNode(parent): """ canCreateChildNode(self, parent) -> bool Return True if hou.GalleryEntry.createChildNode can succeed. """ pass def canApplyToNode(node): """ canApplyToNode(self, node) -> bool Return True if this gallery entry can be safely applied to the given node. See hou.GalleryEntry.applyToNode for more info. node A node to test whether the gallery entry can be applied to. """ pass def nodeTypeCategory(): """ nodeTypeCategory(self) -> NodeTypeCategory Return the category of the node types this gallery entry is associated with. """ pass def name(): """ name(self) -> string Return the gallery entry name. """ pass def applyToNode(node): """ applyToNode(self, node) Apply the gallery entry to a given node. This method sets the node's parameter values to match the ones stored by the entry. It may also add spare parameters and channels to the node and for the subnets, it may create new child nodes. node A node to which to apply the gallery entry. """ pass def bestNodeType(): """ bestNodeType(self) -> NodeType or None Return a best node type which this gallery entry is associated with and whose nodes it can be applied to. """ pass def helpURL(): """ helpURL(self) -> string Return the URL of the help document for this gallery entry. """ pass def allowIconRegeneration(): """ allowIconRegeneration(self) -> bool Return True if this gallery entry wants to let Houdini regenerate the icon for it automatically using an appropriate renderer. Only applies to material gallery entries. """ pass def setKeywords(keywords): """ setKeywords(self, keywords) Set the keywords that describe this gallery entry. keywords A string containing a white-space separated list of keywords. """ pass def setAllowIconRegeneration(allow): """ setAllowIconRegeneration(self, allow) Sets the allow icon regneration flag on this gallery entry. """ pass def GalleryEntry_swigregister(): """None""" pass def Gallery_swigregister(): """None""" pass class Geometry(object): """ hou.Geometry A Geometry object contains the points and primitives that define a 3D geometric shape. For example, each SOP node in Houdini generates a single Geometry object. If you ask a SOP for its geometry via hou.SopNode.geometry, you'll get a read-only reference to it. If the SOP recooks, the corresponding Geometry object will update to the SOP's new geometry. If the SOP is deleted, accessing the Geometry object will raise a hou.ObjectWasDeleted exception. If you call methods that try to modify the geometry, they will raise a hou.GeometryPermissionError exception. If you do not want the geometry to update when the SOP recooks, you can call hou.Geometry.freeze. freeze returns another Geometry object that will not change when the SOP recooks. Accessing frozen Geometry is slightly faster, since Houdini does not need to look up the SOP node for each access, so you may want to use frozen geometry for speed-crucial operations. If you're writing a SOP using Python, you will have read-write access to the geometry, and it will be frozen. To create a Python-defined SOP, select File > New Operator Type... and place the Python code in the Code tab. Finally, you can allocate a new frozen geometry with read-write access by creating an instance of hou.Geometry. """ def setVertexFloatAttribValues(name, values): """ setVertexFloatAttribValues(self, name, values) For a particular attribute, set the attribute values for all vertices. You would typically call this method from the code of a Python-defined SOP. name The name of the vertex attribute. values A sequence of int or float values in the same format as that returned by hou.Geometry.vertexFloatAttribValues. See that method for more information. Raises hou.OperationFailed if the attribute name is not valid, the attribute is not an int or float (i.e. it's a string), or the array of values is not the correct size. Raises hou.GeometryPermissionError if this geometry is not modifiable. Also see hou.Geometry.vertexFloatAttribValues. """ pass def selection(): """ selection(self) -> hou.Selection Returns the current cook component selection associated with this geometry. This is the default selection set by the SOP that created the geometry. """ pass def prim(index): """ prim(self, index) -> hou.Prim Return the primitive at the specified index. This is a convenience method for accessing a particular primitive without the overhead of obtaining all primitives via hou.Geometry.prims. Return None if no such primitive at the specified index exists. """ pass def setPrimFloatAttribValuesFromString(): """None""" pass def point(index): """ point(self, index) -> hou.Point Return the point at the specified index. This is a convenience method for accessing a particular point without the overhead of obtaining all points via hou.Geometry.points. Return None if no such point at the specified index exists. """ pass def loadFromFile(file_name): """ loadFromFile(self, file_name) Replace the contents of this geometry object with the data stored in a file. You would typically call this method from the code of a Python-defined SOP. You may specify any type of file supported by Houdini's File SOP. See hou.Geometry.saveToFile for more information. Raises hou.OperationFailed if the file does not exist or otherwise cannot be loaded. Raises hou.GeometryPermissionError if this geometry is not modifiable. See also hou.Geometry.merge. """ pass def _guDetailHandle(): """None""" pass def renameVertexAttrib(old_name, new_name): """ renameVertexAttrib(self, old_name, new_name) Rename the vertex attribute with the specified old name to the new name. This method is typically called from within a Python-defined SOP when the SOP's geometry is writable. Raises GeometryPermissionError if called on a read-only geometry. Raises TypeError if old_name or new_name is None. Raises OperationFailed if no such vertex attribute with the old name exists. Raises OperationFailed if a vertex attribute with the new name already exists. """ pass def createEdgeGroup(name): """ createEdgeGroup(self, name) -> hou.EdgeGroup Create a new edge group in this geometry. name The name of the new group. Raises hou.OperationFailed if a group with this name already exists. Use hou.EdgeGroup.destroy to remove an edge group from the geometry. """ pass def intrinsicValue(intrinsic_name): """ intrinsicValue(self, intrinsic_name) -> int, float, str, or tuple Gets the value of an "intrinsic", often computed, value of the geometry, such as memoryusage, pointcount, pointattributes, and so on. Raises OperationFailed if the given intrinsic name does not exist. You can also view these values in the user interface using the geometry spreadsheet. In Houdini, some primitives have "intrinsic" values which can't be accessed directly through the attribute interface. Most intrinsic values are computed, such as measuredarea, however a few are writeable with the setIntrinsicValue method. For example, sphere primitives have a transform matrix as part of their definition. You can get a list of the available intrinsic value names with the intrinsicNames method. Different geometry types will have different intrinsic values available. """ pass def pointFloatAttribValues(name): """ pointFloatAttribValues(self, name) -> tuple of float Return a tuple of floats containing one attribute's values for all the points. This method only works on int or float attributes. If the attribute contains more than one element, each point will correspond to multiple values in the result. For example, if "Cd" is a float attribute of size 3 and there are 3 points with values (0.1, 0.2, 0.3), (0.5, 0.5, 0.5), and (0.8, 0.7, 0.6) then the result will be (0.1, 0.2, 0.3, 0.5, 0.5, 0.5, 0.8, 0.7, 0.6). Calling this method is faster than looping over all the points and calling hou.Point.attribValue. If the attribute name is invalid or the attribute is not an int or float (e.g. it's a string attribute), this method raises hou.OperationFailed. Note that you cannot pass a hou.Attrib object to this method like you can with many methods dealing with attributes. However, you can use hou.Attrib.name to easily get the name from an Attrib object. """ pass def stringListAttribValue(name_or_attrib): """ stringListAttribValue(self, name_or_attrib) -> tuple of int Return the global (a.k.a. detail) attribute value for a particular string attribute. The attribute may be specified by name or by hou.Attrib object. The return value is a list of strings. See hou.Geometry.floatListAttribValue for more information. """ pass def primIntAttribValues(name): """ primIntAttribValues(self, name) -> tuple of int Return a tuple of integers containing one attribute's values for all the primitives. This method only works on int or float attributes. If the attribute contains more than one element, each primitive will correspond to multiple values in the result. For example, if idmap is an integer attribute of size 2 and there are 3 primitives with values (1, 2), (2, 3), and (3,4) then the result will be (1, 2, 2, 3, 3, 4). Calling this method is faster than looping over all the primitives and calling hou.Prim.attribValue. If the attribute name is invalid or the attribute is not an int or float (e.g. it's a string attribute), this method raises hou.OperationFailed. Note that you cannot pass a hou.Attrib object to this method like you can with many methods dealing with attributes. However, you can use hou.Attrib.name to easily get the name from an Attrib object. """ pass def intrinsicValueDict(self): """ intrinsicValueDict(self) -> dict of str to value Returns a dictionary mapping intrinsic names to their values. """ pass def edgeGroups(): """ edgeGroups(self) -> tuple of hou.EdgeGroup Return a tuple of all the edge groups in the geometry. """ pass def pointGroups(): """ pointGroups(self) -> tuple of hou.PointGroup Return a tuple of all the point groups in the geometry. The following function returns the names of all the groups in the geometry: > def pointGroupNames(geometry): > return [group.name() for group in geometry.pointGroups()] """ pass def setVertexIntAttribValues(name, values): """ setVertexIntAttribValues(self, name, values) For a particular attribute, set the attribute values for all vertices. You would typically call this method from the code of a Python-defined SOP. name The name of the vertex attribute. values A sequence of int or float values in the same format as that returned by hou.Geometry.vertexIntAttribValues. See that method for more information. Raises hou.OperationFailed if the attribute name is not valid, the attribute is not an int or float (i.e. it's a string), or the array of values is not the correct size. Raises hou.GeometryPermissionError if this geometry is not modifiable. Also see hou.Geometry.vertexIntAttribValues. """ pass def createBezierSurface(rows, cols, is_closed_in_u=False, is_closed_in_v=False): """ createBezierSurface(self, rows, cols, is_closed_in_u=False, is_closed_in_v=False) -> hou.Surface Create a Bezier surface in the XY plane centered at the origin with size (1, 1) and return it. You would typically call this method from the code of a Python-defined SOP. rows, cols Determines the size of the 2D array of vertices defining the control points of the surface. Note that the number of rows corresponds to v and the number or columns corresponds to u, which can be slightly confusing. For example, geo.createBezierSurface(9, 7, is_closed_in_u=False, is_closed_in_v=True) is valid, but geo.createBezierSurface(9, 7, is_closed_in_u=True, is_closed_in_v=False) raises hou.OperationFailed. is_closed_in_u, is_closed_in_v Determines if it is open or closed in each of the u and v directions; see hou.Surface.isClosedInU for more information. order_u, order_v Specifies the surface's order in of the U and V directions. The default order for both is 4, corresponding to a cubic NURBS surface. An order of 2, the lowest order, will give a surface with linear segments, essentially a mesh. As with Bezier curves, a Bezier surface has some restrictions on the point count in each of the U and V directions. For a given direction; if it's open the number of points in the direction must be (order - 1) * n + 1 for some integer n >= 1 (e.g. 4, 7, 10, ...). If it's open, the number of points must be (order - 1) * n where n >= 1 in that direction (e.g. 2, 4, 6, .. for order 3). You can move or resize the surface using hou.Geometry.transformPrims. If the geometry contains primitive attributes, the new surface receives the default values for those attributes. Raises hou.GeometryPermissionError if this geometry is not modifiable. > import math > > # This code will work from inside a Python SOP, but not from the Python > # shell. > geo = hou.pwd().geometry() > > # Build a tube-like object about the y axis. > num_rows, num_cols = (10, 9) > surf = geo.createBezierSurface(num_rows, num_cols, is_closed_in_u=True) > for v_index in range(num_rows): > for u_index in range(num_cols): > angle = u_index * (2.0 * math.pi) / num_cols > surf.vertex(u_index, v_index).point().setPosition( > (math.cos(angle), v_index / float(num_cols-1), math.sin(angle))) """ pass def intListAttribValue(name_or_attrib): """ intListAttribValue(self, name_or_attrib) -> tuple of int Return the global (a.k.a. detail) attribute value for a particular integer attribute. The attribute may be specified by name or by hou.Attrib object. The return value is a list of ints. See hou.Geometry.floatListAttribValue for more information. """ pass def globalAttribs(): """ globalAttribs(self) -> tuple of hou.Attrib Return a tuple of all the global (a.k.a. detail) attributes. """ pass def globPoints(pattern): """ globPoints(self, pattern) -> tuple of hou.Point Return a tuple of points corresponding to a pattern of point numbers. The pattern format is the same one used by the group fields on SOP nodes that take point selections. Elements in the pattern are separated by spaces, and elements can be point numbers, point number ranges, or group names. This method can be useful when writing a Python SOP that works on only a selected set of points. Raises hou.OperationFailed if the pattern is not valid or if it refers to a group that does not exist. Note that an empty pattern is considered to be invalid. Numbers that do not refer to valid points are not errors, and simply do not match points. > # Return a tuple containing points 5 and 7. > geo.globPoints("5 7") > > # Return a tuple containing points 5 to 10. > geo.globPoints("5-10") > > # Return a tuple containing all the points in the pointgroup called group1. > geo.globPoints("group1") > > # Return all the points except those from 0 to 98. > geo.globPoints("!0-98") > > # Return points 5, 10 to 20, and those in group1. > geo.globPoints("5 group1 10-20") The following Python SOP example is behaves similarly to the Point sop. > # This code will work from inside a Python SOP, but not from the Python > # shell. It assumes the Python sop has the following parm tuples: > # group: A string containing which points to affect > # t: A set of 3 floats that behaves like the point sop's position > # parameter. Set these parameters to the expressions ($TX, $TY, $TZ). > geo = hou.pwd().geometry() > > # Use the group field to determine which points to affect. If it's blank, > # operate on all points. > pattern = hou.ch("group") > if pattern == "": > points = geo.points() > else: > points = geo.globPoints(pattern) > > # Loop through the points, setting the SOP's current point as we go. > # Then evaluate the t parm tuple, so it can use the current point (e.g. > # with hscript's $TX or Python's pwd().curPoint()). > for point in points: > hou.pwd().setCurPoint(point) > new_position = hou.pwd().evalParmTuple("t") > point.setPosition(new_position) """ pass def setIntrinsicValue(intrinsic_name, value): """ setIntrinsicValue(self, intrinsic_name, value) Some "intrinsic" values can be modified. For example, you change the internal size and rotation (transform) of a sphere primitive by passing a 16 float tuple representing the transform to setIntrinsicValue. Raises Error if the intrinsic is not writeable or does not accept the passed value, or if the given intrinsic name does not exist. NOTE Modifying the geometry directly will lock the geometry's parent node. See the intrinsicValue method for more information. """ pass def floatListAttribValue(name_or_attrib): """ floatListAttribValue(self, name_or_attrib) -> tuple of float Return the global (a.k.a. detail) attribute value for a particular floating point attribute. The attribute may be specified by name or by hou.Attrib object. The return value is a list of floats. It is valid to call this method when the attribute's size is 1. In this case, a list with one element is returned. See also: * hou.Geometry.attribValue """ pass def iterPrims(): """ iterPrims(self) -> generator of hou.Prim Return a generator that iterates through all the primitives in the geometry. Whereas hou.Geometry.prims allocates and returns a tuple of all the primitives in the geometry, this method returns a generator object that will yield hou.Prim objects on demand. This object is very fast at random access into the sequence. If you're accessing a specific primitive by index and the geometry contains many primitives, it is faster to use iterPrims() than prims(). If, however, you are iterating over all the primitives in the geometry, it is generally faster to use prims() than iterPrims(). > # This is preferred: > geo.iterPrims()[23] > > # over this: > geo.prims()[23] > > # But this is preferred: > for prim in geo.prims(): > ...process prim... > > # over this: > for prim in geo.iterPrims(): > ...process prim... See also the hou.Geometry.prims method. """ pass def sopNodeOutputIndex(): """ sopNodeOutputIndex(self) -> int If the Geometry is not frozen, return the index of the SOP node output that this geometry corresponds to. Otherwise, return -1. For most cases this method will return 0 to indicate that the geometry corresponds to the first output. This method will only return a value other than 0 for SOP nodes that have multiple outputs. See hou.Geometry.freeze for more information on frozen geometry. """ pass def pointBoundingBox(pointpattern): """ pointBoundingBox(self, pointpattern) -> hou.BoundingBox Return an axis-aligned 3D bounding box that is sized and positioned to include the points specified by the point pattern. If the pattern is blank, all points will be included. Some primitives, such as spheres, extend beyond their points. This extension will not be included. """ pass def findPrimAttrib(name): """ findPrimAttrib(self, name) -> hou.Attrib or None Look up a primitive attribute by name. Returns the corresponding hou.Attrib object, or None if no attribute exists with that name. """ pass def renamePointAttrib(old_name, new_name): """ renamePointAttrib(self, old_name, new_name) Rename the point attribute with the specified old name to the new name. This method is typically called from within a Python-defined SOP when the SOP's geometry is writable. Raises GeometryPermissionError if called on a read-only geometry. Raises TypeError if old_name or new_name is None. Raises OperationFailed if no such point attribute with the old name exists. Raises OperationFailed if a point attribute with the new name already exists. """ pass def attributeCaptureObjectPaths(): """ attributeCaptureObjectPaths(self) -> tuple of str Returns a tuple of strings representing the capture object paths for this geometry. The capture objects are those used to capture this geometry and are identified from the geometry's capture attributes. The skeleton root path is prepended to the capture object paths and the object nodes are given by: > # This code will work from inside a Python SOP, but not from the Python > # shell. > geo = hou.pwd().geometry() > nodes = [hou.node(x) for x in geo.attributeCaptureObjectPaths()] See also: * hou.Geometry.attributeCaptureRegions """ pass def setPointIntAttribValues(name, values): """ setPointIntAttribValues(self, name, values) For a particular attribute, set the attribute values for all points. You would typically call this method from the code of a Python- defined SOP. name The name of the point attribute. values A sequence of int or float values in the same format as that returned by hou.Geometry.pointIntAttribValues. See that method for more information. Raises hou.OperationFailed if the attribute name is not valid, the attribute is not an int or float (i.e. it's a string), or the array of values is not the correct size. Raises hou.GeometryPermissionError if this geometry is not modifiable. Also see hou.Geometry.pointIntAttribValues. """ pass def setPrimIntAttribValues(name, values): """ setPrimIntAttribValues(self, name, values) For a particular attribute, set the attribute values for all primitives. You would typically call this method from the code of a Python-defined SOP. name The name of the primitive attribute. values A sequence of int or float values in the same format as that returned by hou.Geometry.primFloatAttribValues. See that method for more information. Raises hou.OperationFailed if the attribute name is not valid, the attribute is not an int or float (i.e. it's a string), or the array of values is not the correct size. Raises hou.GeometryPermissionError if this geometry is not modifiable. Also see hou.Geometry.primIntAttribValues. """ pass def primFloatAttribValues(name): """ primFloatAttribValues(self, name) -> tuple of float Return a tuple of floats containing one attribute's values for all the primitives. This method only works on int or float attributes. If the attribute contains more than one element, each primitive will correspond to multiple values in the result. For example, if Cd is a float attribute of size 3 and there are 3 primitives with values (0.1, 0.2, 0.3), (0.5, 0.5, 0.5), and (0.8, 0.7, 0.6) then the result will be (0.1, 0.2, 0.3, 0.5, 0.5, 0.5, 0.8, 0.7, 0.6). Calling this method is faster than looping over all the primitives and calling hou.Prim.attribValue. If the attribute name is invalid or the attribute is not an int or float (e.g. it's a string attribute), this method raises hou.OperationFailed. Note that you cannot pass a hou.Attrib object to this method like you can with many methods dealing with attributes. However, you can use hou.Attrib.name to easily get the name from an Attrib object. """ pass def vertexAttribs(): """ vertexAttribs(self) -> tuple of hou.Attrib Return a tuple of all the vertex attributes. """ pass def vertexIntAttribValues(name): """ vertexIntAttribValues(self, name) -> tuple of int Return a tuple of integers containing one attribute's values for all the vertices. This method only works on int or float attributes. If the attribute contains more than one element, each vertex will correspond to multiple values in the result. For example, if "idmap" is an integer attribute of size 2 and there are 3 vertices with values (1, 2), (2, 3), and (3, 4) then the result will be (1, 2, 2, 3, 3, 4). Calling this method is faster than looping over all the vertices and calling hou.Vertex.attribValue. If the attribute name is invalid or the attribute is not an int or float (e.g. it's a string attribute), this method raises hou.OperationFailed. Note that you cannot pass a hou.Attrib object to this method like you can with many methods dealing with attributes. However, you can use hou.Attrib.name to easily get the name from an Attrib object. """ pass def vertexIntAttribValuesAsString(name, int_type=hou.numericData.Int32): """ vertexIntAttribValuesAsString(self, name, int_type=hou.numericData.Int32) -> str Return a string representation of the integers of one attribute's value for all the vertices. This method is faster than hou.Geometry.vertexIntAttribValues, and you can use the array module to convert the string into a Python sequence. int_type A hou.numericData value to specify the integer data type (either Int8, Int16, Int32 or Int64). This method provides a faster implementation of the following: > import array > def vertexIntAttribValuesAsString(self, name): > return array.array("i", self.vertexIntAttribValues(name)).tostring() You can convert the return value from this method to an array using the following method: > import array > def vertexIntAttribValuesAsArray(geometry, name): > a = array.array("i") > a.fromstring(geometry.vertexIntAttribValuesAsString(name)) > return a See hou.Geometry.vertexIntAttribValues for more information. """ pass def findEdge(p0, p1): """ findEdge(self, p0, p1) -> hou.Edge p0 The first point that makes up the edge. See hou.Point for more information. p1 The second point that makes up the edge. See hou.Point for more information. finds an edge given two points, or None if no such edge exists """ pass def deletePoints(points): """ deletePoints(self, points) Delete a sequence of points. You would typically call this method from the code of a Python-defined SOP. Note that Houdini will delete any vertices that reference the point. For example, suppose you have a box with 6 polygons, each with 4 vertices. Also suppose that each point on the box is shared by 3 vertices on 3 separate polygons. If you delete one of those points, Houdini will remove each of those vertices from their corresponding polygons, leaving 3 polygons with 4 vertices and 3 polygons with 3 vertices. To delete a single primitive, pass in a sequence with one point. Raises hou.GeometryPermissionError if this geometry is not modifiable. """ pass def execute(self, verb, inputs=[]): """ execute(self, verb, inputs=[]) -> HOM_Geometry Invokes verb.execute() with myself as the first input, and returns the resulting geometry. This allows one to chain a series of verbs invocations: geo.execute(subdivide).execute(subdivide). The optional inputs will have the geometry itself prepended. """ pass def primFloatAttribValuesAsString(name): """ primFloatAttribValuesAsString(self, name) -> str Return a string representation of the floats of one attribute's value for all the primitives. This method is faster than hou.Geometry.primFloatAttribValues, and you can use the array module to convert the string into a Python sequence. This method provides a faster implementation of the following: > import array > def primFloatAttribValuesAsString(self, name): > return array.array("f", self.primFloatAttribValues(name)).tostring() You can convert the return value from this method to an array using the following method: > import array > def primFloatAttribValuesAsArray(geometry, name): > a = array.array("f") > a.fromstring(geometry.primFloatAttribValuesAsString(name)) > return a See hou.Geometry.primFloatAttribValues for more information. """ pass def boundingBox(): """ boundingBox(self) -> hou.BoundingBox Return an axis-aligned 3D bounding box that is sized and positioned to be large enough to hold this geometry. """ pass def pointStringAttribValues(name): """ pointStringAttribValues(self, name) -> tuple of str Return a tuple of strings containing one attribute's values for all the points. This method only works on string attributes. If the attribute contains more than one element, each point will correspond to multiple values in the result. For example, if "strmap" is a string attribute of size 2 and there are 3 points with values ("apple", "orange"), ("red", "blue"), and ("one", "two") then the result will be ("apple", "orange", "red", "blue", "one", "two"). Calling this method is faster than looping over all the points and calling hou.Point.attribValue. If the attribute name is invalid or the attribute is not a string attribute then this method raises hou.OperationFailed. Note that you cannot pass a hou.Attrib object to this method like you can with many methods dealing with attributes. However, you can use hou.Attrib.name to easily get the name from an Attrib object. """ pass def createTetrahedron(): """ createTetrahedron(self) -> hou.Prim Create a new tetrahedron and return the corresponding hou.Prim object. You would typically call this method from the code of a Python-defined SOP. The newly created tetrahedron has four vertices and new points have been allocated for them. To build a tetrahedron out of existin points, use Raises hou.GeometryPermissionError if this geometry is not modifiable. """ pass def attribType(): """ attribType(self) -> hou.attribType enum value Return the enumerated value hou.attribType.Global. Points, primitives, vertices, and geometry support the same set of methods for querying their attributes, and this method is one of them. See also: * hou.Prim.attribType * hou.Point.attribType * hou.Vertex.attribType """ pass def deletePrims(prims, keep_points=False): """ deletePrims(self, prims, keep_points=False) Delete a sequence of primitives. You would typically call this method from the code of a Python-defined SOP. keep_points if True, the primitive will be deleted but its points will remain. To delete a single primitive, pass in a sequence with one primitive. Raises hou.GeometryPermissionError if this geometry is not modifiable. > # Delete every other primitive: > prims = [p for p in geo.prims() if p.number() % 2 == 0] > geo.deletePrims(prims) > > # Delete the first primitive: > geo.deletePrims([geo.iterPrims()[0]]) """ pass def findPointAttrib(name): """ findPointAttrib(self, name) -> hou.Attrib or None Look up a point attribute by name. Returns the corresponding hou.Attrib object, or None if no attribute exists with that name. Note that the point position attribute is named P and is 3 floats in size. Also, the point weight attribute is named Pw and is 1 float in size. These attributes always exist in HOM, even though they are not listed by Houdini's UI. See hou.Point.attribValue for an example. """ pass def setPointFloatAttribValues(name, values): """ setPointFloatAttribValues(self, name, values) For a particular attribute, set the attribute values for all points. You would typically call this method from the code of a Python- defined SOP. name The name of the point attribute. values A sequence of int or float values in the same format as that returned by hou.Geometry.pointFloatAttribValues. See that method for more information. Raises hou.OperationFailed if the attribute name is not valid, the attribute is not an int or float (i.e. it's a string), or the array of values is not the correct size. Raises hou.GeometryPermissionError if this geometry is not modifiable. Also see hou.Geometry.pointFloatAttribValues. """ pass def addAttrib(self): """None""" pass def createPoint(): """ createPoint(self) -> hou.Point Create a new point located at (0, 0, 0) and return the corresponding hou.Point object. You would typically call this method from the code of a Python-defined SOP. If the geometry contains point attributes, the new point receives the default values for those attributes. Raises hou.GeometryPermissionError if this geometry is not modifiable. See hou.Geometry.addAttrib, hou.Geometry.createPolygon, and hou.Face.addVertex for examples. """ pass def setPrimIntAttribValuesFromString(): """None""" pass def findGlobalAttrib(name): """ findGlobalAttrib(self, name) -> hou.Attrib or None Look up a global (a.k.a. detail) attribute by name. Returns the corresponding hou.Attrib object, or None if no attribute exists with that name. """ pass def attributeCaptureRegions(): """ attributeCaptureRegions(self) -> tuple of str Returns a tuple of strings representing the capture region paths for this geometry. The capture regions are identified from the geometry's capture attributes. See also: * hou.Geometry.attributeCaptureObjectPaths """ pass def setPointIntAttribValuesFromString(): """None""" pass def vertexFloatAttribValuesAsString(name, float_type=hou.numericData.Float32): """ vertexFloatAttribValuesAsString(self, name, float_type=hou.numericData.Float32) -> str Return a string representation of the floats of one attribute's value for all the vertices. This method is faster than hou.Geometry.vertexFloatAttribValues, and you can use the array module to convert the string into a Python sequence. float_type A hou.numericData value to specify the float data type (either Float16, Float32 or Float64). This method provides a faster implementation of the following: > import array > def vertexFloatAttribValuesAsString(self, name): > return array.array("f", self.vertexFloatAttribValues(name)).tostring() You can convert the return value from this method to an array using the following method: > import array > def vertexFloatAttribValuesAsArray(geometry, name): > a = array.array("f") > a.fromstring(geometry.vertexFloatAttribValuesAsString(name)) > return a See hou.Geometry.vertexFloatAttribValues for more information. """ pass def setPointStringAttribValues(name, values): """ setPointStringAttribValues(self, name, values) For a particular attribute, set the attribute values for all points. You would typically call this method from the code of a Python- defined SOP. name The name of the point attribute. values A sequence of string values in the same format as that returned by hou.Geometry.pointStringAttribValues. See that method for more information. Raises hou.OperationFailed if the attribute name is not valid, the attribute is not a string, or the array of values is not the correct size. Raises hou.GeometryPermissionError if this geometry is not modifiable. Also see hou.Geometry.pointStringAttribValues. """ pass def containsPrimType(type_or_name): """ containsPrimType(self, type_or_name) -> bool Returns whether the geometry contains at least one primitive of the specified type. type_or_name A hou.primType, or a string containing the name of a primitive type. Typical examples of string values are "Poly" (polygon) or "PackedAgent" (agent packed primitive). To see a complete list of possible typename values, run ginfo -P on a Houdini tools command line. """ pass def prims(): """ prims(self) -> tuple of hou.Prim Return a tuple of all the primitives in the geometry. The primitives returned will be subclasses of hou.Prim (e.g.polygons, volumes, etc.). See also: * hou.Geometry.iterPrims * hou.Face * hou.Polygon * hou.Surface * hou.Volume """ pass def nearestPrim(position): """ nearestPrim(self, position) -> (hou.Prim or None, float, float, float) Given a sequence of three floats containing a position, find the location on the primitive closest to that position and return a tuple containing that primitive, the u value on the primitive, the v value on the primitive, and the distance to the primitive. Note that the first value in the return tuple can be None if there are no primitives in the geometry. """ pass def findEdgeGroup(name): """ findEdgeGroup(self, name) -> hou.EdgeGroup or None name The name of the edge group. Return the edge group with the given name, or None if no such group exists. """ pass def countPrimType(type_or_name): """ countPrimType(self, type_or_name) -> long Returns the number of primitives of the specified type in the geometry. type_or_name A hou.primType, or a string containing the name of a primitive type. Typical examples of string values are "Poly" (polygon) or "PackedAgent" (agent packed primitive). To see a complete list of possible typename values, run ginfo -P on a Houdini tools command line. """ pass def transform(matrix): """ transform(self, matrix) Transforms (e.g. rotates, scales, translates, etc.) the geometry by a transformation matrix. You would typically call this method from the code of a Python-defined SOP. See hou.hmath for functions that build transformation matrices. Raises hou.GeometryPermissionError if this geometry is not modifiable. """ pass def setVertexIntAttribValuesFromString(): """None""" pass def edgeLoop(edges, loop_type, full_loop_per_edge, force_ring, allow_ring): """ edgeLoop(self, edges, loop_type, full_loop_per_edge, force_ring, allow_ring) -> tuple of hou.Edge Returns a tuple of hou.Edge objects that make a path connecting the edges provided in the edges parameter. If multiple paths are being returned, they will be separated in the single returned tuple by a value of None. The paths are generated using the same algorithm used when performing loop selections in the viewport. edges: A list of hou.Edge objects that define the path or paths of connected edges this function should return. Must contain at least one or two edges depending on the loop options. loop_type: Controls the type of path returned. Can be any of the hou.componentLoopType values. If using either the hou.componentLoopType.Extended or hou.componentLoopType.Closed loop types, the inputs edges cannot contain any None entries. If these conditions are not met, a hou.OperationFailed exception will be thrown. full_loop_per_edge: If set to True, with the loop_type set to hou.componentLoopType.Extended or hou.componentLoopType.Closed loop types, each inputs edge is used to create its own full loop or ring. If False, the edges are taken in pairs, and so the number of edges must be even. force_ring: If set to True, this function will return edge rings instead of edge loops. allow_ring: If set to True, this function may return an edge ring if the edges provided produce a ring more naturally than they produce a loop (for example if two perpendicular edges are provided from the same row on a polygonal grid). If set to False, only edge loops will be returned. Raises a hou.OperationFailed if it was unable to construct a loop from the desired components. """ pass def setPrimFloatAttribValues(name, values): """ setPrimFloatAttribValues(self, name, values) For a particular attribute, set the attribute values for all primitives. You would typically call this method from the code of a Python-defined SOP. name The name of the primitive attribute. values A sequence of int or float values in the same format as that returned by hou.Geometry.primFloatAttribValues. See that method for more information. Raises hou.OperationFailed if the attribute name is not valid, the attribute is not an int or float (i.e. it's a string), or the array of values is not the correct size. Raises hou.GeometryPermissionError if this geometry is not modifiable. Also see hou.Geometry.primFloatAttribValues. """ pass def stringAttribValue(name_or_attrib): """ stringAttribValue(self, name_or_attrib) -> str Return the global (a.k.a. detail) attribute value for a particular string attribute. The attribute may be specified by name or by hou.Attrib object. See hou.Geometry.floatAttribValue for more information. """ pass def setGlobalAttribValue(name_or_attrib, attrib_value): """ setGlobalAttribValue(self, name_or_attrib, attrib_value) Set a global (a.k.a. detail) attribute value. The attribute may be specified by name or by hou.Attrib object. You would typically call this method from the code of a Python-defined SOP. Raises hou.OperationFailed if no attribute exists with this name or if the attribute's data type does not match the value passed in. If the attribute's size is more than 1, the attribute value must be a sequence of integers/floats, and the size of the sequence must match the attribute's size. Raises hou.GeometryPermissionError if this geometry is not modifiable. > # This code will work from inside a Python SOP, but not from the Python > # shell. > geo = hou.pwd().geometry() > geo.addAttrib(hou.attribType.Global, "author", "") > geo.addAttrib(hou.attribType.Global, "version", (0, 0, 0)) > geo.setGlobalAttribValue("author", "Joe") > geo.setGlobalAttribValue("version", (1, 0, 7)) See also: * hou.Geometry.attribValue * hou.Point.setAttribValue * hou.Prim.setAttribValue * hou.Vertex.setAttribValue """ pass def freeze(read_only=False): """ freeze(self, read_only=False) -> hou.Geometry Return another Geometry object that is not linked to a particular SOP. Normally, when you call hou.SopNode.geometry, the resultant Geometry object retains a reference to that SOP, and is said to be unfrozen. Each time you access points, primitives, attributes, etc. in an unfrozen Geometry object, Houdini uses the SOP's latest cooked geometry. So, if you change parameters or change the time for an animated SOP, the Geometry object will update to the SOP's new geometry. Unless Python SOPs are involved, a frozen Geometry object does not have a similar live association with a particular SOP. If you ask a SOP for its geometry and then store a frozen copy of that geometry, when the SOP recooks the frozen Geometry object will not update. Instead, the frozen geometry saves its own copy of the point and primitive data, and is unaffected by subsequent changes to the SOP. When a frozen Geometry object is destroyed, any geometry copy it created is also destroyed. Note that accessing a Geometry object's points, primitives, attributes, etc. may be faster when dealing with frozen objects. You may want to work with frozen Geometry in speed-sensitive operations. Calling this method on an unfrozen Geometry object returns a frozen one. Calling it on a frozen object has no effect, and it returns a frozen object. When a Python-defined SOP cooks and runs Python code that asks for the SOP's geometry, the returned Geometry object is writable. Modifying this Geometry object affects the output of this SOP. For efficiency, this geometry object is already frozen, so calling freeze on it has no effect. read_only If True, the resulting frozen geometry will be read-only. Use read-only frozen geometry to share embedded geometry among multiple packed primitives. """ pass def intAttribValue(name_or_attrib): """ intAttribValue(self, name_or_attrib) -> int Return the global (a.k.a. detail) attribute value for a particular integer attribute of size 1. The attribute may be specified by name or by hou.Attrib object. See hou.Geometry.floatAttribValue for more information. """ pass def averageEdgeLength(): """ averageEdgeLength(self) -> float Return the average edge length of the mesh. Raises hou.OperationFailed if mesh does not contain any edges. > # Return the average edge length. > geo.averageEdgeLength() """ pass def createVolume(xres, yres, zres, bounding_box=None): """ createVolume(self, xres, yres, zres, bounding_box=None) -> hou.Volume Given the x, y, and z resolution (or size) of a voxel array, add a new volume primitive to the geometry and return it. The values in the new volume's voxels are all zero. xres, yres, zres Integers greater than zero that specify the size of the voxel array in one dimension. Raises hou.OperationFailed if any of these values are not positive. bounding_box A hou.BoundingBox that specifies the volume's 3D size. Note that this size is independent of the volume's voxel resolution. If this parameter is None, Houdini uses a bounding box going from (-1,-1,-1) to (1,1,1). """ pass def vertexFloatAttribValues(name): """ vertexFloatAttribValues(self, name) -> tuple of float Return a tuple of floats containing one attribute's values for all the vertices. This method only works on int or float attributes. If the attribute contains more than one element, each vertex will correspond to multiple values in the result. For example, if "attrib" is a float attribute of size 3 and there are 3 vertices with values (0.1, 0.2, 0.3), (0.5, 0.5, 0.5), and (0.8, 0.7, 0.6) then the result will be (0.1, 0.2, 0.3, 0.5, 0.5, 0.5, 0.8, 0.7, 0.6). Calling this method is faster than looping over all the vertices and calling hou.Vertex.attribValue. If the attribute name is invalid or the attribute is not an int or float (e.g. it's a string attribute), this method raises hou.OperationFailed. Note that you cannot pass a hou.Attrib object to this method like you can with many methods dealing with attributes. However, you can use hou.Attrib.name to easily get the name from an Attrib object. """ pass def averageMinDistance(local_transform, geometry, geometry_transform): """ averageMinDistance(self, local_transform, geometry, geometry_transform) -> float Return the average over all points in of the minimum distance to the point set of local_transform A transform to be applied to all points in this geometry. geometry The geometry to find distances from. geometry_transform A transform to be applied to all points in . Raises hou.OperationFailed if has no vertices. > query_geometry = query_node.geometry() > queried_geometry = queried_node.geometry() > > # Return the average over all points in of the minimum > # distance to the point set of > query_geometry.averageMinDistance( > query_node.worldTransform(), > queried_geometry, > queried_node.worldTransform()) """ pass def saveToFile(file_name): """ saveToFile(self, file_name) Save the contents of the geometry object to a file. The file extension determines what file format to use. All file formats supported by Houdini (e.g. geo, bgeo, obj, etc.), including extensions listed in GEOio, are supported. If the file extension is not recognized, the bgeo format is used. Raises hou.OperationFailed if the path to the file is invalid or there were permission or other I/O errors. """ pass def createPointGroup(name, is_ordered=False): """ createPointGroup(self, name, is_ordered=False) -> hou.PointGroup Create a new point group in this geometry. name The name of the new group. Raises hou.OperationFailed if a group with this name already exists. is_ordered Whether or not the new group should be ordered. See hou.PointGroup for more information about ordered groups. Use hou.PointGroup.destroy to remove a point group from the geometry. """ pass def findVertexAttrib(name): """ findVertexAttrib(self, name) -> hou.Attrib or None Look up a vertex attribute by name. Returns the corresponding hou.Attrib object, or None if no attribute exists with that name. """ pass def setPointFloatAttribValuesFromString(): """None""" pass def intrinsicSize(): """None""" pass def merge(geometry): """ merge(self, geometry) Merge the points and primitives from another hou.Geometry object into this one. The new points and primitives are appended to this geometry's points and primitives. You would typically call this method from the code of a Python-defined SOP. Raises hou.GeometryPermissionError if this geometry is not modifiable. See also hou.Geometry.loadFromFile. """ pass def transformPrims(prims, matrix): """ transformPrims(self, prims, matrix) Transforms a set of primitives (e.g. rotates, scales, translates, etc.) by a transformation matrix. You would typically call this method from the code of a Python-defined SOP. > import math > > # This code will work from inside a Python SOP, but not from the Python > # shell. > > def createCircle(geo, num_vertices=10): > # Create a closed curve with the specified number of vertices. > curve = geo.createNURBSCurve(num_vertices) > curve.setIsClosed(True) > > # Arrange the points into a unit circle on the XZ plane, > # centered about the origin. > for i, vertex in enumerate(curve.vertices()): > angle = i * (2.0 * math.pi) / num_vertices > position = (math.cos(angle), 0, math.sin(angle)) > vertex.point().setPosition(position) > return curve > > # Create a bunch of circles on the XZ plane, tilt them slightly > # about X, translate them away from the origin, and rotate each > # one about the y axis by a different amount. > geo = hou.pwd().geometry() > num_copies = 20 > for i in range(num_copies): > curve = createCircle(geo) > geo.transformPrims([curve], > hou.hmath.buildRotateAboutAxis((1, 0, 0), 30) * > hou.hmath.buildTranslate((2, 0, 0)) * > hou.hmath.buildRotateAboutAxis((0, 1, 0), i * 360.0 / num_copies)) See hou.hmath functions that build transformation matrices. Raises hou.GeometryPermissionError if this geometry is not modifiable. """ pass def vertexStringAttribValues(name): """ vertexStringAttribValues(self, name) -> tuple of str Return a tuple of strings containing one attribute's values for all the vertices. This method only works on string attributes. If the attribute contains more than one element, each vertex will correspond to multiple values in the result. For example, if "strmap" is a string attribute of size 2 and there are 3 vertices with values ("apple", "orange"), ("red", "blue"), and ("one", "two") then the result will be ("apple", "orange", "red", "blue", "one", "two"). Calling this method is faster than looping over all the vertices and calling hou.Vertex.attribValue. If the attribute name is invalid or the attribute is not a string attribute then this method raises hou.OperationFailed. Note that you cannot pass a hou.Attrib object to this method like you can with many methods dealing with attributes. However, you can use hou.Attrib.name to easily get the name from an Attrib object. """ pass def sopNode(): """ sopNode(self) -> hou.SopNode If the Geometry is not frozen, return the hou.SopNode object corresponding to this Geometry. Otherwise, return None. See hou.Geometry.freeze for more information on frozen geometry. """ pass def createPolygon(): """ createPolygon(self) -> hou.Polygon Create a new polygon and return the corresponding hou.Polygon object. You would typically call this method from the code of a Python-defined SOP. The newly created polygon has no vertices. Use hou.Face.addVertex to add them. The polygon is also closed (see hou.Face.isClosed for more information). If the geometry contains primitive attributes, the new polygon receives the default values for those attributes. Raises hou.GeometryPermissionError if this geometry is not modifiable. > geo = hou.pwd().geometry() > poly = geo.createPolygon() > for position in (0,0,0), (1,0,0), (0,1,0): > point = geo.createPoint() > point.setPosition(position) > poly.addVertex(point) See hou.Face.addVertex for a slightly more complicated example. """ pass def attribValue(name_or_attrib): """ attribValue(self, name_or_attrib) -> int, float, str, or tuple Return the global (a.k.a. detail) attribute value for a particular attribute. The attribute may be specified by name or by hou.Attrib object. Raises hou.OperationFailed if no attribute exists with this name. """ pass def createPoints(point_positions): """ createPoints(self, point_positions) -> tuple of hou.Point Create a set of points located at the specified positions and return a tuple of the new hou.Point objects. You would typically call this method from the code of a Python-defined SOP. point_positions can be either a tuple of hou.Vector3 objects or a tuple of 3-tuple floating point numbers. For example, if point_positions is ((0, 1, 2), (1, 2, 3)) then this method will create 2 points with one positioned at (0, 1, 2) and the other at (1, 2, 3). If the geometry contains point attributes, the new points receive the default values for those attributes. Raises hou.GeometryPermissionError if this geometry is not modifiable. Raises hou.InvalidSize if one of the specified point positions does not contain 3 values (for x, y, z). See hou.Geometry.addAttrib, hou.Geometry.createPolygons, and hou.Face.addVertex for examples. """ pass def intersect(ray_origin, ray_direction, position_out, normal_out, uvw_out, pattern=None, min_hit=0.01, max_hit=1E18, tolerance=0.01): """ intersect(self, ray_origin, ray_direction, position_out, normal_out, uvw_out, pattern=None, min_hit=0.01, max_hit=1E18, tolerance=0.01) -> int Determines the intersection point of a ray with the geometry in this object. NOTE This method is unusual in that instead of returning multiple pieces of information about the intersection, it requires that you pass it objects which it modifies in-place with the information. > # Get some geometry from a SOP node > geometry = hou.node("/obj/geo1/sphere1").geometry() > # Shoot a ray from high up in the "sky" straight down at the origin > origin = hou.Vector3(0, 100, 0) > direction = hou.Vector3(0, -1, 0) > # Make objects for the intersect() method to modify > position = hou.Vector3() > normal = hou.Vector3() > uvw = hou.Vector3() > # Find the first intersection (if it exists) > did_intersect = geometry.intersect(origin, direction, position, normal, uvw) Returns the ID number of the hit primitive if the ray intersected the geometry, or -1 if the ray did not hit. ray_origin A hou.Vector3 object representing the starting point of the ray in world space. ray_direction A hou.Vector3 object representing the direction vector of the ray. position_out Pass a hou.Vector3 object to this argument. The method will change the object's values to represent the intersection position in world space. normal_out Pass a hou.Vector3 object to this argument. The method will change the object's values to represent the normal direction from the surface to the ray. uvw_out Pass a hou.Vector3 object to this argument. The method will change the object's values to represent the UVW position within the intersecting primitive where the ray hit. pattern If you pass a string containing primitive group syntax, the ray can only intersect primitives that match the pattern. min_hit Ignore intersections closer than this distance. You can use the min_hit argument to iterate through all possible hits along the ray, by setting the min_hit a tiny bit farther than the previous hit. > hit_positions = [] > prev_dist = 0.01 > while geometry.intersect(origin, direction, position, normal, uvw, > min_hit=prev_dist): > # Make sure to store a *copy* of the position, not the object > # that is being modified in each iteration of the loop > hit_positions.append(hou.Vector3(position)) > prev_dist = origin.distanceTo(position) + 0.01 max_hit Ignore intersections farther than this distance. tolerance Use this parameter to adjust the accuracy of intersections. If the ray approaches the geometry within the tolerance value, an intersection hit is assumed. A 0.01 tolerance (default) gives strict intersections while larger values produces less accurate intersections. """ pass def pointAttribs(): """ pointAttribs(self) -> tuple of hou.Attrib Return a tuple of all the point attributes. Note that the point position attribute is named P and is 3 floats in size. Also, the point weight attribute is named Pw and is 1 float in size. These attributes always exist in HOM, even though they are not listed by Houdini's UI. """ pass def iterPoints(): """ iterPoints(self) -> generator of hou.Point Return a generator that iterates through all the points in the geometry. Whereas hou.Geometry.points allocates and returns a tuple of all the points in the geometry, this method returns a generator object that will allocate hou.Point objects on demand. This object is very fast at random access into the sequence. If you're accessing a specific point by index and the geometry contains many points, it is faster to use iterPoints() than points(). If, however, you are iterating over all the points in the geometry, it is generally faster to use points() than iterPoints(). > # This is preferred: > geo.iterPoints()[23] > > # over this: > geo.points()[23] > > # But this is preferred: > for point in geo.points(): > ...process point... > > # over this: > for point in geo.iterPoints(): > ...process point... """ pass def primGroups(): """ primGroups(self) -> tuple of hou.PrimGroup Return a tuple of all the primitive groups in the geometry. """ pass def pointIntAttribValues(name): """ pointIntAttribValues(self, name) -> tuple of int Return a tuple of integers containing one attribute's values for all the points. This method only works on int or float attributes. If the attribute contains more than one element, each point will correspond to multiple values in the result. For example, if "idmap" is an integer attribute of size 2 and there are 3 points with values (1, 2), (2, 3), and (3, 4) then the result will be (1, 2, 2, 3, 3, 4). Calling this method is faster than looping over all the points and calling hou.Point.attribValue. If the attribute name is invalid or the attribute is not an int or float (e.g. it's a string attribute), this method raises hou.OperationFailed. Note that you cannot pass a hou.Attrib object to this method like you can with many methods dealing with attributes. However, you can use hou.Attrib.name to easily get the name from an Attrib object. """ pass def pointNormals(points): """ pointNormals(self, points) -> tuple of hou.Vector3 Returns a tuple of hou.Vector3 objects representing the point normals for the supplied points. points: A list of hou.Point objects for which to compute point normals. """ pass def pointIntAttribValuesAsString(name, int_type=hou.numericData.Int32): """ pointIntAttribValuesAsString(self, name, int_type=hou.numericData.Int32) -> str Return a string representation of the integers of one attribute's value for all the points. This method is faster than hou.Geometry.pointIntAttribValues, and you can use the array module to convert the string into a Python sequence. int_type A hou.numericData value to specify the integer data type (either Int8, Int16, Int32 or Int64). This method provides a faster implementation of the following: > import array > def pointIntAttribValuesAsString(self, name): > return array.array("i", self.pointIntAttribValues(name)).tostring() You can convert the return value from this method to an array using the following method: > import array > def pointIntAttribValuesAsArray(geometry, name): > a = array.array("i") > a.fromstring(geometry.pointIntAttribValuesAsString(name)) > return a See hou.Geometry.pointIntAttribValues for more information. """ pass def intrinsicNames(): """ intrinsicNames(self) -> tuple of str Returns a tuple of strings representing the intrinsic values available for this geometry. Different geometry types will have different intrinsic values available. You can then get or set the value using intrinsicValue and/or setIntrinsicValue. See the intrinsicValue method for more information. """ pass def renamePrimAttrib(old_name, new_name): """ renamePrimAttrib(self, old_name, new_name) Rename the primitive attribute with the specified old name to the new name. This method is typically called from within a Python- defined SOP when the SOP's geometry is writable. Raises GeometryPermissionError if called on a read-only geometry. Raises TypeError if old_name or new_name is None. Raises OperationFailed if no such primitive attribute with the old name exists. Raises OperationFailed if a primitive attribute with the new name already exists. """ pass def createPolygons(points): """ createPolygons(self, points) -> tuple of hou.Polygon Create a set of polygons with the specified points as vertices and return a tuple of the new hou.Polygon objects. You would typically call this method from the code of a Python-defined SOP. points can be either a tuple of tuples of hou.Point objects or a tuple of tuples of integers representing the point numbers. For example, if points is ((0, 1, 2), (3, 4, 5, 6)) then this method will create 2 polygons with one having points 0, 1 and 2 as its vertices and the other one having points 3, 4, 5 and 6 as its vertices. The created polygons are closed (see hou.Face.isClosed for more information). If the geometry contains primitive attributes, then the new polygons receive the default values for those attributes. Raises hou.GeometryPermissionError if this geometry is not modifiable. Raises hou.InvalidSize if one of the specified point tuples does not contain at least 3 elements. Raises hou.InvalidInput if one of the point numbers or hou.Point objects do not exist in the geometry. Example: > # Create 6 points in the geometry. > geo = hou.pwd().geometry() > point_positions = ( > (1, 0, 0), (0, 1, 0), (0, 0, 1), > (1, 1, 0), (1, 0, 1), (0, 1, 1), > ) > points = geo.createPoints(point_positions) > > # Create 2 polygons. > # The first polygon uses the first 3 points in the geometry as its vertices. > # The second polygon uses the last 3 points in the geometry as its vertices. > polygons = geo.createPolygons( > ((points[0], points[1], points[2]), (points[3], points[4], points[5]))) """ pass def setVertexStringAttribValues(name, values): """ setVertexStringAttribValues(self, name, values) For a particular attribute, set the attribute values for all vertices. You would typically call this method from the code of a Python-defined SOP. name The name of the vertex attribute. values A sequence of string values in the same format as that returned by hou.Geometry.vertexStringAttribValues. See that method for more information. Raises hou.OperationFailed if the attribute name is not valid, the attribute is not a string, or the array of values is not the correct size. Raises hou.GeometryPermissionError if this geometry is not modifiable. Also see hou.Geometry.vertexStringAttribValues. """ pass def renameGlobalAttrib(old_name, new_name): """ renameGlobalAttrib(self, old_name, new_name) Rename the global attribute with the specified old name to the new name. This method is typically called from within a Python-defined SOP when the SOP's geometry is writable. Raises GeometryPermissionError if called on a read-only geometry. Raises TypeError if old_name or new_name is None. Raises OperationFailed if no such global attribute with the old name exists. Raises OperationFailed if a global attribute with the new name already exists. """ pass def pointLoop(points, full_loop): """ pointLoop(self, points, full_loop) -> tuple of hou.Point Returns a tuple of hou.Point objects that make a path connecting the points provided in the points parameter. If multiple paths are being returned, they will be separated in the single returned tuple by a value of None. The paths are generated using the same algorithm used when performing loop selections in the viewport. points: A list of hou.Point objects that define the path or paths of connected points this function should return. Must contain at least two points. loop_type: Controls the type of path returned. Can be any of the hou.componentLoopType values. If using either the hou.componentLoopType.Extended or hou.componentLoopType.Closed loop types, the inputs points cannot contain any None entries. Furthermore, each pair of points is used to define a separate full loop, so the number of points must be even. If these conditions are not met, a hou.OperationFailed exception will be thrown. Raises a hou.OperationFailed if it was unable to construct a loop from the desired components. """ pass def createTetrahedronInPlace(p0, p1, p2, p3): """ createTetrahedronInPlace(self, p0, p1, p2, p3) -> hou.Prim Create a new tetrahedron and return the corresponding hou.Prim object. You would typically call this method from the code of a Python-defined SOP. The newly created tetrahedron has four vertices and uses the points that have been passed into it. Raises hou.GeometryPermissionError if this geometry is not modifiable. """ pass def primIntAttribValuesAsString(name, int_type=hou.numericData.Int32): """ primIntAttribValuesAsString(self, name, int_type=hou.numericData.Int32) -> str Return a string representation of the integers of one attribute's value for all the primitives. This method is faster than hou.Geometry.primFloatAttribValues, and you can use the array module to convert the string into a Python sequence. int_type A hou.numericData value to specify the integer data type (either Int8, Int16, Int32 or Int64). This method provides a faster implementation of the following: > import array > def primIntAttribValuesAsString(self, name): > return array.array("i", self.primIntAttribValues(name)).tostring() You can convert the return value from this method to an array using the following method: > import array > def primIntAttribValuesAsArray(geometry, name): > a = array.array("i") > a.fromstring(geometry.primIntAttribValuesAsString(name)) > return a See hou.Geometry.primIntAttribValues for more information. """ pass def findPointGroup(name): """ findPointGroup(self, name) -> hou.PointGroup or None Return the point group with the given name, or None if no such group exists. """ pass def createMeshSurface(rows, cols, is_closed_in_u=False, is_closed_in_v=False): """ createMeshSurface(self, rows, cols, is_closed_in_u=False, is_closed_in_v=False) -> hou.Surface Create a quadrilateral mesh surface in the XY plane centered at the origin with size (1, 1) and return it. You would typically call this method from the code of a Python-defined SOP. Note that a mesh object is not the same as a set of polygons defining the same shape. A mesh object is a single primitive. See hou.Geometry.createNURBSSurface for more information. """ pass def primLoop(prims, loop_type): """ primLoop(self, prims, loop_type) -> tuple of hou.Prim Returns a tuple of hou.Prim objects that make a path connecting the primitives provided in the prims parameter. If multiple paths are being returned, they will be separated in the single returned tuple by a value of None. The paths are generated using the same algorithm used when performing loop selections in the viewport. prims: A list of hou.Prim objects that define the path or paths of connected primitives this function should return. Must contain at least two primitives. loop_type: Controls the type of path returned. Can be any of the hou.componentLoopType values. If using either the hou.componentLoopType.Extended or hou.componentLoopType.Closed loop types, the inputs prims cannot contain any None entries. Furthermore, each pair of primitives is used to define a separate full loop, so the number of primitives must be even. If these conditions are not met, a hou.OperationFailed exception will be thrown. Raises a hou.OperationFailed if it was unable to construct a loop from the desired components. """ pass def createNURBSCurve(num_vertices=4, is_closed=False, order=4): """ createNURBSCurve(self, num_vertices=4, is_closed=False, order=4) -> hou.Face Create a new NURBS with the specified number of vertices and return it. You would typically call this method from the code of a Python- defined SOP. num_vertices The number of verticies in the curve. A new point is added to the geometry for each vertex, and this point is located at the origin until you change its position. You can also add more vertices with hou.Face.addVertex. The minimum number of vertices for a NURBS curve is identical to its order. So for the default order of 4, the curve must have a minimum of 4 vertices. If you specify too few vertices, this method raises hou.OperationFailed. is_closed Controls if the curve is open or closed; see hou.Face.isClosed for more information. If not specified, the resulting curve is open. This behavior is different from hou.Geometry.createPolygon, where the new polygon is closed. You can also open or close it with hou.Face.setIsClosed. order Specifies the curve's order. The default order is 4, corresponding to a cubic NURBS curve. An order of 2, the lowest order, will give a curve with linear segments. If the geometry contains primitive attributes, the new curve receives the default values for those attributes. > # This code will work from inside a Python SOP, but not from the Python > # shell. > geo = hou.pwd().geometry() > curve = geo.createNURBSCurve(10) > i = 0 > for vertex in curve.vertices(): > vertex.point().setPosition((i, i % 3, 0)) > i = i + 1 Raises hou.GeometryPermissionError if this geometry is not modifiable. See also: * hou.Prim.vertices * hou.Point.setPosition """ pass def createNURBSSurface(rows, cols, is_closed_in_u=False, is_closed_in_v=False): """ createNURBSSurface(self, rows, cols, is_closed_in_u=False, is_closed_in_v=False) -> hou.Surface Create a NURBS surface in the XY plane centered at the origin with size (1, 1) and return it. You would typically call this method from the code of a Python-defined SOP. rows, cols Determines the size of the 2D array of vertices defining the control points of the surface. The number of cols and rows in each direction, must be equal to or larger than the U and V orders, respectively. is_closed_in_u, is_closed_in_v Controls if the surface is open or closed in each of the U and V directions; see hou.Surface.isClosedInU for more information. If not specified, the default behavior is to build an open surface. order_u, order_v Specifies the surface's order in each of the U and V directions. The default order for both is 4, corresponding to a cubic NURBS surface. An order of 2, the lowest order, will give a surface with linear segments, essentially a mesh. If the geometry contains primitive attributes, the new surface receives the default values for those attributes. You can move or resize the surface using hou.Geometry.transformPrims. Raises hou.GeometryPermissionError if this geometry is not modifiable. Raises hou.OperationFailed if the number of rows and/or columns is invalid. > # This code will work from inside a Python SOP, but not from the Python > # shell. > geo = hou.pwd().geometry() > > # Create a surface with a 10x10 grid of vertices. > surf = geo.createNURBSSurface(10, 10) > > # Initially, the center is at (0, 0, 0), size is (1, 1, 1), on the XY > # plane. Scale to (20, 10) and rotate into the XZ plane. > geo.transformPrims((surf,), > hou.hmath.buildScale((20, 10, 1)) * > hou.hmath.buildRotateAboutAxis((1, 0, 0), 90)) See also: * hou.Geometry.transformPrims * hou.Matrix4 * hou.hmath """ pass def primStringAttribValues(name): """ primStringAttribValues(self, name) -> tuple of str Return a tuple of strings containing one attribute's values for all the primitives. This method only works on string attributes. If the attribute contains more than one element, each primitive will correspond to multiple values in the result. For example, if "strmap" is a string attribute of size 2 and there are 3 primitives with values ("apple", "orange"), ("red", "blue"), and ("one", "two") then the result will be ("apple", "orange", "red", "blue", "one", "two"). Calling this method is faster than looping over all the primitives and calling hou.Prim.attribValue. If the attribute name is invalid or the attribute is not a string attribute) then this method raises hou.OperationFailed. Note that you cannot pass a hou.Attrib object to this method like you can with many methods dealing with attributes. However, you can use hou.Attrib.name to easily get the name from an Attrib object. """ pass def createBezierCurve(num_vertices=4, is_closed=False, order=4): """ createBezierCurve(self, num_vertices=4, is_closed=False, order=4) -> hou.Face Create a new Bezier curve with the specified number of vertices and return it. You would typically call this method from the code of a Python-defined SOP. num_vertices The number of verticies in the curve. A new point is added to the geometry for each vertex, and this point is located at the origin until you change its position. You can also add more vertices with hou.Face.addVertex. is_closed Controls if the curve is open or closed; see hou.Face.isClosed for more information. If not specified, the resulting curve is open. This behavior is different from hou.Geometry.createPolygon, where the new polygon is closed. order Specifies the curve's order. The default order is 4, corresponding to a cubic Bezier curve. An order of 2, the lowest order, will give a curve with linear segments. An open Bezier curve must have (order - 1) * n + 1 vertices for some integer n>=1 (so valid values for order 4 curves are 4, 7, 10, etc.). A closed Bezier curve must have (order - 1) * n vertices (e.g. 3, 6, 9, etc. for order 4 curve). This restriction does not apply to curves of order 2, however. As a consequence, you cannot use hou.Face.setIsClosed on non-linear Bezier curves, since the number of vertices would need to change. See hou.Geometry.createNURBSCurve for more information. """ pass def data(): """ data(self) -> str Return the geometry data in bgeo format. For example: > geometry = hou.node("/obj/geo1/torus1").geometry() > bgeo_data = geometry.data() > open("/tmp/torus.bgeo", "wb").write(bgeo_data) """ pass def addArrayAttrib(type, name, data_type, tuple_size=1): """ addArrayAttrib(self, type, name, data_type, tuple_size=1) -> hou.Attrib Create a new point, primitive, vertex, or global (a.k.a. detail) array attribute. Returns a hou.Attrib object describing the newly created attribute. You would typically call this method from the code of a Python-defined SOP. type A hou.attribType value to specify if the new attribute should be a point, primitive, vertex, or global attribute. name The new attribute's name. Each attribute in the geometry must have a unique name. data_type A hou.attribData value to specify if the new attribute should be an int, float, or string attribute. tuple_size The new attribute's tuple size. Raises hou.GeometryPermissionError if this geometry is not modifiable. Raises hou.OperationFailed if an attribute with this name already exists. If you are familiar with the C++ Houdini Development Kit (HDK), you know that Houdini can support attributes with the same name but with different types. However, many SOPs do not let you distinguish between attributes that have the same name, and multiple attributes with the same name are discouraged. For this reason, you cannot create them with this method. """ pass def _orderedPoints(): """None""" pass def pointFloatAttribValuesAsString(name, float_type=hou.numericData.Float32): """ pointFloatAttribValuesAsString(self, name, float_type=hou.numericData.Float32) -> str Return a string representation of the floats of one attribute's value for all the points. This method is faster than hou.Geometry.pointFloatAttribValues, and you can use the array module to convert the string into a Python sequence. float_type A hou.numericData value to specify the float data type (either Float16, Float32 or Float64). This method provides a faster implementation of the following: > import array > def pointFloatAttribValuesAsString(self, name): > return array.array("f", self.pointFloatAttribValues(name)).tostring() You can convert the return value from this method to an array using the following method: > import array > def pointFloatAttribValuesAsArray(geometry, name): > a = array.array("f") > a.fromstring(geometry.pointFloatAttribValuesAsString(name)) > return a See hou.Geometry.pointFloatAttribValues for more information. """ pass def createPacked(typename): """ createPacked(self, typename) -> hou.PackedPrim typename A string containing the name of a type of packed primitive. Typical examples are "PackedDisk" (on-disk geometry file) or "AlembicRef" (Alembic file). To see a complete list of possible typename values, run ginfo -P on a Houdini tools command line. See hou.PackedPrim for more information. """ pass def globEdges(): """None""" pass def clear(): """ clear(self) Remove everything from this geometry object. The geometry will have no points or primitives after calling this method. Raises hou.GeometryPermissionError if this geometry is not modifiable. """ pass def findPrimGroup(name): """ findPrimGroup(self, name) -> hou.PrimGroup or None Return the primitive group with the given name, or None if no such group exists. """ pass def primAttribs(): """ primAttribs(self) -> tuple of hou.Attrib Return a tuple of all the primitive attributes. """ pass def intrinsicReadOnly(): """None""" pass def globVertices(): """None""" pass def points(): """ points(self) -> tuple of hou.Point Return a tuple of all the points in the geometry. See also the hou.Geometry.iterPoints method. """ pass def globPrims(pattern): """ globVertices(self, pattern) -> tuple of hou.Vertex Return a tuple of vertices corresponding to a pattern of vertex numbers. The pattern format is the same one used by the group fields on SOP nodes that take vertex selections. See hou.Geometry.globPoints for more information. """ pass def setVertexFloatAttribValuesFromString(): """None""" pass def setPrimStringAttribValues(name, values): """ setPrimStringAttribValues(self, name, values) For a particular attribute, set the attribute values for all primitives. You would typically call this method from the code of a Python-defined SOP. name The name of the primitive attribute. values A sequence of string values in the same format as that returned by hou.Geometry.primStringAttribValues. See that method for more information. Raises hou.OperationFailed if the attribute name is not valid, the attribute is not a string, or the array of values is not the correct size. Raises hou.GeometryPermissionError if this geometry is not modifiable. Also see hou.Geometry.primStringAttribValues. """ pass def createPrimGroup(name, is_ordered=False): """ createPrimGroup(self, name, is_ordered=False) -> Hou.PrimGroup Create a new primitive group in this geometry. name The name of the new group. Raises hou.OperationFailed if a group with this name already exists. is_ordered Whether or not the new group should be ordered. See hou.PrimGroup for more information about ordered groups. Use hou.PrimGroup.destroy to remove a primitive group from the geometry. """ pass def primBoundingBox(primpattern): """ primBoundingBox(self, primpattern) -> hou.BoundingBox Return an axis-aligned 3D bounding box that is sized and positioned to include the primitives specified by the primitive pattern. If the pattern is blank, all primitives will be included. Some primitives, such as spheres, extend beyond their points. This extension will be included. """ pass def floatAttribValue(name_or_attrib): """ floatAttribValue(self, name_or_attrib) -> float Return the global (a.k.a. detail) attribute value for a particular floating point attribute. The attribute may be specified by name or by hou.Attrib object. Raises hou.OperationFailed if no attribute exists with this name or the attribute is not a float of size 1. In most cases, you'll just use hou.Geometry.attribValue to access attribute values. Houdini uses this method internally to implement attribValue. """ pass class GeometryDelta(object): """ hou.GeometryDelta Geometry delta provides access to the geometry differences (deltas) stored by some Geometry nodes such as the edit SOP. If you ask a SOP for its geometry delta via hou.SopNode.geometryDelta, you'll get a reference to it. If the SOP recooks, the corresponding geometry delta objects will update to the SOP's new geometry delta object. If the SOP is deleted, accessing the geometry delta object will raise a hou.ObjectWasDeleted exception. """ def setPointPositionsFromString(positions): """ setPointPositionsFromString(self, positions) Stores the differences between the provided positions and this SOP node's input geometry into this node's geometry delta object. This can be used, for example, to preload an edit SOP's delta so its output geometry matches a desired shape without changing the input geometry. The positions parameter should be a binary representation of the positions. For example, the result of calling hou.Geometry.pointFloatAttribValuesAsString. """ pass def GeometryDelta_swigregister(): """None""" pass class GeometryPermissionError(Error): """ hou.GeometryPermissionError Exception that is raised when you try to modify geometry from outside of a Python SOP. """ def description(): """ description(self) -> str Return a description of the class of exception. The description is not related to the exception instance. """ pass def exceptionTypeName(): """ exceptionTypeName(self) -> str Return the name of the exception type. Instances of different subclasses of hou.Error will return different names. Instances of the base class will return "Error". You can also use str(e.__class__) to get the name of the subclass. """ pass def GeometryPermissionError_swigregister(): """None""" pass class GeometrySelection(object): """ hou.GeometrySelection Represents a component selection performed by the user in a viewport. Calling hou.SceneViewer.selectGeometry waits for the user to perform a selection in the viewport, and returns an object of this type representing the elected components. The returned selection can be manipulated by converting it to a specific component type, grown, or shrunk. Then the selection can be converted to a string that can be used in a SOP node group parameter. If the selection contains components from more than one SOP, you can use the hou.GeometrySelection.mergedNode function to create a Merge SOP and/or Object Merge SOPs that brings all the referenced geometry into a single node. """ def ordered(): """ ordered(self) -> bool Returns true if this is an ordered selection. This means that the order in which the user selected the components is preserved. To have an ordered selection, the ordered parameter needs to have been set to True when calling hou.SceneViewer.geometrySelection. """ pass def shrinkSelection(checkuv, =, true): """ shrinkSelection(checkuv = true) Removes components that are on the boundary of the selection. """ pass def connectivity(): """ connectivity(self) -> hou.connectivityType enum value Returns the hou.connectivityType that has been set on this geometry selection. Unless you call hou.GeometrySelection.setConnectivity, this function will return the no connectivity value. """ pass def needsMergedNode(parent): """ needsMergedNode(self, parent) -> bool Returns true if a Merge SOP needs to be created in order to access all components in the selection. """ pass def setGeometryType(type): """ setGeometryType(self, type) Changes the type of component contained in the selection, converting the existing selection to the new component type. """ pass def mergedSelectionString(empty_string_selects_all=True, force_numeric=False): """ mergedSelectionString(self, empty_string_selects_all=True, force_numeric=False) -> string Returns a single string that can be used in group parameters of the merged node returned by hou.GeometrySelection.mergedNode. If all components are selected from a single node this is equivalent to the first string in the tuple returned by hou.GeometrySelection.selectionStrings. """ pass def selections(): """ selections(self) -> tuple of [Hom:hou.Selection] Returns a tuple of component selection objects. These correspond to the nodes returned by the nodes function. """ pass def setPrimitiveTypes(primitive_types): """ setPrimitiveTypes(self, primitive_types) Sets the tuple of primitive types allowed in the selection. Any primitives that are not of an allowed type are removed from the selection. Only has an effect if this is a primitive selection. """ pass def selectionStrings(empty_string_selects_all=True, bool, force_numeric=False): """ selectionStrings(self, empty_string_selects_all=True, bool force_numeric=False) -> tuple of strings Returns a tuple of strings that can be used to refer to the selected components in each SOP node referenced by the selection. """ pass def setConnectivity(connectivity): """ setConnectivity(self, connectivity) Sets the type of connectivity to enforce when modifying the selection. The current selection is also expanded so that all connected components (using the supplied style of connectivity) become part of the selection. """ pass def geometryType(): """ geometryType(self) -> hou.geometryType enum value Returns the type of component that was selected. """ pass def mergedNode(parent, creator_name, force_keep_original_objects=False, display_original_objects=False): """ mergedNode(self, parent, creator_name, force_keep_original_objects=False, display_original_objects=False) -> Node Creates a Merge SOP that combines all the SOPs referenced by the selection. Most selections will only reference a single SOP in which case no Merge SOP is required, and the selected SOP will be returned. """ pass def growSelection(): """ growSelection() Expands the selection by adding all components that are connected to components currently in the selection. """ pass def primitiveTypes(): """ primitiveTypes(self) -> tuple of hou.primitiveType enum values Returns a tuple containing all primitive types that are contained in the selection. """ pass def nodes(): """ nodes(self) -> tuple of Nodes Returns a tuple of all nodes referenced by the selection. """ pass def GeometrySelection_swigregister(): """None""" pass class GeometryViewport(object): """ hou.GeometryViewport REPLACES * viewcamera * viewhome * viewwrite """ def viewTransform(): """ viewTransform(self) -> hou.Matrix4 Returns the transform matrix of the view. To set the viewpoint programmatically, use defaultCamera() to get a hou.ViewportCamera object and manipulate that. """ pass def queryPrimAtPixel(node, x, y): """ queryPrimAtPixel(self, node, x, y) -> hou.Prim or None Return the primitive drawn at the specified pixel in the viewport, or None if there is nothing there. The primitive returned will be a subclass of hou.Prim. The parameter node is used to restrict the query to geometry within a particular node. If node is None, then the query is unrestricted. """ pass def saveViewToCamera(camera_node): """ saveViewToCamera(self, camera_node) Copies the viewpoint transform of the current view onto the transformation parameters of a camera or light node. camera_node A hou.ObjNode object representing the node to save the view to. """ pass def queryInspectedGeometry(): """ queryInspectedGeometry(self) -> hou.Geometry or None Return the geometry currently being inspected in the viewport, or None when nothing is being inspected or when called outside of an inspect script. """ pass def setDefaultCamera(stashed_cam): """ setDefaultCamera(self, stashed_cam) Takes a hou.GeometryViewportCamera and copies its values into this viewport. Set the current camera settings of the viewport to the settings stored in cam_setting. If the viewport is looking through a camera and the view is not locked to the camera, it will be switched to "No camera". If the view is locked to the camera, the camera object will be updated instead. """ pass def home(): """ home(self) Moves/tumbles the viewport to the default view. """ pass def setCamera(camera_node): """ setCamera(self, camera_node) Copies the viewport transform from the transformation parameters of a camera or light onto the current view. This is the same as choosing a camera/light from the Look through submenu in the viewport's Camera menu. camera_node A hou.ObjNode object representing the node to save the view from. """ pass def homeAll(): """ homeAll(self) Moves/tumbles the view to show all geometry/objects (including templated geometry). See also homeNonTemplated(). """ pass def frameNonTemplated(): """ frameNonTemplated(self) Moves the view to show all _non-templated_ geometry. """ pass def homeNonTemplated(): """ homeNonTemplated(self) Moves/tumbles the view to show all _non-templated_ geometry. """ pass def resolutionInPixels(): """ resolutionInPixels(self) -> 2-tuple of int Returns the resolution of the viewport in pixels, as (width, height). """ pass def clearEventCallbacks(): """ clearEventCallbacks(self) Remove all Python callbacks that have been registered with hou.GeometryViewport.addEventCallback. """ pass def camera(): """None""" pass def eventCallbacks(): """ eventCallbacks(self) -> tuple of callbacks Return a tuple of all the Python callbacks that have been registered with hou.GeometryViewport.addEventCallback. """ pass def viewPivot(): """ viewPivot(self) -> hou.Vector3 Returns a hou.Vector3 representing the view pivot as a point in world space. """ pass def queryInspectedPrim(): """ queryInspectedPrim(self) -> hou.Prim or None Return the primitive currently being inspected in the viewport, or None when nothing is being inspected or when called outside of an inspect script. The primitive returned will be a subclass of hou.Prim. """ pass def type(): """ type(self) -> hou.geometryViewportType enum value Query the viewport type (UV, 3D, top, left, etc). """ pass def frameGrid(): """ frameGrid(self) Frames the view on the grid. """ pass def mapToWorld(x, y): """ mapToWorld(self, x, y) -> tuple of (hou.Vector3, hou.Vector3) Convert viewport coordinates to world coordinates. Returns a ray (direction vector and an origin point). """ pass def draw(): """ draw(self) Request that the viewport redraw. Multiple draw() calls within the same script will be merged into a single call. """ pass def lockCameraToView(): """ lockCameraToView(self) Set the viewport camera lock. When True, any changes to the view will affect the camera object being viewed though. When False, the camera will become disconnected from the viewport and revert to the default viewport camera when the user tumbles the view. It is possible to enable this without the viewport looking through a camera, though view changes will not affect any objects until the user sets the viewport to look through a camera or light. """ pass def addEventCallback(callback): """ addEventCallback(self, callback) Register a Python callback to be called whenever a viewport event occurs. The event types are defined in hou.geometryViewportEvent. 'callback': Any callable Python object that expects keyworded arguments specific to an event type. This callback can be used for any geometry viewport event type. Arguments for hou.geometryViewportEvent.CameraSwitched: * event_type: This viewport event. * desktop: The desktop object holding the scene viewer. * viewer: The scene viewer object holding the viewport. * viewport: The viewport object that triggered the event. > import hou > > def myViewportCB(**kwargs): > event_type=kwargs['event_type'] > desktop=kwargs['desktop'] > viewer=kwargs['viewer'] > viewport=kwargs['viewport'] > > print " myViewportCB=",myViewportCB > print "event type=",event_type > print "desktop=",desktop > print "viewer=",viewer > print "viewport=",viewport > > cam = viewport.camera() > print "camera=%s "%(cam.name()) > > curSceneViewer = [item for item in hou.ui.curDesktop().currentPaneTabs() if item.type() == hou.paneTabType.SceneViewer][0] > curSceneViewer.curViewport().addEventCallback(myViewportCB) """ pass def changeType([Hom:hou.geometryViewportType]): """ changeType(self, [Hom:hou.geometryViewportType]) Set the viewport type (hou.geometryViewportType). This method first attempts to restore a stashed view for the new viewport type, but failing that, will home the viewport. """ pass def queryNodeAtPixel(x, y): """ queryNodeAtPixel(self, x, y) -> hou.ObjNode, hou.SopNode, or None Return the node draw at the specified pixel in the viewport, or None if there is nothing there. The type of node returned depends on the level of the viewer. """ pass def mapFromMouseChop(x, y): """ mapFromMouseChop(self, x, y) -> tuple of (int, int) Convert from the Mouse CHOP's X and Y screen values (which range from -1 to 1) to viewport coordinates, where (0,0) is the bottom left corner of the viewport. """ pass def mapToScreen(position): """ mapToScreen(self, position) -> hou.Vector2 Convert world coordinates to viewport coordinates. position A hou.Vector3 containing a world space position. """ pass def isCameraLockedToView(): """ isCameraLockedToView(self) -> bool Query to see if the camera is locked to the view. This returns the state of the camera lock only; this can be enabled without viewing through a camera. """ pass def frameAll(): """ frameAll(self) Moves the view to show all geometry/objects. See also frameNonTemplates(). """ pass def homeSelected(): """ homeSelected(self) Moves/tumbles the view to show the selected geometry/objects. """ pass def homeGrid(): """ homeGrid(self) Homes the viewport on the grid. """ pass def name(): """ name(self) -> str Query of the name of the viewport (persp1, top1, etc). """ pass def frameBoundingBox(bbox): """ frameBoundingBox(self, bbox) Moves the view to show an arbitrary area in the scene. bbox A hou.BoundingBox representing the volume of space to focus on. """ pass def settings(): """ settings(self) -> hou.GeometryViewportSettings Set the name of the viewport. Setting the name does not affect its type, so naming a perspective view front will be confusing. This is best used in conjunction with changeType(). """ pass def usesConstructionPlane(): """ usesConstructionPlane(self) -> bool Returns whether this viewport uses the construction plane when it is on. """ pass def useDefaultCamera(): """ useDefaultCamera(self) Set the viewport camera to "No camera" and stop looking through a camera object (or light). """ pass def changeName(str): """ changeName(self, str) Set the name of the viewport. """ pass def frameSelected(): """ frameSelected(self) Moves the view to show the selected geometry/objects. """ pass def removeEventCallback(selfcallback): """ removeEventCallback(self,callback) Remove a specific Python callback that have been registered with hou.GeometryViewport.addEventCallback. """ pass def defaultCamera(): """ defaultCamera(self) -> hou.GeometryViewportCamera Returns an object representing the viewport's viewpoint. The returned object is "live" in that changing its settings will immediately change the view If a camera/ight is locked to the view, changing the settings of the GeometryViewportCamera will change the camera/light node's parameters as well. Instead of a live object, you can get a "disconnected" version of the viewpoint using hou.GeometryViewportCamera.stash. This is a useful way to remember a certain viewpoint in code for later. You can restore a "stashed" camera using setDefaultCamera(). > # Remember the current view > cam = viewport.defaultCamera() > saved = cam.stash() > > # Change the view somehow > > # Restore the original view > viewport.setDefaultCamera(saved) """ pass class GeometryViewportBackground(object): """ hou.GeometryViewportBackground """ def setBrightness(intensity): """ setBrightness(self, intensity) Set the intensity multiplier of the background image. A value of 1 keeps it at its original intensity, and values less than that dim it. """ pass def sourceFromCOP(use_cop): """ sourceFromCOP(self, use_cop) Fetch the background image from a composite operator instead of a disk file. If False, a disk file is used. """ pass def autoPlace(): """ autoPlace(self) -> bool Query if the background image is automatically fit to the viewport. """ pass def imageOffset(): """ imageOffset(self) -> tuple of float Query the background image offset. """ pass def imageFile(): """ imageFile(self) -> str Query the filename of the background image. """ pass def imageCOP(): """ imageCOP(self) -> str Query the operation path of the background image. """ pass def imageScale(): """ imageScale(self) -> tuple of float Query the background image scale. """ pass def isCOPSource(): """ isCOPSource(self) -> bool Query if the background image is sourced from a composite operator. """ pass def imageSource(): """ imageSource(self) -> str Query the file or cop path, depending on the current background image source. """ pass def brightness(): """ brightness(self) -> float Query the intensity multiplier of the background image. """ pass def setImageOffset(offset): """ setImageOffset(self, offset) Set the background image offset, which is a 2-tuple of float. The values should be in the 0-1 range, representing fractions of the viewport width and height. """ pass def setImageScale(scale): """ setImageScale(self, scale) Set the background image scale, which is a 2-tuple of float. The values should be in the 0-1 range, representing fractions of the viewport width and height. """ pass def isFileSource(): """ isFileSource(self) -> bool Query if the background image is sourced from a disk file. """ pass def setAutoPlace(enable): """ setAutoPlace(self, enable) Automatically fit the background image to the viewport. If False, use the manual offset and scale to position the image. """ pass def setImageCOP(op_path): """ setImageCOP(self, op_path) Set the path to the Composite operator defining the background image and set the background source to 'COP'. """ pass def setImageFile(file_path): """ setImageFile(self, file_path) Set the filename of the background image and set the background source to 'File'. """ pass def setImageSource(file_or_op_path): """ setImageSource(self, file_or_op_path) Set the file or cop path, depending on the current background image source. """ pass def GeometryViewportBackground_swigregister(): """None""" pass class GeometryViewportCamera(object): """ hou.GeometryViewportCamera """ def clipPlanes(): """ clipPlanes(self) -> 2-tuple of float Query the clip planes of the viewport camera as (near,far). """ pass def isPerspective(): """ isPerspective(self) -> bool Query if the camara view uses a perspective projection. """ pass def setFocalLength(fl): """ setFocalLength(self, fl) Set the focal length of the viewport camera. Throws an error if the viewport is looking though camera object and the view is not locked to that camera. """ pass def windowSize(): """ windowSize(self) -> 2-tuple of float Query the window size of the viewport, in (0,1) space. """ pass def orthoWidth(): """ orthoWidth(self) -> float """ pass def windowOffset(): """ windowOffset(self) -> 2-tuple of float Query the window offset of the viewport, in (0,1) space. """ pass def pivot(): """ pivot(self) -> 3-tuple of float Query the pivot of the viewport camera. """ pass def translation(): """ translation(self) -> 3-tuple of float Query the translation (position) of the viewport camera. """ pass def setAperture(ap): """ setAperture(self, ap) Set the aperture of the viewport camera. Throws an error if the viewport is looking though camera object and the view is not locked to that camera. """ pass def rotation(): """None""" pass def setAspectRatio(ar): """ setAspectRatio(self, ar) Set the view aspect ratio of the viewport camera (16:9 would be 1.777). Throws an error if the viewport is looking though camera object and the view is not locked to that camera. """ pass def setClipPlanes(near_far): """ setClipPlanes(self, near_far) """ pass def focalLength(): """ focalLength(self) -> float Query the focal length of the viewport camera (or current camera). """ pass def setWindowSize(size): """ setWindowSize(self, size) """ pass def stash(): """ stash(self) -> hou.GeometryViewportCamera Create a copy of the camera settings which can be used to store the view, usually so it can be restored later. Stashed camera settings are not connected to a viewport, so modifying them will have no effect on the viewport until it is passed to the viewport via hou.GeometryViewport.setDefaultCamera(). """ pass def setPerspective(perspective): """ setPerspective(self, perspective) Set the camera view to perspective (True) or orthographic (False). Fixed orthographics views cannot be changed to perspective (Top, Bottom, Left, Right, Front, and Back). """ pass def setWindowOffset(xy): """ setWindowOffset(self, xy) """ pass def setPivot(xyz): """ setPivot(self, xyz) """ pass def setOrthoWidth(ow): """ setOrthoWidth(self, ow) Set the orthographic width of the viewport camera. Throws an error if the viewport is looking though camera object and the view is not locked to that camera. This has no effect on perspective cameras. """ pass def aperture(): """ aperture(self) -> float Query the aperture of the viewport camera (or current camera). """ pass def setRotation(): """None""" pass def aspectRatio(): """ aspectRatio(self) -> float """ pass def isOrthographic(): """ isOrthographic(self) -> bool Query if the camara view uses an orthographic projection. """ pass def setTranslation(xyz): """ setTranslation(self, xyz) """ pass def GeometryViewportCamera_swigregister(): """None""" pass class GeometryViewportDisplaySet(object): """ hou.GeometryViewportDisplaySet A Display Set represents a group of 3D viewport display options that apply to a particular context of geometry. OVERVIEW In Houdini's 3D viewer display options window, you can apply different display options to certain subsets of objects/geometry, for example selected objects, or the displayed SOP. This object represents a set of options that apply to one of these subsets. For example, you can set templated SOPs to display as wireframe: > # Get a reference to the geometry viewer > pane = hou.ui.curDesktop().paneTabOfType(hou.paneTabType.SceneViewer) > > # Get the display settings > settings = pane.curViewport().settings() > > # Get the GeometryViewportDisplaySet for objects > tmplset = settings.displaySet(hou.displaySetType.TemplateModel) > > # Tell Houdini to show set the shading mode for this subset to wireframe > tmplset.setShadedMode(hou.glShadingType.Wire) There are several subsets available: Objects hou.displaySetType.SceneObject Object nodes which are not selected or ghosted. hou.displaySetType.SelectedObject Object nodes which are selected. hou.displaySetType.GhostObject Object nodes which ghosted, which occurs when they are visible when at the SOP level and "Ghost Other Objects" is the current object mode, but are not the current object. Geometry hou.displaySetType.DisplayModel SOP with the display flag. This takes precedence over TemplateModel and CurrentModel, if the SOP has either the template flag set or is selected. hou.displaySetType.CurrentModel SOP that is currently selected. This takes precedence over TemplateModel, if that SOP also has the template flag set. hou.displaySetType.TemplateModel SOP that has a template flag set. You can set the options in each display set independently of the other sets. You can also link a subset to another, so this subset uses the linked set's options. """ def showPointMarkers(on): """ showPointMarkers(self, on) Show or hide point markers. """ pass def isShowingPrimBreakpoints(): """ isShowingPrimBreakpoints(self) -> bool Query if breakpoints are displayed. Breakpoints are only available on NURBS and bezier surfaces and curves. """ pass def pointPositionVisibility(): """ pointPositionVisibility(self) -> hou.markerVisibility Query the visibility setting of point UVs. """ pass def primNumberVisibility(): """ primNumberVisibility(self) -> hou.markerVisibility Query the visibility setting of primitive numbers. """ pass def pointNumberVisibility(): """ pointNumberVisibility(self) -> hou.markerVisibility Query the visibility setting of point numbers. """ pass def isUniqueDisplaySet(): """ isUniqueDisplaySet(self) -> bool A display set can be linked to another display set, so that all of its options are taken from that linked set rather than its own. This method returns True if the display set is unique, in that it is not linked to another display set, and False if the set refers to another display set. """ pass def setBoundaryMode(hou.boundaryDisplay): """ setBoundaryMode(self, hou.boundaryDisplay) Set the viewport types that highlight 3D boundaries for the geometry in the display set. * hou.boundaryDisplay.Off: No 3D boundaries are displayed. * hou.boundaryDisplay.On: 3D boundaries are shown in all viewports. * hou.boundaryDisplay.View3D: 3D boundaries are shown in 3D viewports only. * hou.boundaryDisplay.ViewUV: . 3D boundaries are shown in UV viewports only. """ pass def vertexNumberVisibility(): """ vertexNumberVisibility(self) -> hou.markerVisibility Query the visibility setting of vertex numbers. """ pass def isShowingUVBackfaces(): """ isShowingUVBackfaces(self) -> bool Query if UV Backface highlighting is enabled in the UV view. Highlight polygons that are facing away, as the texture will appear backwards on these polygons. """ pass def showPrimBackfaces(on): """ showPrimBackfaces(self, on) Enable to tint backfacing polygons to distinguish them from front facing polygons. """ pass def isShowingPointUVs(): """ isShowingPointUVs(self) -> bool Query if point texture coordinates are being shown, as text: "(u,v)". """ pass def isShowingVertexNumbers(): """ isShowingVertexNumbers(self) -> bool Query if vertex numbers are shown. Each vertex on a polygon or mesh is numbered 0 to #edges-1. """ pass def pointTrailVisibility(): """ pointTrailVisibility(self) -> hou.markerVisibility Query the visibility setting of point trails. """ pass def isShowingPrimProfileNumbers(): """ isShowingPrimProfileNumbers(self) -> bool Query if profile curve numbers are shown, on NURBS surfaces only. Each profile curve has an index from 0 to #profiles-1. """ pass def setVertexMarkerVisibility(visibility): """ setVertexMarkerVisibility(self, visibility) Controls how vertex markers are shown when displayed. """ pass def isShowingPointTrails(): """ isShowingPointTrails(self) -> bool Query if point trails are shown (based on the velocity v attribute). """ pass def isShowingPointMarkers(): """ isShowingPointMarkers(self) -> bool Query if point markers are shown (blue dots at points). """ pass def useLighting(on): """ useLighting(self, on) Enable lighting for the geometry in the display set. This works in conjunction with the global lighting mode in the viewport. Both this option and the global lighting mode must be set to a lighting mode in order to see lighting (ie, enabling Lighting on this display set will not cause it to be lit if the global viewport mode is "No Lighting"). """ pass def isShowingPrimNormals(): """ isShowingPrimNormals(self) -> bool Query if the primitive face normals are shown. Only polygon-based primitives have face normals. """ pass def showUVBackfaces(on): """ showUVBackfaces(self, on) Enable or disable UV backface highlighting in the UV viewport. Backfacing polygons would have the texture displayed on them backwards, from the point of view of the background image in the UV viewport. """ pass def vertexNormalVisibility(): """ vertexNormalVisibility(self) -> hou.markerVisibility Query the visibility setting of vertex normals. """ pass def showPointPositions(on): """ showPointPositions(self, on) Show or hide point position text display, drawn by each point. """ pass def isShowingPointPositions(): """ isShowingPointPositions(self) -> bool Query if 3D point positions are being shown, as text: "(x,y,z)". """ pass def isShowingUVOverlap(): """ isShowingUVOverlap(self) -> bool Query if the UV overlap is shown in the UV texture viewport. UV areas that reuse the same UV coordinates will be highlighted. """ pass def isShowingPrimProfiles(): """ isShowingPrimProfiles(self) -> bool Query if profile curves are shown, on NURBS surfaces only. """ pass def isShadingModeLocked(): """ isShadingModeLocked(self) -> bool Query if the shading mode is locked. When locked, changing the shading mode in the viewport will not affect the look of geometry in this display set. """ pass def showPointUVs(on): """ showPointUVs(self, on) Show or hide point UVs. If the geometry does not have point UVs, nothing will be displayed (ie. no UVs or vertex UVs). """ pass def isShowingPointNumbers(): """ isShowingPointNumbers(self) -> bool Query if point numbers are shown as text (blue point numbers, one per point). """ pass def setShadingModeLocked(on): """ setShadingModeLocked(self, on) Locks the shading mode so that it cannot be changed by the user using the Shading Mode menu in the viewport or the wireframe toggle hotkey. Passing False unlocks the display set so that it follows the viewport's shading mode. """ pass def setVertexUVVisibility(visibility): """ setVertexUVVisibility(self, visibility) Controls how vertex normals are shown when displayed. """ pass def useFadedLook(on): """ useFadedLook(self, on) Suppress geometry color (Cd attribute, point, primitive, or vertex) on the geometry in the display set. """ pass def showVertexUVs(on): """ showVertexUVs(self, on) Enable or disable vertex UV texture display. Vertex UVs are drawn inset into its parent polygon. The geometry must have vertex texture coordinates to be shown (vertex uv). """ pass def showPrimNumbers(on): """ showPrimNumbers(self, on) Enable or disable the display of primitive numbers, which are shown in the middle of the primitive. """ pass def isUsingGhostedLook(): """ isUsingGhostedLook(self) -> bool Query if the display set is ghosted. Ghosted geometry appears transluscent so that geometry behind it can be easily seen. """ pass def setPrimNumberVisibility(visibility): """ setPrimNumberVisibility(self, visibility) Controls how primitive numbers are shown when displayed. * hou.markerVisibility.Always: All are shown. * hou.markerVisibility.Selected: Only numbers for selected primitives are shown. * hou.markerVisibility.AroundPointer: Numbers close to the 3D point the mouse cursor is currently over are shown. * hou.markerVisibility.UnderPointer: Numbers under the mouse cursor are shown. """ pass def setPointNumberVisibility(visibility): """ setPointNumberVisibility(self, visibility) Controls how point numbers are shown when displayed. * hou.markerVisibility.Always: All are shown. * hou.markerVisibility.Selected: Only numbers for selected points are shown. * hou.markerVisibility.AroundPointer: Numbers close to the 3D point the mouse cursor is currently over are shown. * hou.markerVisibility.UnderPointer: Numbers under the mouse cursor are shown. """ pass def useXRay(on): """ useXRay(self, on) Draw the geometry in the display set as XRay, which draws the geometry normally if not occluded, and as a dimmed wireframe where occluded by other geometry. """ pass def setPrimNormalVisibility(visibility): """ setPrimNormalVisibility(self, visibility) Controls how primitive face normals are shown when displayed. * hou.markerVisibility.Always: All are shown. * hou.markerVisibility.Selected: Only normals for selected primitives are shown. * hou.markerVisibility.AroundPointer: Normals close to the 3D point the mouse cursor is currently over are shown. * hou.markerVisibility.UnderPointer: Normals under the mouse cursor are shown. """ pass def setPointUVVisibility(visibility): """ setPointUVVisibility(self, visibility) Controls how point UVs are shown when displayed. * hou.markerVisibility.Always: All are shown. * hou.markerVisibility.Selected: Only UVs for selected points are shown. * hou.markerVisibility.AroundPointer: UVs close to the 3D point the mouse cursor is currently over are shown. * hou.markerVisibility.UnderPointer: UVs under the mouse cursor are shown. """ pass def useGhostedLook(on): """ useGhostedLook(self, on) Make all geometry in the display set appear ghosted - slightly translucent. This allows geometry behind the ghosted to seen and de- emphasizes the ghosted geometry in the viewport. This is normal used to direct focus to other geometry (displayed SOP within an object, for example). """ pass def showPointNumbers(on): """ showPointNumbers(self, on) Show or hide point numbers. """ pass def isShowingPrimHulls(): """ isShowingPrimHulls(self) -> bool Query if primitive hulls are shown. Only some primitives have hulls, such as volumes, NURBS, crowd agents, and bezier curves. """ pass def uvBoundaryMode(): """ uvBoundaryMode(self) -> hou.boundaryDisplay Query which viewport types display UV boundaries (hou.boundaryDisplay). * hou.boundaryDisplay.Off: No UV boundaries are displayed. * hou.boundaryDisplay.On: UV boundaries are shown in all viewports. * hou.boundaryDisplay.View3D: UV boundaries are shown in 3D viewports only. * hou.boundaryDisplay.ViewUV: . UV boundaries are shown in UV viewports only. """ pass def setVertexNormalVisibility(visibility): """ setVertexNormalVisibility(self, visibility) Controls how vertex normals are shown when displayed. """ pass def showVertexMarkers(on): """ showVertexMarkers(self, on) Enable or disable vertex markers. Vertex markers are drawn as small squares inset into its parent polygon slightly. """ pass def setVertexNumberVisibility(visibility): """ setVertexNumberVisibility(self, visibility) Controls how vertex numbers are shown when displayed. """ pass def isShowingVertexUVs(): """None""" pass def showVertexNormals(on): """ showVertexNormals(self, on) Enable or disable vertex normal display. Vertex normals are drawn inset into its parent polygon slightly. The geometry must have vertex normals to be shown (vertex N). """ pass def setPointMarkerVisibility(visibility): """ setPointMarkerVisibility(self, visibility) Controls how point markers are shown when displayed. * hou.markerVisibility.Always: All are shown. * hou.markerVisibility.Selected: Only markers for selected points are shown. * hou.markerVisibility.AroundPointer: Markers close to the 3D point the mouse cursor is currently over are shown. * hou.markerVisibility.UnderPointer: Markers under the mouse cursor are shown. """ pass def primNormalVisibility(): """ primNormalVisibility(self) -> hou.markerVisibility Query the visibility setting of primitive normals. """ pass def setToolbarLinked(on): """ setToolbarLinked(self, on) Link the display set's options to the option toggles in the right viewport toolbar. When linked, clicking a display option button on this toolbar will affect the corresponding option in this display set. """ pass def showPrimNormals(on): """ showPrimNormals(self, on) Enable or disable primitive face normals. This shows the face normals of polygons, not the value of a primitive N attribute. """ pass def isShowingPrimNumbers(): """ isShowingPrimNumbers(self) -> bool Query if primitive numbers are shown. The primitive numbers can be used to specify primitives in primitive groups. The number is shown at the center of the primitive. """ pass def isShowingPointNormals(): """ isShowingPointNormals(self) -> bool Query if point normals are shown. If the point normals are blue, the geometry has point normals. If they are dimmed, the model does not have normals and the normals shown have been automatically generated for display. If no normals are shown, the geometry has vertex normals. This query does not check for those conditions, but just the current setting of the display option. """ pass def showCoincidentPoints(on): """ showCoincidentPoints(self, on) Enable or disable coincident point detection. Orange points markers and a duplicate count are placed where coincident points are detected. Coindicent point detection has affects viewport performance more significantly than other markers. It is best used when zoomed in on an area of the geometry for dense meshes, to avoid false positives. NOTE Coindicent point detection has affects viewport performance more significantly than other markers. It is best used when zoomed in on an area of the geometry for dense meshes, to avoid false positives. """ pass def showPrimBreakpoints(on): """ showPrimBreakpoints(self, on) Enable or disable breakpoints display. Breakpoints are only available on NURBS and bezier surfaces and curves, and appear as hollow circles along the isoparms. """ pass def pointMarkerVisibility(): """ pointMarkerVisibility(self) -> hou.markerVisibility Query the visibility setting of point markers. """ pass def setUVBoundaryMode(hou.boundaryDisplay): """ setUVBoundaryMode(self, hou.boundaryDisplay) Set viewport types that highlight UV boundaries for the geometry in the display set. * hou.boundaryDisplay.Off: No UV boundaries are displayed. * hou.boundaryDisplay.On: UV boundaries are shown in all viewports. * hou.boundaryDisplay.View3D: UV boundaries are shown in 3D viewports only. * hou.boundaryDisplay.ViewUV: . UV boundaries are shown in UV viewports only. """ pass def pointNormalVisibility(): """ pointNormalVisibility(self) -> hou.markerVisibility Query the visibility setting of point normals. """ pass def vertexUVVisibility(): """ vertexUVVisibility(self) -> hou.markerVisibility Query the visibility setting of vertex UVs. """ pass def isShowingPrimBackfaces(): """ isShowingPrimBackfaces(self) -> bool Query if backfacing polygons are tinted to distinguish them from front facing polygons. """ pass def setUniqueDisplaySet(on): """ setUniqueDisplaySet(self, on) When True, remove any link from this display set to another display set. Its own settings will be used. Passing False has no effect; use setLinkToDisplaySet to link this set to another display set. """ pass def setPrimBreakpointVisibility(visibility): """ setPrimBreakpointVisibility(self, visibility) Controls how primitive breakpoints are shown when displayed. """ pass def displaySetType(): """ displaySetType() -> hou.displaySetType Returns the geometry context this display set represents: * hou.displaySetType.SceneObject - object nodes which are not selected or ghosted. * hou.displaySetType.SelectedObject - object nodes which are selected. * hou.displaySetType.GhostObject - object nodes which ghosted, which occurs when they are visible when at the SOP level and "Ghost Other Objects" is the current object mode, but are not the current object. * hou.displaySetType.DisplayModel - SOP with the display flag. This takes precedence over TemplateModel and CurrentModel, if the SOP has either the template flag set or is selected. * hou.displaySetType.CurrentModel - SOP that is currently selected. This takes precedence over TemplateModel, if that SOP also has the template flag set. * hou.displaySetType.TemplateModel - SOP that has a template flag set. """ pass def showPrimProfileNumbers(on): """ showPrimProfileNumbers(self, on) Enable or disable profile curve number display on NURBS surfaces. Each profile on a NURBS surface has an index from 0 to #profiles-1. """ pass def isUsingFadedLook(): """ isUsingFadedLook(self) -> bool Query if the display set is faded. Faded geometry suppresses the display of geometry color. """ pass def isUsingLighting(): """ isUsingLighting(self) -> bool Query if lighting is used for this display set. When off, the geometry is displayed without any lighting (often much brighter). """ pass def isToolbarLinked(): """ isToolbarLinked(self) -> bool Query if the display set is linked to the right viewport toolbar. When linked, clicking a display option button on this toolbar will affect the corresponding option in this display set. """ pass def showUVOverlap(on): """ showUVOverlap(self, on) Enable or disable highlighting of UV overlap. Areas of the texture that would be share the same UVs are highlighted. """ pass def showPrimProfiles(on): """ showPrimProfiles(self, on) Enable or disable profile curve display on NURBS surfaces. """ pass def pointUVVisibility(): """ pointUVVisibility(self) -> hou.markerVisibility Query the visibility setting of point UVs. """ pass def setPointTrailVisibility(visibility): """ setPointTrailVisibility(self, visibility) Controls how point trails are shown when displayed. * hou.markerVisibility.Always: All are shown. * hou.markerVisibility.Selected: Only trails for selected points are shown. * hou.markerVisibility.AroundPointer: Trails close to the 3D point the mouse cursor is currently over are shown. * hou.markerVisibility.UnderPointer: Trails under the mouse cursor are shown. """ pass def primBreakpointVisibility(): """ primBreakpointVisibility(self) -> hou.markerVisibility Query the visibility setting of primitive breakpoints. """ pass def shadedMode(): """ shadedMode(self) -> hou.glShadingType Query the shading mode of the display set (hou.glShadingType): * hou.glShadingType.WireBoundingBox: no geometry, only bounding box outline * hou.glShadingType.ShadedBoundingBox: no geometry, solid bounding box * hou.glShadingType.Wire: wireframe * hou.glShadingType.WireGhost: wireframe with muted hidden lines * hou.glShadingType.HiddenLineInvisible: wireframe with hidden lines * hou.glShadingType.HiddenLineGhost: wireframe with solid constant faces * hou.glShadingType.Flat: shaded with primitive face normals * hou.glShadingType.FlatWire: shaded with primitive face normals, outlined polygons * hou.glShadingType.Smooth: shaded with point or vertex normals * hou.glShadingType.SmoothWire: shaded with point or vertex normals, outlined polygons """ pass def linkedToDisplaySet(): """ linkedToDisplaySet(self) -> hou.displaySetType A display set can be linked to another display set, so that all of its options are taken from that linked set rather than its own. This method returns the display set this set is linked to. If it is not linked to another set, it will return the its own set. """ pass def isUsingXRay(): """ isUsingXRay(self) -> bool Query if the display set is drawn with XRay. XRay geometry will appear as a faded wireframe behind other geometry that occludes it. """ pass def showPrimHulls(on): """ showPrimHulls(self, on) Enable or disable primitive hulls. Only certain primitive types have hulls, such as NURBS, volumes, agents, and bezier curves. """ pass def isShowingVertexMarkers(): """ isShowingVertexMarkers(self) -> bool Query if vertex markers are shown. Vertex markers are inset into their polygon slightly, for ease of selection and selection display. The markers are small hollow squares. Not all primitive types have vertex markers. """ pass def setPointPositionVisibility(visibility): """ setPointPositionVisibility(self, visibility) Controls how point positions are shown when displayed. * hou.markerVisibility.Always: All are shown. * hou.markerVisibility.Selected: Only positions for selected points are shown. * hou.markerVisibility.AroundPointer: Positions close to the 3D point the mouse cursor is currently over are shown. * hou.markerVisibility.UnderPointer: Positions under the mouse cursor are shown. """ pass def isShowingVertexNormals(): """ isShowingVertexNormals(self) -> bool Query if vertex normals are shown. If the geometry does not have vertex normals, they will not be shown. The base of the vertex normal is inset slightly into its polygon to make it easier to see which polygon the normal is influencing. """ pass def setLinkToDisplaySet(view_display_set): """ setLinkToDisplaySet(self, view_display_set) Link this display set to the settings of another display set. This display set's option settings are then ignored, and the other sets are used in their place. Linking a set to itself restores its own settings. * hou.displaySetType.SceneObject * hou.displaySetType.SelectedObject * hou.displaySetType.GhostObject * hou.displaySetType.DisplayModel * hou.displaySetType.CurrentModel * hou.displaySetType.TemplateModel """ pass def setPointNormalVisibility(visibility): """ setPointNormalVisibility(self, visibility) Controls how point normals are shown when displayed. * hou.markerVisibility.Always: All are shown. * hou.markerVisibility.Selected: Only normals for selected points are shown. * hou.markerVisibility.AroundPointer: Normals close to the 3D point the mouse cursor is currently over are shown. * hou.markerVisibility.UnderPointer: Normals under the mouse cursor are shown. """ pass def showPointNormals(on): """ showPointNormals(self, on) Show or hide point normals. """ pass def boundaryMode(): """ boundaryMode(self) -> hou.boundaryDisplay Query which viewport types display 3D boundaries (hou.boundaryDisplay). * hou.boundaryDisplay.Off: No 3D boundaries are displayed. * hou.boundaryDisplay.On: 3D boundaries are shown in all viewports. * hou.boundaryDisplay.View3D: 3D boundaries are shown in 3D viewports only. * hou.boundaryDisplay.ViewUV: . 3D boundaries are shown in UV viewports only. """ pass def vertexMarkerVisibility(): """ vertexMarkerVisibility(self) -> hou.markerVisibility Query the visibility setting of vertex markers. """ pass def showVertexNumbers(on): """ showVertexNumbers(self, on) Enable or disable vertex numbers. Vertex numbers are drawn as numbers inset into its parent polygon slightly, ranging 0 to #edges-1. """ pass def isShowingCoincidentPoints(): """ isShowingCoincidentPoints(self) -> bool Query if coincident point detection is enabled (yellow points and a duplicate count where coincident points are detected). """ pass def showPointTrails(on): """ showPointTrails(self, on) Show or hide point trails on all points. Geometry must have a velocity attribute v. """ pass def setShadedMode(shaded_mode): """ setShadedMode(self, shaded_mode) Sets the shading mode for this display set: * hou.glShadingType.WireBoundingBox: no geometry, only bounding box outline * hou.glShadingType.ShadedBoundingBox: no geometry, solid bounding box * hou.glShadingType.Wire: wireframe * hou.glShadingType.WireGhost: wireframe with muted hidden lines * hou.glShadingType.HiddenLineInvisible: wireframe with hidden lines * hou.glShadingType.HiddenLineGhost: wireframe with solid constant faces * hou.glShadingType.Flat: shaded with primitive face normals * hou.glShadingType.FlatWire: shaded with primitive face normals, outlined polygons * hou.glShadingType.Smooth: shaded with point or vertex normals * hou.glShadingType.SmoothWire: shaded with point or vertex normals, outlined polygons """ pass def GeometryViewportDisplaySet_swigregister(): """None""" pass class GeometryViewportSettings(object): """ hou.GeometryViewportSettings REPLACES * cplane * viewbackground * viewcamera * viewcopy * viewdisplay * viewls * viewname * vieworthogrid * viewprojection * viewsnapshot * viewtransform * viewtype * viewuvgrid """ def setHdrRendering(): """ hdrRendering(self) -> bool Queries if High Dynamic Range (HDR) rendering is enabled. """ pass def shadowMapSizeFromLight(): """ shadowMapSizeFromLight(self) -> bool Query if the shadow map size is defined by the light object. """ pass def autoGenerateVertexNormals(): """ autoGenerateVertexNormals(self) -> bool Query if vertex normals are produced when geometry is missing normals. If false, point numbers are produced. """ pass def setTextureAnisotropicFilter(num_samples): """ setTextureAnisotropicFilter(self, num_samples) Set the number of samples for anisotropic texture filtering. More samples produces better results for textures on polygons on an angle to the view direction. """ pass def setSingleBoneDeform(viewportAgentBoneDeform): """ setSingleBoneDeform(self, viewportAgentBoneDeform) Set the complexity of bone-based deformation on agents. * hou.viewportAgentBoneDeform.Always: Only use 1 bone to deform on all agent instances (the one with the most influence). * hou.viewportAgentBoneDeform.ReducedLOD: Use up to 4 bones to deform the highest LOD agent instances, and 1 bone on all the reduced LOD instances. * hou.viewportAgentBoneDeform.Disabled: Use up to 4 bones to deform on all agent instances. """ pass def setUVReferenceGrid(enable): """ setUVReferenceGrid(self, enable) Display the grid in UV viewports. """ pass def pointInstancingLimit(): """ pointInstancingLimit(self) -> int Query the current polygon limit for instancing. """ pass def setTextureMaxRes3D(res): """ setTextureMaxRes3D(self, res) Set the maximum resolution of a 3D texture (volume). res is an integer 3-tuple of (width, height, depth). OpenGL has its own limit, and setting this limit higher than that will have no effect. The image will be scaled to fit the limit if it exceeds it. """ pass def closureSelection(hou.viewportClosureSelection): """ closureSelection(self, hou.viewportClosureSelection) Change the closure selection display setting. A Closure selection is shown on a primitive when any part of that primitive is selected. * hou.viewportClosureSelection.Hide: Do not show closure selections. * hou.viewportClosureSelection.HullPrimitives: Only show closure selections on primitives that have hulls which are disconnected from the tessellated surface or curve (such as a NURBS surface). * hou.viewportClosureSelection.Show: Show closure selections on all primitive types. """ pass def selectWireframeAsSolid(): """ selectWireframeAsSolid(self) -> bool Query if selection of wireframe polygons is done by face (true) or edge (false). """ pass def usingReflections(): """ usingReflections(self) -> bool Query if reflection mapping is enabled. """ pass def uvAutoAttribute(): """ uvAutoAttribute(self) -> bool Return True if the UV viewport is auto-detecting the class of the displayed UV attribute. """ pass def setReflectMapSize(size): """ setReflectMapSize(self, size) Set the size of the cubemap used to store the surrounding scene as an environment map. Larger cubemaps produce sharper reflections but increase memory use. """ pass def setAgentShapePointCutoff(num_points): """ setAgentShapePointCutoff(self, num_points) Set the minimum number of points in an agent LOD level. If an LOD level would go below this number, it is not generated. """ pass def usingDisplacement(): """ usingDisplacement(self) -> bool Query if displacement mapping is allowed. """ pass def showBadges(): """ showBadges(self) -> bool Query if viewport status badges are displayed. Badges are icons which present additional state information. """ pass def guideFontSize(): """None""" pass def setBackgroundImageGammaLUT(apply_to_bg): """ setBackgroundImageGammaLUT(self, apply_to_bg) Apply gamma and Lookup Table (LUT) color correction to the background image. """ pass def shadowSensitivity(): """ shadowSensitivity(self) -> tuple of int Query the variable and constant shadow offsets, returned in a 2-tuple. """ pass def xrayDrawing(): """ xrayDrawing(self) -> bool Query if X-ray drawing is enabled globally. """ pass def setSceneGamma(gamma): """ setSceneGamma(self, gamma) Set the gamma correction for the scene. This value should match the calibrated gamma of the display device. """ pass def setDisplayTextureLayers(enable): """ setDisplayTextureLayers(self, enable) Enable multiple texture layers when texturing. This causes an extra render of the geometry per texture layer. """ pass def setDisplayTextures(enable): """ setDisplayTextures(self, enable) Enable material texturing. """ pass def wireBlend(): """ wireBlend(self) -> double Query the blend factor between wires and the surface in wire-over- shaded modes. Values close to 0 produce very faint lines, values closer to 1 produce solid lines. """ pass def setDisplacementLevel(level): """ setDisplacementLevel(self, level) Set the level of detail for displacement mapping. Displacement mapping adaptively subdivides the geometry to provide finer detail. Higher values result in denser subdivision, while lower values produce lighter meshes. The default is 1.0. """ pass def setDefaultMaterialEmission(): """ setDefaultMaterialEmission(self) -> hou.Color Query the default material's emission color. """ pass def setShadowSensitivity(offset): """ setShadowSensitivity(self, offset) Set the shadow bias to avoid self-shadowing. A 2-tuple is expected, with the first value setting the variable offset (depending on how parallel the surface is to the view direction) and the second a constant offset. Generally these don't need to be changed from their default, but larger values reduce self shadowing but increase the risk of missing shadows for very close geometry. """ pass def setOriginGnomonSize(size): """ setOriginGnomonSize(self, size) Sets the world size of the gnomon axes that appear at the world origin. """ pass def displayEnvironmentBackgroundImage(): """ displayEnvironmentBackgroundImage(self) -> bool Query if environmenty lights' envirnoment maps are shown as 360 degree background images. """ pass def sceneLUT(): """ sceneLUT(self) -> str Query the current Lookup Table (LUT) file. """ pass def geometryInfo(hou.viewportGeometryInfo): """ geometryInfo(self, hou.viewportGeometryInfo) Queries the current geometry information display setting: * hou.viewportGeometryInfo.Off: No information displayed. * hou.viewportGeometryInfo.SelectedOnly: only display information if something is selected. * hou.viewportGeometryInfo.Always: Always display information. """ pass def showEmission(enable): """ showEmission(self, enable) Enable emissive lighting. Emission lighting comes from materials on geometry, not lights, so modifying the lights in the scene has no effect on it. This can be used to debug lighting. """ pass def textureAutoReduce2D(): """ textureAutoReduce2D(self) -> bool Query if auto-reduction of regular 2D textures is allowed. """ pass def setOnionSkinOpacity(opacity): """ setOnionSkinOpacity(self, opacity) Set the opacity of the onion skins to make them more or less prominent. """ pass def useDisplacement(enable): """ useDisplacement(self, enable) Enable displacement mapping for materials that have a displacement map. When disabled, the displacement map is ignored. This can have a significant hit for lower-end GPUs. """ pass def useTransparency(enable): """ useTransparency(self, enable) Enable transparency rendering. When transparency is enabled, another pass handles areas of the geometry that have Alpha less than one (either due to an Alpha attribute or material opacity). When disabled, alpha is ignored and rendered as opaque. """ pass def colorScheme(): """ colorScheme(self) -> hou.viewportColorScheme Query the current viewport color scheme. * hou.viewportColorScheme.Dark: Black background. * hou.viewportColorScheme.Grey: Light grey background. * hou.viewportColorScheme.Light: Light blue gradient background. """ pass def setMaterialUpdate(viewportMaterialUpdate): """ setMaterialUpdate(self, viewportMaterialUpdate) Set the material assignment update frequency. * hou.viewportMaterialUpdate.Always: Update assignments whenever needed. * hou.viewportMaterialUpdate.OffForPlayback: Update assignments whenever needed, but not during playback. * hou.viewportMaterialUpdate.Manual: Only update assignments when Update Materials is pressed. """ pass def defaultMaterialSpecular(): """ defaultMaterialSpecular(self) -> hou.Color Query the default material's specular color. """ pass def distanceBasedPackedCulling(): """ distanceBasedPackedCulling(self) -> bool Query if packed primitive culling is enabled. """ pass def onionSkinFramesAfterTint(): """ onionSkinFramesAfterTint(self) -> tuple of double Query the tint color of skins that appear after the current frame. """ pass def setOnionSkinFramesAfterCount(num_frames): """ setOnionSkinFramesAfterCount(self, num_frames) Set the number of onion skins after the current frame. Their spacing depends on the onion skin frame increment. """ pass def ambientOcclusionLevel(): """ ambientOcclusionLevel(self) -> int Return the current occlusion level for ambient occlusion. """ pass def setAspectRatio(aspect): """ setAspectRatio(self, aspect) Set the viewport aspect ratio (width/height). """ pass def polygonConvexQuality(): """ polygonConvexQuality(self) -> bool Query the polygon convexing quality, true for high quality and false for fast convexing. """ pass def enableGuide(hou.viewportGuide, on): """ enableGuide(self, hou.viewportGuide, on) Show or hide the guide specified by hou.viewportGuide. """ pass def setTextureBitDepthLimit2D(viewportTextureDepth): """ setTextureBitDepthLimit2D(self, viewportTextureDepth) Set the maximum bit depth for a 2D texture. Textures with a bit depth higher than this will be downconverted to this bit depth. Textures with an equal or lower bit depth will not be converted. * hou.viewportTextureDepth.Compressed8: Compressed, 8b SDR texture format. Smallest memory use. * hou.viewportTextureDepth.Fixed8: 8b SDR texture format. Good balance between memory and quality. * hou.viewportTextureDepth.HDR16: 16b HDR texture format. Excellent dynamic range, but more memory use and slower texturing performance. * hou.viewportTextureDepth.FullHDR: 32b HDR texture format. Extreme dynamic range, but very high memory use and slow texturing performance. Use with care. """ pass def textureResLimit3D(): """ textureResLimit3D(self) -> bool Query if 3D textures have their resolutions limited. """ pass def useReflections(enable): """ useReflections(self, enable) Enable reflection mapping. Objects with reflective materials generate reflection maps of the scene around them, which can be quite expensive. """ pass def showingMaterials(): """ showingMaterials(self) -> bool Query if materials are shown. """ pass def scenePolygonLimit(): """ scenePolygonLimit(self) -> int Query the maximum allowed number of polygons in the view frustum, in millions of polygons. """ pass def setUVAutoAttribute(): """None""" pass def viewAspectRatio(masked): """ viewAspectRatio(self, masked) -> float Query the actual viewport aspect ratio. If masked is True, return the aspect ratio of the area inside the camera mask, otherwise return the full viewport aspect ratio. """ pass def setSceneAntialias(aalevel): """ setSceneAntialias(self, aalevel) Sets the viewports full-scene antialiasing level to one of 1, 2, 4, 8, 16, 32, 64, or 128. This represents the number of samples rendered to produce a higher quality image. Higher numbers produce better antialiasing, but this can affect the viewport's rendering performance. Some graphics hardware only support a subset of these modes (eg. up to 8 or 32). """ pass def showsCameraName(show): """ showsCameraName(self, show) Display the camera name and menu in the upper right corner. """ pass def displayProjectedTextures(): """ displayProjectedTextures(self) -> bool Query if projected textures from spotlights are rendered. """ pass def instanceStandInGeometry(): """ instanceStandInGeometry(self) -> hou.viewportStandInGeometry Query the current stand-in geometry for culled instances. * hou.viewportStandInGeometry.DisplayOff: Show nothing for culled instances. * hou.viewportStandInGeometry.LocationMarker: Show a location marker at the local space origin of each instanced. * hou.viewportStandInGeometry.BoundingBox: Show the culled instances' bounding boxes. """ pass def setDistanceBasedPackedCulling(enable): """ setDistanceBasedPackedCulling(self, enable) Enable culling of packed primitives when the polygon count of the visible objects in the frustum exceeds a certain amount, starting with the most distant. """ pass def setHeadlightSpecular(enable): """ setHeadlightSpecular(self, enable) Enable specular reflections when in Headlight lighting mode. Turning this off results in purely diffuse lighting. """ pass def volumeQuality(): """ volumeQuality(self) -> hou.viewportVolumeQuality Query the volume display quality. * hou.viewportVolumeQuality.VeryLow: Very fast, low quality preview * hou.viewportVolumeQuality.Low: Fewer slices than Normal for speed * hou.viewportVolumeQuality.Normal: Good quality vs. speed setting. * hou.viewportVolumeQuality.High: Large number of slices with jittering """ pass def handleHighlight(hou.viewportHandleHighlight): """ handleHighlight(self, hou.viewportHandleHighlight) Sets the size of the handle highlight when the mouse is over a handle part: * hou.viewportHandleHighlight.Off: Handles do not show highlights. * hou.viewportHandleHighlight.Small: Handles have a subtle highlight. * hou.viewportHandleHighlight.Normal: Handles use their default highlight, which is twice the width of the small highlight. """ pass def setTextureScale3D(scale): """ setTextureScale3D(self, scale) Uniformly downscale all 3D textures (volumes) by this fraction (default 1.0, no scale). """ pass def materialUpdate(): """ materialUpdate(self) -> hou.viewportMaterialUpdate Query the material assignment update frequency. * hou.viewportMaterialUpdate.Always: Update assignments whenever needed. * hou.viewportMaterialUpdate.OffForPlayback: Update assignments whenever needed, but not during playback. * hou.viewportMaterialUpdate.Manual: Only update assignments when Update Materials is pressed. """ pass def setSingleObjectMaterialLimit(num_materials): """ setSingleObjectMaterialLimit(self, num_materials) Set the maximum number of material variations for a single object. """ pass def particleDisplayType(): """ particleDisplayType(self) -> hou.viewportParticleDisplay Query the default particle display. * hou.viewportParticleDisplay.Points: Constant sized point marker, with the diameter specified by particlePointSize. This marker is unaffected by pscale. * hou.viewportParticleDisplay.Pixels: Single pixel drawn for a particle. * hou.viewportParticleDisplay.Lines: Streak trail plus marker. * hou.viewportParticleDisplay.Discs: World-space circle, affected by pscale or discSize. """ pass def setHomeAutoAdjustsClip(viewportHomeClipMode): """ setHomeAutoAdjustsClip(self, viewportHomeClipMode) Set which camera clip planes are adjusted when performing a homing operation. * hou.viewportHomeClipMode.Neither: Neither clip plane is adjusted. * hou.viewportHomeClipMode.FarOnly: Only the far clip plane is adjusted. * hou.viewportHomeClipMode.NearOnly: Only the near clip plane is adjusted. * hou.viewportHomeClipMode.NearAndFar: Both clip planes are adjusted. """ pass def originGnomonSize(): """ originGnomonSize(self) -> float Queries the world size of the gnomon axes that appear at the world origin. """ pass def setTextureAutoReduce3D(enable): """ setTextureAutoReduce3D(self, enable) Allow auto-reduction of 3D textures (volumes). """ pass def pointInstancing(): """ pointInstancing(self) -> bool Query if point instancing is globally enabled. """ pass def setTextureResLimit2D(enable): """ setTextureResLimit2D(self, enable) Limit the resolution of all 2D textures, so that the width and height cannot exceed the limit. Even if disabled, OpenGL has its own texture limits which will be applied (usually 8k or 16k). """ pass def volumeWireAsPoints(): """ volumeWireAsPoints(self) -> bool Query if volumes are currently drawn as a point field in wireframe. """ pass def orthoGridRuler(): """ orthoGridRuler(self) -> tuple of int Query the spacing of the grid numbers in fixed orthographic views as a 2-tuple. """ pass def interiorWireAlpha(): """ interiorWireAlpha(self) -> double Query the dimness of the interior wires in a tet mesh. Outer wires are drawn normally, inner wires are dimmed. This only affects tet meshes in wireframe mode. """ pass def setMaxLODLevels(num_levels): """ setMaxLODLevels(self, num_levels) Set the maximum number of levels to generate for an agent. This will be the original model plus this number. """ pass def subdivsionLimit(): """ subdivsionLimit(self) -> int Returns the current subdivision polygon limit, in millions of polygons. """ pass def setOrthoRuler(viewportGridRuler): """ setOrthoRuler(self, viewportGridRuler) Where to display the grid numbers on the fixed orthographic view grid. * hou.viewportGridRuler.Hide: Do not display. * hou.viewportGridRuler.MainAxis: Display along the main axes at grid line intersections. * hou.viewportGridRuler.GridPoints: Display on grid line intersections. """ pass def setColorScheme(viewportColorScheme): """ setColorScheme(self, viewportColorScheme) Set the color scheme for the viewport. * hou.viewportColorScheme.Dark: Black background. * hou.viewportColorScheme.Grey: Light grey background. * hou.viewportColorScheme.Light: Light blue gradient background. """ pass def agentLODReductionBias(): """ agentLODReductionBias(self) -> int Query the LOD bias for agents. """ pass def textureAutoReduce(): """ textureAutoReduce(self) -> bool Query if auto-reduction of viewport textures is enabled. """ pass def hullsOnly(): """ hullsOnly(self) -> bool Query if only hulls are drawn for complex curves and surfaces. """ pass def setHeadlightOcclusion(enable): """ setHeadlightOcclusion(self, enable) Enables ambient occlusion when in headlight mode. This has no effect if a lighting mode other than headlight is active. """ pass def camera(): """ camera(self) -> ObjNode or None Return the camera or light node that the viewport is looking through. Return None if the viewport is not looking through a camera or light node. """ pass def setUVVertexType(): """None""" pass def setInteractiveMaterialUpdate(enable): """ setInteractiveMaterialUpdate(self, enable) Update materials when they are changed to reflect their new state. When disabled, Update Materials must be pressed manually for changes to be reflected in the viewport. """ pass def headlightOcclusion(): """ headlightOcclusion(self) -> bool Query if ambient occlusion is active for headlight mode. """ pass def defaultMaterialDiffuse(): """ defaultMaterialDiffuse(self) -> hou.Color Query the default material's diffuse color. """ pass def pointInstancingPercent(): """ pointInstancingPercent(self) -> double Query the percentage of instances shown in the viewport for point instancing. """ pass def onionSkinFramesBeforeTint(): """ onionSkinFramesBeforeTint(self) -> tuple of double Query the tint color of skins that appear before the current frame. """ pass def setHullsOnly(enable): """ setHullsOnly(self, enable) Draw only hulls for complex curves and surfaces like NURBS and Beziers. """ pass def setXrayQuality(quality): """ setXrayQuality(self, quality) Enable high-quality X-ray rendering, which draws X-rayed objects as dimmed shaded surfaces when occluded, with up to 8 levels of overlap between X-rayed objects. This looks better but takes longer to render. Regular X-ray rendering displays X-ray objects as wireframe when occluded. """ pass def setTextureMaxRes2D(res): """ setTextureMaxRes2D(self, res) Set the maximum resolution of a 2D texture. res is an integer 2-tuple of (width, height). OpenGL has its own limit, and setting this limit higher than that will have no effect. The image will be scaled to fit the limit if it exceeds it. """ pass def usingPerPrimStylesheets(): """ usingPerPrimStylesheets(self) -> bool Query if per-primitive stylesheets are evaluated. """ pass def setHeadlightDirection(dir): """ setHeadlightDirection(self, dir) Set the direction of the headlight used in Headlight lighting mode. This is expressed as a direction vector in camera space (the camera looks down -Z). """ pass def setTextureAutoReduce(enable): """ setTextureAutoReduce(self, enable) Enable auto-reduction of viewport textures. This attempts to scale down textures to fit within the texture cache. """ pass def setOnionSkinFramesBeforeCount(num_frames): """ setOnionSkinFramesBeforeCount(self, num_frames) Set the number of onion skins before the current frame. Their spacing depends on the onion skin frame increment. """ pass def vertexNormalCuspAngle(): """ vertexNormalCuspAngle(self) -> double Query the cusp angle for vertex normal generation. Any shared edge between polygons will be considered a hard edge if the polygon faces differ by more than this angle, otherwise the normals will be smooth over the edge. """ pass def ambientOcclusion(): """ ambientOcclusion(self) -> bool Query if ambient occlusion is enabled. This can return true even if not in a high quality mode as this queries the raw display option value, not a reflection of whether the pass is active. If querying it the pass is active, the lighting mode should also be checked. """ pass def interactiveMaterialUpdate(): """ interactiveMaterialUpdate(self) -> bool Query if materials are updated when they change. """ pass def particlePointSize(): """ particlePointSize(self) -> double Query the point diameter for particles drawn as Points or Lines. """ pass def uvReferenceGridOverImage(): """None""" pass def setMinHomeSize(min_size): """ setMinHomeSize(self, min_size) Set the smallest area that viewport can home to, in world units. """ pass def onionSkinFrameIncrement(): """ onionSkinFrameIncrement(self) -> int Query the frame increment between onion skins. """ pass def showingDiffuse(): """ showingDiffuse(self) -> bool Query if diffuse lighting is enabled. """ pass def vectorScale(): """ vectorScale(self) -> float Query the scale applied to the length of vector decorations. """ pass def setWireOverPackedGeo(wire_over_packed): """ setWireOverPackedGeo(self, wire_over_packed) Show polygon outlines on meshes in packed geometry when drawing a wire-over-shaded mode. Disabling this hides the outlines on packed geometry, making meshes appear as a single shape, which packed geometry technically is. """ pass def clampUVGridToBackground(): """ clampUVGridToBackground(self) -> bool Query if the grid is restricted to the background image's area. """ pass def guideEnabled(hou.viewportGuide): """ guideEnabled(self, hou.viewportGuide) -> bool Query if the guide specified by hou.viewportGuide is shown (True) or hidden (False). """ pass def setPackedBoundingBoxMode(viewportPackedBoxMode): """ setPackedBoundingBoxMode(self, viewportPackedBoxMode) Define how culled packed primitives are displayed. * hou.viewportPackedBoxMode.NoDisplay: Culled packed primitives are not displayed at all. * hou.viewportPackedBoxMode.Wireframe: A wireframe bounding box replaces the packed primitive. * hou.viewportPackedBoxMode.Shaded: A shaded bounding box replaces the packed primitive. * hou.viewportPackedBoxMode.CurrentShadingMode: A bounding box replaces the packed primitive, drawn wireframe in wireframe shading modes and shaded otherwise. """ pass def saveViewToCamera(camera_node): """ saveViewToCamera(self, camera_node) Saves the viewport's current view into the given camera node. It does this by setting the camera's transform parameters to match the viewport's view transform matrix. """ pass def filterBackgroundImage(): """ filterBackgroundImage(self) -> bool Query if texture filtering of background images is enabled. """ pass def textureBitDepthLimit3D(): """ textureBitDepthLimit3D(self) -> hou.viewportTextureDepth Query the maximum bit depth of a 3D texture (volume). * hou.viewportTextureDepth.Fixed8: 8b SDR texture format. Good balance between memory and quality. * hou.viewportTextureDepth.HDR16: 16b HDR texture format. Excellent dynamic range, but more memory use and slower texturing performance. * hou.viewportTextureDepth.FullHDR: 32b HDR texture format. Extreme dynamic range, but very high memory use and slow texturing performance. Use with extreme care. """ pass def setAgentWireframe(viewportAgentWireframe): """ setAgentWireframe(self, viewportAgentWireframe) Set the appearance of agents in wireframe mode. * hou.viewportAgentWireframe.Bone: Agents are rendered as bone-based skeletons. * hou.viewportAgentWireframe.Line: Agents are rendered as line-based skeletons. """ pass def setScenePolygonLimit(millions_of_polygons): """ setScenePolygonLimit(self, millions_of_polygons) Set the maximum number of polygons in the view frustum, in millions, before the viewport begins culling packed primitives. """ pass def setDisplayUVTileBoundaries(enable): """ setDisplayUVTileBoundaries(self, enable) Display the boundaries of UV tiles at integral U and V numbers. """ pass def setXrayDrawing(global_enable): """ setXrayDrawing(self, global_enable) Globally enable or disable X-ray drawing. Object must have their X-ray flag set in order to render as X-ray. X-ray causes the object to be visible when occluded. """ pass def minHomeSize(): """ minHomeSize(self) -> float Query the smallest area that viewport can home to, in world units. """ pass def objectOrigins(): """ objectOrigins(self) -> bool Query if object origin display is globally enabled. """ pass def showsBadges(show): """ showsBadges(self, show) Display viewport status badges as icons beside the camera menu, which presents additional state information. """ pass def setOnionSkinning(global_enable): """ setOnionSkinning(self, global_enable) Globally allow onion skinning to be displayed. Onion skinning is enabled on a per-object basis in the Misc tab of objects. This shows animation as a series of ghosted poses at other frames around the current frame. """ pass def setCamera(camera_node): """ setCamera(self, camera_node) Makes the viewport look through the given camera node. """ pass def usingMaterialStylesheets(): """ usingMaterialStylesheets(self) -> bool Query if material stylesheet assignment is active. """ pass def backgroundImage(viewportBGImageView, layer): """ backgroundImage(self, viewportBGImageView, layer) -> hou.GeometryViewportBGImage Access the background image parameters for the target view type. layer is currently not used but reserved for future use. * hou.viewportBGImageView.Perspective: The 3D view not attached to a camera ("No cam"). * hou.viewportBGImageView.Camera: The 3D view looking through a camera. * hou.viewportBGImageView.Top: The orthographic top view. * hou.viewportBGImageView.Front: The orthographic front view. * hou.viewportBGImageView.Right: The orthographic right view. * hou.viewportBGImageView.Bottom: The orthographic bottom view. * hou.viewportBGImageView.Back: The orthographic back view. * hou.viewportBGImageView.Left: The orthographic left view. * hou.viewportBGImageView.UV: The UV texture viewport. """ pass def agentLODReduction(): """ agentLODReduction(self) -> bool Query if multiple levels of detail (LOD) are generated for crowd agents. """ pass def onionSkinFramesAfterCount(): """ onionSkinFramesAfterCount(self) -> int Queries the number of onion skins after the current frame. """ pass def maxLODLevels(): """ maxLODLevels(self) -> int Query the maximum number of levels generated for an agent. """ pass def xrayStrength(): """ xrayStrength(self) -> double Query the strength of occluded x-ray objects. """ pass def setDisplayBackgroundImage(enable): """ setDisplayBackgroundImage(self, enable) Globally enable background image display. """ pass def setVisibleObjects(uv): """ setVisibleObjects(self, uv) Set the mask for all visible objects in the viewport. Wilcards can be used. """ pass def showAmbient(enable): """ showAmbient(self, enable) Enable ambient lighting. When disabled, all ambient lights will not contribute to the final lit color. This can be used to debug lighting. """ pass def displaySet(display_set): """ displaySet(self, display_set) -> GeometryViewportDisplaySet Returns the display set associated with the context 'display_set', which contains context-sensitive display options such as Draw Mode and Point Numbers. """ pass def textureScale2D(): """ textureScale2D(self) -> float Query the uniform scale applied to 2D textures. """ pass def lightSampling(): """ lightSampling(self) -> int Query the number of lighting samples. """ pass def backgroundImageQuality(): """ backgroundImageQuality(self) -> int Query the quality of background image display, from 0-100. """ pass def setTextureCacheSize(size_in_mb): """ setTextureCacheSize(self, size_in_mb) Set the size of the texture cache, in megabytes. The viewport will use as much texture memory as it needs, even if it exceeds this level, but textures will be culled once they are no longer used to remain within this limit. """ pass def lighting(): """ lighting(self) -> hou.viewportLighting Query the current global lighting mode. """ pass def setHeadlightIntensity(intensity): """ setHeadlightIntensity(self, intensity) Set the intensity of the headlight used in Headlight lighting mode. """ pass def showGeometryColor(enable): """ showGeometryColor(self, enable) Enable contribution of the geometry Cd attribute to the material. When disabled, this is ignored. Cd multiplies both the the material diffuse and ambient colors. """ pass def wireOverPackedGeo(): """ wireOverPackedGeo(self) -> bool Query if polygon outlines are visible on packed geometry when a wire-over-shaded mode is active. """ pass def uvGridPixelOffset(): """ uvGridPixelOffset(self) -> tuple of float Query the spacing of the dot grid in pixels. """ pass def setAgentLODReduction(enable): """ setAgentLODReduction(self, enable) Enable the use of multiple levels of detail for crowd agents, each LOD level being half the polygon count of the previous level. """ pass def texture2DSettingsFor3D(): """ texture2DSettingsFor3D(self) -> bool Query if the 2D settings are used for 3D textures. """ pass def setUseSceneLUT(enable): """ setUseSceneLUT(self, enable) Enable Lookup Table (LUT) color correction. A valid LUT file must also be present. """ pass def showingGeometryColor(): """ showingGeometryColor(self) -> bool Query if geometry Cd contributes to the material. """ pass def setOrthoGridSpacing(offset): """ setOrthoGridSpacing(self, offset) Set the spacing of the grid lines in fixed orthographic views as a 2-tuple. """ pass def clipPlanes(): """ clipPlanes(self) -> tuple of float Query the near and far camera clip planes, returning them in a 2-tuple. """ pass def onionSkinFramesBeforeCount(): """ onionSkinFramesBeforeCount(self) -> int Queries the number of onion skins before the current frame. """ pass def baseLODLevel(): """ baseLODLevel(self) -> int Query the base level of detail. """ pass def useSceneLUT(): """ useSceneLUT(self) -> bool Query if Lookup Table color correction is enabled. This will return True even no LUT file exists. """ pass def textureMipmapping(): """ textureMipmapping(self) -> bool Query if texture mipmapping is enabled. """ pass def setTransparencyQuality(viewportTransparency): """ setTransparencyQuality(self, viewportTransparency) Set the quality of the transparency pass performed by the viewport. * hou.viewportTransparency.Cutout: Fast test to render the transparent pixel as opaque (>0) or to discard it (0). This can be used for texture cards such as leaves. This doesn't require an additional pass for transparency. * hou.viewportTransparency.Low: Render transparent pixels in a separate pass. Only the front- most transparent pixel is rendered. * hou.viewportTransparency.Medium: Render transparent pixels in an Order-Independent buffer of 8 samples, which is then sorted and composited together to do multi-layer transparency for up to 8 layers of overlapping transparency. * hou.viewportTransparency.High: Render transparent pixels in an Order-Independent buffer of 16 samples, which is then sorted and composited together to do multi-layer transparency for up to 16 layers of overlapping transparency. """ pass def setTextureAutoReduce2D(enable): """ setTextureAutoReduce2D(self, enable) Allow auto-reduction of regular 2D textures. """ pass def setShadowMapSize(size): """ setShadowMapSize(self, size) Set the maximum shadow map size, in pixels. Larger maps will produce sharper shadows but increase memory usage. Shadow maps are always square. """ pass def showsName(show): """ showsName(self, show) Display the viewport name and menu in the upper right corner. """ pass def useMaterialStylesheets(enable): """ useMaterialStylesheets(self, enable) Enable evaluation of material stylesheets for viewport material assignment. """ pass def setAgentLODReductionBias(reduce_bias): """ setAgentLODReductionBias(self, reduce_bias) Set the LOD balance from Performance (0) to Quality (10), which biases which LOD levels are chosen. """ pass def displayTextures(): """ displayTextures(self) -> bool Query if material texturing is enabled. """ pass def stereoMode(): """ stereoMode(self) -> hou.viewportStereoMode Query the current stereo display mode. """ pass def textureAutoReduce3D(): """ textureAutoReduce3D(self) -> bool Query if auto-reduction of 3D textures is allowed. """ pass def sceneAntialias(): """ sceneAntialias(self) Returns the number of samples used to antialias the viewport. Possible values are 1 (no antialiasing), 2, 4 (default for most hardware), 8, 16, 32, 64, or 128. """ pass def shadeOpenCurves(): """ shadeOpenCurves(self) -> bool Query if shaded open curves are enabled or not. """ pass def xrayQuality(): """ xrayQuality(self) -> bool Queries if high quality X-ray rendering is active. """ pass def backgroundImageGammaLUT(): """ backgroundImageGammaLUT(self) -> bool Query if color correction is applied to the background image. """ pass def setTexture2DSettingsFor3D(enable): """ setTexture2DSettingsFor3D(self, enable) When enabled, use all the 2D texture settings for 3D textures. """ pass def setRemoveBackfaces(enable): """ setRemoveBackfaces(self, enable) Cull polygons facing backwards instead of rasterizing them. """ pass def usingPackedStylesheets(): """ usingPackedStylesheets(self) -> bool Query if material stylesheet assignments are applied to geometry within packed primitives. """ pass def singleObjectMaterialLimit(): """ singleObjectMaterialLimit(self) -> int Query the maximum number of material variations for a single object. """ pass def vertexNormalLimit(): """ vertexNormalLimit(self) -> int Query the polygon limit for generating vertex normals, in millions of polygons. """ pass def setUVGridPixelOffset(offset): """ setUVGridPixelOffset(self, offset) Set the spacing, in pixels, of the dot grid. """ pass def shadowMapSize(): """ shadowMapSize(self) -> int Query the maximum size of the shadow maps used by High Quality Lighting with Shadows lighting mode. """ pass def headlightDirection(): """ headlightDirection(self) -> tuple of double Query the vector direction of the headlight. """ pass def setClampUVGridToBackground(enable): """ setClampUVGridToBackground(self, enable) Restrict the grid to the background image's area. """ pass def uvDisplayAttribute(): """ uvDisplayAttribute(self) -> str Return the attribute currently displayed in the UV viewport. """ pass def viewportType(): """ viewportType(self) -> hou.geometryViewportType enum value Query the viewport type (UV, 3D, top, left, etc). """ pass def setUVDisplayGridOverImage(): """None""" pass def displayTextureLayers(): """ displayTextureLayers(self) -> bool Query if multiple texture layers are rendered. """ pass def packedBoundingBoxMode(): """ packedBoundingBoxMode(self) -> hou.viewportPackedBoxMode Query how culled packed primitives are displayed. * hou.viewportPackedBoxMode.NoDisplay: Culled packed primitives are not displayed at all. * hou.viewportPackedBoxMode.Wireframe: A wireframe bounding box replaces the packed primitive. * hou.viewportPackedBoxMode.Shaded: A shaded bounding box replaces the packed primitive. * hou.viewportPackedBoxMode.CurrentShadingMode: A bounding box replaces the packed primitive, drawn wireframe in wireframe shading modes and shaded otherwise. """ pass def setAmbientOcclusionLevel(level): """ setAmbientOcclusionLevel(self, level) Set the level of occlusion to generate, from 1-4. Higher levels produce a larger area of effect, while lower values produce fine detail. """ pass def agentWireframe(): """ agentWireframe(self) -> hou.viewportAgentWireframe Query the appearance of agents in wireframe mode. * hou.viewportAgentWireframe.Bone: Agents are rendered as bone-based skeletons. * hou.viewportAgentWireframe.Line: Agents are rendered as line-based skeletons. """ pass def setDefaultMaterialSpecular(tint): """ setDefaultMaterialSpecular(self, tint) Set the specular color of the default material (used when no material assignment is present or Show Materials is disabled). """ pass def setBackgroundImageQuality(quality): """ setBackgroundImageQuality(self, quality) Set the quality of the background image, from 0-100. Values less than 100 will scale down the resolution of the background image. """ pass def shadowQuality(): """ shadowQuality(self) -> hou.viewportShadowQuality Query the current shadow quality. """ pass def usingMaterialOverrides(): """ usingMaterialOverrides(self) -> bool Query if material overrides are being applied to material assignments. """ pass def showStateStatus(): """ showStateStatus(self) -> bool Query if the tool status messages are displayed. """ pass def setSceneLUT(lut_file): """ setSceneLUT(self, lut_file) Specify a Lookup Table (LUT) file to use for color correction. """ pass def viewMaskOpacity(): """ viewMaskOpacity(self) -> float Query the opacity of the bars used to mask areas out the viewport outside the aspect ratio. """ pass def showingEmission(): """ showingEmission(self) -> bool Query if emission lighting is enabled. """ pass def sceneGamma(): """ sceneGamma(self) -> double Query the scene gamma correction. """ pass def setOrthoGridRuler(offset): """ setOrthoGridRuler(self, offset) Set the spacing of the grid numbers in fixed orthographic views as a 2-tuple. """ pass def orthoGridSpacing(): """ orthoGridSpacing(self) -> tuple of float Query the spacing of the grid lines in fixed orthographic views as a 2-tuple. """ pass def useAspectRatio(enable): """ useAspectRatio(self, enable) Enforce a specific aspect ratio for the viewport, which will add bars if the viewport aspect ratio does not match. """ pass def setOffsetVertexMarkers(enable): """ setOffsetVertexMarkers(self, enable) When enabled, vertex markers and normals are inset into the polygon so they can be selected independently when part of a seamless mesh. When disabled, the markers and normals are placed at the actual vertex, potentially overlapping. """ pass def onionSkinning(): """ onionSkinning(self) -> bool Query if onion skinning is globally enabled. """ pass def uvGridPixelSpacing(): """ uvGridPixelSpacing(self) -> tuple of float Query the spacing of the UV dot grid displayed over background images. """ pass def setPointMarkerSize(point_size): """ setPointMarkerSize(self, point_size) Set the size of point marker decorations, in pixels. """ pass def setClipPlanes(clip): """ setClipPlanes(self, clip) Set the near and far camera clip planes from a 2-tuple. """ pass def setDefaultMaterialDiffuse(tint): """ setDefaultMaterialDiffuse(self, tint) Set the diffuse color of the default material (used when no material assignment is present or Show Materials is disabled). """ pass def setTextureScale2D(scale): """ setTextureScale2D(self, scale) Uniformly downscale all 2D textures by this fraction (default 1.0, no scale). """ pass def setLighting(viewportLighting): """ setLighting(self, viewportLighting) Set the global lighting mode for all viewports. * hou.viewportLighting.Off: No lighting, constant shaded. * hou.viewportLighting.Headlight: Basic lighting from a single directional light defined in the display options. * hou.viewportLighting.Normal: Good quality lighting from up to 10 basic lights (area lights modeled as point lights, limited environment lights). * hou.viewportLighting.HighQuality: High quality lighting from an unlimited number of lights including area, geometry, environment and ambient occlusion. * hou.viewportLighting.HighQualityWithShadows: High quality lighting with shadows. """ pass def setDisplayProjectedTextures(enable): """ setDisplayProjectedTextures(self, enable) Enable projected textures from spotlights with a valid texture. """ pass def singleBoneDeform(): """ singleBoneDeform(self) -> hou.viewportAgentBoneDeform Query the complexity of bone-based deformation on agents. * hou.viewportAgentBoneDeform.Always: Only use 1 bone to deform on all agent instances (the one with the most influence). * hou.viewportAgentBoneDeform.ReducedLOD: Use up to 4 bones to deform the highest LOD agent instances, and 1 bone on all the reduced LOD instances. * hou.viewportAgentBoneDeform.Disabled: Use up to 4 bones to deform on all agent instances. """ pass def orientDiscToNormal(): """ orientDiscToNormal(self) -> bool Queries if discs and sprites are oriented to the normal (true) or not. The normal will be orthogonal to the disc (they will face in that direction). """ pass def showSpecular(enable): """ showSpecular(self, enable) Enable specular highlights. When disabled, specular will not contribute to the final lit color. This will also disable most reflections. This can be used to debug lighting. """ pass def useMaterialOverrides(enable): """ useMaterialOverrides(self, enable) Allow material overrides from material stylesheets and the material_override attribute. """ pass def spriteTextureLimit(): """ spriteTextureLimit(self) -> tuple of int Query the maximum texture resolution for sprites. This is primarily a performance vs. quality trade-off option. Larger sprites look better but may cause slowdowns for large particle systems. """ pass def orthoGridOffset(): """ orthoGridOffset(self) -> tuple of float Query the offset of the grid in fixed orthographic views. """ pass def usePerPrimStylesheets(enable): """ usePerPrimStylesheets(self, enable) Enable evaluation of per-primitive stylesheets. """ pass def textureMaxMemory(): """ textureMaxMemory(self) -> int Return the maximum size of a single texture, in megabytes. """ pass def setVectorScale(scale): """ setVectorScale(self, scale) Set the scale applied to vector decorations, to make them longer or shorter. """ pass def setMinReflectAmount(min_reflect): """ setMinReflectAmount(self, min_reflect) Set the minimum level of reflection required for a reflection cubemap to be generated for an object. This is based on the largest reflective value from all the materials assigned to the object. The larger this value, the more reflective an object must be to generate a reflection maps. A value of zero is not recommended, as all objects will generate a reflection map. """ pass def optimizeGeometry(): """ optimizeGeometry(self) -> bool Query if packed geometry is optimized. """ pass def setApplyZoomToBackgroundImage(enable): """ setApplyZoomToBackgroundImage(self, enable) Allow the camera zoom to affect the background image. """ pass def setFilterBackgroundImage(enable): """ setFilterBackgroundImage(self, enable) Enable texture filtering of background images. When off, individual pixels are shown as blocks at high zoome levels rather than blended. """ pass def showsStateStatus(show): """ showsStateStatus(self, show) Display any status messages of the current tool. """ pass def textureResLimit2D(): """ textureResLimit2D(self) -> bool Query if 2D textures have their resolutions limited. """ pass def setShadowMapSizeFromLight(enable): """ setShadowMapSizeFromLight(self, enable) Set whether to use the shadow map size specified by the Shadow Map size parameter in the light object (clamped to the maximum size specified in the display options) or always use the maximum size. """ pass def wireWidth(): """ wireWidth(self) -> double Query the width of lines drawn for wireframe and wire-over-shaded modes. """ pass def setOnionSkinFramesAfterTint(tint): """ setOnionSkinFramesAfterTint(self, tint) Tint all onion skins that appear after the current frame with this color. """ pass def aspectRatio(): """ aspectRatio(self) -> float Query the viewport aspect ratio display option. Use viewAspectRatio() to query the current viewport aspect ratio. """ pass def setUVGridPixelSpacing(offset): """ setUVGridPixelSpacing(self, offset) Set the spacing of the UV dot grid displayed over the background image. """ pass def setObjectOrigins(globel_enable): """ setObjectOrigins(self, globel_enable) Globally allow object origins to be displayed. Object origins are enabled by setting the Origin flag on objects. """ pass def setXrayStrength(strength): """ setXrayStrength(self, strength) Sets the strength of the occluded x-ray objects. Lower values make occluded X-ray objects dimmer. """ pass def setTextureMaxMemory(size_in_mb): """ setTextureMaxMemory(self, size_in_mb) Set the maximum size of a single texture, in megabytes. This prevents extremely large textures from starving the graphics hardware's bandwidth (mostly by 3D textures). """ pass def textureScale3D(): """ textureScale3D(self) -> float Query the uniform scale applied to 3D textures (volumes). """ pass def normalScale(): """None""" pass def setHdrReflections(hdr_reflect): """ setHdrReflections(self, hdr_reflect) Enable High Dynamic Range (HDR) color buffers for the generated scene cubemap, which allows for higher contrast and bright spots in reflections. """ pass def showingSpecular(): """ showingSpecular(self) -> bool Query if specular lighting is enabled. """ pass def particleDiscSize(): """ particleDiscSize(self) -> double Query the disc diameter for particles drawn as Discs or Sprites if the pscale attribute does not exist. This is specified in world- space units. """ pass def onionSkinOpacity(): """ onionSkinOpacity(self) -> double Query the current onion skin opacity. """ pass def setNormalScale(normal_scale): """ setNormalScale(self, normal_scale) Set a scale factor for the display of normals to increase or decrease their length. """ pass def setTextureMipmapping(enable): """ setTextureMipmapping(self, enable) Enable mipmapping for textures, improving display quality but increasing texture memory use by 50%. """ pass def showMaterials(enable): """ showMaterials(self, enable) Enable materials on geometry from SHOPs or VOPs. When disabled, these material assignments are ignored and only the attributes on the geometry will affect shading. """ pass def visibleObjects(): """ visibleObjects(self) -> str Query the current visible object mask. """ pass def headlightIntensity(): """ headlightIntensity(self) -> double Query the intensity of the headlight. """ pass def setDisplayEnvironmentBackgroundImage(enable): """ setDisplayEnvironmentBackgroundImage(self, enable) Allow environment lights to show their environment maps as 360 degree background images. """ pass def usingTransparency(): """ usingTransparency(self) -> bool Query if transparency rendering is enabled. """ pass def setStereoMode(viewportStereoMode): """ setStereoMode(self, viewportStereoMode) Set the stereo display mode when viewing through a stereo camera. * hou.viewportStereoMode.Anaglyph: Anaglyph display of left/right as red/cyan. * hou.viewportStereoMode.HorizontalInterlace: Interlace left and right on alternating scanlines. Only useful for 3D monitors which support this. * hou.viewportStereoMode.HorizontalInterlaceReverse: Interlace left and right on alternating scanlines, swapping which scanlines are used for left and right. * hou.viewportStereoMode.QuadBufferGL: Use OpenGL quad buffer stereo, generally only available on professional cards. """ pass def textureMaxRes2D(): """ textureMaxRes2D(self) -> 2-tuple of int Return the maximum resolution for a 2D texture. """ pass def levelOfDetail(): """ levelOfDetail(self) -> double Query the current level of detail used for tessellating geometry. """ pass def updateMaterials(): """ updateMaterials(self) Manually update all materials and material assignments. """ pass def hdrRendering(): """None""" pass def setTextureBitDepthLimit3D(viewportTextureDepth): """ setTextureBitDepthLimit3D(self, viewportTextureDepth) Set the maximum bit depth for a 3D texture (volume). Textures with a bit depth higher than this will be downconverted to this bit depth. Textures with an equal or lower bit depth will not be converted. 3D textures do not support compressed formats. * hou.viewportTextureDepth.Fixed8: 8b SDR texture format. Good balance between memory and quality. * hou.viewportTextureDepth.HDR16: 16b HDR texture format. Excellent dynamic range, but more memory use and slower texturing performance. * hou.viewportTextureDepth.FullHDR: 32b HDR texture format. Extreme dynamic range, but very high memory use and slow texturing performance. Use with care. """ pass def homeAutoAdjustClip(): """ homeAutoAdjustClip(self) -> hou.viewportHomeClipMode Queries which camara clip planes are adjusted when performing a homing operation. """ pass def hdrReflections(): """ hdrReflections(self) -> bool Query if High Dynamic Range (HDR) color buffers are use for the scene cubemap. """ pass def showCameraName(): """ showCameraName(self) -> bool Query if the camera name menu is displayed. """ pass def textureCacheSize(): """ textureCacheSize(self) -> int Query the texture cache size, in megabytes. """ pass def setLightSampling(num_samples): """ setLightSampling(self, num_samples) Set the number of lighting samples to perform when doing high quality lighting for area and environment lights. """ pass def defaultMaterialEmission(tint): """ defaultMaterialEmission(self, tint) Set the emission color of the default material (used when no material assignment is present or Show Materials is disabled). """ pass def showName(): """ showName(self) -> bool Query if the viewport name menu is displayed. """ pass def minReflectAmount(): """ minReflectAmount(self) -> double Query the minimum reflection level required for a cubemap to be generated for an object. """ pass def setAmbientOcclusion(enable): """ setAmbientOcclusion(self, enable) Enable an ambient occlusion pass in high quality lighting modes. This generates local occlusion shadows. """ pass def allowParticleSprites(): """ allowParticleSprites(self) -> bool Query if particles are drawn as sprites when sprite attributes are detected on the particle (sprite* or shop_materialpath). """ pass def removeBackfaces(): """ removeBackfaces(self) -> bool Query if backwards facing polygons are culled. """ pass def applyZoomToBackgroundImage(): """ applyZoomToBackgroundImage(self) -> bool Query if the camera zoom is affecting the background image. """ pass def setShadowQuality(viewportShadowQuality): """ setShadowQuality(self, viewportShadowQuality) Set the quality of shadow sampling in High Quality Lighting with Shadows lighting mode. * hou.viewportShadowQuality.Point: Area lights are treated as point lights when generating and sampling shadow maps. This is the fastest option. * hou.viewportShadowQuality.PointAA: Do some antialiasing of shadow edges. Treat area lights as point lights when generating and sampling shadow maps. * hou.viewportShadowQuality.Area: Area lights generate multiple shadow maps which are sampled to generate an approximation of a blurred shadow from an area source. * hou.viewportShadowQuality.AreaAA: Area lights generate multiple maps and antialias the shadow lookups. """ pass def setOnionSkinFrameIncrement(frame_increment): """ setOnionSkinFrameIncrement(self, frame_increment) Set the frame increment between onion skins. Using 1 will draw every frame around the current frame ($F-2 $F-1 $F $F+1 $F+2, while 5 would step by 5 ($F-10 $F-5 $F $F+5 $F+10). """ pass def agentShapePointCutoff(): """ agentShapePointCutoff(self) -> int Query the minimum number of points in an agent LOD level. """ pass def textureMaxRes3D(): """ textureMaxRes3D(self) -> 3-tuple of int Query the maximum resolution of a 3D texture (volume). """ pass def usePackedStylesheets(enable): """ usePackedStylesheets(self, enable) Enable assignment of material stylesheets to geometry within packed primitives. """ pass def offsetVertexMarkers(): """ offsetVertexMarkers(self) -> bool When enabled, vertex markers and normals are inset into the polygon so they can be selected independently when part of a seamless mesh. When disabled, the markers and normals are placed at the actual vertex, potentially overlapping. """ pass def setOnionSkinFramesBeforeTint(tint): """ setOnionSkinFramesBeforeTint(self, tint) Tint all onion skins that appear before the current frame with this color. """ pass def setOrthoGridOffset(offset): """ setOrthoGridOffset(self, offset) Set the offset of the grid in fixed orthographic views, as a 3-tuple in world space. """ pass def displacementLevel(): """ displacementLevel(self) -> double Query the level of detail used for displacement mapping. """ pass def setViewMaskOpacity(opacity): """ setViewMaskOpacity(self, opacity) Set the opacity of the bars used to mask areas out the viewport outside the aspect ratio. """ pass def textureAnisotropicFilter(): """ textureAnisotropicFilter(self) -> int Query the number of samples used for anisotropic texture filtering. """ pass def uvVertexType(): """ uvVertexType(self) -> bool Return the class of the UV attribute, Point or Vertex. This returns the viewport setting, and not the detected class of the current UV attribute. If uvAutoAttribute is enabled, the class will be the same as the currently displayed attribute, but if it is disabled it may be different. """ pass def displayUVTileBoundaries(): """ displayUVTileBoundaries(self) -> bool Query if the boundaries of UV tiles are displayed. """ pass def uvReferenceGrid(): """ uvReferenceGridOverImage(self) -> bool Query if the dot grid is displayed. """ pass def headlightSpecular(): """ headlightSpecular(self) -> bool Query if specular reflections are generated by the headlight. """ pass def textureBitDepthLimit2D(): """ textureBitDepthLimit2D(self) -> hou.viewportTextureDepth Query the maximum bit depth for a 2D texture. * hou.viewportTextureDepth.Compressed8: Compressed, 8b SDR texture format. Smallest memory use. * hou.viewportTextureDepth.Fixed8: 8b SDR texture format. Good balance between memory and quality. * hou.viewportTextureDepth.HDR16: 16b HDR texture format. Excellent dynamic range, but more memory use and slower texturing performance. * hou.viewportTextureDepth.FullHDR: 32b HDR texture format. Extreme dynamic range, but very high memory use and slow texturing performance. Use with care. """ pass def setDisplayOrthoGrid(enable): """ setDisplayOrthoGrid(self, enable) Display the grid in fixed orthographic views (Top, Left, Front, Bottom, Right, Back). """ pass def reflectMapSize(): """ reflectMapSize(self) -> int Query the size of reflection cubemaps. """ pass def setTextureResLimit3D(enable): """ setTextureResLimit3D(self, enable) Limit the resolution of all 3D textures (volumes), so that the width, height, and depth cannot exceed the limit. Even if disabled, OpenGL has its own texture limits which will be applied (usually 2k or 8k). """ pass def showDiffuse(enable): """ showDiffuse(self, enable) Enable diffuse contribution of lighting. When disabled, diffuse will not contribute to the final lit color. This can be used to debug lighting. """ pass def showingAmbient(): """ showingAmbient(self) -> bool Query if ambient lighting is enabled. """ pass def pointMarkerSize(): """ pointMarkerSize(self) -> float Queries the size of point marker decorations, in pixels. """ pass def usingAspectRatio(): """ usingAspectRatio(self) -> bool Query if a specific aspect ratio is being enforced. """ pass def setBaseLODLevel(base_level): """ setBaseLODLevel(self, base_level) Set the level to use as the full level of detail model, generally 0 (the original agent model). For very heavy poly count agents, this can be set to higher values to reduce the polygon count of the highest level of detail model. """ pass def setDefaultMaterialAmbient(): """ setDefaultMaterialAmbient(self) -> hou.Color Query the default material's ambient color. """ pass def displayOrthoGrid(): """ displayOrthoGrid(self) -> bool Query if the grid is displayed in fixed orthographic views. """ pass def transparencyQuality(): """ transparencyQuality(self) -> hou.viewportTransparency Query the transparency quality. """ pass def setUVDisplayAttribute(): """None""" pass def displayBackgroundImage(): """ displayBackgroundImage(self) -> bool Query if background image display is globally enabled. """ pass def defaultMaterialAmbient(tint): """ defaultMaterialAmbient(self, tint) Set the ambient color of the default material (used when no material assignment is present or Show Materials is disabled). """ pass def orthoRuler(): """ orthoRuler(self) -> hou.viewportGridRuler Query where the grid numbers are displayed on the fixed orthographic view grid. * hou.viewportGridRuler.Hide: Not displayed. * hou.viewportGridRuler.MainAxis: Displayed along the main axes at grid line intersections. * hou.viewportGridRuler.GridPoints: Displayed on grid line intersections. """ pass def setOptimizeGeometry(enable): """ setOptimizeGeometry(self, enable) Optimize packed geometry when loaded to make it faster for display (triangulating and splitting meshes). """ pass def GeometryViewportSettings_swigregister(): """None""" pass def GeometryViewport_swigregister(): """None""" pass def Geometry_swigregister(): """None""" pass class HDADefinition(object): """ hou.HDADefinition Represents the definition of a houdini digital asset (HDA). A digital asset definition defines a node type and exists inside an hda file. The node type is implemented in terms of other nodes wired together inside a subnet. These nodes inside the subnet are called the definition's contents. An hda file contains one or more digital asset definitions, and installing an hda file installs all the definitions in the file. When a digital asset definition is installed, the node type it defines is added to Houdini. Note that you can access an HDADefinition without installing it. A digital asset's algorithm is determined by the nodes inside it. To edit those nodes you create an instance of the digital asset, unlock it, modify the contents, and save the definition. New digital asset instances are normally locked, meaning that they are read-only, and they automatically update when the asset's definition changes. An unlocked instance is editable, does not update when the definition changes, and you can save its contents to change the definition. To unlock a node, select Allow Editing of Contents or call hou.Node.allowEditingOfContents. To save the contents of an unlocked node to the definition, select Save Operator Type or call hou.HDADefinition.updateFromNode. To revert an unlocked instance back to the last saved definition and change it back into a locked instance, select Match Current Definition or call hou.Node.matchCurrentDefinition. See also hou.hda and hou.HDAOptions. """ def comment(): """None""" pass def isPreferred(): """ isPreferred(self) -> bool Return whether this definition is preferred. After loading hda files, Houdini uses a set of rules to resolve conflicts when it encounters multiple definitions for the same node type (e.g. preferring the most recent hda file, preferring definitions embedded in the hip file, etc.). When these rules do not use the definition you want, you can override them by explicitly marking a definition as preferred. Houdini saves this list of preferred definitions with the hip file. Marking a definition as not preferred will remove it from this list, and the normal rules will apply again. """ pass def removeParmTuple(self, name): """ removeParmTuple(self, name) Remove a parameter tuple from this node type's parameters. See also hou.HDADefinition.addParmTuple and hou.HDADefinition.removeParmFolder. This method is deprecated in favor of hou.HDADefinition.setParmTemplateGroup. """ pass def setExtraInfo(extra_info): """ setExtraInfo(self, extra_info) Set extra information about the asset definition that isn't stored elsewhere, like the representative node, guide geometry, etc. This string is encoded in a specific format, so it is recommended that you only call this method with values returned from hou.HDADefinition.extraInfo. """ pass def installed(): """None""" pass def setIsPreferred(preferred): """ setIsPreferred(self, preferred) Set whether this definition is preferred. See hou.HDADefinition.isPreferred for more information. """ pass def addParmTuple(self, parm_template, in_folder=(): """ addParmTuple(self, parm_template, in_folder=(), create_missing_folders=False) Add a parameter tuple to this node type's parameters. Houdini places the new parameter at the bottom of the parameters in a particular folder. parm_template An instance of a hou.ParmTemplate subclass that describes the parameter. in_folder A sequence of folder name strings to tell Houdini which folder to put the parameter in. If this sequence is empty, the parameter will go in top level set of folders. It it is, for example, ("Transform",), the parameter is added inside the Transform folder. If it is ("Transform", "Options"), it will go inside the Options folder inside the Transform folder. create_missing_folders Whether Houdini should create folders specified in in_folder that do not already exist. If this parameter is True, you can create folders without having to call hou.HDADefinition.addParmFolder. Note that this method can add a single folder by passing a hou.FolderParmTemplate for parm_template. See also hou.HDADefinition.replaceParmTuple. This method is deprecated in favor of hou.HDADefinition.setParmTemplateGroup. """ pass def minNumInputs(): """ minNumInputs(self) -> int Return the minimum number of connected inputs that node instances of this digital asset can have. If these inputs are not connected, the node will generate an error. See also hou.NodeType.minNumInputs. """ pass def setDescription(description): """ setDescription(self, description) Set the description for this definition's node type. Houdini uses this description for user interface elements such as the TAB menu. This description is also called the operator label in Houdini. See also hou.HDADefinition.description and hou.NodeType.description. """ pass def current(): """None""" pass def addParmFolder(self, folder_name, in_folder=(): """ addParmFolder(self, folder_name, in_folder=(), parm_name=None, create_missing_folders=False) Adds a folder to this node type's parameters. folder_name The name of the folder that is displayed in the parameter dialog. in_folder A sequence of folder name strings to indicate where the folder should go. If this sequence is empty, the folder will go in top level set of folders. It it is, for example, ("Transform",), the folder is added inside the Transform folder. If it is ("Transform", "Options"), it will go inside the Options folder inside the Transform folder. parm_name The name of the underlying parameter tuple corresponding to the set of folders. For example, the folders in a set might be named Transform, Subnet, and Controls, and these correspond to one parameter tuple named, say, 'stdswitcher0'. The value of the parameter in this tuple is the index of the folder that is open. If this is the first folder to go in the set, parm_name is used as the parameter name. Otherwise, it is ignored and Houdini uses the parameter name of the first folder in the set. If this is the first folder in the set and parm_name is None, it will default to 'folder0'. If parm_name is already in use, Houdini automatically generates a unique name. create_missing_folders Whether Houdini should create folders specified in in_folder that do not already exist. If this parameter is True, you can use this method to add nested folders in one call. Note that you can add folders by passing a hou.FolderParmTemplate to the addSpareParmTuple method, so this method is deprecated. Note also that addSpareParmTuple is deprecated in favor of setParmTemplateGroup. See also the removeParmFolder and addParmTuple methods. This method is deprecated in favor of setParmTemplateGroup. """ pass def hideDefaultParameters(): """ hideDefaultParameters(self) -> bool Return whether the parameters that are common to nodes types in this node type category are hidden or not. For example, nearly all objects have common translation, rotation, scale, etc. parameters, and object level digital assets have these parameters by default. If hidden, though, these parameters are still there but are not displayed to the user. Note that this value is also stored in the string returned by hou.HDADefinition.extraInfo. """ pass def extraFileOptions(): """ extraFileOptions(self) -> dict of str to bool, int, float, str Return a dictionary containing the extra options attached to sections in the asset's definition. For example, event handler scripts such as OnCreated are stored as sections inside the asset, and extra metadata in this dictionary determines whether Houdini runs these scripts as Python as as Hscript. These is one dictionary for the entire asset, and keys in this dictionary are usually of the form section_name/option_name. For example, if the OnCreated section is marked as containing Python code, this dictionary will contain "OnCreated/IsPython" set to True. Note that the contents of this dictionary are saved in the ExtraFileOptions section and are encoded in a binary format. See also hou.HDADefinition.setExtraFileOption and hou.HDADefinition.removeExtraFileOption. """ pass def setPreferred(): """None""" pass def hasSection(name): """ hasSection(self, name) -> bool Return True if the HDA definition contains a section with the specified name and False otherwise. See hou.HDASection for more information on sections. """ pass def representativeNodePath(): """ representativeNodePath(self) -> str Return the contents of the Representative Node field on the Basic tab of the Type Properties dialog. For object-level digital assets that contain other object nodes, it is possible to make Houdini treat your digital asset like a camera or light by choosing a node inside the asset to represent it. For example, if you choose a camera inside the asset as the representative node, instances of the digital asset will appear in the viewport's list of camera objects. Note that this value is also stored in the string returned by hou.HDADefinition.extraInfo. """ pass def version(): """None""" pass def replaceParmTuple(self, parm_tuple_name, parm_template): """ replaceParmTuple(self, parm_tuple_name, parm_template) Replace an existing parameter tuple with a new one. The old parameter tuple is removed and the new one is added in its place. parm_tuple_name The name of the parameter tuple to replace. Raises hou.OperationFailed if no parameter tuple exists with this name. parm_template A hou.ParmTemplate describing the new parameter tuple. The new parameter tuple may or may not have the same name as the old one. By providing a parameter tuple with the same name, you can modify an existing parameter tuple. The following example function changes the definition of the asset to make a parameter tuple visible or invisible in all nodes of that type. To show or hide a parameter in just one instance of a node, use hou.ParmTuple.hide. To change a spare parameter on a node, use hou.Node.replaceSpareParmTuple or hou.Node.setParmTemplateGroup. This method is deprecated in favor of hou.HDADefinition.setParmTemplateGroup. """ pass def embeddedHelp(): """ embeddedHelp(self) -> str Return the help text embedded in the digital asset. Return an empty string if no embedded help exists. Embedded help typically comes from the Help tab of the operator type properties window, but it may also come from a dialog script. """ pass def setMaxNumInputs(max_num_inputs): """ setMaxNumInputs(self, max_num_inputs) Set the maximum number of inputs that node instances of this digital asset may have. This number must be greater than or equal to the minimum number of inputs. If it is 5 or greater, Houdini will use a merge SOP-style input connector that allows an unlimited number of inputs. Otherwise, the node will have between 0 and 4 input connectors, each of which may or may not be connected, that correspond to the subnet indirect inputs inside the digital asset. See hou.Node.inputConnectors and hou.SubnetIndirectInput for more information on input connectors and subnet indirect inputs. """ pass def removeSection(name): """ removeSection(self, name) Remove an existing section. Only remove sections that you explicitly added. Do not remove the special sections that Houdini uses to store the contents of the digital asset definition, or Houdini will generate errors or strange side effects. See hou.HDASection for more information on sections. Note that hou.HDASection.destroy will also remove a section. Raises hou.OperationFailed if no such section exists in the definition. """ pass def nodeTypeName(): """ nodeTypeName(self) -> str Return the name of the node type defined by this digital asset. Raises hou.OperationFailed if the digital asset is not installed. If the digital asset is installed, this method is a shortcut for self.nodeType().name(). """ pass def save(file_name, template_node=None, options=None, create_backup=True): """ save(self, file_name, template_node=None, options=None, create_backup=True) Save the definition into an hda file. file_name Where to save the definition. To save to the current hda file, use the return value from hou.HDADefinition.libraryFilePath. template_node Either None or a hou.Node object containing an unlocked instance of the digital asset that defines the definition's new contents. If None, this method does not update the definition's contents. options Either None or a hou.HDAOptions object that specifies extra behaviors of the definition. If template_node is not None, the compressContents, lockContents, saveSpareParms, and makeInitialParmsDefaults values of the hou.HDAOptions object are used. Otherwise, only the compressContents value is used. create_backup Create a backup before modifying existing hda files. See also hou.HDADefinition.updateFromNode for a way to save an unlocked node's definition to the current hda file. See also hou.HDADefinition.copyToHDAFile. """ pass def sections(): """ sections(self) -> dict of str to hou.HDASection Return a dictionary mapping section names to hou.HDASection objects. See hou.HDASection for more information on sections. """ pass def removeParmFolder(self, folder): """ removeParmFolder(self, folder) Remove an empty folder from this node type's parameters. folder A _sequence of folder names_. For example, to remove the Output folder, pass in ("Output",) and not "Output". Raises hou.OperationFailed if the folder does not exist or it is not empty. Use hou.HDADefinition.removeParmTuple to remove all the parameters inside the folder before calling this method. See also addParmFolder, hou.ParmTemplateGroup.remove, and hou.ParmTemplateGroup.findFolder. This method is deprecated in favor of hou.HDADefinition.setParmTemplateGroup. """ pass def isInstalled(): """ isInstalled(self) -> bool Return whether this definition is installed in Houdini. It is possible to access HDADefinition objects in hda files that are not installed with hou.hda.definitionsInFile. See also hou.hda.installFile. """ pass def nodeType(): """ nodeType(self) -> hou.NodeType Return the node type defined by this digital asset. Raises hou.OperationFailed if the digital asset is not installed. """ pass def description(): """ description(self) -> str Return the description for this definition's node type. Houdini uses this description for user interface elements such as the TAB menu. This description is also called the operator label in Houdini. See also hou.NodeType.description. """ pass def addSection(name, contents="", compression_type=hou.compressionType.NoCompression): """ addSection(self, name, contents="", compression_type=hou.compressionType.NoCompression) -> hou.HDASection Create a new section with the specified contents. If a section already exists with this name, changes the existing contents to the new contents. Note that the contents may contain binary data. Also note that section names may contain '/'. You can optionally specify a compression type, hou.compressionType, to compress the contents. Note that you must specify the same compression type when reading the contents back to decompress them. See hou.HDASection for more information on sections. To remove a section, use hou.HDASection.destroy. Sections can have associated properties stored in the hou.HDADefinition.extraFileOptions. > def addSectionFromFile(hda_definition, section_name, file_name): > '''Add a section whose contents come from a file. If the section > already exists, replace its contents.''' > section_file = open(file_name, "r") > hda_definition.addSection(section_name, section_file.read()) > section_file.close() """ pass def copyToHDAFile(file_name, new_name=None, new_menu_name=None): """ copyToHDAFile(self, file_name, new_name=None, new_menu_name=None) Copy this definition into an hda file. file_name The hda file where the definition will be saved. If the file does not already exist, it will be created. If it already contains a definition for this node type, it will be overwritten. new_name The new name of the node type. If None, the definition will be saved as the existing node type name. See also hou.NodeType.name. new_menu_name The new description of the node type that appears in the tab menu. If None, Houdini will use the existing description. Note that the node type name must be unique within the hda file, so saving the definition with a new description to an hda file containing a definition with the old node name will still overwrite the existing definition. See also hou.NodeType.description. """ pass def preferred(): """None""" pass def modificationTime(): """ modificationTime(self) -> int Return the time when the definition was last modified. This time is returned as a POSIX timestamp, such as is returned by time.time(). > >>> import time > >>> time.ctime(hou.nodeType(hou.objNodeTypeCategory(), "toon_character"). > ... definition().modificationTime()) > 'Thu Nov 6 18:22:38 2008' """ pass def setOptions(options): """ setOptions(self, options) Set this digital asset definition's options to the data in a hou.HDAOptions object. See hou.HDAOptions for more information. """ pass def setParmTemplateGroup(parm_template_group, rename_conflicting_parms=False): """ setParmTemplateGroup(self, parm_template_group, rename_conflicting_parms=False) Change the spare parameters for this node. parm_template_group A hou.ParmTemplateGroup object containing the new parameter layout. rename_conflicting_parms If True, parameters in the group with the same parm tuple names will be automatically renamed. If False and there are parms with the same name, this method raises hou.OperationFailed. Note that each node type has a set of parameters which must exist and must be of certain types. If your parm template group does not contain the required parameters for the node type the will be added at the bottom and will be made invisible. Similarly, if your parm template group attempts to modify the type, range, label, or other property of a required parameter, all changes to that parameter other than visibility settings will be ignored. This method is preferred over the other parameter-related methods in this class (addSpareParmTuple, removeSpareParmTuple, replaceSpareParmTuple, addSpareParmFolder, removeSpareParmFolder) because it lets you more easily make manipulate parameters. See hou.HDADefinition.setParmTemplateGroup to change the parameter interface of a digital asset. """ pass def setVersion(): """None""" pass def maxNumInputs(): """ maxNumInputs(self) -> int Return the maximum number of inputs that node instances of this digital asset can have. Return a number greater than 4 if this node type can accept an unlimited number of inputs. See also hou.NodeType.maxNumInputs. """ pass def isCurrent(): """ isCurrent(self) -> bool Return whether this definition is the one currently in use by Houdini. This example shows how you can access other definitions for the same node type: > def otherDefinitions(definition): > '''Given an HDADefinition object, return the other loaded definitions > for the same node type.''' > # Look through all the loaded hda files for definitions providing > # the same node type. > result = [] > for hda_file in hou.hda.loadedFiles(): > # Skip the hda file containing the definition that was passed in. > if hda_file == definition.libraryFilePath(): > continue > > for other_definition in hou.hda.definitionsInFile(hda_file): > if other_definition.nodeType() == definition.nodeType(): > result.append(other_definition) > return result > # Print the paths to hda files providing other definitions for a digital asset instance. > >>> for other_definition in otherDefinitions(hou.node("/obj/my_hda1").type().definition()): > ... print other_definition.libraryFilePath() > /path/to/file1.hda > /path/to/file2.hda """ pass def destroy(): """ destroy(self) Uninstall this definition and _delete it from the hda file_. Any node instances of this asset will warn that they are using an incomplete asset definition. See also hou.hda.uninstallFile. """ pass def compileCodeSection(source_section, destination_section): """ compileCodeSection(self, source_section, destination_section) This function is deprecated. Compiled VEX code should no longer be stored inside of an HDA. """ pass def parsedContents(self): """ parsedContents(self) -> tuple of (str, str) Return a list of (name, value) pairs of the parsed from the Contents section. The Contents section consists of the child nodes used to create a node instance of the HDA. See also hou.HDADefinition.uncompressedContents. """ pass def icon(): """ icon(self) -> str Return the name or path of the icon for this definition's node type. Note that Houdini uses its search path to locate icons, so you do not need to pass in a full path. See also hou.NodeType.icon. """ pass def uncompressedContents(self): """ uncompressedContents(self) -> str Return a string containing the data of the uncompressed Contents section. The Contents section consists of data in the CPIO format representing the child nodes used to create a node instance of the HDA. See also hou.HDADefinition.parsedContents. """ pass def nodeTypeCategory(): """ nodeTypeCategory(self) -> hou.NodeTypeCategory Return the node type category (e.g. Objects, SOPs, DOPs, etc.) for the node type defined by this digital asset. See hou.NodeTypeCategory for more information. It is safe to call this method if the digital asset is not installed. If the digital asset is installed, this method is equivalent to self.nodeType().category(). """ pass def setIcon(icon): """ setIcon(self, icon) Set the icon for this definition's node type. See hou.HDADefinition.icon for more information. """ pass def extraInfo(): """ extraInfo(self) -> str Return a string storing extra information about the asset definition that isn't stored elsewhere, like the representative node, guide geometry, whether default parameters are hidden, etc. See also hou.HDADefinition.representativeNodePath and hou.HDADefinition.hideDefaultParameters to more easily retrieve some portions of the extra info. """ pass def setModificationTime(time=-1): """ setModificationTime(self, time=-1) Set the modification time for the definition to the given POSIX timestamp. If the time parameter is negative, uses the current time. See also hou.HDADefinition.modificationTime. """ pass def setComment(): """None""" pass def libraryFilePath(): """ libraryFilePath(self) -> str Return the path to the hda file containing the digital asset's definition. Note that it is possible to save an asset with a hip file, without storing it in an hda file. In this case, this method returns "Embedded". """ pass def setExtraFileOption(name, value, type_hint, =, hou.fieldType::NoSuchField): """ setExtraFileOption(self, name, value, type_hint = hou.fieldType::NoSuchField) Set an entry in the dictionary of extra file options. See hou.HDADefinition.extraFileOptions for more information. name The name of the option to set. value An integer, float, string, hou.Vector2, hou.Vector3, hou.Vector4, hou.Quaternion, hou.Matrix3, hou.matrix4, or sequence of numbers. type_hint Used to determine the exact hou.fieldType desired when the specified value type is not enough to unambiguously determine it. The following example function marks an section, such as OnCreated, as containing Python code: > def markSectionAsPython(definition, section_name): > definition.setExtraFileOption(section_name + "/IsPython", True) """ pass def parmTemplateGroup(): """ parmTemplateGroup(self) -> hou.ParmTemplateGroup Return the group of parm templates corresponding to the current parameter layout for this node. You can edit the parameter layout for this node (add or remove spare parameters, reorder or hide built-in parameters, etc.) by getting the current parameter group, modifying it, and calling hou.Node.setParmTemplateGroup with it. The following example creates a geometry object, adds a My Parms folder to it, and adds a My Parm float parameter to it in that folder. The parameters are added only to the geometry object created; other geometry objects are unaffected. > >>> node = hou.node("/obj").createNode("geo") > >>> group = node.parmTemplateGroup() > >>> folder = hou.FolderParmTemplate("folder", "My Parms") > >>> folder.addParmTemplate(hou.FloatParmTemplate("myparm", "My Parm", 1)) > >>> group.append(folder) > >>> node.setParmTemplateGroup(group) See hou.ParmTemplateGroup and the setParmTemplateGroup method for more information and examples. """ pass def updateFromNode(node): """ updateFromNode(self, node) Update and save the definition to match the contents of a given unlocked instance of the asset. Calling this method is the same as selecting Save Operator Type on the node's menu. > def saveUnlockedNodes(): > '''Look through all the nodes in the file for unlocked digital asset > instances and save and lock them.''' > for node in hou.node("/").allSubChildren(): > if node.type().definition() is None or node.matchesCurrentDefinition(): > continue > > node.type().definition().updateFromNode(node) > node.matchCurrentDefinition() """ pass def setUserInfo(extra_info): """ setUserInfo(self, extra_info) Set user information about the asset definition. This info isn't used by Houdini so it can contain any text. """ pass def setMinNumInputs(min_num_inputs): """ setMinNumInputs(self, min_num_inputs) Set the minimum number of connected inputs that node instances of this digital asset must have. min_num_inputs must be between 0 and 4, inclusive. If a node does not have the minimum number of inputs, it will generate an error. """ pass def options(): """ options(self) -> hou.HDAOptions Return a hou.HDAOptions object for the options stored in this digital asset. See hou.HDAOptions for more information. """ pass def removeExtraFileOption(name): """ removeExtraFileOption(self, name) Remove an entry in the dictionary of extra file options. See hou.HDADefinition.extraFileOptions for more information. Raises hou.OperationFailed if there is no entry in the dictionary with this name. """ pass def userInfo(): """ userInfo(self) -> str Return a string containing user specified information about the asset definition. """ pass def HDADefinition_swigregister(): """None""" pass class HDAModule(object): """ hou.HDAModule User-defined Python module containing functions, classes, and constants that are stored with and accessed from a digital asset. In Python, a module lets you organize functions, classes, and constants into a common namespace. For example, os is a module and os.getcwd is a function inside that module, and you access the contents of a module by looking up Python attributes on it. An HDAModule is a Python module that is associated with a particular digital asset type. It lets you store a library of Python code in one location in your asset, and you can invoke that code from parameters, event handlers, and callbacks inside that asset. The module's source code is stored in the Python Module section of the Scripts tab in the Type Properties dialog. For example, suppose the digit asset is an object named gear and the Python Module section contains the following: > def position(): > return (hou.frame() * 1.2, 0.0, 3.2) > > def onButtonPress(): > print "you pressed the button" > > def onLoaded(): > print "onLoaded section running" Unlike regular Python modules, which you access by name, you access a digital asset's Python module by calling hou.NodeType.hdaModule on its node type. For example, suppose you created an object-level digital asset named gear and put the above code in its Python Module section. You could then access the contents of the Python module as follows: > >>> node_type = hou.nodeType(hou.objNodeTypeCategory(), "gear") > >>> node_type.hdaModule().position() > (1.2, 0.0, 3.2) > >>> node_type.hdaModule().onButtonPress() > you pressed the button One use for the Python module is drive parameter expressions on nodes inside the digital asset. For example, suppose /obj/gear1 is an instance of the digital asset and /obj/gear1/geo1 is a node inside the asset. You could put the following inside geo1's tx parameter expression: > hou.node("..").type().hdaModule().position()[0] For convenience, you can also access the module from a node instance of the digital asset using hou.Node.hdaModule. So, you could simplify the above expression to: > hou.node("..").hdaModule().position()[0] And since you don't need to use the hou. prefix inside expressions, you could further simplify it to: > node("..").hdaModule().position()[0] The following example shows how you might run code in the module from the Callback Script field of a button parameter: > hou.pwd().hdaModule().onButtonPress() In an event handler script, such as On Loaded, you can use the kwargs dict to access the node type: > kwargs["type"].hdaModule().onLoaded() Note that Houdini creates a local kwargs dict that's accessible from the Python Module, too. It contains one entry with the key "type", to give you access to the hou.NodeType defined by the digital asset. If you find that a digital asset has too much Python code to store in one module, it's possible to create submodules. For example, if you want to create a submodule named bar, put its source code in a new digital asset section (say, "bar_PythonModule"). Then, from the Python Module section, you can write the following: > import toolutils > bar = toolutils.createModuleFromSection("bar", kwargs["type"], "bar_PythonModule") bar now appears as a submodule of the main module. If, for example, the bar_PythonModule section contains: > def foo(): > return 3.2 then you could write the following from a parameter on the digital asset node: > pwd().hdaModule().bar.foo() Note that the Python Module code is stored in a section of the digital asset named "PythonModule". For example, you can get a string containing that source code using node_type.definition().sections()["PythonModule"].contents(). """ def _reload(): """None""" pass def HDAModule_swigregister(): """None""" pass class HDAOptions(object): """ hou.HDAOptions Stores miscellaneous options about a houdini digital asset (HDA). The contents of this object correspond to some of the checkboxes on the Basic tab of the Type Properties dialog. These values are stored in the TypePropertiesOptions section of a digital asset definition. Call hou.HDADefinition.options to get an HDAOptions instance. Note that an instance of this class is simply a data structure, and is not associated with an particular digital asset instance. In other words, changing the values inside this object will not change the digital asset. To save these values to the digital asset definition, call hou.HDADefinition.setOptions. > >>> node = hou.node("/obj/my_digital_asset1") > >>> definition = node.type().definition() > >>> print definition.sections()['TypePropertiesOptions'].contents() > ParmsFromVfl := 0; > PrefixDroppedParmName := 1; > UseDSParms := 1; > ForbidOutsideParms := 1; > LockContents := 1; > SaveSpareParms := 0; # <-- Currently 0 > CheckExternal := 1; > GzipContents := 1; > MakeDefault := 1; > PrefixDroppedParmLabel := 1; > UnlockOnCreate := 0; > > >>> options = definition.options() > >>> options.saveSpareParms() > False > >>> options.setSaveSpareParms(True) > >>> definition.setOptions(options) > >>> print definition.sections()['TypePropertiesOptions'].contents() > ParmsFromVfl := 0; > PrefixDroppedParmName := 1; > UseDSParms := 1; > ForbidOutsideParms := 1; > LockContents := 1; > SaveSpareParms := 1; # <-- Now 1 > CheckExternal := 1; > GzipContents := 1; > MakeDefault := 1; > PrefixDroppedParmLabel := 1; > UnlockOnCreate := 0; """ def setSaveSpareParms(save_spare_parms): """ setSaveSpareParms(self, save_spare_parms) Set the Save Spare Parameters option. See hou.HDAOptions.saveSpareParms for more information. """ pass def setForbidOutsideParms(forbid_outside_parms): """ setForbidOutsideParms(self, forbid_outside_parms) Sets the Forbid Linking Parameters from Outside this Subnet option. See hou.HDAOptions.forbidOutsideParms for more information. """ pass def parametersFromVexCode(): """ parametersFromVexCode(self) -> bool Return whether the Get Properties from VEX Code option is on. When this option is set, most properties and parameters of the operator come from pragma statements in the VEX source code. """ pass def setCompressionType(): """None""" pass def forbidOutsideParms(): """ forbidOutsideParms(self) -> bool Return whether the Forbid Linking Parameters from Outside this Subnet option is set. When set, this option does not allow you to drag parameters from nodes outside the contents of the digital asset. """ pass def checkForExternalLinks(): """ checkForExternalLinks(self) -> bool Return whether the Check for External Node References option is set. If set, this option changes all absolute node references inside the digital asset into relative references. """ pass def setParametersFromVexCode(parameters_from_vex_code): """ setParametersFromVexCode(self, parameters_from_vex_code) Sets the Get Properties from VEX Code option. See hou.HDAOptions.parametersFromVexCode for more information. """ pass def setSaveCachedCode(save_cached_code): """ setSaveCachedCode(self, save_cached_code) Set the Save Cached Code option. See hou.HDAOptions.saveCachedCode for more information. """ pass def compressContents(): """ compressContents(self) -> bool Return whether the Compress Contents option is on. When this option is set, Houdini compresses the contents of the asset definition to reduce the size of the .hda file. Note that this option only as effect when the result of hou.HDAOptions.lockContents is True. """ pass def saveSpareParms(): """ saveSpareParms(self) -> bool Return the Save Spare Parameters option. When set, this option will add code into the asset creation script to recreate the node's current spare parameters. New node instances of the digital asset will contain the same spare parameters as those on the representative node. """ pass def setUnlockNewInstances(unlock_new_instances): """ setUnlockNewInstances(self, unlock_new_instances) Sets the Unlock New Nodes on Creation option. See hou.HDAOptions.unlockNewInstances for more information. """ pass def makeInitialParmsDefaults(): """ makeInitialParmsDefaults(self) -> bool Return whether the Save Defaults as Initial Parameters option is on. When set, this option uses the default values of the original parameters as the initial values for new nodes, instead of their current values. """ pass def setCheckForExternalLinks(check_for_external_links): """ setCheckForExternalLinks(self, check_for_external_links) Sets the Check for External Node References option. See hou.HDAOptions.checkForExternalLinks for more information. """ pass def saveCachedCode(): """ saveCachedCode(self) -> bool Return the Save Cached Code option. When set, this option will save cached code for applicable definitions, such as digital assets defined by VOP networks that generate VEX code. With this option on, the compiled code will be saved to the HDA section(s) and will be used for shaders, etc, without the need to recompile the network. This can save significant amounts of time for complex shaders. """ pass def setPrefixDroppedParmNames(prefix_dropped_parm_names): """ setPrefixDroppedParmNames(self, prefix_dropped_parm_names) Sets the Prefix Dropped Parameter Names option. See hou.HDAOptions.prefixDroppedParmNames for more information. """ pass def setSaveInitialParmsAndContents(save_initial_parms_and_contents): """ setSaveInitialParmsAndContents(self, save_initial_parms_and_contents) Set the Save Initial Contents and Parameters option. See hou.HDAOptions.saveInitialParmsAndContents for more information. """ pass def setPrefixDroppedParmLabels(prefix_dropped_parm_labels): """ setPrefixDroppedParmLabels(self, prefix_dropped_parm_labels) Sets the Prefix Dropped Parameter Labels option. See hou.HDAOptions.prefixDroppedParmLabels for more information. """ pass def setCompressContents(compress_contents): """ setCompressContents(self, compress_contents) Sets the Compress Contents option. See hou.HDAOptions.compressContents for more information. """ pass def prefixDroppedParmLabels(): """None""" pass def lockContents(): """ lockContents(self) -> bool Return whether the Save Contents as Locked option is on. When this option is not set, Houdini will use a creation script to store the contents of the digital asset instead of storing the node data. A creation script cannot store extra data like locked SOPs, edit SOP information, paint SOP information, etc. If this option is not set, new instances of the digital asset will be locked, so the user can edit the contents. However, you probably do not ever want to turn this option off. Instead, if you want to lock new instances of the digital asset, see hou.HDAOptions.unlockNewInstances. """ pass def compressionType(): """None""" pass def unlockNewInstances(): """ unlockNewInstances(self) -> bool Return whether the Unlock New Nodes on Creation option is set. When this option is set, Houdini will unlock new instances of the digital asset when they are created. Note that this option only has effect when the result of hou.HDAOptions.lockContents is True. """ pass def prefixDroppedParmNames(): """ prefixDroppedParmNames(self) -> bool Return whether the Prefix Dropped Parameter Names option is on. When this option is set, Houdini will not include a prefix on parameter names when you drag and drop parameters into the Existing Parameters areas of the Parameters tab of the Type Properties dialog. See also hou.HDAOptions.prefixDroppedParmLabels. """ pass def setMakeInitialParmsDefaults(make_initial_parms_defaults): """ setMakeInitialParmsDefaults(self, make_initial_parms_defaults) Sets the Save Defaults as Initial Parameters option. See hou.HDAOptions.makeInitialParmsDefaults for more information. """ pass def saveInitialParmsAndContents(): """ saveInitialParmsAndContents(self) -> bool Return whether the Save Initial Contents and Parameters option is on. When this option is set, Houdini saves any parameter values and node contents referenced by the digital asset to be saved as part of the asset's definition. """ pass def setLockContents(lock_contents): """ setLockContents(self, lock_contents) Sets the Save Contents as Locked option. See hou.HDAOptions.lockContents for more information. """ pass def HDAOptions_swigregister(): """None""" pass class HDASection(object): """ hou.HDASection Represents a "section" of data stored along with a digital asset. A digital asset stores its contents in a number of different pieces of data called sections. Each section is named and contains an arbitrarily sized piece of data, often textual. Each section is like a file embedded inside the definition, and Houdini uses specially named sections to store the node contents, list of parameters, etc. You can embed your own data into a digital asset by putting it inside a section. Any parameter in Houdini that references a file can also reference a section inside a digital asset. For example, if car is an object-level digital asset and the section is named "texture.jpg", you can reference that texture with opdef:/Object/car?texture.jpg. Note that hou.readFile also supports this opdef: syntax. By moving files into digital asset sections, you can build self- contained digital assets that can be distributed via a single hda file. Note that section names may contain '/'. """ def name(): """ name(self) -> str Return the name of this section. Note that is is not possible to rename a section, but the following function will emulate renaming: > def renameSection(section): > '''Rename a section by removing it and creating a new one. Return the new section.''' > new_section = section.definition().addSection(new_name, section.contents()) > section.destroy() > return new_section """ pass def modificationTime(): """ modificationTime(self) -> int Return the time when the section was last modified. This time is returned as a POSIX timestamp, such as is returned by time.time(). > >>> hou.nodeType(hou.cop2NodeTypeCategory(), "colorwheel").definition() > > >>> definition = hou.nodeType(hou.cop2NodeTypeCategory(), "colorwheel").definition() > >>> definition.sections().keys() > ['VflCode', 'DialogScript', 'VexCode'] > >>> section = definition.sections()['VflCode'] > >>> section.modificationTime() > 1177535169 > >>> import datetime, time > >>> datetime.datetime.fromtimestamp(section.modificationTime()) > datetime.datetime(2007, 4, 25, 17, 6, 9) > >>> time.ctime(section.modificationTime()) > 'Wed Apr 25 17:06:09 2007' """ pass def contents(compressionType=hou.compressionType.NoCompression): """ contents(self, compressionType=hou.compressionType.NoCompression) -> str Return a string containing the contents of this section. You can optionally specify a compression type, hou.compressionType, to decompress the contents. Raises hou.OperationFailed if a compression type is specified and the contents are not compressed by that type. > def saveSectionToFile(section, file_name): > '''Given a section, save it to a file.''' > section_file = file(file_name, "w") > section_file.write(section.contents()) > section_file.close() """ pass def size(): """ size(self) -> int Return the number of bytes in the contents. This method is a shortcut for len(self.contents()). """ pass def definition(): """ definition(self) -> hou.HDADefinition Return the digital asset definition containing this section. """ pass def destroy(): """ destroy(self) Remove this section from the HDA definition. You can also remove a section with hou.HDADefinition.removeSection, and this method is equivalent to self.definition().removeSection(self.name()). Only remove sections that you explicitly added. Do not remove the special sections that Houdini uses to store the contents of the digital asset definition, or Houdini will generate errors or strange side effects. To add a section, use hou.HDADefinition.addSection. """ pass def setContents(contents, compressionType=hou.compressionType.NoCompression): """ setContents(self, contents, compressionType=hou.compressionType.NoCompression) Set the contents of this section to the given string. A section may contain binary information, like bgeo files, images, etc. You can optionally specify a compression type, hou.compressionType, to compress the contents. Note that you must specify the same compression type when reading the contents back to decompress them. See hou.HDADefinition.addSection for an example of how to create a section from a file on disk. """ pass def HDASection_swigregister(): """None""" pass class Handle(object): """ hou.Handle Gives access to an handle bound to a viewer state. OVERVIEW The Handle class lets you manipulate handles bound to viewer states. """ def show(): """None""" pass def update(): """ update(self) This method forces the handle to update. Useful if a change made to a viewer state requires one of its handle to get updated. For dynamic handles, this will trigger a call to the onStateToHandle callback, allowing the viewer state to update the proper handle parameter(s). """ pass def visible(): """ visible(self): -> bool Returns True if the handle is visible, False otherwise. """ pass def type(): """ type(self): -> string Returns the type name of the handle. The return value corresponds to the type used for binding the handle. See hou.ViewerStateTemplate.bindHandle or hou.ViewerStateTemplate.bindStaticHandle for details. """ pass def name(): """ name(self): -> string The name of this handle. """ pass def Handle_swigregister(): """None""" pass class HelpBrowser(PaneTab): """ hou.HelpBrowser Class representing a help browser pane tab. Provides methods for controlling the help browser. REPLACES * helpbrowser """ def displayHelp(node_type): """ displayHelp(self, node_type) Loads the help for the specified node type. Raises HOM_ObjectWasDeleted if the help browser pane tab was deleted. """ pass def displayHelpPath(help_path): """ displayHelpPath(self, help_path) Loads the help for the specified help path. The path can either be a Houdini help URL (i.e. op:Sop/copy, tool:curve) or a raw help path (i.e. /nodes/sop/copy, shelf/curve). """ pass def displayHelpPyPanel(interface_name): """ displayHelpPyPanel(self, interface_name) Loads the help for the python panel with the specified name. Raises HOM_Error if the interface name is invalid. """ pass def url(): """ url(self) -> str Return the current URL of this help browser. Raises HOM_ObjectWasDeleted if the help browser pane tab was deleted. """ pass def setUrl(url): """ setUrl(self, url) Loads the specified URL. Raises HOM_ObjectWasDeleted if the help browser pane tab was deleted, and raises HOM_Error if url is not given. """ pass def showUI(show): """ showUI(self, show) Shows or hides the help browser's navigation controls. Raises HOM_ObjectWasDeleted if the help browser pane tab was deleted. """ pass def homePage(): """ homePage(self) -> str Returns the home page URL of this help browser. Raises HOM_ObjectWasDeleted if the help browser pane tab was deleted. """ pass def setHomePage(home_page): """ setHomePage(self, home_page) Sets the home page for this help browser to the specified URL. Raises HOM_ObjectWasDeleted if the help browser pane tab was deleted, and raises HOM_Error if home_page is not given. """ pass def HelpBrowser_swigregister(): """None""" pass class IPRViewer(PaneTab): """ hou.IPRViewer An interactive preview render (IPR) window. The IPR viewer progressively refines a render, first providing a rough view of the rendered image and eventually providing the fully rendered image. When you change a shader value, move an object, etc., the viewer will re-render the image. When you Ctrl+click on a pixel in the rendered image, Houdini searches $HOUDINI_PATH for scripts/ipr/pickpixel.py and runs it. The version of this file that ships with Houdini pops up the shader contributing the pixel, or an information window if there is is no shader. If Houdini cannot find that Python file it then looks for the Hscript file scripts/ipr/pickpixel.cmd. When you drag a SHOP node onto the rendered image, Houdini searches for and runs scripts/ipr/dragdrop.py. By default, this script assigns the SHOP to the object contributing the pixel. If it cannot find a Python version, Houdini then looks for scripts/ipr/dragdrop.cmd. Note that shelf scripts can access the last location the user clicked on with hou.IPRViewer.lastClickLocation. """ def cropRegion(): """ cropRegion(self) -> (float, float, float, float) Return the x0, x1, y0, and y1 normalized coordinates of the subregion that is selected, where (x0, y0) is the bottom-left corner and (x1, y1) is the top-right corner of the subregion. You can optionally tell the IPR viewer to only re-render only a portion of the image. To select a subportion of the image, hold down shift and select the box. Note that the bottom-left corner is (0.0, 0.0) and the top-right corner is (1.0, 1.0). For example, if the entire image is being rendered, this method returns (0.0, 1.0, 0.0, 1.0). """ pass def updateTime(): """ updateTime(self) -> float Return the contents of the viewer's Update Time field. This value determines approximately how long each progressive refinement should take. Smaller values will produce more progressive renders where detail is added more gradually. See also hou.IPRViewer.setUpdateTime and hou.IPRViewer.delay. """ pass def saveFrame(file_path, snapshot=0, xres=-1, yres=-1, color='C', alpha='C', scope='*', lut='', gamma=1.0, convert=True): """ saveFrame(self, file_path, snapshot=0, xres=-1, yres=-1, color='C', alpha='C', scope='*', lut='', gamma=1.0, convert=True) -> bool Saves the current IPR render to the specified file path. It is possible to save an in progress/incomplete render. The output image type is inferred from the file extension on the provided file path. The snapshot parameter controls which IPR snapshot to save. A value of 0 indicates the active render. The native IPR resolution is used by default, however a custom resolution can be specified with the xres and yres parameters. The color and alpha parameters control which render planes are used when writing RGBA images like .jpg or .png. If a deep image format such as .pic or .exr is used, the scope parameter can be used to specify which image planes to include in the output. """ pass def lastClickLocation(): """ lastClickLocation(self) -> (int, int) Return the x and y coordinates for the pixel location where the user last clicked in the IPR viewer. Note that this location might be outside the image: the x and y coordinates can be negative and can be greater than or equal to the image resolution. Note that if the user never clicked in the viewer, the x and y coordinates will be negative. You would typically call this method from a shelf script. For example, a user can click on a pixel in the IPR viewer and then click on the shelf to perform an action on that pixel (e.g. display the shader parameters, assign a shader, etc.). Use hou.IPRViewer.imageResolution to get the valid range for pixel coordinates. Note that when you Ctrl-click on a pixel, Houdini searches $HOUDINI_PATH for scripts/ipr/pickpixel.py and runs it. This script can access the viewer with kwargs["viewer"] and the location where the user clicked with kwargs["position"]. The following script opens a floating parameter window for the shader corresponding to the pixel the user last clicked on. > viewer = hou.ui.paneTabOfType(hou.paneTabType.IPRViewer) > px, py = viewer.lastClickLocation() > > if (px < 0 or px > viewer.imageResolution()[0] or > py < 0 or py >= viewer.imageResolution()[1]): > hou.ui.displayMessage("Click on the image and then run this script again") > else: > material = viewer.materialNode(px, py) > > if material is not None: > parm_window = hou.ui.curDesktop().createFloatingPaneTab( > hou.paneTabType.Parm) > parm_window.setCurrentNode(material) > parm_window.setPin(True) > else: > hou.ui.displayMessage("Click on an object to bring up the shader.") """ pass def setPreview(on): """ setPreview(self, on) Check or uncheck the Preview checkbox. See hou.IPRViewer.isPreviewOn for more information. """ pass def prim(x, y): """ prim(self, x, y) -> hou.Prim or None Return the geometry primitive contributing the pixel at the specified location, or None if there is nothing at the pixel or if the pixel location is outside the image bounds Raises hou.OperationFailed if the viewer does not contain an image. """ pass def autoSaveTime(): """ autoSaveTime(self) -> float Returns the time between IPR auto saves in seconds. When auto saving is on, a render progress image is written out at this rate. See also hou.IPRViewer.setAutoSaveTime. """ pass def startRender(): """ startRender(self) Start a new render if there is no active IPR session or issue a re- render if there is one. """ pass def setAutoSavePath(path): """ setAutoSavePath(self, path) Sets the render progress save path. See also hou.IPRViewer.autoSavePath for more information. """ pass def setUpdateTime(time): """ setUpdateTime(self, time) Set the contents of the viewer's Update Time field. See hou.IPRViewer.updateTime for more information. """ pass def pauseRender(): """ pauseRender(self) Pauses the active IPR session (if there is one). """ pass def isRendering(): """ isRendering(self) -> bool Indicates whether the IPR session has an render in progress. Returns True even if the render is paused. """ pass def setDelay(time): """ setDelay(self, time) Set the contents of the viewer's Delay field. See hou.IPRViewer.delay for more information. """ pass def delay(): """ delay(self) -> float Return the contents of the viewer's Delay field. This value determines how long Houdini waits between when you change a parameter value and when it starts re-rendering. See also hou.IPRViewer.setDelay and hou.IPRViewer.updateTime. """ pass def resumeRender(): """ resumeRender(self) Resumes the active IPR session (if there is one). """ pass def planes(): """ planes(self) -> tuple of str Return the names of the image planes in the rendered output. Note that the special Op_Id image plane contains the hou.Node.sessionId ids of the object nodes in the image. -1 indicates that there is no object node associated with the pixel. Use hou.IPRViewer.objectNode to access the object corresponding to that id. Similarly, the Prim_Id plane contains the hou.Prim.number ids of the primitives in the image. Use hou.IPRViewer.prim to access the primitive corresponding to that id. Raises hou.OperationFailed if the viewer does not contain an image. """ pass def ropNode(): """ ropNode(self) -> hou.RopNode or None Return the ROP node that is selected in the viewer, or None if nothing is selected. """ pass def killRender(): """ killRender(self) Kills the active IPR session (if there is one). """ pass def displayedPlane(): """ displayedPlane(self) -> str Return the name of the currently-displayed image plane in the rendered output. Note that the special Op_Id image plane contains the hou.Node.sessionId ids of the object nodes in the image. -1 indicates that there is no object node associated with the pixel. Use hou.IPRViewer.objectNode to access the object corresponding to that id. Similarly, the Prim_Id plane contains the hou.Prim.number ids of the primitives in the image. Use hou.IPRViewer.prim to access the primitive corresponding to that id. Raises hou.OperationFailed if the viewer does not contain an image. """ pass def autoSavePath(): """ autoSavePath(self) -> str Returns the render save path. This is the path that is used when the IPR viewer is set to automatically save render progress to disk. See also hou.IPRViewer.setSavePath. """ pass def isPreviewOn(): """ isPreviewOn(self) -> bool Return whether or not the Preview checkbox is checked. When it is unchecked, the viewer will not progressively refine the image using IPR, and will instead use the rendering engine from the ROP node to render it. See also hou.IPRViewer.setPreview. """ pass def setAutoSave(on): """ setAutoSave(self, on) Set or unset the Auto Save toggle. See hou.IPRViewer.isAutoSaveOn for more information. """ pass def isAutoSaveOn(): """ isAutoSaveOn(self) -> bool Returns whether or not the Auto Save toggle is selected. When turned on, IPR will periodically save the render progress to the auto save file path. The time between saves can be configured by setting the auto save time. See also hou.IPRViewer.setAutoSave. """ pass def setRopNode(rop_node): """ setRopNode(self, rop_node) Set the ROP node to use for rendering. """ pass def pixels(plane_name): """ pixels(self, plane_name) -> tuple of tuple of float Returns the value of all pixels in one plane of the image. This method returns a tuple of tuples of 1 to 4 floats, depending on the type of image plane. The results are in row-major order, starting at the bottom left corner of the IPR image. Note that the color plane is named C. Raises hou.OperationFailed if the plane name is invalid or the viewer does not contain an image. > >>> all_pixels = viewer.pixels("C") > >>> width = viewer.imageResolution()[0] > >>> all_pixels[width*200 + 300] > (0.69970703125, 0.46728515625, 0.289794921875, 1.0) """ pass def isActive(): """ isActive(self) -> bool Indicates whether an active IPR sessions exists. """ pass def setAutoUpdate(on): """ setAutoUpdate(self, on) Check or uncheck the Auto-Update checkbox. See hou.IPRViewer.isAutoUpdateOn for more information. """ pass def imageResolution(): """ imageResolution(self) -> (int, int) Return the resolution of the image. Raises hou.OperationFailed if the viewer does not contain an image. """ pass def objectNode(x, y): """ objectNode(self, x, y) -> hou.ObjNode or None Return the object node contributing the pixel at the specified location, or None if there is no object at the pixel or if the pixel location is outside the image bounds The following function returns the SOP node containing the geometry that contributes the pixel to the final image: > def sopNode(viewer, x, y): > obj_node = viewer.objectNode(x, y) > return (obj_node.renderNode() if obj_node is not None else None) Raises hou.OperationFailed if the viewer does not contain an image. """ pass def pixel(plane_name, x, y): """ pixel(self, plane_name, x, y) -> tuple of float Return the value of a pixel in one plane of the image. This method returns a tuple of 1 to 4 floats, depending on the type of image plane. Note that the color plane is named C. Raises hou.OperationFailed if the plane name is invalid, the pixel location is outside the image, or the viewer does not contain an image. You can determine the number of components in the image plane using the following: len(viewer.pixel(plane_name, 0, 0)). > >>> viewer.pixel("C", 300, 200) > (0.69970703125, 0.46728515625, 0.289794921875, 1.0) """ pass def evaluatedStyleSheetPaths(x, y): """ evaluatedStyleSheetPaths(self, x, y) -> tuple of str Returns a list of paths to the styles that contribute to the style sheet at the current pixel. """ pass def isAutoUpdateOn(): """ isAutoUpdateOn(self) -> bool Return whether or not the Auto-Update checkbox is checked. When it is unchecked, the viewer will not refresh when objects, shaders, lights, etc. change. In this case, you can force a re-render by clicking on the Render button. See also hou.IPRViewer.setAutoUpdate. """ pass def isPaused(): """ isPaused(self) -> bool Indicates whether the IPR session is paused. If there is no active session, this returns false. """ pass def materialNode(x, y): """ materialNode(self, x, y) -> hou.ShopNode or None Return the SHOP node contributing the pixel at the specified location, or None if there is nothing at the pixel, the pixel location is outside the image bounds, or there is no shader on the geometry. This method first checks the primitive corresponding to the pixel and returns the SHOP corresponding to its shop_materialpath attribute. If the primitive does not have this attribute then it returns the SHOP assigned to the object. If no SHOP is assigned to the object, it returns None. Raises hou.OperationFailed if the viewer does not contain an image. """ pass def setAutoSaveTime(float): """ setAutoSaveTime(self, float) Sets the auto save time in seconds. See also hou.IPRViewer.autoSaveTime for more information. """ pass def evaluatedStyleSheetJSON(x, y): """ evaluatedStyleSheetJSON(self, x, y) -> str Returns a JSON string describing the material style sheet at a given pixel. If no style sheet is active, an empty string is returned. """ pass def IPRViewer_swigregister(): """None""" pass class IndexPairPropertyTable(object): """ hou.IndexPairPropertyTable Describes properties of an index pair attribute. """ def propertyNames(): """ propertyNames(self) -> tuple of string Return a list of all property names. """ pass def intListPropertyValueAtIndex(property_name, row): """ intListPropertyValueAtIndex(self, property_name, row) -> tuple of int Return a list of property values for a particular integer property. Raises hou.OperationFailed if no property exists with this name. """ pass def floatPropertyValueAtIndex(property_name, row): """ floatPropertyValueAtIndex(self, property_name, row) -> float Return the property value for a particular floating point property. Raises hou.OperationFailed if no property exists with this name or the property is not float of size 1. """ pass def intPropertyValueAtIndex(property_name, row): """ intPropertyValueAtIndex(self, property_name, row) -> int Return the property value for a particular integer property. Raises hou.OperationFailed if no property exists with this name or the property is not integer of size 1. """ pass def numIndices(): """None""" pass def floatListPropertyValueAtIndex(property_name, row): """ floatListPropertyValueAtIndex(self, property_name, row) -> tuple of float Return a list of property values for a particular floating point property. Raises hou.OperationFailed if no property exists with this name. """ pass def stringPropertyValueAtIndex(property_name, row): """ stringPropertyValueAtIndex(self, property_name, row) -> string Return the property value for a particular string property. Raises hou.OperationFailed if no property exists with this name or the property is not string of size 1. """ pass def propertySize(property_name): """ propertySize(self, property_name) -> int Return the number of data components in the property value. """ pass def attrib(): """ attrib(self) -> hou.Attrib Return the parent index pair attribute. """ pass def propertyDataType(property_name): """ propertyDataType(self, property_name) -> hou.attribData enum value Return the property's data type (int, float or string). """ pass def stringListPropertyValueAtIndex(property_name, row): """ stringListPropertyValueAtIndex(self, property_name, row) -> tuple of string Return a list of property values for a particular string property. Raises hou.OperationFailed if no property exists with this name. """ pass def IndexPairPropertyTable_swigregister(): """None""" pass class IndirectInput(NetworkMovableItem): """ hou.IndirectInput An abstract base class for a network item that can be used as an input to nodes in the same network, but which is not a node itself. There are two specific forms of an indirect input. The hou.SubnetIndirectInput provides a way to connect nodes outside a sub- network to nodes inside the sub-network. The hou.NetworkDot allows connections to be routed through a network along any path. """ def outputs(): """None""" pass def useColorFromOutput(): """None""" pass def inputOutputIndex(): """None""" pass def setColorDefault(): """None""" pass def inputItem(): """ inputItem(self) -> hou.NetworkMovableItem Returns the item connected directly to the input side of this indirect input. This may be a node, indirect input, or None if nothing is connected. Note that the returned item may not be inside the same parent network as this object if it is a hou.SubnetIndirectInput. """ pass def outputConnections(): """None""" pass def setSymbolicColorName(): """None""" pass def setUseColorFromOutput(): """None""" pass def symbolicColorName(): """None""" pass def input(): """None""" pass def inputItemOutputIndex(): """ inputItemOutputIndex(self) -> int Returns the index of the output connection on the network item connected directly to the input side of this object. Returns 0 if nothing is connected. This value will only be non-zero if a hou.Node is connected to this object since all other network items only has a single output connector. """ pass def IndirectInput_swigregister(): """None""" pass class InitScriptFailed(Error): """ hou.InitScriptFailed """ def description(): """ description(self) -> str Return a description of the class of exception. The description is not related to the exception instance. """ pass def exceptionTypeName(): """ exceptionTypeName(self) -> str Return the name of the exception type. Instances of different subclasses of hou.Error will return different names. Instances of the base class will return "Error". You can also use str(e.__class__) to get the name of the subclass. """ pass def InitScriptFailed_swigregister(): """None""" pass class IntParmTemplate(ParmTemplate): """ hou.IntParmTemplate Describes a parameter tuple containing integer values. Note that integer parameters may also be menu parameters. Integer parameters with menus are conceptually the same as parameters derived from hou.MenuParmTemplate. """ def setDefaultExpression(tuple_of_default_expressions): """ setDefaultExpression(self, tuple_of_default_expressions) Set the default expression for new parameter instances to a sequence of strings. See the hou.IntParmTemplate.defaultExpression method for more information. Note that if the number of strings in the sequence is different from the number of components in the parm template, any extra values will be discarded and any missing expressions will become the empty string. """ pass def menuItems(): """ menuItems(self) -> tuple of str Return the tuple of internal menu names. If this integer does not use a menu, returns an empty tuple. These internal menu names are not displayed in the UI, but they can be passed to hou.Parm.set. """ pass def setDefaultExpressionLanguage(tuple_of_default_expression_languages): """ setDefaultExpressionLanguage(self, tuple_of_default_expression_languages) Set the default expression language for new parameter instances to a sequence of hou.scriptLanguage values. See the defaultExpressionLanguage method for more information. Note that if the number of hou.scriptLanguage values in the sequence is different from the number of components in the parm template, any extra values will be discarded and any missing expression languages will become hou.scriptLanguage.Hscript. """ pass def setItemGeneratorScriptLanguage(language): """ setItemGeneratorScriptLanguage(self, language) Set the script language used to generate menu items to a hou.scriptLanguage enum value. See the itemGeneratorScriptLanguage method for more information. """ pass def minValue(): """ minValue(self) -> int Return the minimum value of the parameter. See also the minIsStrict method. """ pass def menuLabels(): """ menuLabels(self) -> tuple of str Return the tuple of menu labels displayed in the UI. """ pass def setMinIsStrict(on): """ setMinIsStrict(self, on) Set whether the minimum value is strictly enforced. See the minIsStrict method for more information. """ pass def defaultValue(): """ defaultValue(self) -> tuple of int Return the default value for new parameter instances. For example, suppose this parm template is named "divisions", the naming scheme is XYZW, it has 3 components, and the default value is (10, 20, 30). The corresponding parm tuple instance on a node would be named "divisions" and would contain parameters "divisionsx", "divisionsy", and "divisionsz". When the node is created, "divisionsx" would be 10, "divisionsy" would be 20, and "divisionsz" would be 30. """ pass def setItemGeneratorScript(item_generator_script): """ setItemGeneratorScript(self, item_generator_script) Set the script used to generate menu items. See the itemGeneratorScript method for more information. """ pass def setMinValue(min_value): """ setMinValue(self, min_value) Set the minimum value of the parameter. See the minValue method for more information. """ pass def defaultExpressionLanguage(): """ defaultExpressionLanguage(self) -> tuple of hou.scriptLanguage Return the default expression language for new parameter instances. The default expression language only applies if the default expression is set. If the default expression of a component is not set, then the expression language is set to hou.scriptLanguage.Hscript. """ pass def setMenuItems(menu_items): """ setMenuItems(self, menu_items) Set the internal menu names to the given sequence of strings. See the menuItems method for more information. If the new number of menu items is less than the old number, the menu labels will be shortened and the default value will be modified if it is out of range. """ pass def iconNames(): """ iconNames(self) -> tuple of str Return the tuple of icons corresponding to the menu items. If there are no icons, returns a tuple of empty strings. These icons are used when this parm template uses a menu. """ pass def setMenuLabels(): """None""" pass def minIsStrict(): """ minIsStrict(self) -> bool Returns whether the minimum value is strictly enforced. If a minimum value is not strictly enforced, the slider will not let you change the value below the minimum, but you can set the value to be lower than the minimum by typing it in, changing it via hou.Parm.setValue, or using the ladder handle. If it is strictly enforced and you try to change it below the minimum value using any mechanism, Houdini will set it to the minimum value. See also the minValue method. """ pass def setMenuUseToken(on): """ setMenuUseToken(self, on) Set whether the parameter is set to the token value instead of the index. See also the menuUseToken method. """ pass def setDefaultValue(tuple_of_default_values): """ setDefaultValue(self, tuple_of_default_values) Set the default value for new parameter instances to a sequence of ints. See the defaultValue method for more information. Note that if the number of ints in the sequence is different from the number of components in the parm template, any extra values will be discarded and any missing values will become zeros. """ pass def maxValue(): """ maxValue(self) -> int Return the minimum value of the parameter. See also the minIsStrict method. """ pass def itemGeneratorScript(): """ itemGeneratorScriptLanguage(self) -> hou.scriptLanguage enum value Return the script used to generate menu items, or an empty string if there is no such script. """ pass def setIconNames(icon_names): """ setIconNames(self, icon_names) Set the icon names to the given sequence of strings. """ pass def setMenuType(menu_type): """ setMenuType(self, menu_type) Set the type of menu to a hou.menuType enum value. See the menuType method for more information. """ pass def setMaxIsStrict(on): """ setMaxIsStrict(self, on) Set whether the maximum value is strictly enforced. See the maxIsStrict method for more information. """ pass def defaultExpression(): """ defaultExpression(self) -> tuple of strings Return the default expression for new parameter instances. The default expression takes precedence over the default value. If a component has no default expression (i.e. an empty string), then the default value is used for new parameter instances. Note that the default expression language is needed to interpret the meaning of the default expression. For example, suppose this parm template is named "divisions", the naming scheme is XYZW, it has 3 components, the default value is (10, 20, 30), the default expression is ("$F", "hou.frame()", "") and the default expression language is (hou.scriptLanguage.Hscript, hou.scriptLanguage.Python, hou.scriptLanguage.Hscript). Then the corresponding parm tuple instance on a node would be named "divisions" and would contain parameters "divisionsx", "divisionsy", "divisionsz". When the node is created, "divisionsx" would have a default Hscript expression of "$F", "divisionsy" would have a default Python expression of "hou.frame()", and "divisionsz" would have a default value of 30. """ pass def menuUseToken(): """ menuUseToken(self) -> bool Return whether the parameter is set to the token value instead of the index. See also the setMenuUseToken method. """ pass def itemGeneratorScriptLanguage(): """None""" pass def setMaxValue(max_value): """ setMaxValue(self, max_value) Set the maximum value of the parameter. See the maxValue method for more information. """ pass def menuType(): """ menuType(self) -> hou.menuType enum value Return the type of menu. See hou.menuType for more information. """ pass def maxIsStrict(): """ maxIsStrict(self) -> bool Return whether the maximum value is strictly enforced. See the minIsStrict method for more information. """ pass def IntParmTemplate_swigregister(): """None""" pass class InterruptableOperation(object): """ hou.InterruptableOperation Use this class to turn any Python code block into an interruptable operation. """ def updateProgress(percentage=-1.0): """ updateProgress(self, percentage=-1.0) Update the progress percentage of the operation. At the same time, check if the operation was interrupted by the user. percentage A fractional number between 0.0 and 1.0. A value of 0.0 means that no progress has been made while 1.0 means that the operation is complete. A negative percentage indicates that the progress percentage is not available. Raises hou.OperationInterrupted if the user has chosen to interrupt the operation. Raises hou.OperationFailed if the interruptable operation object was constructed outside of a with statement. """ pass def updateLongProgress(percentage=-1.0, long_op_status=None): """ updateLongProgress(self, percentage=-1.0, long_op_status=None) Update the progress percentage and status of the long, or high- level, operation. At the same time, check if the operation was interrupted by the user. percentage A fractional number between 0.0 and 1.0. A value of 0.0 means that no progress has been made while 1.0 means that the operation is complete. A negative percentage indicates that the progress percentage is not available. long_op_status Text describing the current status of the long operation. The status will overwrite the text in the 2nd progress bar of the interrupt dialog. To keep the previous text in the progress bar, set this parameter to None. Raises hou.OperationInterrupted if the user has chosen to interrupt the operation. Raises hou.OperationFailed if the interruptable operation object was constructed outside of a with statement. """ pass def InterruptableOperation_swigregister(): """None""" pass class InvalidInput(Error): """ hou.InvalidInput Exception that is raised when you try to set a node's input to something invalid. """ def description(): """ description(self) -> str Return a description of the class of exception. The description is not related to the exception instance. """ pass def exceptionTypeName(): """ exceptionTypeName(self) -> str Return the name of the exception type. Instances of different subclasses of hou.Error will return different names. Instances of the base class will return "Error". You can also use str(e.__class__) to get the name of the subclass. """ pass def InvalidInput_swigregister(): """None""" pass class OperationFailed(Error): """ hou.OperationFailed """ def description(): """ description(self) -> str Return a description of the class of exception. The description is not related to the exception instance. """ pass def exceptionTypeName(): """ exceptionTypeName(self) -> str Return the name of the exception type. Instances of different subclasses of hou.Error will return different names. Instances of the base class will return "Error". You can also use str(e.__class__) to get the name of the subclass. """ pass class InvalidNodeType(Error): """ hou.InvalidNodeType Exception that is raised when you try to call a method on a Node that isn't supported by that type of node. For example, if you ask a non-subnet node for its indirect inputs, hou.Node.indirectInputs raises an instance of this exception. """ def description(): """ description(self) -> str Return a description of the class of exception. The description is not related to the exception instance. """ pass def exceptionTypeName(): """ exceptionTypeName(self) -> str Return the name of the exception type. Instances of different subclasses of hou.Error will return different names. Instances of the base class will return "Error". You can also use str(e.__class__) to get the name of the subclass. """ pass def InvalidNodeType_swigregister(): """None""" pass class InvalidSize(Error): """ hou.InvalidSize Exception that is raised when you pass a sequence of the wrong length to a function. """ def description(): """ description(self) -> str Return a description of the class of exception. The description is not related to the exception instance. """ pass def exceptionTypeName(): """ exceptionTypeName(self) -> str Return the name of the exception type. Instances of different subclasses of hou.Error will return different names. Instances of the base class will return "Error". You can also use str(e.__class__) to get the name of the subclass. """ pass def InvalidSize_swigregister(): """None""" pass class Keyframe(BaseKeyframe): """ hou.Keyframe Class representing the default keyframe type, a numerical keyframe. REPLACES * chkey * chkeyls """ def slope(): """ slope(self) -> double Returns the slope leaving the keyframe. This method raises hou.KeyframeValueNotSet if the slope has not been set. """ pass def useValue(): """None""" pass def interpretAccelAsRatio(on): """ interpretAccelAsRatio(self, on) Sets whether Houdini should interpret the acceleration values entering and leaving the keyframe as a single ratio. When set to True, the ratio of the in-acceleration to out-acceleration is always maintained. If, for example, the in-acceleration is made to be twice as large using the Animation Editor, then the out-acceleration will automatically be adjusted to be twice as large as well. This is the default behavior for Houdini keyframes. """ pass def setInAccel(in_accel): """ setInAccel(self, in_accel) Sets the acceleration entering the keyframe. Sets the acceleration leaving the keyframe, if not already set. Unties the acceleration. """ pass def evaluatedType(): """ evaluatedType(self) -> hou.parmData enum value Return the data type of the keyframe's evaluated value. For keyframes storing numerical values this method returns hou.parmData.Float. """ pass def setInSlopeAuto(on): """ setInSlopeAuto(self, on) Sets the slope entering the keyframe to automatic. """ pass def isValueUsed(): """None""" pass def isAccelUsed(): """None""" pass def setAccel(accel): """ setAccel(self, accel) Sets the acceleration leaving the keyframe. """ pass def isValueTied(): """ isValueTied(self) -> bool Returns True if the value entering the keyframe has not been set. """ pass def isValueSet(): """ isValueSet(self) -> bool Returns True if the value entering or leaving the keyframe has been set. """ pass def isAccelTied(): """ isAccelTied(self) -> bool Returns True if the acceleration entering the keyframe has not been set. """ pass def asJSON(self, brief=False, save_keys_in_frames=False): """ asJSON(self, brief=False, save_keys_in_frames=False) -> dict Returns a JSON dictionary that represents the keyframe. The dictionary includes the frame time, value/expression, and the slope and acceleration parameters. If the brief parameter is set to True a smaller set of key/value pairs are included in the dictionary to reduce space usage. If the save_keys_in_frames parameter is True the dictionary uses a frame number instead of a time value. See also the fromJSON method. """ pass def isAccelSet(): """ isAccelSet(self) -> bool Returns True if the acceleration entering or leaving the keyframe has been set. """ pass def inSlope(): """ inSlope(self) -> double Returns the slope entering the keyframe. This method raises hou.KeyframeValueNotSet if the slope has not been set or the slope is tied. """ pass def isSlopeUsed(): """None""" pass def setValue(value): """ setValue(self, value) Sets the value leaving the keyframe. """ pass def isAccelInterpretedAsRatio(): """ isAccelInterpretedAsRatio(self) -> bool Returns True if the acceleration values entering and leaving the keyframe are interpreted as a ratio by Houdini. """ pass def isSlopeSet(): """ isSlopeSet(self) -> bool Returns True if the slope entering or leaving the keyframe has been set. """ pass def unsetInAccel(): """ unsetInAccel(self) Unsets the acceleration entering the keyframe and tie the acceleration. """ pass def useAccel(): """None""" pass def accel(): """ accel(self) -> double Returns the acceleration leaving the keyframe. This function raises hou.KeyframeValueNotSet if the acceleration has not been set. """ pass def useSlope(): """None""" pass def setInSlope(in_slope): """ setInSlope(self, in_slope) Sets the slope entering the keyframe. Sets the slope leaving the keyframe, if not already set. Unties the slope. """ pass def isInSlopeAuto(): """ isInSlopeAuto(self) -> bool Returns True if the slope entering the keyframe is set to automatic. """ pass def isSlopeAuto(): """ isSlopeAuto(self) -> bool Returns True if the slope leaving the keyframe is set to automatic. """ pass def inValue(): """ inValue(self) -> double Returns the value entering the keyframe. This method raises hou.KeyframeValueNotSet if the value has not been set or the value is tied. """ pass def fromJSON(self, keyframe_dict): """ fromJSON(self, keyframe_dict) Sets the keyframe time, value and parameters using the key/value pairs from a JSON dictionary. See also the asJSON method. """ pass def isSlopeTied(): """ isSlopeTied(self) -> bool Returns True if the slope entering the keyframe has not been set. """ pass def unsetInSlope(): """ unsetInSlope(self) Unsets the slope entering the keyframe and tie the slope. """ pass def setSlope(slope): """ setSlope(self, slope) Sets the slope leaving the keyframe. """ pass def value(): """ value(self) -> double Returns the value leaving the keyframe. This method raises hou.KeyframeValueNotSet if the value has not been set. """ pass def unsetInValue(): """ unsetInValue(self) Unsets the value entering the keyframe and tie the values. """ pass def setInValue(in_value): """ setInValue(self, in_value) Sets the value entering the keyframe. Sets the value leaving the keyframe, if not already set. Unties the value. """ pass def setSlopeAuto(on): """ setSlopeAuto(self, on) Sets the slope leaving the keyframe to automatic. """ pass def inAccel(): """ inAccel(self) -> double Returns the acceleration entering the keyframe. This method raises hou.KeyframeValueNotSet if the acceleration has not been set or it is tied. """ pass class KeyframeValueNotSet(Error): """ hou.KeyframeValueNotSet """ def description(): """ description(self) -> str Return a description of the class of exception. The description is not related to the exception instance. """ pass def exceptionTypeName(): """ exceptionTypeName(self) -> str Return the name of the exception type. Instances of different subclasses of hou.Error will return different names. Instances of the base class will return "Error". You can also use str(e.__class__) to get the name of the subclass. """ pass def KeyframeValueNotSet_swigregister(): """None""" pass def Keyframe_swigregister(): """None""" pass class LabelParmTemplate(ParmTemplate): """ hou.LabelParmTemplate Describes a label parameter. Unlike most other parameters, labels do not store parameter values. """ def setColumnLabels(column_labels): """ setColumnLabels(column_labels) Set the column labels to a sequence of strings. The parameter editor in the always has at least one column label, so if you supply an empty sequence there will be one column label that is an empty string. See the columnLabels method for more information. """ pass def columnLabels(): """ columnLabels() -> tuple of str Return the tuple of strings of column labels. Normally, label parm templates do not have any column labels. However, they may have these extra labels that are displayed in addition to the main label. Note that the number of components in a label parm template corresponds to the number of column labels. """ pass def LabelParmTemplate_swigregister(): """None""" pass class LoadWarning(Error): """ hou.LoadWarning Exception class for when loading a hip file in Houdini generates warnings. """ def description(): """ description(self) -> str Return a description of the class of exception. The description is not related to the exception instance. """ pass def exceptionTypeName(): """ exceptionTypeName(self) -> str Return the name of the exception type. Instances of different subclasses of hou.Error will return different names. Instances of the base class will return "Error". You can also use str(e.__class__) to get the name of the subclass. """ pass def LoadWarning_swigregister(): """None""" pass class LopNetwork(Node): """ hou.LopNetwork Represents a lighting node. """ def selection(): """ selection(self) -> tuple of str Return a tuple of strings representing all the scene graph locations currently selected in the LOP Network parent of this LOP node. This is the same selection that will be showing in the Scene Graph Tree pane and the LOP viewport. """ pass def setSelectionRule(name, rule): """ setSelectionRule(self, name, rule) Stores a named selection rule on the LOP Network that owns this LOP node. The rule parameter must be a hou.LopSelectionRule or None. Use None to remove a single named rule from the LOP Network. The selection rule name can be a slash-separated path, in which case the selection rule will appear in the Scene Graph Tree pane as part of a nested hierarchy. This in no way affects the operation of the rule, serving only as a way of organizing sets of rules. """ pass def selectionCurrentPrim(): """ selectionCurrentPrim(self) -> str Return a string with the path to the scene graph primitive that should be displayed in the Scene Graph Details pane. Set this value with the hou.LopNetwork.setSelection method. """ pass def namedViewportOverrides(): """ namedViewportOverrides(self) -> tuple of str Returns a list of the named session overrides saved on the LOP Network. The names returned from this method can be passed to the loadNamedViewportOverrides method to load a particular set of overrides saved with the saveNamedViewportOverrides method. """ pass def viewportLoadMasks(): """ viewportLoadMasks(self) -> hou.LopViewportLoadMasks Returns the load masking configuration for the viewport currently set on the LOP Network. This controls payload loading, stage population masking, and layer muting on any viewport pointed at this LOP Network. """ pass def selectionRules(): """ selectionRules(self) -> dict of str to hou.LopSelectionRule Return a dictionary mapping string names to hou.LopSelectionRule objects that match the selection rules stored on the LOP Network that owns this LOP node. """ pass def viewportOverrides(lop, output_index, =, 0, layer_index, =, 0): """ viewportOverrides(self, lop, output_index = 0, layer_index = 0) -> hou.LopViewportOverrides Return a hou.LopViewportOverrides object that allows editing of the current session-only modifications which should be applied to any scene being viewed in a Scene Graph Tree pane or a Scene Viewer pane. The lop must be a hou.LopNode object. The cooked stage from this LOP Node is used to perform the requested edit operations in the returned hou.LopViewportOverrides object. The output_index controls which output of this LOP node will be used to author the stage presented through the hou.LopViewportOverrides.stage method. The layer_index parameter controls which specific session sublayer is to be modified. """ pass def setDebugFlag(on): """ setDebugFlag(self, on) Turns the node's debug flag on or off. The debug flag on a LOP node is used to force the node to create its own USD Layer and apply its edits in that new layer. This makes it easier to track which scene graph modifications were made by which LOP node. Setting this flag will also affect the performance of the LOP Network since composition of the USD stage takes longer if there are more layers. Raises hou.PermissionError if the node is unwritable. """ pass def namedViewportLoadMasks(): """ namedViewportLoadMasks(self) -> tuple of str Returns a list of the named load masking configurations saved on the LOP Network. The names returned from this method can be passed to the loadNamedViewportLoadMasks method to load a particular load masking configuration saved with the saveNamedViewportLoadMasks method. """ pass def setSelection(selection, layerid, =, None, currentprim, =, None): """ setSelection(self, selection, layerid = None, currentprim = None) Accepts a tuple of strings holding the scene graph locations which should become the selection in the LOP Network parent of this LOP node. This selection will be reflected in the Scene Graph Tree pane and the LOP viewport. The optional layerid parameter can be a string which is the layer identifier of a specific layer that should be displayed in the Scene Graph Details pane. Similarly the currentprim string can be supplied to have the Scene Graph Details pane show the information for a primitive at a specific path. The currentprim is usually in the selection list, but it doesn't need to be. Passing None for layerid or currentprim leave these values on the LOP Network unchanged. """ pass def selectionLayerId(): """ selectionLayerId(self) -> str Return a string with the layer identifier of the specific USD layer that should be displayed in the Scene Graph Details pane. Set this value with the hou.LopNetwork.setSelection method. """ pass def clearSelectionRules(): """ clearSelectionRules(self) Deletes all selection rules stored on the LOP Network that owns this LOP node. """ pass def saveNamedViewportLoadMasks(name): """ saveNamedViewportLoadMasks(self, name) Saves the supplied load masking configuration to the LOP Network under the specified name. This configuration will be saved to the hip file, and can be restored with the loadNamedViewportLoadMasks method. """ pass def saveNamedViewportOverrides(name): """ saveNamedViewportOverrides(self, name) Saves the current set of session overrides to the LOP Network under the specified name. This set of overrides will be saved to the hip file, and can be restored with the loadNamedViewportOverrides method. """ pass def isDebugFlagSet(): """ isDebugFlagSet(self) -> bool Returns True if the node's debug flag is turned on. Returns False otherwise. """ pass def setViewportLoadMasks(payload_config): """ setViewportLoadMasks(self, payload_config) Sets a new load masking configuration on the LOP Network. """ pass def loadNamedViewportOverrides(name): """ loadNamedViewportOverrides(self, name) Loads the session overrides saved under the specified name on the LOP Network. This set of overrides will be applied to any viewport pointed at this LOP Network. These named session override sets can be created with the saveNamedViewportOverrides method. """ pass def loadNamedViewportLoadMasks(name): """ loadNamedViewportLoadMasks(self, name) -> hou.LopViewportLoadMasks Returns the load masking configuration saved under the specified name on the LOP Network. Raises a hou.OperationFailed exception if there is no load masking configuration stored under the specified name. """ pass def displayNode(): """ displayNode(self) -> Node Return the LOP node inside this network with its display flag on. Otherwise, return None. """ pass def LopNetwork_swigregister(): """None""" pass class LopNode(Node): """ hou.LopNode Represents a lighting node. """ def lastModifiedPrims(): """ lastModifiedPrims(self) -> tuple of str Returns the paths of the USD primitives modified by this node. """ pass def activeLayer(): """ activeLayer(self) -> pxr.Sdf.Layer Returns a pxr.Sdf.Layer object representing the USD layer that has been modified by this node. """ pass def loadMasks(): """ loadMasks(self) -> hou.LopViewportLoadMasks Returns the load masking configuration cooked into the stage at this LOP node. This object controls stage population masking and layer muting. These masks can be set using the Load Masks LOP. These load masks will affect the primitives available on the stage when cooking this node or nodes below it. """ pass def sourceLayerCount(): """ sourceLayerCount(self) -> int Returns the number of source layers that are used to build the stage at the output of this node. The result from this method will be one greater than the maximum value that can be passed to the sourceLayer method. """ pass def setDisplayFlag(on): """ setDisplayFlag(self, on) Turn this node's display flag on or off. """ pass def editableStage(): """ editableStage(self) -> pxr.Usd.Stage Returns a pxr.Usd.Stage object with permission to edit that represents the USD stage input to a Python LOP. """ pass def isBypassed(): """ isBypassed(self) -> bool Returns whether this node's bypass flag is on. """ pass def setDebugFlag(on): """ setDebugFlag(self, on) Turns the node's debug flag on or off. The debug flag on a LOP node is used to force the node to create its own USD Layer and apply its edits in that new layer. This makes it easier to track which scene graph modifications were made by which LOP node. Setting this flag will also affect the performance of the LOP Network since composition of the USD stage takes longer if there are more layers. Raises hou.PermissionError if the node is unwritable. """ pass def setLastModifiedPrims(primpaths): """ setLastModifiedPrims(self, primpaths) When used in a Python based LOP node, this method sets the value that will be returned by subsequent calls to lastModifiedPrims. The primpaths parameter must be a tuple or list of strings. """ pass def inputPrims(inputidx): """ inputPrims(self, inputidx) -> tuple of str Returns the paths of the USD primitives modified by the specified input of this node. This method is roughly equivalent to: > lopnode.inputs()[inputidx].lastModifiedPrims() """ pass def isDisplayFlagSet(): """ isDisplayFlagSet(self) -> bool Returns whether this node's display flag is on. """ pass def network(): """ network(self) -> hou.LopNetwork Return the LOP Network that contains this LOP Node. """ pass def isDebugFlagSet(): """ isDebugFlagSet(self) -> bool Returns True if the node's debug flag is turned on. Returns False otherwise. """ pass def displayNode(): """ displayNode(self) -> Node If this is a subnet LOP, return the LOP node inside the subnet with its display flag on. Otherwise, return None. """ pass def bypass(on): """ bypass(self, on) Turns this node's bypass flag on or off, making this node have no effect. """ pass def sourceLayer(layerindex): """ sourceLayer(self, layerindex) -> pxr.Sdf.Layer Return a pxr.Sdf.Layer object representing the specific requested USD layer that is used to build the stage that is the output of this node. """ pass def stage(apply_network_overrides=True): """ stage(self, apply_network_overrides=True) -> pxr.Usd.Stage Returns a pxr.Usd.Stage object representing the USD stage output from this node. Set apply_network_overrides to True to return a stage with its session layer set with any temporary activation or visibility settings configured in the scene graph tree. Set it to False to return the stage with an empty session layer. """ pass def editableLayer(): """ editableLayer(self) -> pxr.Sdf.Layer Returns a pxr.Sdf.Layer object with permission to edit that represents the active layer in a Python LOP. """ pass def LopNode_swigregister(): """None""" pass class LopSelectionRule(object): """ hou.LopSelectionRule Stores a set of rules that define how to make a selection of scene graph primitives. """ def collectionAwarePaths(lopnode): """ collectionAwarePaths(self, lopnode) -> tuple of str Calculates the scene graph primitive selection using the scene graph from the provided Hom:hou.LopNode object. Returns the full paths to every scene graph primitive or collection matching the selection pattern. Unlike the expandedPaths method, collections are not expanded to explicitly list their contents as primitives. Instead the full path of the collection itself is returned. If the primitive pattern contains any exclusions the included collections cannot be accurately tracked, so the results of this method will be the same as for expandedPaths. """ pass def setPathPattern(pattern): """ setPathPattern(self, pattern) Sets the path pattern string used in this selection rule. """ pass def pathPattern(): """ pathPattern(self) -> str Return the path pattern string used in this selection rule. """ pass def expandedPaths(lopnode): """ expandedPaths(self, lopnode) -> tuple of str Calculates the scene graph primitive selection using the scene graph from the provided Hom:hou.LopNode object. Returns the full paths to every scene graph primitive matching the selection rules. All collections in the path pattern are expanded to list their included prims explicitly. """ pass def LopSelectionRule_swigregister(): """None""" pass class LopViewportLoadMasks(object): """ hou.LopViewportLoadMasks Stores a description of which payloads on the USD stage should be loaded into the viewport. """ def populatePaths(): """ populatePaths(self) -> tuple of str Return the list of all paths which should be populated on the stage. Descendants of explicitly named primitives will also populate on the stage. """ pass def loadPaths(): """ loadPaths(self) -> tuple of str Return a list of all scene graph branches which will load their payloads in the viewport. Descendants of explicitly named primitives will also load their payloads. """ pass def addPopulatePath(path): """ addPopulatePath(self, path) Adds a single path to the list of paths to populate. If the path is already in the list of paths, this method does nothing. """ pass def removeMuteLayer(identifier): """ removeMuteLayer(self, identifier) Removes a single layer identifier from the list of muted layer identifiers. If the identifier is not being muted, this method does nothing. """ pass def removePopulatePath(path): """ removePopulatePath(self, path) Removes a single path from the list of paths to populate . If the path is not in the list of paths, this method does nothing. """ pass def isPathPopulated(): """None""" pass def setMuteLayers(identifiers): """ setMuteLayers(self, identifiers) Set the list of layer identifiers that should be muted. """ pass def loadAll(): """None""" pass def addMuteLayer(identifier): """ addMuteLayer(self, identifier) Adds a single layer identifier to the list of muted layer identifiers. If the identifier is already being muted, this method does nothing. """ pass def addLoadPath(path): """ addLoadPath(self, path) Adds a single path to the list of scene graph paths which will load their payloads inthe viewport. If the path is already in the list, this method does nothing. """ pass def setPopulateAll(): """ setPopulateAll(self) Configures the stage mask to include the entire scene graph. This clears the current list of paths to populate because it is not needed. Calling any method which manipulates the list of paths to populate will set this flag back to False. """ pass def populateAll(): """ populateAll(self) -> bool Returns True if the stage mask is configured to include the entire scene graph. If True, the explicit list of paths has no meaning. """ pass def setLoadPaths(paths): """ setLoadPaths(self, paths) Set the list of scene graph paths which should load their payloads in the viewport. """ pass def setLoadAll(): """ setLoadAll(self) Set the flag indicating that all payloads should be loaded by default. Calling any method which manipulates the list of paths to be loaded will set this flag back to False. """ pass def setPopulatePaths(paths): """ setPopulatePaths(self, paths) Set the list of paths which should be populated on the stage. """ pass def muteLayers(): """ muteLayers(self) -> tuple of str Return the list of all muted layer identifiers. """ pass def isPathLoaded(path, exact_match, =, True): """ isPathLoaded(self, path, exact_match = True) -> bool Return True if the specified scene graph path is explicitly named in the list of paths to load. If exact_match is False, this method also returns true if any ancestor of the supplied path is in the set of paths to load. """ pass def removeLoadPath(path): """ removeLoadPath(self, path) Removes a single path from the list of scene graph paths which will load their payloads in the viewport. If the path is not in the list, this method does nothing. """ pass def isLayerMuted(identifier): """ isLayerMuted(self, identifier) -> bool Return True if the specified layer identifier should be ignored when composing the stage. """ pass def LopViewportLoadMasks_swigregister(): """None""" pass class LopViewportOverrides(object): """ hou.LopViewportOverrides Used to edit the current session overlay layer that is applied to the current LOP node's scene graph. This object is a context manager. You can create one using hou.LopNetwork.viewportOverrides. At the end of the with block, the notification of the session edits is propagated to viewer panes. """ def layer(): """ layer(self) -> pxr.Sdf.Layer Return the pxr.Sdf.Layer object that contains all the current session edits to the scene graph. This object can be modified using the pxr.Sdf.Layer API to make further session modifications to the scene graph. """ pass def setActive(prims, active): """ setActive(self, prims, active) Change the active state of USD primitives by editing the session layer of a LOP Network. Deactivated primitives do not appear in the viewport, and cannot be expanded in the scene graph tree. The LOP Network to edit is determined by looking at the LOP node used to create this session editor object. prims A hou.LopSelectionRule object that specifies which USD primitives should be affected. active A boolean value indicating the new activation state of the USD primitives. """ pass def setDrawMode(prims, drawmode): """ setDrawMode(self, prims, drawmode) Change the draw mode of USD primitives by editing the session layer of a LOP Network. The draw mode of a primitive is only respected if the primitive is part of a valid, contiguous USD model hierarchy. The LOP Network to edit is determined by looking at the LOP node used to create this session editor object. prims A hou.LopSelectionRule object that specifies which USD primitives should be affected. drawmode A string value indicating the new draw mode for the USD primitives. Only primitives that are part of a valid USD model hierarchy can have their draw mode changed. The allowed values for this string are default (draw the full geometry), origin (draw a set of axes at the origin of the primitive), bounds (draw a bounding box around the primitive), and cards (draw three axis-aligned cards that fill the primitive's bounding box). """ pass def setVisible(prims, visible): """ setVisible(self, prims, visible) Change the visibility of USD primitives by editing the session layer of a LOP Network. Invisible primitives are not drawn in the viewport, but still appear in the scene graph tree. The LOP Network to edit is determined by looking at the LOP node used to create this session editor object. prims A hou.LopSelectionRule object that specifies which USD primitives should be affected. visible A boolean value indicating whether the USD primitives should be visible. """ pass def stage(): """ stage(self) -> pxr.Sdf.Stage Return the pxr.Usd.Stage object that contains all the current session edits to the scene graph. This object can be modified using the pxr.Usd.Stage API to make further session modifications to the scene graph. """ pass def LopViewportOverrides_swigregister(): """None""" pass class MatchDefinitionError(Error): """ hou.MatchDefinitionError """ def description(): """ description(self) -> str Return a description of the class of exception. The description is not related to the exception instance. """ pass def exceptionTypeName(): """ exceptionTypeName(self) -> str Return the name of the exception type. Instances of different subclasses of hou.Error will return different names. Instances of the base class will return "Error". You can also use str(e.__class__) to get the name of the subclass. """ pass def MatchDefinitionError_swigregister(): """None""" pass class Matrix2(object): """ hou.Matrix2 A 2x2 matrix of floating point values. """ def setToIdentity(): """ setToIdentity(self) Set this matrix to the multiplicative identity, having 1's in the diagonal. The matrix will contain the values [[1, 0], [0, 1]]. Note that you can construct a new matrix with these values using hou.Matrix2(1). """ pass def asTupleOfTuples(): """ asTupleOfTuples(self) -> tuple of tuple of float Return the contents of the matrix as a tuple of tuples of 2 floats. """ pass def determinant(): """ determinant(self) -> double Return the determinant of the matrix. See Wikipedia's determinant page. """ pass def inverted(): """ inverted(self) -> hou.Matrix2 Return the inverse of this matrix. Raises hou.OperationFailed if the matrix is not invertible. Otherwise, (self * self.inverted()).isAlmostEqual(hou.Matrix2(1)) is True. See Wikipedia's invertible matrix page for more information. """ pass def at(row, col): """ at(self, row, col) -> double Return the value of the matrix at the given row and column. Raises IndexError if the row or column are not between 0 and 1, inclusive. Note that negative indices will not index from the end. """ pass def setTo(tuple): """ setTo(self, tuple) Set this matrix's contents. The sequence may contain either 4 floats or 2 sequences, each with 2 floats. See hou.Matrix2.__init__ for examples of suitable parameter values. """ pass def isAlmostEqual(matrix2, tolerance=0.00001): """ isAlmostEqual(self, matrix2, tolerance=0.00001) -> bool Returns whether this matrix is equal to another, within a tolerance. """ pass def transposed(): """ transposed(self) -> hou.Matrix2 Return the transpose of this matrix. The result is such that self.at(i, j) == self.transposed().at(j, i) for 0 <= i,j <= 1. See Wikipedia's transpose page for more information. """ pass def setToZero(): """ setToZero(self) Set this matrix to contain all zeros. Note that you can construct a new matrix with all zeros with hou.Matrix2(). """ pass def preMult(matrix2): """ preMult(self, matrix2) -> hou.Matrix2 Returns matrix2 * self. Note that __mul__ returns self * matrix2, which is a different result because matrix multiplication is not commutative. """ pass def _asVoidPointer(): """None""" pass def setAt(row, col, value): """ setAt(self, row, col, value) Set the value of the matrix at the given row and column. Raises IndexError if the row or column are not between 0 and 1, inclusive. Note that negative indices will not index from the end. """ pass def asTuple(): """ asTuple(self) -> tuple of float Return the contents of the matrix as a tuple of 4 floats. """ pass def Matrix2_swigregister(): """None""" pass class Matrix3(object): """ hou.Matrix3 A 3x3 matrix of floating point values. 3x3 matrices are typically used in Houdini to represent a 3D rotation (with a possible scale). Most places in Houdini use hou.Matrix4, which can store generation 3D transformations (including translations). Note that you can construct a general transformation Matrix4 from a Matrix3 by writing hou.Matrix4(matrix3). """ def setToIdentity(): """ setToIdentity(self) Set this matrix to the multiplicative identity, having 1's in the diagonal. The matrix will contain the values [[1, 0, 0], [0, 1, 0], [0, 0, 1]]. Note that you can construct a new matrix with these values using hou.Matrix3(1). """ pass def asTupleOfTuples(): """ asTupleOfTuples(self) -> tuple of tuple of float Return the contents of the matrix as a tuple of tuples of 3 floats. """ pass def determinant(): """ determinant(self) -> double Return the determinant of the matrix. See Wikipedia's determinant page. """ pass def inverted(): """ inverted(self) -> hou.Matrix3 Return the inverse of this matrix. Raises hou.OperationFailed if the matrix is not invertible. Otherwise, (self * self.inverted()).isAlmostEqual(hou.Matrix3(1)) is True. See Wikipedia's invertible matrix page for more information. """ pass def at(row, col): """ at(self, row, col) -> double Return the value of the matrix at the given row and column. Raises IndexError if the row or column are not between 0 and 2, inclusive. Note that negative indices will not index from the end. """ pass def setTo(tuple): """ setTo(self, tuple) Set this matrix's contents. The sequence may contain either 9 floats or 3 sequences, each with 3 floats. See hou.Matrix3.__init__ for examples of suitable parameter values. """ pass def extractRotates(rotate_order="xyz"): """ extractRotates(self, rotate_order="xyz") -> hou.Vector3 Return a Vector3 of Euler angles, in degrees, representing the rotation component of this matrix. Rotating about the coordinate axes in the specified order by these amounts will yield the rotation contained in this matrix. rotate_order A string containing a permutation of the letters x, y, and z that determines the order in which rotations are performed about the coordinate axes. Raises hou.OperationFailed if the matrix does not represent a valid rotation matrix (e.g. it is singular) or the rotate order is not a permutation of the string 'xyz'. See also hou.Matrix4.explode and hou.Matrix4.extractRotates. """ pass def transposed(): """ transposed(self) -> hou.Matrix3 Return the transpose of this matrix. The result is such that self.at(i, j) == self.transposed().at(j, i) for 0 <= i,j <= 2. See Wikipedia's transpose page for more information. """ pass def setToZero(): """ setToZero(self) Set this matrix to contain all zeros. Note that you can construct a new matrix with all zeros with hou.Matrix3(). """ pass def preMult(matrix3): """ preMult(self, matrix3) -> hou.Matrix3 Returns matrix3 * self. Note that __mul__ returns self * matrix3, which is a different result because matrix multiplication is not commutative. """ pass def _asVoidPointer(): """None""" pass def setAt(row, col, value): """ setAt(self, row, col, value) Set the value of the matrix at the given row and column. Raises IndexError if the row or column are not between 0 and 2, inclusive. Note that negative indices will not index from the end. """ pass def asTuple(): """ asTuple(self) -> tuple of float Return the contents of the matrix as a tuple of 9 floats. """ pass def isAlmostEqual(matrix3, tolerance=0.00001): """ isAlmostEqual(self, matrix3, tolerance=0.00001) -> bool Returns whether this matrix is equal to another, within a tolerance. """ pass def Matrix3_swigregister(): """None""" pass class Matrix4(object): """ hou.Matrix4 A 4x4 matrix of floating point values. 4x4 matrices are typically used in Houdini to represent a 3D transformation (e.g. some combination of rotation, scaling, shearing, and translation). A single matrix compactly represents a transformation, and is much easier to deal with than multiple translate, rotate, scale, shear, transformation order, and rotation order values. Note that Houdini's matrices are stored in row-major format, and vectors that are multiplied with matrices are treated as row vectors. So, if p is a hou.Vector4 representing a point and M is a Matrix4, you write p*M, *not* M*p. Similarly, p*M1*M2 will first transform p by M1, and then transform it by M2. NOTE Most mathematical notations treat vectors and points as column vectors instead of row vectors. They will often use A*B*C (or simply ABC) to refer to a combined transform that first applies C's transform, then B's, and then applies A's. However, the convention is different in Houdini. To represent the equivalent matrix expression in Houdini, you need to concatenate the transforms in the reverse order. So, you would instead write C'*B'*A', where C', B', A' are the transpose of C, B, A respectively. You can multiply Vector3s or Vector4s by Matrix4s. If you multiply a Vector3, it is the same as multiplying a Vector4 where the fourth component is 1 (see hou.Vector3.__mul__). To transform a normal (as opposed to a point or vector), you need to multiply by the inverse transpose of the matrix. For example, suppose: p is a hou.Vector3 object representing a position (or a hou.Vector4 with v[4]==1) v is a hou.Vector4 object representing a vector (a direction with a length but no fixed location in space), with v[3]==0 n is a hou.Vector4 object representing a normal, with v[3]==0 m is a Matrix4 object representing a transform matrix Then you would write: > p * m # to transform the point > v * m # to transform the vector > n * m.inverted().transposed() # to transform the normal > # (note that m.inverted().transposed() is mathematically equivalent to m.transposed().inverted()) Here is a concrete example: > >>> m = hou.hmath.buildTranslate((1, 1, 2)) > >>> m > > >>> p = hou.Vector3(1, 2, 3) > >>> p * m > Both VEX and the UT_DMatrix4 class in the Houdini Development Kit (HDK) also store matrices in row-major format. RELATED * hou.hmath * hou.Matrix3 * hou.Quaternion * hou.Vector3 * hou.Vector4 """ def asTupleOfTuples(): """ asTupleOfTuples(self) -> tuple of tuple of float Return the contents of the matrix as a tuple of tuples of 4 floats. """ pass def inverted(): """ inverted(self) -> hou.Matrix4 Return the inverse of this matrix. Raises hou.OperationFailed if the matrix is not invertible. Otherwise, (self * self.inverted()).isAlmostEqual(hou.hmath.identityTransform()) is True. See Wikipedia's invertible matrix page for more information. """ pass def extractRotationMatrix3(): """ extractRotationMatrix3(self) -> hou.Matrix3 Extracts the 3x3 rotation matrix from this matrix, assuming it is a transformation matrix. If it fails to extract the rotation, for example if scaling is zero on one axis, it returns the identity matrix instead. """ pass def at(row, col): """ at(self, row, col) -> float Return the value of the matrix at the given row and column. Raises IndexError if the row or column are not between 0 and 3, inclusive. Note that negative indices will not index from the end. """ pass def setTo(sequence): """ setTo(self, sequence) Set this matrix's contents. The sequence may contain either 16 floats or 4 sequences, each with 4 floats. See hou.Matrix4.__init__ for examples of suitable parameter values. """ pass def extractRotates(transform_order='srt', rotate_order='xyz', pivot=hou.Vector3(): """ extractRotates(self, transform_order='srt', rotate_order='xyz', pivot=hou.Vector3(), pivot_rotate=hou.Vector3()) -> hou.Vector3 A shortcut for self.explode(transform_order, rotate_order, pivot, pivot_rotate)['rotate']. See hou.Matrix4.explode for more information. """ pass def setToZero(): """ setToZero(self) Set this matrix to contain all zeros. Note that you can construct a new matrix with all zeros with hou.Matrix4(). """ pass def _asVoidPointer(): """None""" pass def asTuple(): """ asTuple(self) -> tuple of float Return the contents of the matrix as a tuple of 16 floats. """ pass def setToIdentity(): """ setToIdentity(self) Set this matrix to the multiplicative identity, having 1's in the diagonal. The matrix will contain the values [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]. Note that you can construct a new matrix with these values using hou.hmath.identityTransform or hou.Matrix4(1). """ pass def determinant(): """ determinant(self) -> float Return the determinant of the matrix. See Wikipedia's determinant page. """ pass def setToOrthographic(): """None""" pass def isAlmostEqual(matrix4, tolerance=0.00001): """ isAlmostEqual(self, matrix4, tolerance=0.00001) -> bool Return whether this matrix is equal to another, within a tolerance. """ pass def extractTranslates(transform_order='srt', pivot_rotate=hou.Vector3(): """ extractTranslates(self, transform_order='srt', pivot_rotate=hou.Vector3()) -> hou.Vector3 A shortcut for self.explode(transform_order, hou.Vector3(), pivot_rotate)['translate']. See hou.Matrix4.explode for more information. > >>> matrix = hou.hmath.buildTranslate(1, 0, 0) * hou.hmath.buildRotate(0, 0, 45) > >>> matrix.extractTranslates('trs') > > >>> matrix.extractTranslates('srt') > """ pass def extractScales(transform_order='srt', pivot=hou.Vector3(): """ extractScales(self, transform_order='srt', pivot=hou.Vector3(), pivot_rotate=hou.Vector3()) -> hou.Vector3 A shortcut for self.explode(transform_order, rotate_order, pivot, pivot_rotate)['scale']. See hou.Matrix4.explode for more information. """ pass def extractShears(transform_order='srt', pivot=hou.Vector3(): """ extractShears(self, transform_order='srt', pivot=hou.Vector3(), pivot_rotate=hou.Vector3()) -> hou.Vector3 A shortcut for self.explode(transform_order, rotate_order, pivot, pivot_rotate)['shear']. See hou.Matrix4.explode for more information. """ pass def transposed(): """ transposed(self) -> hou.Matrix4 Return the transpose of this matrix. The result is such that self.at(i, j) == self.transposed().at(j, i) for 0 <= i,j <= 3. See Wikipedia's transpose page for more information. """ pass def setToPerspective(zoom, orthowidth=1, image_aspect=1, pixel_aspect=1, clip_near=0, clip_far=1, window_xmin=0, window_xmax=1, window_ymin=0, window_ymax=1): """ setToOrthographic(self, zoom, orthowidth=1, image_aspect=1, pixel_aspect=1, clip_near=0, clip_far=1, window_xmin=0, window_xmax=1, window_ymin=0, window_ymax=1) Set this matrix to an orthographic projection matrix with the given parameters. Sometimes the zoom is expressed in terms of focal and aperture. In this case: zoom = focal/aperture. Sometimes the image_aspect is expressed in terms of xres and yres. In this case: image_aspect = xres / yres. """ pass def preMult(matrix4): """ preMult(self, matrix4) -> hou.Matrix4 Returns matrix4 * self. Note that __mul__ returns self * matrix4, which is a different result because matrix multiplication is not commutative. """ pass def explode(transform_order='srt', rotate_order='xyz', pivot=hou.Vector3(): """ explode(self, transform_order='srt', rotate_order='xyz', pivot=hou.Vector3(), pivot_rotate=hou.Vector3()) -> dict of str to hou.Vector3 Return a dictionary with keys 'rotate', 'scale', 'translate', and 'shear' whose values are hou.Vector3 objects. When applied in the specified order, the corresponding rotations, scales (and shears), and translations will give this matrix. The rotation is returned as a set of Euler angles, in degrees. See Wikipedia's Euler angles page for more information. transform_order A string containing a permutation of the letters s, r, and t. The rotate, scale, and translate results are dependent on the order in which you perform those operations, and this string specifies that order. For example, imagine a transformation where you first translate in x by one unit, then you rotate in z by 45 degrees. With a transform order of 'trs' (translate, rotate, scale), the translate component is (1, 0, 0). However, this same transformation could be constructed, for example, by first scaling, then rotating, and then translating. For this transformation order, the translate component would be (1.0 / math.sqrt(2), 1.0 / math.sqrt(2), 0). rotate_order A string containing a permutation of the letters x, y, and z that determines the order in which rotations are performed about the coordinate axes. pivot A Vector3 containing a position about which rotations and scales are performed. By default, this parameter is set to the origin. pivot_rotate A Vector3 containing the Euler angles about the x, y, and z axes, in degrees, that specifies the base rotation about the pivot. These angles are always processed in 'xyz' order. Raises hou.OperationFailed if the matrix does not represent a valid transform matrix (e.g. it is singular), the transform order is not a permutation of the string 'srt', or the rotate order is not a permutation of the string 'xyz'. See hou.hmath.buildRotateAboutAxis for an example of how to convert Euler angles into an axis and rotation. See hou.ObjNode.setParmTransform for an example. This method is the inverse of hou.hmath.buildTransform. See also the other functions in hou.hmath that build transformation matrices. """ pass def setAt(row, col, value): """ setAt(self, row, col, value) Set the value of the matrix at the given row and column. Raises IndexError if the row or column are not between 0 and 3, inclusive. Note that negative indices will not index from the end. """ pass def Matrix4_swigregister(): """None""" pass class MenuParmTemplate(ParmTemplate): """ hou.MenuParmTemplate Describes a menu parameter containing evaluating to integer values. Note that StringParmTemplates may also have menus. REPLACES * opmenu """ def setDefaultExpression(tuple_of_default_expressions): """ setDefaultExpression(self, tuple_of_default_expressions) Set the default expression, which when evaluated, returns the index of the default menu item. If default_expression is the empty string, then the default expression is unset. """ pass def menuItems(): """ menuItems(self) -> tuple of str Return the tuple of internal menu names. These internal menu names are not displayed in the UI, but they can be passed to hou.Parm.set and will be returned by hou.Parm.evalAsString for menu parameters. """ pass def setDefaultExpressionLanguage(tuple_of_default_expression_languages): """ setDefaultExpressionLanguage(self, tuple_of_default_expression_languages) Set the default expression language. See the defaultExpressionLanguage method for more information. """ pass def setItemGeneratorScriptLanguage(language): """ setItemGeneratorScriptLanguage(self, language) Set the script language used to generate menu items to a hou.scriptLanguage enum value. See the itemGeneratorScriptLanguage method for more information. """ pass def defaultExpressionLanguage(): """ defaultExpressionLanguage(self) -> tuple of hou.scriptLanguage Return the default expression language. The default expression language only applies if the default expression is set. If the default expression is not set, then the expression language is set to hou.scriptLanguage.Hscript. """ pass def menuLabels(): """ menuLabels(self) -> tuple of str Return the tuple of menu labels displayed in the UI. """ pass def setMenuLabels(menu_labels): """ setMenuLabels(self, menu_labels) Set the menu labels displayed in the UI to the given sequence of strings. If the number of menu labels is less than the number of menu items, Houdini uses the internal menu item names for the missing labels. If the number of labels is more than the number of menu items, Houdini discards the extra labels. If you want to change both the menu items and menu labels, be sure to change the menu items first. """ pass def defaultValue(): """ defaultValue(self) -> int Return the index of the default menu item. See also the defaultValueAsString method. """ pass def setItemGeneratorScript(item_generator_script): """ setItemGeneratorScript(self, item_generator_script) Set the script used to generate menu items. See the itemGeneratorScript method for more information. """ pass def setAsButtonStrip(): """ setAsButtonStrip(self) Set the parameter to use a Button Strip widget. See also the setAsMenu, setAsIconStrip methods. """ pass def setMenuItems(menu_items): """ setMenuItems(self, menu_items) Set the internal menu names to the given sequence of strings. See the menuItems method for more information. If the new number of menu items is less than the old number, the menu labels will be shortened and the default value will be modified if it is out of range. """ pass def iconNames(): """ iconNames(self) -> tuple of str Return the tuple of icons corresponding to the menu items. If there are no icons, returns a tuple of empty strings. """ pass def defaultValueAsString(): """None""" pass def isButtonStrip(): """ isButtonStrip(self) -> bool Return whether the parameter is set to use the button strip widget. """ pass def setMenuUseToken(on): """ setMenuUseToken(self, on) Set whether the parameter is set to the token value instead of the index. See also the menuUseToken method. """ pass def setDefaultValue(tuple_of_default_values): """ setDefaultValue(self, tuple_of_default_values) Set the index of the default menu item. Note that if this index is out of range, it will be adjusted. """ pass def itemGeneratorScript(): """ itemGeneratorScriptLanguage(self) -> hou.scriptLanguage enum value Return the programming language for the script that generates menu items. """ pass def isMenu(): """ isMenu(self) -> bool Return whether the parameter is set to use the drop down menu widget. """ pass def setAsMenu(): """ setAsMenu(self) Turn back the parameter to a default menu drop down. See also the setAsButtonStrip, setAsIconStrip methods. """ pass def setIconNames(icon_names): """ setIconNames(self, icon_names) Set the icon names to the given sequence of strings. """ pass def isIconStrip(): """ isIconStrip(self) -> bool Return whether the parameter is set to use the icon strip widget. """ pass def setMenuType(menu_type): """ setMenuType(self, menu_type) Set the type of menu to a hou.menuType enum value. See the menuType method for more information. """ pass def defaultExpression(): """ defaultExpression(self) -> string Return the expression, which when evaluated, returns the index of the default menu item. The default expression takes precedence over the default value. If the default expression is not set (i.e. an empty string), then the default value is used instead. Note that the default expression language is needed to interpret the meaning of the default expression. """ pass def setAsIconStrip(): """ setAsIconStrip(self) Set the parameter to use a Icon Strip widget. See also the setAsMenu, setAsButtonStrip methods. """ pass def menuUseToken(): """ menuUseToken(self) -> bool Return whether the parameter is set to the token value instead of the index. See also the setMenuUseToken method. """ pass def itemGeneratorScriptLanguage(): """None""" pass def menuType(): """ menuType(self) -> hou.menuType enum value Return the type of menu. Note that some menu types only apply to string parameters with menus, so the meaningful menu types for MenuParmTemplates are hou.menuType.Normal (for standard menus) and hou.menuType.Mini for menus that only display a dropdown arrow. See hou.menuType for more information. """ pass def MenuParmTemplate_swigregister(): """None""" pass class NameConflict(Error): """ hou.NameConflict Exception raised when a name conflict is detected during an operation. """ def description(): """ description(self) -> str Return a description of the class of exception. The description is not related to the exception instance. """ pass def exceptionTypeName(): """ exceptionTypeName(self) -> str Return the name of the exception type. Instances of different subclasses of hou.Error will return different names. Instances of the base class will return "Error". You can also use str(e.__class__) to get the name of the subclass. """ pass def NameConflict_swigregister(): """None""" pass class NetworkAnimValue(object): """ hou.NetworkAnimValue A value to adjust the appearance of a network editor without changing the underlying node data. The hou.NetworkEditor pane allows network items to be moved or resized by user interactions without actually changing the node positions or sizes. This is accomplished by associating each NetworkAnimValue with a network item through the hou.NetworkEditor.setAdjustments method. NetworkAnimValues can either represent a single value, or they can represent an animation from one value to another. The actual animation is displayed automatically by the network editor. For example, to following code would animate the position of a couple of nodes: > >>> editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor) > >>> n1 = hou.node('/obj/geo1') > >>> pos1 = n1.position() > >>> newpos1 = pos1 + hou.Vector2(5, 5) > >>> anim1 = hou.NetworkAnimValue(1.0, pos1, newpos1) > >>> n2 = hou.node('/obj/geo2') > >>> pos2 = n2.position() > >>> newpos2 = pos2 + hou.Vector2(5, 5) > >>> anim2 = hou.NetworkAnimValue(1.0, pos2, newpos2) > >>> editor.setAdjustments([n1, n2], [anim1, anim2], auto_remove=True) > >>> n1.setPosition(newpos1) > >>> n2.setPosition(newpos2) Note that the new positions are set on the nodes immediately. But the animation starts them at their original positions, and makes it look like they move slowly to their new positions. Also note that the auto_remove parameter in the call to setAdjustments() has been set to True. This is because we are using the adjustments only to animate the nodes to their new positions, which have already been set. Once the animation is complete, the adjustments can be thrown away. Without this parameter, the adjustments would remain on the network editor until the next call the setAdjustments. """ def NetworkAnimValue_swigregister(): """None""" pass class NetworkBox(NetworkMovableItem): """ hou.NetworkBox Represents a network box. To create a network box, use the hou.Node.createNetworkBox method on the node inside which you want to create the box. To get an existing network box, use the hou.Node.findNetworkBox method on the node containing the network box. To get a list of all network boxes in a network, use the hou.Node.networkBoxes method on the containing node. REPLACES * nbcolor * nbget * nblocate * nbls * nblsop * nbname * nbop * nbrm * nbset * nbsize * opscript """ def comment(): """ comment(self) -> str Returns the comment for this network box. """ pass def setAutoFit(auto_fit): """ setAutoFit(self, auto_fit) Set the value of the auto fit flag on this network box. The default value is True which causes the network box to resize itself when nodes that belong to the network box are moved outside the bounds of the box. Setting this values to False prevents this automatic resizing. The Network View will draw the network box around it's contents in any case. The default setting of True is primarily useful for backward compatibility with the old network editor which relies on this automatic resizing to draw the network box properly. """ pass def removeSubnetIndirectInput(indirect): """ removeSubnetIndirectInput(self, indirect) Removes the given indirect input from the network box. This method if deprecated. Use hou.NetworkBox.removeItem instead. """ pass def removeAllItems(): """ removeAllItems(self) Removes all items from the network box. """ pass def setComment(comment): """ setComment(self, comment) Set the comment string for this network box. This comment is visible in the network editor and can be used to describe the purpose of the box. """ pass def restoredSize(): """ restoredSize(self) -> hou.Vector2 Return the size of this item's tile in the network editor graph if it is not minimized. Returned as a Vector2. """ pass def minimizedSize(): """ minimizedSize(self) -> hou.Vector2 Return the size of this item's tile in the network editor graph if it is minimized. Returned as a Vector2. """ pass def addStickyNote(stickynote): """ addStickyNote(self, stickynote) Adds a hou.StickyNote to the network box. This method is deprecated. Use hou.NetworkBox.addItem instead. """ pass def removeNode(node): """ removeNode(self, node) Removes the given node from the network box. This method if deprecated. Use hou.NetworkBox.removeItem instead. """ pass def setMinimized(on): """ setMinimized(self, on) Minimizes or restores the network box. """ pass def addNetworkBox(netbox): """ addNetworkBox(self, netbox) Adds a hou.NetworkDot to the network box. This method is deprecated. Use hou.NetworkBox.addItem instead. """ pass def removeStickyNote(stickynote): """ removeStickyNote(self, stickynote) Removes the given sticky note from the network box. This method if deprecated. Use hou.NetworkBox.removeItem instead. """ pass def destroy(destroy_contents=False): """ destroy(self, destroy_contents=False) Remove and delete the network box, optionally deleting the nodes it contains. """ pass def nodes(recurse=True): """ nodes(self, recurse=True) -> tuple of hou.Node Returns the nodes inside the network box. recurse If True, recurses down into nested network boxes. """ pass def fitAroundContents(): """ fitAroundContents(self) Resizes the network box to fit its contents. """ pass def setBounds(bounds): """ setBounds(self, bounds) Sets the size and position of this sticky note to the given hou.BoundingRect bounds argument. Equivalent to calling setSize then setPosition. """ pass def stickyNotes(recurse=True): """ stickyNotes(self, recurse=True) -> tuple of hou.StickyNote Returns the sticky notes inside the network box. recurse If True, recurses down into nested network boxes. """ pass def addNode(node): """ addNode(self, node) Adds a hou.Node to the network box. This method is deprecated. Use hou.NetworkBox.addItem instead. """ pass def addItem(item): """ addItem(self, item) Adds a hou.NetworkMovableItem of any kind to the network box. """ pass def subnetIndirectInputs(recurse=True): """ subnetIndirectInputs(self, recurse=True) -> tuple of hou.SubnetIndirectInput Returns the subnet indirect inputs inside the network box. recurse If True, recurses down into nested network boxes. """ pass def removeItem(item): """ removeItem(self, item) Removes the given item from the network box. """ pass def removeNetworkBox(netbox): """ removeNetworkBox(self, netbox) Removes the given network box from the network box. This method if deprecated. Use hou.NetworkBox.removeItem instead. """ pass def networkBoxes(recurse=True): """ networkBoxes(self, recurse=True) -> tuple of hou.NetworkBox Returns the network boxes inside the network box. recurse If True, recurses down into nested network boxes. """ pass def resize(vector2): """ resize(self, vector2) Resizes a network box by the increments in the given hou.Vector2. Use setSize() to set the box's absolute size. """ pass def removeAllNodes(): """ removeAllNodes(self) Removes all nodes from the network box. This method if deprecated. Use hou.NetworkBox.removaAllItems or hou.NetworkBox.removeItems instead. """ pass def isMinimized(): """ isMinimized(self) -> bool Returns whether the network box is minimized. """ pass def items(recurse=True): """ items(self, recurse=True) -> tuple of hou.NetworkMovableItem Returns the items of any type inside the network box. recurse If True, recurses down into nested network boxes. """ pass def autoFit(): """ autoFit(self) -> bool Returns the value of the auto fit flag on this network box. """ pass def asCode(brief=False, recurse=False, save_box_contents=False, save_channels_only=False, save_creation_commands=False, save_keys_in_frames=False, save_parm_values_only=False, save_spare_parms=False, function_name=None): """ asCode(self, brief=False, recurse=False, save_box_contents=False, save_channels_only=False, save_creation_commands=False, save_keys_in_frames=False, save_parm_values_only=False, save_spare_parms=False, function_name=None) -> string Prints the Python code necessary to recreate a network box. See hou.Node.asCode for information on the keyword arguments. """ pass def addSubnetIndirectInput(indirect): """ addSubnetIndirectInput(self, indirect) Adds a hou.SubnetIndirectInput to the network box. This method is deprecated. Use hou.NetworkBox.addItem instead. """ pass def setSize(size): """ setSize(self, size) Sets the size of this network box to the given hou.Vector2 size parameter. Use resize() to set the box's size relative to its current size. """ pass def NetworkBox_swigregister(): """None""" pass class NetworkDot(IndirectInput): """ hou.NetworkDot A small dot in a network that allows wires to be routed along specific paths without affecting the data passing through them. Network dots are allowed to have a single input, but may have many outputs. They can be moved around to force a wire connecting two nodes to follow a specific path. They can also be used as "scaffolding" for a set of nodes that you want to be able to quickly add or remove in a larger network. New dots are created by calling hou.Node.createNetworkDot on the node that will contain the dot. A list of all existing dots in a network can be generated by calling hou.Node.networkDots. """ def isPinned(): """ isPinned(self) -> bool Returns the pinned state of this dot. See hou.NetworkDot.setPinned for a more detailed discussion of the meaning of a pinned dot. """ pass def insertInput(self, input_index, item_to_become_input, output_index=0): """ insertInput(self, input_index, item_to_become_input, output_index=0) Connects a network item to the input of this dot, exactly like the two parameter form of setInput. But this method name and signature matches the signature of hou.Node.insertInput, which allows code to run on either a network dot or a node. The value of the input_index is ignored. """ pass def setInput(input_index, item_to_become_input, output_index=0): """ setInput(self, input_index, item_to_become_input, output_index=0) Connects a network item to the input of this dot, exactly like the two parameter form of this function. But this second signature matches the signature of hou.Node.setInput, which allows code to run on either a network dot or a node. The value of the input_index is ignored. """ pass def inputConnections(): """ inputConnections(self) -> tuple of hou.NodeConnection Returns a tuple of hou.NodeConnection objects for the connection coming into this dot. The tuple will have a length of one if anything is connected to the input of this dot. Returns an empty tuple if nothing is connected. """ pass def destroy(): """ destroy(self) Delete this dot. Connections in and out of the dot are automatically re-established such that the behavior of the network will be unchanged by the removal of this dot. """ pass def setPinned(pinned): """ setPinned(self, pinned) Sets the boolean pinned state of this dot. Pinned dots are not functionally different from unpinned dots, but are treated differently by the network editor. A pinned dot remains even if its input and output connections are removed. An unpinned dot will be deleted automatically by the network editor if its input or last output is cut. The following code is a greatly simplified version of the code for automatically deleting unconnected dots, which will delete any dots that are not pinned and that don't have an input connection: > >>> net = hou.node('/obj') > >>> net.createNetworkDot().setPinned(False) > >>> net.createNetworkDot().setPinned(True) > >>> net.networkDots() > (, ) > >>> for dot in net.networkDots(): > ... if not dot.isPinned(): > ... if dot.inputItem() is None: > ... dot.destroy() > ... > >>> net.networkDots() > (,) """ pass def NetworkDot_swigregister(): """None""" pass class NetworkEditor(PathBasedPaneTab): """ hou.NetworkEditor Represents a Network Editor panetab. """ def frameSelection(self): """ frameSelection(self) Centers the nodes within the network editor to show the current selection and zooms to its extents. This method wraps a call to hou.NetworkEditor.setVisibleBounds. """ pass def setTooltip(tooltip): """ setTooltip(self, tooltip) Sets the tooltip string that should be shown under the mouse if it remains stationary for a short time. This string should generally be set to correspond to the network item currently under the mouse cursor. Because it appears after a delay, it is okay to make this text more verbose than the prompt text passed to setPromptText(). """ pass def setPreSelectedItems(items): """ setPreSelectedItems(self, items) When box selecting items in the network, it is useful to be able to see what will be selected if the mouse button is released. These items are drawn to the overlay layer of the network editor canvas in a light blue color with transparency. The network items passed as a tuple to this method are the ones that get drawn with this pre- selection highlight. """ pass def setPref(pref, value): """ setPref(self, pref, value) Sets the preference named pref to value. The value is always a string, and must be converted to or from a number, enum, or other format as appropriate. If the preference specified by pref is a global preference, all network editors will automatically update with the new value. Otherwise the change will only affect this network editor. """ pass def posFromScreen(pos): """ posFromScreen(self, pos) -> hou.Vector2 Given a position value pos as a hou.Vector2, expressed in screen units (pixels), return the equivalent position in network units. The result will depend on both the current zoom level and view position of the network editor. """ pass def autoAddToNetbox(self, node): """ autoAddToNetbox(self, node) This method is deprecated in the new network editor and does nothing. """ pass def autoPlaceNodes(self): """ autoPlaceNodes(self) -> bool This method is deprecated in the new network editor and always returns False. """ pass def lengthFromScreen(len): """ lengthFromScreen(self, len) -> float Given a length value len, expressed in screen units (pixels), return the equivalent length in network units. The result will depend on the current zoom level of the network editor. """ pass def setListMode(self, on): """ setListMode(self, on) Set the network editor to enter list mode if on is True and to exit list mode if on is False. """ pass def setDropTargetItem(item, name, index): """ setDropTargetItem(self, item, name, index) When the user is performing a drag and drop operation within the network editor, it is important that they receive some feedback about where the thing they are dragging will be dropped if they let go of the mouse button. This indication is provided by highlighting the drop target in the UI. This method allows the current drop target to be specified in python code. Usually the item, name, and index will be values returned in one of the tuples from the networkItemsInBox method. """ pass def setCursorMap(cursors): """ setCursorMap(self, cursors) Tells the network editor which mouse cursor to use based on what UI widget is under the mouse. This configuration is specified as a dictionary mapping a tuple to a string. The string is the name of the cursor, which can be any of the cursor file names from the $HFS/houdini/config/Cursors directory. Each tuple consists of a string and an integer. The string is the name of the UI widget, and the integer represents the specific index value within that UI widget. The following code sets the network editor to show a "connect" cursor for all node inputs and outputs: > >>> editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor) > >>> editor.setCursorMap({ > ... ('input', -1): 'wire', > ... ('output', -1): 'wire' > ... }) The following code sets the network editor to show an appropriate resize icon based on the specific section of the sticky note border under the mouse: > >>> editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor) > >>> editor.setCursorMap({ > ... ('stickynoteborder', 0): 'arrowSWNE', > ... ('stickynoteborder', 1): 'arrowLeftRight', > ... ('stickynoteborder', 2): 'arrowNWSE', > ... ('stickynoteborder', 3): 'arrowUpDown', > ... ('stickynoteborder', 4): 'arrowSWNE', > ... ('stickynoteborder', 5): 'arrowLeftRight', > ... ('stickynoteborder', 6): 'arrowNWSE', > ... ('stickynoteborder', 7): 'arrowUpDown' > ... }) """ pass def prompt(): """ prompt(self) -> str Return the current prompt string. This is the value that was last passed to the setPromptText() method. """ pass def isVolatileKeyDown(key): """ isVolatileKeyDown(self, key) -> bool Return True if the specified keyboard key is currently pressed. This allows the current state of a volatile key to be tested without seeing the "keydown" event triggered when the user pressed the key. Calling this method with a key that has not been registered through the setVolatileKeys method will always return False even if the key is currently pressed. The key string is of the form returned by the hou.ui.hotkeys method, which is a combination of the symbol on the key, and any modifier keys involved, such as "Ctrl+Shift+G". """ pass def badges(): """ badges(self) -> tuple of tuple of str Return descriptions of the optional node badges that can be shown in the network editor. Each tuple contained in the returned value contains three strings describing the badge. The first is the preference value that controls whether the badge is hidden, or appears as a small or large icon. The second string is a description of the badge. The third string is the name of the badge icon. These values can be used to present an interface for configuring the badges. """ pass def scheduleTimerEvent(seconds): """ scheduleTimerEvent(self, seconds) -> int Requests that a timer event be sent to the network editor after seconds has elapsed. The returned integer id is included in the triggered event to differentiate between timers if more than one is scheduled at a time. """ pass def cursorPosition(confine_to_view=True): """ cursorPosition(self, confine_to_view=True) -> hou.Vector2 Return the current mouse cursor position expressed in network view coordinates. If confine_to_view is True, the returned value will be clipped to the area of the network currently visible in the network editor. Here is an example of moving a node underneath the mouse cursor: > # Get the network editor. > net_editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor) > > # Get the node. > node = hou.node("/obj/myNode") > > # Set the node's new position. > node.setPosition(net_editor.cursorPosition()) """ pass def nodeShapes(): """ nodeShapes(self) -> tuple of str Return a list of all valid node shape names. These are the values that can be set into the user data of a node to control the shape of a specific node. They are also the shape names that can be used as defaults for node types. This code sets a node to a random shape: > >>> import random > >>> editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor) > >>> shapes = editor.nodeShapes() > >>> hou.node('/obj/geo1').setUserData('nodeshape', random.choice(shapes)) """ pass def decorationInteractive(): """ decorationInteractive(self) -> bool Return whether the currently decorated item is interactive. This is just the interactive value passed into the last call to setDecoratedItem. """ pass def reloadNodeShapes(): """ reloadNodeShapes(self) -> tuple of str Forces all node shape files to be reloaded. This may cause new shapes to become available, or existing shapes to be removed. Returns a tuple of strings that indicate the name of each loaded node shape, and any error messages generated while parsing each shape. Use nodeShapes() to get a simple list of all successfully loaded shapes after calling this method. """ pass def decoratedItem(): """ decoratedItem(self) -> hou.NetworkItem Return the currently set decorated item. This is just the item value passed into the last call to setDecoratedItem. """ pass def textBadges(): """ textBadges(self) -> tuple of tuple of str Return descriptions of the optional node text that can be shown in the network editor. Each tuple contained in the returned value contains three strings describing the text. The first is the preference value that controls whether the text is hidden, or appears as truncated or full text. The second string is a description of the text. The third string is the name of an icon that can be used to represent the meaning of the text. These values can be used to present an interface for configuring the text. """ pass def sizeToScreen(size): """ sizeToScreen(self, size) -> hou.Vector2 Given a box size value size as a hou.Vector2, expressed in network units, return the equivalent size in screen units (pixels). This is equivalent to making two separate calls to lengthToScreen() for the width and height. The result will depend on the current zoom level of the network editor. """ pass def setDecoratedItem(item, interactive): """ setDecoratedItem(self, item, interactive) This method is similar to setDropTargetItem in that it tells the network editor to highlight a particular item when drawing it. In the case of the decorated item, however, only the network item needs to be provided. The result of setting a node as the decorated item is to bring up the node ring. Network dots may also be the decorated item, in which case the input and output connectors for the dot are shown. The interactive boolean flag indicates whether the user is allowed to interact with the decorations. If not, the node ring is drawn faded, and its buttons cannot be clicked. This non-interactive mode corresponds to having the Control key pressed while moving the mouse around the network editor. """ pass def listMode(self): """ listMode(self) -> bool Return True if the network editor is in list mode and False otherwise. """ pass def openNoteEditor(stickynote, select_all, =, False): """ openNoteEditor(self, stickynote, select_all = False) -> int Opens an input field for editing the text of the sticky note specified in the stickynote parameter. Returns an integer id which is passed to the network editor as part of an event indicating when the user finishes editing the text. If select_all is set to True, the editor is opened with all text selected. """ pass def openTabMenu(key=None, auto_place=False, branch=False, src_item=None, src_connector_index=-1, dest_item=None, dest_connector_index=-1, node_position=None, src_items=[], src_indexes=[], dest_items=[], dest_indexes=[]): """ openTabMenu(self, key=None, auto_place=False, branch=False, src_item=None, src_connector_index=-1, dest_item=None, dest_connector_index=-1, node_position=None, src_items=[], src_indexes=[], dest_items=[], dest_indexes=[]) Opens the tab menu in the network editor. When the user chooses a tool from the tab menu, the parameters passed to this function determine the context information that will be sent to the tool script. Generally, most tools treat these parameters in a consistent way as described below. key The key used (if any) to open the menu. This same key pressed with the menu up will cause the menu to close. auto_place Set to True to make the tab menu turn on auto placement when a tool is chosen from the menu. The new node will be placed at a position determined automatically by the tab menu based on the source and destination nodes. branch Set to True to cause the new node to create a new branch instead of inserting the new node between the source and destination nodes. src_item The node, dot, or subnet indirect input that will be connected to the input of the new node created by the tab menu. src_item_connector_index The output index of the node that will be connected to the input of the new node created by the tab menu. dest_item The node or dot that will be connected to the output of the new node created by the tab menu. dest_connector_index The input index of the node or dot that will be connected to the output of the new node created by the tab menu. node_position The location to use for the new node created by the tab menu. src_items A list of nodes, dot, or subnet indirect inputs that will be connected to the input of the new node created by the tab menu. This parameter (and all other list-based source and destination paramaters) take precedence over the single item parameters if both are specified. src_item_connector_indexes A list of output indexes of the nodes that will be connected to the input of the new node created by the tab menu. dest_items A list of nodes or dots that will be connected to the output of the new node created by the tab menu. dest_connector_indexes A list of input indexes of the nodes or dots that will be connected to the output of the new node created by the tab menu. """ pass def openVopEffectsMenu(node, input_index): """ openVopEffectsMenu(self, node, input_index) Brings up the VOP node effects menu for the hou.VopNode specified in the node parameter, at the input specified by the input_index parameter. """ pass def setCursorPosition(pos): """ setCursorPosition(self, pos) Moves the mouse cursor to the position specified by the hou.Vector2 pos parameter. """ pass def getPref(pref): """ getPref(self, pref) -> str Return the value of the preference named pref. This preference may be a global or local preference. The returned value is always a string which can be interpreted as a number or other data structure as appropriate for the specific preference. """ pass def setPrompt(prompt): """ setPrompt(self, prompt) Sets the prompt text that appears at the bottom of the network editor. This string should generally be set to correspond to the network item currently under the mouse cursor. This text should be fairly brief. More detailed information can be put into the tooltip through the setTooltip() method. """ pass def getPrefs(): """ getPrefs(self) -> dict of str to str Return all global and local preferences for this network editor as a python dictionary mapping preference name strings to value strings. """ pass def setDefaultCursor(cursor_name): """ setDefaultCursor(self, cursor_name) Tells the network editor which mouse cursor to use when none of the UI mentioned in the dictionary sent to setCursorMap() is under the mouse. """ pass def openCommentEditor(item, select_all, =, False): """ openCommentEditor(self, item, select_all = False) -> int Opens an input field for editing the comment of the network box specified in the item parameter. Returns an integer id which is passed to the network editor as part of an event indicating when the user finishes editing the text. If select_all is set to True, the editor is opened with all text selected. """ pass def itemOutputPos(item, output_index, adjusted=True): """ itemOutputPos(self, item, output_index, adjusted=True) -> hou.Vector2 Return the center point of the output connector of the hou.Node, hou.NetworkDot, or hou.SubnetIndirectInput specified by item. The output_index parameter specifies the specific output of interest. For network dots and subnet indirect inputs, this value must be zero. If the adjusted parameter is set to True, any adjustments to this item's size and position set in the most recent call to setAdjustments() will be taken into account. If False, these adjustments will be ignored. """ pass def selectPosition(self, input_node=None, output_index=0, output_node=None, input_index=0): """ selectPosition(self, input_node=None, output_index=0, output_node=None, input_index=0) -> hou.Vector2 This method wraps a call to hou.NetworkEditor.pushEventContext, with the event context set to 'nodegraphselectpos', and appropriate context data to give behavior similar to the old network editor. Prompt the user to select a position in the network editor for a new node to be placed. The network editor visualizes the position with a dotted outline of a node placeholder. The user can then move the mouse to change the position and [LMB] to confirm. The user can also press [Esc] instead to cancel the selection. You can optionally pass in hou.Node objects to the input_node and output_node arguments to visualize the node placeholder with connections to the specified input and output nodes. Return a hou.Vector2 containing the x,y coordinates of the selected position. Raise hou.OperationInterrupted if the user canceled the selection. Raise hou.OperationFailed if the network editor is in list mode. This method can be useful for scripts that create new nodes and prompts for node positions. Here is an example: > > # Get the input and output nodes that the new node will connect to. > input_node = hou.node("/obj/myInput") > output_node = hou.node("/obj/myOutput") > > # Set the new node to connect to the first output of the input node > # and the second input of the output node. > output_index = 0 > input_index = 1 > > # Get the network editor. > network_editor = hou.ui.curDesktop().paneTabOfType( > hou.paneTabType.NetworkEditor) > > # Prompt the user to select a position for the new node. > position = network_editor.selectPosition( > input_node, output_index, output_node, input_index) > > # Create the new node. > new_node = hou.node("/obj").createNode("geo") > > # Position the new node and wire it to the input and output nodes. > new_node.move(position) > new_node.setInput(0, input_node, output_index) > output_node.setInput(input_index, new_node, 0) """ pass def insertIntoUnderlyingConnections(self, node, x, y): """ insertIntoUnderlyingConnections(self, node, x, y) This method is deprecated in the new network editor and does nothing. """ pass def redraw(): """ redraw(self) Forces the network editor to redraw. This may be necessary in cases where your code updates aspects of your Houdini session which indirectly affect the drawing of the network editor (such as changing default node shapes and colors). Direct changes to the network (such as changing the shape or color of a specific node) should automatically cause the network editor to redraw. Only use this function when you see that a redraw is not being triggered automatically by the your code. """ pass def cursorMap(): """ cursorMap(self) -> dict of (str, int) to str Return the current mouse cursor configuration. This will just be the dictionary passed into the last call to setCursorMap. """ pass def autoScrollNodes(self): """ autoScrollNodes(self) -> bool This method is deprecated in the new network editor and always returns False. """ pass def defaultCursor(): """ defaultCursor(self) -> str Return the default mouse cursor set by the last call to setDefaultCursor(). """ pass def allVisibleRects(ignore_items): """ allVisibleRects(self, ignore_items) -> tuple of (hou.NetworkMovableItem, hou.BoundingRect) This method is equivalent to calling itemRect() for every network item that is currently visible in the network editor. Getting these results in a single method call is significantly faster, and eliminates the need to test each item for visibility. This method is used for finding items to snap against when moving nodes. The ignore_items parameter is a tuple of hou.NetworkMovableItem objects that should not be returned in the result tuple. """ pass def overviewPosFromScreen(pos): """ overviewPosFromScreen(self, pos) -> hou.Vector2 Given a position value pos as a hou.Vector2, expressed in screen units (pixels) within the overview gadget, return the equivalent position in network units. This method returns a value that assumes the overview area is visible, even if it is not. If the provided position is outside the overview area, this method returns a value that assumes the overview gadget extends as far as required to reach the specified coordinates. """ pass def itemInputDir(item, input_index): """ itemInputDir(self, item, input_index) -> hou.Vector2 Return a normalized vector indicating the direction at which the wire connected to the specified input should emerge from its connector. The item parameter may be a hou.Node or hou.NetworkDot. The input_index specifies which input is of interest. This value must be zero if the item is a network dot. """ pass def networkItemsInBox(pos1, pos2, for_drop=False, for_select=False): """ networkItemsInBox(self, pos1, pos2, for_drop=False, for_select=False) -> tuple of (hou.NetworkItem, str, int) Return any network items inside the bounding box defined by the hou.Vector2 points pos1 and pos2. These points are specified in screen space, which makes it easy to call this function given a mouse position. The returned tuple of triples are sorted in increasing distance from the center of the specified bounding box. Each triple consists of a network item (which may be a node, sticky note, wire, etc.), a string which describes the part of the UI for that item that was found in the box, and an optional index value which differentiates between different instances of the same item/name combination. For example, if the connector for input 2 of the node geo1 was the only thing inside the provided box, the return value would be: > >>> editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor) > >>> editor.networkItemsInBox(pos1, pos2) > ((, 'input', 2),) One of for_drop or for_select may be set to True to use a different criteria for deciding what a valid target is. By default, any UI widget that highlights with the mouse over it will be returned by this method. Setting for_drop to True will return only UI widgets that can be drop targets. Setting for_select to True will only return UI widgets that result in the item being selected when box picking. """ pass def itemOutputDir(item, output_index): """ itemOutputDir(self, item, output_index) -> hou.Vector2 Return a normalized vector indicating the direction at which the wire connected to the specified output should emerge from its connector. The item parameter may be a hou.Node, hou.NetworkDot, or hou.SubnetIndirectInput. The output_index specifies which output is of interest. This value must be zero if the item is a network dot or subnet indirect input. """ pass def setVolatileKeys(keys): """ setVolatileKeys(self, keys) The keys parameter specifies a tuple of keyboard keys that should be processed as volatile keys. This means they generate a "keydown" event when the key is pressed, and a "keyup" event when the key is released. All other keys simply send a "keyhit" event after the key is released, with no notification when the key is first pressed. The key strings are of the form returned by the hou.ui.hotkeys method, which is a combination of the symbol on the key, and any modifier keys involved, such as "Ctrl+Shift+G". """ pass def backgroundImages(): """ backgroundImages(self) -> tuple of hou.NetworkImage Return the descriptors for the current set of background images being displayed in the network editor. This will be the tuple passed into the last call to setBackgroundImages. """ pass def setPrefs(prefs): """ setPrefs(self, prefs) Sets a number of preference values with a single method call. The prefs parameter must be a python dictionary mapping preference name strings to value strings. The preferences may be local or global, but this method is most often used for saving and loading the local preferences for a single network editor. """ pass def isPosInside(pos): """ isPosInside(self, pos) -> bool Return True if the hou.Vector2 passed as the pos parameter is inside the network view. The values in pos are mouse coordinates expressed relative to the network editor pane. """ pass def visibleBounds(): """ visibleBounds(self) -> hou.BoundingRect Return the network space bounds of the network editor viewing area. """ pass def modifyPositionForNode(self, vector2, node): """ modifyPositionForNode(self, vector2, node) -> Vector2 This method is deprecated in the new network editor, and simply returns the position passed into the function. """ pass def registerPref(pref, value, global): """ registerPref(self, pref, value, global) Registers a preference with the name pref, and default value value. If global is True, this preference is treated as a global preference that is applied to all network editors and saved in $HOUDINI_USER_PREF_DIR/networkeditor.pref. Otherwise the preference is considered local to each network editor, and will be saved to the desk file with each network editor instance. Registering a preference is required to ensure the preference is saved when it is not a preference used internally by the network editor. The preference that enables snapping, or the one to enable dropping a node onto an existing wire are examples of preferences that are only used by the python event handling code, and so must be explicitly registered. This registration should be done in response to the network editor initialization event which is sent once to each network editor when it is first created. """ pass def isShowingConnectors(): """ isShowingConnectors(self) -> bool Return True if the network editor zoom level is high enough that input and output connectors are visible. This can be useful in network editor event handlers that expect the user to click on a connector. If the connectors are not visible, some alternative interaction is required. """ pass def preSelectedItems(): """ preSelectedItems(self) -> tuple of hou.NetworkItem Return the currently pre-selected items. These are just the values passed into the last call to setPreSelectedItems. """ pass def overviewPosToScreen(pos): """ overviewPosToScreen(self, pos) -> hou.Vector2 Given a position value pos as a hou.Vector2, expressed in network units, return the equivalent position in screen units (pixels) within the overview gadget in the network editor. This method returns a value that assumes the overview area is visible, even if it is not. """ pass def sizeFromScreen(size): """ sizeFromScreen(self, size) -> hou.Vector2 Given a box size value size as a hou.Vector2, expressed in screen units (pixels), return the equivalent size in network units. This is equivalent to making two separate calls to lengthFromScreen() for the width and height. The result will depend on the current zoom level of the network editor. """ pass def dropTargetItem(): """ dropTargetItem(self) -> (hou.NetworkItem, str, int) Return the currently set drop target item information. These are just the values passed into the last call to setDropTargetItem. """ pass def setFootprints(footprints): """ setFootprints(self, footprints) Configure the footprint rings that the network editor should display. The footprints parameter must be a tuple of hou.NetworkFootprint objects. See that class for more information. """ pass def tooltip(): """ tooltip(self) -> str Return the current tooltip string. This is the value that was last passed to the setTooltip() method. """ pass def setBackgroundImages(images): """ setBackgroundImages(self, images) Configures the background images to be displayed in the network editor. The network editor saves and loads the image descriptions into the user data for each network, which allows a different set of background images for each network. The images are specified as a tuple of hou.NetworkImage objects. See the documentation of that class for more information. """ pass def locatingEnabled(): """ locatingEnabled(self) -> bool Return True if the network editor will highlight UI elements under the mouse, and allow clicking on those UI elements. """ pass def itemInputPos(item, input_index, adjusted=True): """ itemInputPos(self, item, input_index, adjusted=True) -> hou.Vector2 Return the center point of the input connector of the hou.Node or hou.NetworkDot specified by item. The input_index parameter specifies the specific input of interest. For network dots, this value must be zero. If the adjusted parameter is set to True, any adjustments to this item's size and position set in the most recent call to setAdjustments() will be taken into account. If False, these adjustments will be ignored. """ pass def closeTextEditor(id, apply_changes, =, True): """ closeTextEditor(self, id, apply_changes = True) Immediately closes and commits any changes made to input fields opened with the openNameEditor(), openCommentEditor(), or openNoteEditor() methods. The id parameter is the value returned by the method that opened the editor. Set the apply_changes parameter to False if the changes made to the input field should not be applied. """ pass def lengthToScreen(len): """ lengthToScreen(self, len) -> float Given a length value len, expressed in network units, return the equivalent length in screen units (pixels). The result will depend on the current zoom level of the network editor. """ pass def networkBoxPendingRemovals(): """ networkBoxPendingRemovals(self) -> tuple of hou.NetworkMovableItem Return the items currently pending remove from their network box. These are just the values passed into the last call to setNetworkBoxPendingRemovals. """ pass def screenBounds(): """ screenBounds(self) -> hou.BoundingRect Return the screen space bounds of the network editor viewing area. This does not include the menu bar, toolbar, or other UI elements. Only the area where the network contents are displayed is returned. The bounds are relative to the network area itself, so the lower left corner of the returned bounding box will always be (0, 0). """ pass def setOverlayShapes(shapes): """ setOverlayShapes(self, shapes) The shapes parameter specifies a tuple of hou.NetworkShape objects which will be drawn into the overlay layer of the network editor canvas. See documentation of the network shape class and its subclasses for more information. """ pass def setVisibleBounds(bounds, transition_time=0.0, max_scale=0.0, set_center_when_scale_rejected=False): """ setVisibleBounds(self, bounds, transition_time=0.0, max_scale=0.0, set_center_when_scale_rejected=False) Sets the visible bounds of the network editor viewing area, expressed in network space coordinates. This method will never alter the screen space size or location of the network editor. If the area specified by the bounds parameter has a different aspect ratio from the actual network editor, this method will automatically adjust the bounds to ensure that the area specified is fully visible. bounds A hou.BoundingRect specifying the area that should be visible in the network editor. transition_time The amount of time, in seconds, over which the network editor will animate the transition from the current visible bounds to the new visible bounds. max_scale If set to a non-zero value, this parameter controls the maximum zoom level that will be allowed. The default maximum scale used by the network editor code is 100. set_centered_when_scale_rejected If set to True, but the new zoom level is determined to be the same as the previous zoom, no change is made to the bounds at all. This prevents a bounds change, that was intended as a pure zoom, from inadvertently panning the view if the zoom doesn't actually change. """ pass def setLocatingEnabled(enabled): """ setLocatingEnabled(self, enabled) Enables or disables highlighting of UI elements under the mouse in the network editor. When disabled, mouse events sent to the network editor event processing code will never specify a located or selected UI element. In some modes (such as when in a viewing state where mouse events only modify the view) it is desirable to disable this behavior. """ pass def footprints(): """ footprints(self) -> tuple of hou.NetworkFootprint Return the current footprint configuration as a tuple of hou.NetworkFootprint objects. These are just the values passed into the last call to setFootprints. """ pass def overviewVisibleIfAutomatic(): """ overviewVisibleIfAutomatic(self) -> bool Return a boolean indicating whether or not the overview gadget would currently be visible if it was configured to display automatically. In other words, this method returns True if any part of the network is currently outside the visible bounds of the editor. """ pass def eventContextData(): """None""" pass def handleCurrentKeyboardEvent(resend=False): """ handleCurrentKeyboardEvent(self, resend=False) Requests that the network editor handle the current keyboard event. This method only makes sense when handling a keyboard event. If the resend parameter is set to True, the keyboard event is sent to the network editor's python handling code a second time rather than the network editor handling the keyboard event itself. This is useful if the network editor is in a state or mode that does not know how to handle a key, but which the state recognizes as one that should exit the current state, and possibly trigger some other python event handling code. This parameter is used in the state for selecting the position of a new node if the Tab key is pressed (which exits the positions selection state, and triggers a new Tab menu instead). If this method is not called when handling a keyboard event, the network editor assumes that the python event handling code has handled the keyboard event. """ pass def openNodeMenu(node, =, None, items, =, []): """ openNodeMenu(self, node = None, items = []) Brings up a node context menu under the current mouse position. The two parameters contol which node(s) will be affected by the menu option chosen by the user. If a hou.Node object is specified in the node parameter, the menu operation will affect that node, and, if that node is currently selected, all other selected network items will also be affected. If the items parameter is passed a non-empty list of hou.NetworkMovableItem objects, those items and only those items will be affected by the menu, regardless of the current selection. If the chosen menu item only operates on a single node, the original node parameter value or the last hou.Node object in the items list will be affected. If the selected menu item can affect multiple nodes, all nodes will be affected. And in the few cases where network items other than nodes may be altered by a menu item, all items (nodes or otherwise) will be affected. """ pass def flashMessage(image, message, duration): """ flashMessage(self, image, message, duration) Causes a message to appear briefly in the upper left corner of the network editor, then fade away. The image parameter specifies an icon or image file that should be displayed along with the text specified in the message parameter. Either of these parameters may be None if only an image or only text is desired. The duration parameter specifies the time in seconds before the message should fade away. """ pass def popEventContext(): """None""" pass def setDragSourceData(items): """ setDragSourceData(self, items) Controls the network items that are put into the drag and drop buffer. The values in this buffer are only used when dragging items out of the network editor (such as when the user drags a node from the network editor onto a textport, or a parameter dialog. """ pass def setShapes(shapes): """ setShapes(self, shapes) The shapes parameter specifies a tuple of hou.NetworkShape objects which will be drawn into the network editor. See documentation of the network shape class and its subclasses for more information. """ pass def homeToSelection(self): """ homeToSelection(self) Centers the nodes within the network editor to show the current selection. This method wraps a call to hou.NetworkEditor.setVisibleBounds. """ pass def setNetworkBoxPendingRemovals(items): """ setNetworkBoxPendingRemovals(self, items) When moving items around the network, network boxes automatically resize to contain their child items as they move. To indicate that items will be removed from their network box, pass them as a tuple to this method. Doing so will cause their network box containers to not resize to fit the items as they move. """ pass def setAdjustments(items, adjustments, auto_remove=False): """ setAdjustments(self, items, adjustments, auto_remove=False) Configures temporary adjustments to the sizes and locations of network items in the editor. The items parameter is a tuple of hou.NetworkMovableItem objects. The adjustments parameter is a tuple of hou.NetworkAnimValue objects to associate with each network item in the items tuple. See the documentation of that class for more information about specifying adjustments. The auto_remove parameter may be set to True to indicate that the network editor should automatically delete the adjustments once the animation on them has completed. This is useful for animations performed at the end of a user action, where the following events do not relate to the changes being made, and so it is easier not to have to manage the reset of the adjustment values explicitly in the future. """ pass def overviewVisible(): """ overviewVisible(self) -> bool Return a boolean indicating whether or not the overview gadget is currently visible. This result reflects the true state of the overview gadget even if the overview is configured to display automatically. """ pass def itemRect(item, adjusted=True): """ itemRect(self, item, adjusted=True) -> hou.BoundingRect Return the bounding rectangle of the hou.NetworkMovableItem specified by the item parameter. If the adjusted parameter is set to True, any adjustments to this item's size and position set in the most recent call to setAdjustments() will be taken into account. If False, these adjustments will be ignored. Note that for nodes, only the node body is taken into account, not the node name, badges, or other decorations. """ pass def pushEventContext(): """ eventContextData(self) -> dict Accesses the context data passed into the most recent call to the hou.NetworkEditor.pushEventContext method. If no calls have been made to this method, there is still a python dict available to store any global information that may be used by the network editor event handling code. As an example, the current view bounds for each network visited by the editor are stored as part of this context data dictionary. """ pass def openVopOutputInfoMenu(node, output_index): """ openVopOutputInfoMenu(self, node, output_index) Brings up the VOP node output info menu for the hou.VopNode specified in the node parameter, at the output specified by the output_index parameter. This menu is used to control the behavior of the VOP node when the Debug or Bypass flags are enabled. """ pass def openNameEditor(item, select_all, =, False): """ openNameEditor(self, item, select_all = False) -> int Opens an input field for editing the name of the node specified in the item parameter. Returns an integer id which is passed to the network editor as part of an event indicating when the user finishes editing the text. If select_all is set to True, the editor is opened with all text selected. """ pass def posToScreen(pos): """ posToScreen(self, pos) -> hou.Vector2 Given a position value pos as a hou.Vector2, expressed in network units, return the equivalent position in screen units (pixels). The result will depend on both the current zoom level and view position of the network editor. """ pass def NetworkEditor_swigregister(): """None""" pass class NetworkFootprint(object): """ hou.NetworkFootprint Describes the conditions under which a footprint ring should be displayed for a node in a network editor pane. A footprint in the network editor is a ring drawn behind the node in the network editor, such as the blue "display flag" ring around the wave1 node and the orange "output flag" ring around the wave2 node: This class describes to the network editor which nodes should be drawn with a footprint, and the color and position of that footprint. A tuple of these objects is passed to the hou.NetworkEditor.setFootprints method. This tuple should be updated every time the current network changes to a new node type category. The default footprint setup for SOP nodes is the following: > >>> editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor) > >>> editor.setFootprints([ > hou.NetworkFootprint( > hou.nodeFlag.Display, > hou.ui.colorFromName('GraphDisplayHighlight'), 1, True > ), > hou.NetworkFootprint( > hou.nodeFlag.Render, > hou.ui.colorFromName('GraphRenderHighlight'), 0, True > ), > hou.NetworkFootprint( > hou.nodeFlag.Template, > hou.ui.colorFromName('GraphTemplateHighlight'), 2, True > ), > hou.NetworkFootprint( > hou.nodeFlag.Footprint, > hou.ui.colorFromName('GraphTemplateHighlight'), 2, True > ), > hou.NetworkFootprint( > 'output', > hou.ui.colorFromName('GraphOutputHighlight'), 1, True > ) > ]) """ def NetworkFootprint_swigregister(): """None""" pass class NetworkImage(object): """ hou.NetworkImage Describes a background image that can be displayed in a network editor pane. The network editor pane can display any number of images in the background behind the nodes of the network. These background images are described using this class, and set in the network editor using the hou.NetworkEditor.setBackgroundImages method. This code sets a single background image in the network editor: > > editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor) > image = hou.NetworkImage() > image.setPath('$HFS/houdini/pic/Mandril.pic') > image.setRect(hou.BoundingRect(0, 0, 5, 5)) > editor.setBackgroundImages([image]) The network editor pane provides a mode for creating and editing background images directly in the pane. The resulting image layout is saved into the user data for the current network so that the image arrangement is automatically saved and restored with the hip file. """ def setBrightness(brightness): """ setBrightness(self, brightness) Sets the brightness adjustment for displaying this image in the network editor. This value should range from 0 to 1. Values less than 1 cause the image to be blended with the background of the network editor. An image with a brightness of 0 will appear as the background color, not black as is normally indicated by a brightness value of 0. """ pass def setRelativeToPath(path): """ setRelativeToPath(self, path) Images can be tied to network items such as nodes, network boxes, or sticky notes. This method sets the path to the network item to which this image is tied. Passing in an empty string indicates the location is not relative to any network item. """ pass def path(): """ path(self) -> str Return the path to the image file. """ pass def rect(): """ rect(self) -> hou.BoundingRect Returns the bounding rectangle that defines the size and position of the image within the network. If the relativeToPath() value is set, then the rectangle is translated by the position of the network item to which this image is tied. """ pass def brightness(): """ brightness(self) -> float Return the brightness adjustment for displaying this image in the network editor. This value should range from 0 to 1. Values less than 1 cause the image to be blended with the background of the network editor. An image with a brightness of 0 will appear as the background color, not black as is normally indicated by a brightness value of 0. """ pass def relativeToPath(): """ relativeToPath(self) -> str Images can be tied to network items such as nodes, network boxes, or sticky notes. This method returns the path to the network item to which this image is tied (or an empty string if its location is not relative to any network item). """ pass def setPath(path): """ setPath(self, path) Sets the path to the image file. """ pass def setRect(rect): """ setRect(self, rect) Sets the bounding rectangle that defines the size and position of the image within the network. If the relativeToPath() value is set, then the rectangle will be translated by the position of the network item to which this image is tied. """ pass def NetworkImage_swigregister(): """None""" pass class NetworkItem(object): """ hou.NetworkItem The base class for all visible elements within a network. This class has no methods, and only exists as a base class for hou.NetworkMovableItem and Hou.NodeConnection, both of which are visible in the network editor, but which have no real meaningful base class. By providing a common base class, items of these two types can be passed in or returned from hou.NetworkEditor functions. """ def networkItemType(): """None""" pass def NetworkItem_swigregister(): """None""" pass class NetworkMovableItem(NetworkItem): """ hou.NetworkMovableItem The base class for all visible elements within a network, such as Nodes, Network Boxes, and Sticky Notes. Each movable item has a position, color, and other attributes that allow for common interactions in the network editor. All movable items will have a parent network (except the node represented by hou.node('/')), and may be contained by a hou.NetworkBox. Not all movable items have a name, but all have a numeric session id, which is a unique number within a given Houdini session for a given subclass of NetworkMovableItem. """ def shiftPosition(self, vector2): """ shiftPosition(self, vector2) Equivalent to calling hou.NetworkMovableItem.move. """ pass def parentNetworkBox(): """ parentNetworkBox(self) -> hou.NetworkBox or None Returns the parent network box which contains this item, or None if it is not inside a network box. """ pass def setName(name, unique_name=False): """ setName(self, name, unique_name=False) Set the name of this node. Raises hou.OperationFailed if the new name contains characters other than letters, numbers, periods, dashes, or underscores. Raises hou.OperationFailed if the node could not be renamed (for example, another node already exists with the name, the node is the root node or top-level manager (e.g. /obj), or the node is inside a locked asset). If the unique_name parameter is set to True, the supplied name may be changed to ensure that it doesn't match the name of any existing node. """ pass def parent(): """ parent(self) -> hou.Node Return the node that contains this item. Note that this method returns None if the item is the root node (i.e. /). > >>> hou.node("/obj/box_object1").parent() > > >>> print hou.node("/").parent() > None """ pass def color(): """ color(self) -> hou.Color Return the color of this item's tile in the network editor. """ pass def move(vector2): """ move(self, vector2) Moves this item's tile in the network editor graph by the increments in the given hou.Vector2. To position a item absolutely, use setPosition(). To get the item's current graph position, use position(). Raises hou.InvalidInput if the item cannot move to the position specified. """ pass def isPicked(self): """ isPicked(self) -> bool Equivalent to calling hou.NetworkMovableItem.isSelected. """ pass def setPicked(self, on): """ setPicked(self, on) Equivalent to calling hou.NetworkMovableItem.setSelected with default values for all optional parameters. """ pass def path(): """ path(self) -> str Return the full path (i.e. starting with /) of this node in the network. """ pass def setPosition(vector2): """ setPosition(self, vector2) Sets the position of this item's tile in the network editor graph. Raises hou.InvalidInput if the item cannot have the given position. """ pass def size(): """ size(self) -> hou.Vector2 Return the size of this item's tile in the network editor graph as a Vector2. """ pass def setSelected(on, clear_all_selected=False, show_asset_if_selected=False): """ setSelected(self, on, clear_all_selected=False, show_asset_if_selected=False) Select or deselect this item, optionally deselecting all other selected items in this network. If show_asset_if_selected is True, and this item is a Node, then the panes will show the top-level asset of the selected item instead. """ pass def setColor(color): """ setColor(self, color) Sets the color of this item's tile in the network editor to the given hou.Color. """ pass def digitsInName(): """ digitsInName(self) -> int Return the value of the last set of digits inside the node's name, or 0 if there are no digits. For example, the result is 102 for a node named geo102, and 34 for a node named light12to34. """ pass def name(): """ name(self) -> str Return this node's name. See also hou.NetworkMovableItem.path. """ pass def relativePathTo(base_node): """ relativePathTo(self, base_node) -> str Return a relative path to another node object from this node. > >>> box1 = hou.node("/obj/box_object1/box1") > >>> sphere1 = hou.node("/obj/sphere_object1/sphere1") > >>> box1.relativePathTo(sphere1) > '../../sphere_object1/sphere1' > >>> hou.node("/obj").relativePathTo(box1) > 'box_object1/box1' > >>> box1.relativePathTo(box1) > '.' """ pass def isSelected(): """ isSelected(self) -> bool Return whether this item is selected. See also hou.selectedNodes. """ pass def sessionId(): """ sessionId(self) Returns an integer value that uniquely identifies this item in a given Houdini session. This id is only guaranteed to be unique in a single Houdini process. It is useful as a quick and easy way to save a restore a reference to an item. It is also only unique for a specific item subclass. So there may be a Node with the same session id as a NetworkBox. See hou.nodeBySessionId to turn a session id back into a node, or hou.networkBoxBySessionId to turn a session id back into a network box, or more generally, hou.itemBySessionId to turn a session id combined with an enum value indicating the item subclass into an item of that type. """ pass def position(): """ position(self) -> hou.Vector2 Return the position of this item's tile in the network editor graph as a Vector2. See also move() and setPosition(). """ pass def NetworkMovableItem_swigregister(): """None""" pass class NetworkShape(object): """ hou.NetworkShape The base class for extra shapes that can be drawn into a network editor. The network editor pane can be instructed to draw additional shapes to either the main canvas, or to the overlay area of the pane (drawn on top of the actual network). Each element that is drawn is described as a subclass of this NetworkShape base class, then passed to the network editor through either the hou.NetworkEditor.setShapes or hou.NetworkEditor.setOverlayShapes methods. """ class NetworkShapeBox(NetworkShape): """ hou.NetworkShapeBox Describes a rectangular area that can be drawn into a network editor. This subclass of hou.NetworkShape describes a rectangle that can be drawn into a network editor pane. """ def NetworkShapeBox_swigregister(): """None""" pass class NetworkShapeConnection(NetworkShape): """ hou.NetworkShapeConnection Describes a wire that can be drawn into a network editor. This subclass of hou.NetworkShape describes a wire that can be drawn into a network editor pane. This wire is drawn using the same wire style set on the current network. """ def NetworkShapeConnection_swigregister(): """None""" pass class NetworkShapeLine(NetworkShape): """ hou.NetworkShapeLine Describes a line that can be drawn into a network editor. This subclass of hou.NetworkShape describes a line that can be drawn into a network editor pane. """ def NetworkShapeLine_swigregister(): """None""" pass class NetworkShapeNodeShape(NetworkShape): """ hou.NetworkShapeNodeShape Describes a node shape that can be drawn into a network editor. This subclass of hou.NetworkShape describes a node shape that can be drawn into a network editor pane. This can draw any of the node shapes available to the nodes in the network through the Shape Palette. """ def NetworkShapeNodeShape_swigregister(): """None""" pass def NetworkShape_swigregister(): """None""" pass class Node(NetworkMovableItem): """ hou.Node The base class for all nodes in Houdini (objects, SOPs, COPs, etc.) An instance of this class corresponds to exactly one instance of a node in Houdini. Each node has a unique path that defines its location in the tree of nodes. The node path hierarchy is similar to the hierarchy of folders and files in a file system. Some nodes, called networks, may contain other nodes inside them, much like a file folder would, while other nodes may not. For example, an object node instance and a SOP subnetwork node instance may contain SOP nodes, but a box SOP instance may not. TIP Be careful not to confuse nodes with node types. A node is an instance of a node type. For example suppose /obj/geo1/box1 is a box SOP. It has its own unique name (box1) and its own copies of parameter values. It is an instance of the box SOP node type. This node type defines what parameters are common to all box SOP node instances, as well as the algorithm that each BOX SOP performs. The class that represents a node type is hou.NodeType. You cannot create instances of hou.Node using hou.Node.__init__. Instead, you look up Node objects corresponding to existing Houdini nodes with hou.node(). To create a new Houdini node instance inside another node, use hou.Node.createNode. To delete a Houdini node, use hou.Node.destroy. Note that a Node object internally stores a reference to the corresponding Houdini node, and that their lifetimes are different. If a Python node object is deleted because its reference count in Python goes to zero, the Houdini node will be unaffected. On the other hand, if you have a Node object in a Python variable and the Houdini node is deleted, the Python variable will still exist, and Python will not crash. Instead, if you later call a method on that Python Node object, Houdini will raise a hou.ObjectWasDeleted exception. Be careful not to confuse this class with the function hou.node. """ def copyItemsToClipboard(items): """ copyItemsToClipboard(self, items) Given a sequence of child items (nodes, network boxes, sticky notes, etc), save them to the clipboard so they can be pasted into this or another network. items A sequence of hou.NetworkMovableItems that are children of this node. Raises hou.OperationFailed if any of the nodes or network boxes are node children of this node. Raises hou.PermissionError if you do not have permission to read the contents of this node. """ pass def cookCodeGeneratorNode(check_parent=False): """ cookCodeGeneratorNode(self, check_parent=False) -> hou.Node Return the node itself or a network node that contains this node and can generate compiled cook code. For example, the generator node for a VOP node could be the SHOP node or SOP node that contains it for example. Return None if this node cannot generate code and is not contained in a code generating node either either. """ pass def evalParm(parm_path): """ evalParm(self, parm_path) -> int, float, or str Evaluates the specified parameter and returns the result. """ pass def selectNextVisibleWorkItem(): """ selectNextVisibleWorkItem() If a work item is selected, selects the next visible work item """ pass def clearParmAliases(): """ clearParmAliases(self) Removes all alias names from parameters on the node. """ pass def inputAncestors(include_ref_inputs=True, follow_subnets=False): """ inputAncestors(self, include_ref_inputs=True, follow_subnets=False) -> tuple of hou.Node Return a tuple of all input ancestors of this node. If include_ref_inputs is False, then reference inputs are not traversed. If follow_subnets is True, then instead of treating subnetwork nodes as a single node, we also traverse its children starting with its display node. See also the inputs() method. """ pass def supportsMultiCookCodeContexts(): """ supportsMultiCookCodeContexts(self) -> bool Return True if this node can generate compiled cook code for multiple contexts (i.e. surface context, displacement context, etc.) and False otherwise. Raises hou.OperationFailed if this node cannot generate compiled code. """ pass def selectPreviousVisibleWorkItem(): """None""" pass def parmsReferencingThis(): """ parmsReferencingThis(self) -> tuple of hou.Parm Return a list of the parameters that reference this node. """ pass def setParmExpressions(self, parm_dict, language=None, replace_expressions=True): """ setParmExpressions(self, parm_dict, language=None, replace_expressions=True) Given a dictionary mapping parm names to expression strings, set each of the corresponding parms on this node to the given expression string in the dictionary. See hou.Parm.setExpression for a description of the language and replace_expressions parms. The following example expressions set the tx and sy parameters at once: > >>> node = hou.node("/obj").createNode("geo") > >>> node.setParmExpressions({"tx": 'ch("ty")', "sy": "sin($F)"}) Raises hou.OperationFailed if any of the parameter names are not valid. See also the setParms method. """ pass def iterStickyNotes(): """None""" pass def childTypeCategory(): """ childTypeCategory(self) -> hou.NodeTypeCategory Return the hou.NodeTypeCategory corresponding to the children of this node. For example, if this node is a geometry object, the children are SOPs. If it is an object subnet, the children are objects. """ pass def children(): """ children(self) -> tuple of hou.Node Return a list of nodes that are children of this node. Using the file system analogy, a node's children are like the contents of a folder/directory. To find the number of children nodes, use len(node.children()). The order of the children in the result is the same as the user defined ordering in Houdini. To see this order, switch the network view pane into list mode, and ensure that the list order is set to user defined. To reorder nodes, drag and drop them in the list. > def pc(node): > '''Print the names of the children of a particular node. This function > can be handy when working interactively in the Python shell.''' > for child in node.children(): > print child.name() > > def ls(): > '''Print the names of the nodes under the current node.''' > pc(hou.pwd()) The following expression evaluates to a list of children of a particular node type: > [c for c in node.children() if c.type() == node_type] """ pass def isInsideLockedHDA(): """ isInsideLockedHDA(self) -> bool Return whether this node is inside a locked digital asset. If this node is not inside a locked HDA, the node may deviate from the HDA definition. """ pass def createOrMoveVisualizer(output_index): """ createOrMoveVisualizer(self, output_index) Creates a node for visualizing the data from a particular output of this node. If a visualizer node already exists in the current network, it is moved and connected to the specified output_index. This method is only implemented for SOP and VOP nodes. Other node types do nothing when this method is called. """ pass def addSpareParmTuple(self, parm_template, in_folder=(): """ addSpareParmTuple(self, parm_template, in_folder=(), create_missing_folders=False) -> hou.ParmTuple Add a spare parameter tuple to the end of the parameters on the node. If in_folder is not an empty sequence, this method adds the parameters to the end of the parameters in a particular folder. parm_template A hou.ParmTemplate subclass instance that specifies the type of parameter tuple, the default value, range, etc. in_folder A sequence of folder names specifying which folder will hold the parameter. If this parameter is an empty sequence (e.g. ()), Houdini will not put the parameter inside a folder. If it is, for example, ("Misc", "Controls"), Houdini puts it inside the "Controls" folder that's inside the "Misc" folder. If it is, for example, ("Misc",), Houdini puts it inside the "Misc" folder. create_missing_folders If True, and the folder location specified by in_folder does not exist, this method creates the missing containing folders. Note that this method can add a single folder by passing a hou.FolderParmTemplate for parm_template. See also the removeSpareParmTuple() and addSpareParmFolder() methods. This method is deprecated in favor of setParmTemplateGroup. """ pass def copyTo(self, destination_node): """ copyTo(destination_node) -> hou.Node Copy this node to a new place in the node hierarchy. The new node is placed inside the given destination node. This method returns the new node. Raises hou.OperationFailed if the destination node cannot contain the new node. Raises hou.PermissionError if the destination node is inside a locked asset. """ pass def setCachedUserData(name, value): """ setCachedUserData(self, name, value) Add/set a named value on this node instance. Unlike setUserData, values set using this method are not saved with the hip file. name: A unique name (key) for the user-defined data. By using different names, you can attach multiple pieces of user-defined data to a node. value: The value to store. Unlike setUserData, this value may be any Python object. This name/value pair is not stored with the hip file. It is useful for nodes implemented in Python that want to save temporary values between cooks, to avoid recomputing them on subsequent cooks. The following example illustrates how to set, access, and delete cached user-defined data: > >>> n = hou.node("/obj").createNode("geo") > >>> n.setCachedUserData("my data", [1, 2, {"a": "b", "c": "d"}]) > >>> n.cachedUserData("my data") > [1, 2, {'a': 'b', 'c': 'd'}] > >>> n.cachedUserDataDict() > {'my data': [1, 2, {'a': 'b', 'c': 'd'}]} > >>> n.destroyCachedUserData("my data") > >>> n.cachedUserDataDict() > {} > >>> print n.cachedUserData("my data") > None See per-node user-defined data for more information and examples. """ pass def removeSpareParmTuple(self, parm_tuple): """ removeSpareParmTuple(self, parm_tuple) Removes the specified spare parameter tuple. See also addSpareParmTuple(). This method is deprecated in favor of setParmTemplateGroup. """ pass def copyItems(items, channel_reference_originals, =, False, relative_references, =, True, connect_outputs_to_multi_inputs, =, True): """ copyItems(self, items, channel_reference_originals = False, relative_references = True, connect_outputs_to_multi_inputs = True) -> tuple of hou.NetworkMovableItem Create copies of all specified items in this network. The items do not need to be children of this network, but all items must be contained in the same parent network. If channel_reference_originals is True, the parameters of all new nodes are set to channel reference the original nodes. If a copied node is a sub-network, only the top level node establishes channel references to the original. Child nodes inside the sub-network will be simple copies of the original child nodes. The relative_references parameter controls whether the channel references use relative or absolute paths to the source nodes. If connect_outputs_to_multi_inputs is True, and any items being copied have outputs connected to a multi-input node (like a Merge), then the new item copies will also be connected to the multi-input node. Normally copied nodes do not have any outputs to nodes outside the copied set. Returns a tuple of all the new network items. Raises hou.OperationFailed if this node cannot contain children. Raises hou.PermissionError if this node is inside a locked asset. """ pass def findNodesThatProcessedObject(): """None""" pass def nodes(node_path_tuple): """ nodes(self, node_path_tuple) -> tuple of hou.Node or None This is like node() but takes multiple paths and returns multiple Node objects. This is the equivalent of: > nodes = [self.node(path) for path in paths] """ pass def numOrderedInputs(): """ numOrderedInputs(self) -> int Some nodes can have a small number of dedicated inputs with specific meanings, followed by an arbitrary number of additional inputs, where gaps are not permitted between the inputs (these are referred to as unordered inputs). This is common in DOP nodes such as the Multiple Solver DOP. This function returns the number of dedicated (or ordered) inputs that occur before the unordered inputs begin. This function will only return non-zero values if the hou.NodeType.hasUnorderedInputs function for this node's hou.Node.type object returns True. """ pass def createNode(node_type_name, node_name=None, run_init_scripts=True, load_contents=True, exact_type_name=False): """ createNode(self, node_type_name, node_name=None, run_init_scripts=True, load_contents=True, exact_type_name=False) -> hou.Node Create a new node of type node_type_name as a child of this node. node_name The name of the new node. If not specified, Houdini appends a number to the node type name, incrementing that number until a unique node name is found. If you specify a name and a node already exists with that name, Houdini will append a number to create a unique name. run_init_scripts If True, the initialization script associated with the node type will be run on the new node. load_contents If True, any subnet contents will be loaded for custom subnet operators. exact_type_name If True, the node's type name will be exactly as specified in the node_type_name. Otherwise, a preferred operator type that matches the given node_type_name may be used. For example, the given "hda" may match a newer version "hda::2.0", or if there are two available operators "namespaceA::hda" and "namespaceB::hda", and the "namespaceB" has precedence, then the created node will be of type "namespaceB::hda". Raises hou.OperationFailed if this node cannot contain children. Raises hou.PermissionError if this node is inside a locked asset. > >>> obj = hou.node("/obj") > > # Let Houdini choose a name based on the node type name. > >>> obj.createNode("geo") > > > # Let Houdini choose a unique name. > >>> obj.createNode("geo") > > > # Give the node a specific name. > >>> obj.createNode("geo", "foo") > > > # Let Houdini create a unique name from our suggested name. Also, don't > # run the geometry object init scripts so the contents are empty. > >>> obj.createNode("geo", "geo1", run_init_scripts=False) > > >>> obj.node("geo1").children() > (,) > >>> obj.node("geo3").children() > () """ pass def outputConnectors(): """ outputConnectors(self) -> tuple of tuple of hou.NodeConnection Return a a tuple of tuples of hou.NodeConnection objects. The length of the result tuple is equal to the number of output connectors on this node. Each subtuple contains all the connections going out of that connector, and is empty if nothing is wired to that connector. > >>> split = hou.node("/obj").createNode("dopnet").createNode("split") > >>> split.parent().createNode("rbdsolver").setFirstInput(split) > >>> split.parent().createNode("gravity").setFirstInput(split, 1) > >>> split.parent().createNode("merge").setFirstInput(split, 1) > >>> split.outputConnectors() > ((,), (, ), (), ()) See also hou.NodeConnection and hou.Node.outputConnections. """ pass def addSpareParmFolder(self, folder_name, in_folder=(): """ addSpareParmFolder(self, folder_name, in_folder=(), parm_name=None, create_missing_folders=False) Adds a folder to the spare parameters. Note that all the folders in a set correspond to one parameter. If this is the first folder to go in the set, parm_name will be used as the parameter name. Otherwise, parm_name will be ignored and the parameter name of the first folder in the set is used. If this is the first folder in the set and parm_name is None, it will default to 'sparefolder0'. If parm_name is already in use, a unique name will be automatically generated. If create_missing_folders is True, this method will create the folders in in_folder that don't exist. So, this method can be used to add spare folders and a spare parameter at the same time. Note that you can add folders by passing a hou.FolderParmTemplate to the addSpareParmTuple method, so this method is deprecated. Note also that addSpareParmTuple is deprecated in favor of setParmTemplateGroup. See also the removeSpareParmFolder and addSpareParmTuple methods. This method is deprecated in favor of setParmTemplateGroup. """ pass def indirectInputs(): """ indirectInputs(self) -> tuple of hou.SubnetIndirectInput Return the hou.SubnetIndirectInput objects of a subnet. Raises hou.InvalidNodeType if this node is not a subnetwork. """ pass def inputConnectors(): """ inputConnectors(self) -> tuple of tuple of hou.NodeConnection Return a tuple of tuples of hou.NodeConnection objects. The length of the result tuple is equal to the maximum number of inputs that can be connected to this node. Each subtuple contains exactly one node connection if something is wired into the connector; otherwise it is the empty tuple. See also hou.NodeConnection and hou.Node.inputConnections. """ pass def modificationTime(self): """ modificationTime(self) -> datetime.datetime Return the date and time when the node was last modified. """ pass def findNetworkBoxes(pattern): """ findNetworkBoxes(self, pattern) -> tuple of hou.NetworkBox Return a list of network boxes inside this node whose names match a pattern. """ pass def setParmTemplateGroup(): """None""" pass def outputConnections(): """ outputConnections(self) -> tuple of hou.NodeConnection Return a tuple of NodeConnection objects for the connections going out of the bottom of this node. If nothing is wired into the output of this node, return an empty tuple. To get a list of the connected nodes themselves, use hou.Node.outputs. Note that this method is a shortcut for: reduce(lambda a, b: a+b, self.outputConnectors(), ()). Since most nodes have only one output connector, though, this method is usually equivalent to self.outputConnectors()[0]. > >>> box = hou.node("/obj").createNode("geo").createNode("box") > >>> box.parent().createNode("xform").setFirstInput(box) > >>> box.parent().createNode("subdivide").setFirstInput(box) > >>> box.outputConnections() > (, ) See also hou.node.outputConnectors. """ pass def loadParmClip(self): """auto-insert ocstring: HOM_Node::loadParmClip""" pass def setDisplayDescriptiveNameFlag(): """None""" pass def runInitScripts(): """ runInitScripts(self) Runs the initialization script associated with this node's type. """ pass def cook(force=False, frame_range=(): """ cook(self, force=False, frame_range=()) Asks or forces the node to re-cook. frame_range The frames at which to cook the object. This should be a tuple of 2 or 3 ints giving the start frame, end frame, and optionally a frame increment, in that order. If you supply a two-tuple (start, end), the increment is 1. """ pass def createOutputNode(self, node_type_name, node_name=None, run_init_scripts=True, load_contents=True, bool, exact_type_name=False): """ createOutputNode(self, node_type_name, node_name=None, run_init_scripts=True, load_contents=True, bool exact_type_name=False) Create a new node and connect its first input to this node's (first) output. Return the new node. See the createNode method for more information on the parameters. See also the createInputNode method. """ pass def isGenericFlagSet(flag): """ isGenericFlagSet(self, flag) -> bool Returns the value of the specific flag. flag must be a hou.nodeFlag value. """ pass def hdaModule(): """ hm(self) -> hou.HDAModule This method is a shortcut for self.hdaModule(). See also hou.phm. """ pass def copyNetworkBox(network_box_to_copy, new_name=None, channel_reference_original=False): """ copyNetworkBox(self, network_box_to_copy, new_name=None, channel_reference_original=False) -> hou.NetworkBox Copies a network box and returns the copy. If new_name is given, the network box will be copied to a new network box named new_name (a different name will be generated if there is already a network box with that name). If channel_reference_original is True, all operators created by the copy will have their animatable parameters set to reference the original operators. Raises hou.OperationFailed if this node is not a network or if the node child type does not match the network box's node type. """ pass def isNetwork(): """ isNetwork(self) -> bool Return True if this node is a network, in other words a node that may contain child nodes. Otherwise return False which indicates that several other methods such as hou.Node.createNode will raise hou.OperationFailed if they are called. """ pass def setEditableInputString(): """None""" pass def parmsInFolder(folder_names): """ parmsInFolder(self, folder_names) -> tuple of hou.Parm Return a list of parameters in a folder on this node. Returns all parameters in the folder and its subfolders (if any). folder_names A sequence of folder name strings. For example, to get a list of the parameters in the Shading folder of the Render folder, use ("Render", "Shading"). Note that by folder name, we mean the label used in the parameter dialog, not the internal parameter name. If this sequence is empty, the method returns all parameters on the node, the same as if you called parms(). Raises hou.OperationFailed if the folder specified by folder_names does not exist. For example, suppose a node had a Render folder that contained a Shading subfolder. Then this line of code would return the parameters in the Render folder: > # Note the trailing comma after "Render" to tell Python that "Render" is > # contained in a tuple/sequence as opposed to just a single string with > # parentheses around it. > >>> node.parmsInFolder(("Render", )) And this line of code would return the parameters in the Shading subfolder. > >>> node.parmsInFolder(("Render", "Shading")) See also hou.Parm.containingFolders and hou.Parm.containingFolderSetParmTuples """ pass def removeEventCallback(event_types, callback): """ removeEventCallback(self, event_types, callback) Given a callback that was previously added on this node and a sequence of hou.nodeEventType enumerated values, remove those event types from the set of event types for the callback. If the remaining set of event types is empty, the callback will be removed entirely from this node. Raises hou.OperationFailed if the callback had not been previously added. See hou.Node.addEventCallback for more information. """ pass def parmClipData(self, start=None, end=None, binary=True, use_blosc_compression=True, sample_rate=0, scoped_only=False): """ parmClipData(start=None, end=None, binary=True, use_blosc_compression=True, sample_rate=0, scoped_only=False) -> str Returns the clip data for the parameters of this node. This method is similar to hou.Node.saveParmClip, except that it returns the clip data (file contents) instead of saving the animation to a clip file. , , , and behave the same as in hou.Node.saveParmClip. If is True, return binary clip data, otherwise return plain text (ASCII) clip data. If is True, blosc compress the binary clip data. This cannot be used for plain text (ASCII) clip data. Raises a hou.OperationFailed exception if none of the parameters of this tuple have animation. Raises a hou.InvalidInput exception if start >= end. If specifying only , ensure that the specified value is less than the global end frame. Likewise, if specifying only , ensure it is larger than the global start frame. Raises a hou.InvalidInput exception if binary = False and use_blosc_compression = True. """ pass def parmTuplesInFolder(folder_names): """ parmTuplesInFolder(self, folder_names) -> tuple of hou.ParmTuple Return a list of the parameter tuples in a folder on this node. This method is similar to parmsInFolder(), except it returns a list of hou.ParmTuple instead of hou.Parm. See parmsInFolder() above for information about the arguments. See also hou.Parm.containingFolders and hou.Parm.containingFolderSetParmTuples """ pass def item(item_path): """ item(self, item_path) -> hou.NetworkMovableItem or None Return the network item at the given path, or None if no such item exists. If you pass in a relative path (i.e. the path does not start with /), searches are performed relative to this node. If the path is an absolute path (i.e. it starts with /), this method is a shortcut for hou.item(node_path). Otherwise, it is a shortcut for hou.item(self.path() + "/" + item_path). See also hou.item. Note that the return value may be an instance of a subclass of NetworkMovableItem. For example, if the item being found is an object node, the return value will be a hou.ObjNode instance. If the item is a network box, the return value will be a hou.NetworkBox instance. """ pass def allParms(self): """ allParms(self) -> generator of hou.Parm Recursively return a sequence of all the parameters on all of the nodes contained in this node including this node. This method is a generator and does not return a tuple. Here is an example of printing out the parameter paths for all nodes under /obj: > root_node = hou.node("/obj") > for parm in root_node.allParms(): > print parm.path() """ pass def numItems(): """None""" pass def setInput(input_index, item_to_become_input, output_index=0): """ setInput(self, input_index, item_to_become_input, output_index=0) If item_to_become_input is not None, connect the output connector of another node to an input connector of this node. Otherwise, disconnect anything connected to the input connector. input_index The index of this node's input connector. item_to_become_input If None this method disconnects everything from the input connector. If a hou.Node or a hou.SubnetIndirectInput, this method connects its output to this node's input connector. output_index The index of the other node's output connector. Raises hou.InvalidInput if output_index is invalid. Raises hou.OperationFailed if item_to_become_input is not in the same network as this node. Raises hou.PermissionError if the node is inside a locked asset. """ pass def creatorState(): """ creatorState(self) -> str This returns the name of the viewport tool that was used to be created. This name is not set by default and is usually the empty string. """ pass def globParms(pattern, ignore_case=False, search_label=False, single_pattern=False): """ globParms(self, pattern, ignore_case=False, search_label=False, single_pattern=False) -> tuple of hou.Parm Return a tuple of parameters matching the pattern. The pattern may contain multiple pieces, separated by spaces. An asterisk (*) in a pattern piece will match any character. By default, Houdini will add the parameters from each pattern piece to those already matched. However, if the pattern piece begins with a caret (^), Houdini will remove the matches for that piece from the result. By default the pattern match is case-sensitive. Set ignore_case to True for case-insensitive pattern matching. Note that case insensitivity only applies when matching node and parameter names. It does not apply when matching group, network box or bundle names. By default, only parameters with names matching the pattern are returned. Set search_label to True to also return parameters with labels matching the pattern. If single_pattern is True, the pattern will be treated as one pattern even if there are spaces in the pattern. This method returns an empty tuple if you pass in an empty pattern. """ pass def saveCookCodeToFile(file_name, skip_header=False, context_name=None): """ saveCookCodeToFile(self, file_name, skip_header=False, context_name=None) Saves VEX/RSL source code to a disk file (on nodes that support this). file_name The file path in which to save the generated code. skip_header If True, the method does not write a header comment at the beginning of the file containing the file name and node path from which the code was generated and a time stamp. context_name A string containing name of the shader context for the code. This option applies to nodes such as the Material Shader Builder which can generate code for multiple context types. For example, a Material network might contain both surface and displacement shaders, so you must specify which type of shader code to generate: > node("/shop/vopmaterial1").saveCookCodeToFile("myfile.vfl", context_name="surface") On single-context nodes this argument is ignored. For VEX materials, possible values are surface, displacement, light, shadow, fog, image3d, photon, or cvex. For RSL materials, possible values are surface, displacement, light, volume, or imager. """ pass def editableInputString(): """None""" pass def node(node_path): """ node(self, node_path) -> hou.Node or None Return the node at the given path, or None if no such node exists. If you pass in a relative path (i.e. the path does not start with /), searches are performed relative to this node. For example, to get the parent node of a node in the the variable n, use n.node(".."). To get a child node named geo5, use n.node("geo5"). To get a sibling node named light3, use n.node("../light3"). Note that the return value may be an instance of a subclass of Node. For example, if the node being found is an object node, the return value will be a hou.ObjNode instance. If the path is an absolute path (i.e. it starts with /), this method is a shortcut for hou.node(node_path). Otherwise, it is a shortcut for hou.node(self.path() + "/" + node_path). See also hou.node_. """ pass def isEditable(): """ isEditable(self) -> bool Return True if the node is editable. This is similar to the hou.Node.isEditableInsideLockedHDA method except that it will return True for nodes that are not inside a locked HDA. This function is the simplest way to determine if most node modifications (changing inputs, changing parameters, changing flags) will be allowed on the node. """ pass def creator(): """ isBuiltExplicitly(self) -> bool Return whether this node was built explicitly (defaults to True). Most nodes are built explicitly, but some are implicitly created by Houdini. For example, if you select geometry from multiple SOPs and then perform an operation, Houdini will put down an implicit merge SOP before performing that operation. When reselecting geometry in SOPs, Houdini will automatically delete any SOPs that were created implicitly. """ pass def isFlagReadable(flag): """ isFlagReadable(self, flag) -> bool Return True if the specified flag is readable and False otherwise. flag must be a hou.nodeFlag value. """ pass def setNextInput(item_to_become_input, output_index=0, unordered_only=False): """ setNextInput(self, item_to_become_input, output_index=0, unordered_only=False) Connect the output connector from another node into the first unconnected input connector or a multi-input connector of this node. If a node has some ordered inputs followed by a multi-input connector, the unordered_only parameter can be used to force the input to connect to the unordered multi-input connection instead of any of the ordered input which may not be connected. This method is roughly equivalent to: > for input_index, conectors in enumerate(self.inputConnectors()): > if len(connectors) == 0: > self.setInput(input_index, item_to_become_input, output_index) > raise hou.InvalidInput("All inputs are connected") Raises hou.InvalidInput if all inputs are connected. See hou.Node.setInput for more information. """ pass def replaceSpareParmTuple(self, parm_tuple_name, parm_template): """ replaceSpareParmTuple(self, parm_tuple_name, parm_template) Replace an existing spare parameter tuple with a new one. The old parameter tuple is removed and the new one is added in its place. parm_tuple_name The name of the spare parameter tuple to replace. Raises hou.OperationFailed if no parameter tuple exists with this name, or if it is the name of a non-spare parameter. parm_template A hou.ParmTemplate describing the new parameter tuple. The new parameter tuple may or may not have the same name as the old one. By providing a parameter tuple with the same name, you can modify an existing spare parameter tuple. Note that you cannot replace non-spare parameter tuples. However, you can change the visibility of non-spare parameters using hou.ParmTuple.hide. To change a parameter for all instances of digital asset, use hou.HDADefinition.replaceParmTuple. This method is deprecated in favor of setParmTemplateGroup. """ pass def loadChildrenFromFile(self, file_name, ignore_load_warnings=False): """ loadChildrenFromFile(self, file_name, ignore_load_warnings=False) Calls hou.Node.loadItemsFromFile. Provided for backward compatibility. New code should call loadItemsFromFile directly. """ pass def pasteItemsFromClipboard(position, =, None): """ pasteItemsFromClipboard(self, position = None) Load the contents of a file saved with hou.Node.copyItemsToClipboard into the contents of this node. If the position parameter is given as a tuple of two float values (or equivalent, like a hou.Vector2), the pasted items are moved such that they are centered around the provided position. Raises hou.OperationFailed if this node is not a network, or if there are errors loading the items from the clipboard. Raises hou.PermissionError if this node is a locked instance of a digital asset. """ pass def findStickyNotes(pattern): """ findStickyNotes(self, pattern) -> tuple of hou.StickyNote Return a list of sticky notes inside this node whose names match a pattern. """ pass def setCurrent(on, clear_all_selected=False): """ setCurrent(self, on, clear_all_selected=False) Set or unset this node as the last selected one. Each network (i.e. node containing children) stores its own list of selected nodes, and the last selected node has special meaning. For example, it is the node displayed in unpinned parameter panes. If on is True, this node will become the last selected node. If it is False and this node was the last selected one, it will be unselected and the second-last selected node will become the last selected node. If clear_all_selected is true, Houdini will unselect every node in this network before performing the operation. See also hou.Node.setSelected and hou.selectedNodes. """ pass def moveToGoodPosition(relative_to_inputs=True, move_inputs=True, move_outputs=True, move_unconnected=True): """ moveToGoodPosition(self, relative_to_inputs=True, move_inputs=True, move_outputs=True, move_unconnected=True) -> hou.Vector2 Moves a node to a well-spaced position near its inputs or outputs and returns the new position of the node. """ pass def findOrCreateMotionEffectsNetwork(create=True): """ findOrCreateMotionEffectsNetwork(self, create=True) -> hou.chopNetNodeTypeCategory Return a CHOP network node suitable for storing Motion Effects. By default, if the node doesn't exist, it will be created. See also hou.Parm.storeAsClip and hou.Node.motionEffectsNetworkPath. """ pass def selectedChildren(include_hidden=False, include_hidden_support_nodes=False): """ selectedChildren(self, include_hidden=False, include_hidden_support_nodes=False) -> tuple of hou.Node Return a tuple containing the children of this node that are selected. Note that the last selected node has special meaning, and can also be retrieved with hou.Node.isCurrent. include_hidden If False, hidden nodes are not included in the result, even if they are selected. include_hidden_support_nodes If True, include in the returned tuple any hidden nodes that exist solely to support nodes that are actually selected. This specifically refers to VOP Parameter nodes, but may include other support nodes as well. The following example will print the names of all selected objects in /obj: > for n in hou.node("/obj").selectedChildren(): > print n.name() To find the total number of selected children nodes, use len(node.selectedChildren()). """ pass def errors(): """ errors(self) -> tuple of str Return the text of any errors from the last cook of this node, or an empty tuple if there were no errors. """ pass def hide(on): """ hide(self, on) Hide or show a node in the network editor. See hou.Node.isHidden for more information about hidden nodes. """ pass def addEventCallback(event_types, callback): """ addEventCallback(self, event_types, callback) Registers a Python callback that Houdini will call whenever a particular action, or event, occurs on _this particular node instance_. Callbacks only persist for the current session. For example, they are not saved to the .hip file. If you want persistent callbacks in every session, you can add them in code in 456.py (runs when the user opens a .hip file). See where to add Python scripting for more information. event_types A sequence of hou.nodeEventType enumeration values describing the event types that will cause Houdini to call the callback function. callback A callable Python object, such as a function or bound method. Houdini will call this function whenever one of the event types in event_types occurs. Houdini calls the function with an event_type keyword argument containing the hou.nodeEventType value corresponding to the event that triggered the callback. Houdini will pass additional keyword arguments depending on the event type. For example, in a callback for the ParmTupleChanged event, Houdini will pass a parm_tuple keyword argument containing a hou.ParmTuple reference to the parameter that changed. See hou.nodeEventType for the extra arguments (if any) passed for each event type. You can add **kwargs to the argument list to accept all keyword arguments, to allow the same callback to be used for different events, or to be safe from future changes: > def event_callback(event_type, **kwargs): > ... NOTE If you try to add the exact same callback function more than once, Houdini will still only call the function only once in response to an event. However, it may be useful to "add" the same function if you want to register it with different event_types. Raises hou.OperationFailed if the event_types list argument is empty. The following example shows to set up a function that's called whenever a certain node's name changes: > > def name_changed(node, event_type, **kwargs): > print("The geometry object is now named", node.name()) > > hou.node("/obj/geo1").addEventCallback((hou.nodeEventType.NameChanged, ), name_changed) See also hou.Node.removeEventCallback and hou.Node.removeAllEventCallbacks. """ pass def isLockedHDA(): """ isLockedHDA(self) -> bool If this node is an instance of a digital asset, return whether or not it is locked. Otherwise, return False. To differentiate between unlocked digital assets and nodes that are not instances of digital assets, check if the node's type has a definition: > def isUnlockedAsset(node): > return not node.isLockedHDA() and node.type().definition() is not None See hou.HDADefinition.updateFromNode for an example of how to save and lock all unlocked digital asset instances. """ pass def inputLabels(): """ inputLabels(self) -> tuple of str Returns a tuple of all input labels for this node. Labels for input connectors that are hidden are also included. """ pass def canCreateDigitalAsset(): """ canCreateDigitalAsset(self) -> bool Return True if hou.Node.createDigitalAsset can succeed. """ pass def infoTree(verbose=False, debug=False, output_index=0): """ infoTree(self, verbose=False, debug=False, output_index=0) -> hou.NodeInfoTree Returns a tree structure containing information about the node and its most recently cooked data. The contents of the tree vary widely depending on the node type, and the nature of its cooked data. This tree of data is used to generate the node information window contents. verbose Setting verbose to True will cause some additional information to be generated. In particular data that is expensive to calculate, or which will generate a large amount of information tends to be generated only if this option is turned on. debug Setting debug to True will, in a few cases, cause additional information to be displayed which generally will be most useful when debugging the internal operation of Houdini. For example, geometry attributes will display their "data ids", which can be helpful when tracking down errors in SOPs written with the HDK. output_index Specifies which of the node's outputs to return information for. """ pass def removeAllEventCallbacks(): """ removeAllEventCallbacks(self) Remove all event callbacks for all event types from this node. See hou.Node.addEventCallback for more information. """ pass def findNetworkBox(name): """ findNetworkBox(self, name) -> hou.NetworkBox Return a network box with the given name inside this node, or None if no network box with the given name exists. """ pass def networkDots(): """ networkDots(self) -> tuple of hou.NetworkDot Returns a tuple of all dots in this network. """ pass def extractAndDelete(): """ extractAndDelete(self) -> tuple of hou.NetworkMovableItem Move the children of this subnet node to become siblings of this node, and then delete this node. The method is the opposite of collapseIntoSubnet(). Returns a tuple containing all extracted items. Raises hou.InvalidNodeType if this node is not a subnetwork. """ pass def dataBlock(key): """ dataBlock(self, key) -> str Returns the data block stored under the given key. This method will only work if the specified data block is has a type that can be represented by a python object. Otherwise None is returned. Raises hou.ValueError if the provided key is not associated with any data block on this node. """ pass def createStickyNote(name=None): """ createStickyNote(self, name=None) -> hou.StickyNote Creates a sticky note inside this network. Raises hou.OperationFailed if this node is not a network. If you don't specify a name, Houdini gives the note a default name. """ pass def isBuiltExplicitly(): """None""" pass def userData(name): """ userData(self, name) -> str or None Return the user-defined data with this name, or None if no data with this name exists. See hou.Node.setUserData for more information. This method can be implemented as follows: > def userData(self, name): > return self.userDataDict().get(name) """ pass def expressionLanguage(): """ expressionLanguage(self) -> hou.exprLanguage enum value Return the node's default expression language. When you enter an expression in a parameter that does not already contain an expression, the node's expression language is used to determine how that expression should be evaluated. You can change a node's expression language in the parameter dialog in the GUI. Changing the node's expression language will not change the language in parameters already containing expressions (i.e. parameters with keyframes). Note that if a parameter already contains an expression and you change that expression in the GUI, the expression language will not change, regardless of the value of the node's expression language. To change the language of an existing expression in a parameter from Python, use hou.Parm.setExpression, as in parm.setExpression(parm.expression(), language). """ pass def stickyNotes(): """ iterStickyNotes(self) -> generator of hou.StickyNote Return a generator that iterates through all the sticky notes inside this node. """ pass def deleteItems(items): """ deleteItems(self, items) Destroys all the items in the provided tuple of hou.NetworkMovableItem objects. This is significantly more efficient than looping over the items and calling destroy() on each one. It also safely handles cases where one object may not be allowed to be deleted unless another object is also deleted. Raises hou.OperationFailed if one or more of the provided items is not a child of this node. Raises hou.PermissionError if this node is or is inside a locked digital asset. """ pass def parmTuples(): """ parmTuples(self) -> tuple of hou.ParmTuple Return a list of all parameter tuples on this node. This method is similar to parms(), except it returns a list of hou.ParmTuple instead of hou.Parm. """ pass def matchCurrentDefinition(): """ matchCurrentDefinition(self) If this node is an unlocked digital asset, change its contents to match what is stored in the definition and lock it. The parameter values are unchanged. If this node is locked or is not a digital asset, this method has no effect. See also hou.Node.matchesCurrentDefinition and hou.Node.isLocked. """ pass def appendComment(comment): """ appendComment(self, comment) Appends the given text to the comment associated with this node. """ pass def cookCodeLanguage(): """ cookCodeLanguage(self) -> str Return the language of the generated cook code (i.e. VEX, RSL). Raises hou.OperationFailed if this node cannot generate compiled code. """ pass def cachedUserData(name): """ cachedUserData(self, name) -> str or None Return the user-defined cached data with this name, or None if no data with this name exists. See hou.Node.setCachedUserData for more information. This method can be implemented as follows: > def cachedUserData(self, name): > return self.cachedUserDataDict().get(name) Note that None is a valid value for a key, so the most reliable way to check if a key is valid is to check if it is in the result of cachedUserDataDict: > >>> n = hou.node("/obj").createNode("geo") > >>> n.cachedUserDataDict() > {} > >>> print n.cachedUserData("foo") > None > >>> "foo" in n.cachedUserDataDict() > False > >>> n.setCachedUserData("foo", None) > >>> n.cachedUserDataDict() > {'foo': None} > >>> print n.cachedUserData("foo") > None > >>> "foo" in n.cachedUserDataDict() > True """ pass def isCurrent(): """ isCurrent(self) -> bool Return a boolean to indicate of the node is the last selected node in its network. Each network (i.e. node containing children) stores its own list of selected nodes, and the last selected node has special meaning. For example, it is the node displayed in unpinned parameter panes. See also hou.selectedNodes to get a tuple of all the selected nodes in all networks in Houdini. The last node in this list also has special meaning in Houdini, and corresponds to the global current node. """ pass def setDeleteScript(script_text, language=hou.scriptLanguage.Python): """ setDeleteScript(self, script_text, language=hou.scriptLanguage.Python) Sets the script that will run when this node is deleted. """ pass def _setParmClipData(): """None""" pass def loadItemsFromFile(file_name, ignore_load_warnings=False): """ loadItemsFromFile(self, file_name, ignore_load_warnings=False) Load the contents of a file (saved with hou.Node.saveItemsToFile) into the contents of this node. Raises hou.OperationFailed if the file does not exist or it is not the correct type of file. Raises hou.PermissionError if this node is a locked instance of a digital asset. Raises hou.LoadWarning if the load succeeds but with warnings and ignore_load_warnings is False. """ pass def setExpressionLanguage(language): """ setExpressionLanguage(self, language) Set the node's default expression language. See expressionLanguage() for more information. """ pass def items(item_path_tuple): """ items(self, item_path_tuple) -> tuple of hou.NetworkMovableItem or None This is like item() but takes multiple paths and returns multiple NetworkMovableItem objects. This is the equivalent of: > items = [self.item(path) for path in paths] """ pass def messages(): """ messages(self) -> tuple of str Return the text of any messages from the last cook of this node, or an empty tuple if there were no messages. """ pass def createDigitalAsset(name=None, hda_file_name=None, description=None, min_num_inputs=0, max_num_inputs=0, compress_contents=False, comment=None, version=None, save_as_embedded=False, ignore_external_references=False, change_node_type=True, create_backup=True): """ createDigitalAsset(self, name=None, hda_file_name=None, description=None, min_num_inputs=0, max_num_inputs=0, compress_contents=False, comment=None, version=None, save_as_embedded=False, ignore_external_references=False, change_node_type=True, create_backup=True) -> Node Create a digital asset from this node. You would typically call this method on subnet nodes. name The name of the node type that the new digital asset will define. hda_file_name The name of the hda file where Houdini will save the digital asset. If None Houdini will use $HOME/houdiniX.Y/hda/OPcustom.hda. description The name that will appear in the tab menu. If None, Houdini will use the name for the description. min_num_inputs The minimum number of inputs that need to be wired into instances of the digital asset. See hou.HDADefinition.minNumInputs for more information. max_num_inputs The number of input connectors available on instances of the digital asset for input connections. See hou.HDADefinition.minNumInputs for more information. compress_contents Whether or not the contents of this digital asset are compressed inside the hda file. See hou.HDAOptions.compressContents for more information. comment A user-defined comment string. See hou.HDADefinition.comment for more information. version A user-defined version string. See hou.HDADefinition.version for more information. save_as_embedded Whether or not the digital asset's definition will be saved with the hip file instead of an hda file. When this parameter is True, Houdini ignores the hda_file_name parameter. Setting this parameter to True is equivalent to setting this parameter to False and setting the hda_file_name parameter to "Embedded". ignore_external_references If True, Houdini will not generate warnings if the contents of this digital asset reference nodes outside the asset. change_node_type Normally, Houdini will change the node creating the digital asset into the new digital asset type. Setting this flag to false will cause the node to remain unchanged. create_backup Create a backup before modifying an existing hda file. """ pass def __modificationTime(): """None""" pass def asCode(brief=False, recurse=False, save_channels_only=False, save_creation_commands=True, save_keys_in_frames=False, save_outgoing_wires=False, save_parm_values_only=False, save_spare_parms=True, function_name=None): """ asCode(self, brief=False, recurse=False, save_channels_only=False, save_creation_commands=True, save_keys_in_frames=False, save_outgoing_wires=False, save_parm_values_only=False, save_spare_parms=True, function_name=None) -> str Prints the Python code necessary to recreate a node. brief Do not set values if they are the parameter's default. Applies to the contents of the node if either recurse or save_box_contents is True. recurse Recursively apply to the entire operator hierarchy. save_box_contents Script the contents of the node. save_channels_only Only output channels. Applies to the contents of the node if either recurse or save_box_contents is True. save_creation_commands Generate a creation script for the node. If set to False, the generated script assumes that the network box already exists. When set to True, the script will begin by creating the network box. save_keys_in_frames Output channel and key times in samples (frames) instead of seconds. Applies to the contents of the node if either recurse or save_box_contents is True. save_parm_values_only Evaluate parameters, saving their values instead of the expressions. Applies to the contents of the node if either recurse or save_box_contents is True. save_spare_parms Save spare parameters as well. When save_creation_commands is True, commands for creating spare parameters will also be output. Applies to the contents of the node if either recurse or save_box_contents is True. function_name If a function_name is specified, the output will be wrapped in a Python function. """ pass def saveItemsToFile(items, file_name, save_hda_fallbacks, =, False): """ saveItemsToFile(self, items, file_name, save_hda_fallbacks = False) Given a sequence of child items (nodes, network boxes, sticky notes, etc), save a file containing those items. You can load this file using hou.Node.loadItemsFromFile. items A sequence of hou.NetworkMovableItems that are children of this node. file_name The name of the file to write the contents to. You can use any extension for this file name. save_hda_fallbacks Set to True to save simplified definitions for HDAs into the file along with the child nodes. Doing this allows the generated file to be safely loaded into any houdini session, even if the assets used in the file are not already loaded into the houdini session. Depending on the use of the generated file, this information is often not required and makes the files unnecessarily large. Raises hou.OperationFailed if any of the nodes or network boxes are node children of this node, or if the file could not be written to. Raises hou.PermissionError if you do not have permission to read the contents of this node. """ pass def comment(): """ comment(self) -> str Return the node's comment string. """ pass def isSubNetwork(): """None""" pass def allNodes(self): """ allNodes(self) -> generator of hou.Node Recursively return a sequence of all nodes contained in this node including this node. This method differs from hou.Node.allSubChildren in the following ways: * It includes this node in the returned sequence. * It does not guarantee a top-down or bottom-up traversal order. * The method is a generator and does not return a tuple so it is not safe to create or delete nodes while looping through the return value. Here is an example of printing out the paths for all nodes under /obj: > root_node = hou.node("/obj") > for node in root_node.allNodes(): > print node.path() """ pass def setBuiltExplicitly(): """None""" pass def cookCount(): """ cookCount(self) -> int Returns the number of times this node has cooked in the current session. """ pass def removeSpareParms(): """ removeSpareParms(self) Removes all spare parameters from this node. """ pass def references(include_children, =, True): """ references(self, include_children = True) -> tuple of hou.Node Return a tuple of nodes that are referenced by this node, either through parameter expressions, referring to the node by name, or using expressions which rely on the data generated by another node. These reflect all the other ways (besides connecting to an input) in which one node may affect another. Note that the result can differ depending last cook of the nodes. It's recommended that you first call cook() on the node first. """ pass def saveCompiledCookCodeToFile(file_name, context_name=None): """ saveCompiledCookCodeToFile(self, file_name, context_name=None) Saves compiled VEX code to a disk file (for nodes that support this). See hou.Node.saveCookCodeToFile for a description of the arguments. """ pass def setGenericFlag(flag, value): """ setGenericFlag(self, flag, value) Sets the value of the specified flag based on the bool value argument. flag must be a hou.nodeFlag value. """ pass def parms(): """ parms(self) -> tuple of hou.Parm Return a list of the parameters on this node. """ pass def destroyUserData(name): """ destroyUserData(self, name) Remove the user-defined data with this name. See hou.Node.setUserData for more information. Raises hou.OperationFailed if no user data with this name exists. """ pass def parmAliases(recurse=False): """ parmAliases(self, recurse=False) -> dict of hou.Parm to str Return a dictionary of parameter aliases on the node's parameters. The keys in the dictionary are the parameters that have aliases and the values are the alias names. recurse Return the parameter aliases for this node _and its children_. """ pass def nodeGroups(): """ nodeGroups(self) -> tuple of hou.NodeGroup Return the list of node groups in this node. """ pass def saveParmClip(self, file_name, start=None, end=None, sample_rate=0, scoped_only=False): """ saveParmClip(self, file_name, start=None, end=None, sample_rate=0, scoped_only=False) Saves the animation associated with the parameters of this node to the clip file specified by . The extension of determines the format of the saved file. You can use one of the following extensions: * .clip: save animation as plain text (ASCII) clip file. * .bclip: save animation as a bclip (binary clip) file. * .bclip.sc: save animation as a bclip file using Blosc compression. Set to a non-zero, non-negative value to specify the sample_rate to be used for the clip file. For example, if the current frame rate is 24 (hou.fps), and is set to 12, the animation will be sampled every second frame since is half of the current frame rate. If is not None, start saving the animation from the specified frame (inclusive). Otherwise, the animation will be saved from the global start frame (inclusive). Similarly, if is not None, stop saving the animation at the specified frame (inclusive). Otherwise, the animation will be saved until the global end frame (inclusive). The global start and end frame are specified in the Global Animation Options window. If is True, only the animation associated with scoped parameters will be saved. If there are no scoped parameters, the animation associated with auto-scoped parameters will be saved. If is False, animation associated with any of the parameters of this node will be saved. Raises a hou.OperationFailed exception if none of the parameters of this node have animation. If is True, this exception can be raised if none of the scoped parameters have animation, or if none of the auto-scoped parameters have animation (if the node has no scoped parameters). Raises a hou.OperationFailed exception if there is an error saving the animation to file. Raises a hou.InvalidInput exception if start >= end. If specifying only , ensure that the specified value is less than the global end frame. Likewise, if specifying only , ensure it is larger than the global start frame. """ pass def allowEditingOfContents(propagate=False): """ allowEditingOfContents(self, propagate=False) Unlocks a digital asset so its contents can be edited. To use this function, you must have permission to modify the HDA. """ pass def iterNetworkBoxes(): """None""" pass def layoutChildren(items=(): """ layoutChildren(self, items=(), horizontal_spacing=-1.0, vertical_spacing=-1.0) Automatically position all or some children of this node in the network editor. items A sequence of child hou.NetworkMovableItem objects to position. This may include nodes, dots, and/or subnet inputs. If this sequence is empty, this method will reposition all child items of this node. horizontal_spacing A fraction of the width and height of a tile that affects the space between nodes with common inputs. If this parameter is -1, Houdini uses the default spacing. vertical_spacing A fraction of the width and height of a tile that affects the space between a node and its output nodes. If this parameter is -1, Houdini uses the default spacing. """ pass def setCreatorState(state): """ setCreatorState(self, state) This sets the name of the tool that created this node. If you call this with a name that differs from the node type name, you should also call setBuiltExplicitly(False). """ pass def type(): """ type(self) -> hou.NodeType Return the hou.NodeType object for this node. For example, all camera node instances share the same node type. """ pass def dataBlockKeys(blocktype): """ dataBlockKeys(self, blocktype) -> tuple of str Return the names of all data blocks stored on this node that are of the data type specified by the blocktype parameter. Data blocks are similar to user data in that they can contain any extra data that may be useful to attach to a specific node. They differ from user data in that data blocks are designed to more efficiently handle large blocks of data. Data blocks can also contain binary data, and have a data type associated with each block. """ pass def spareParms(): """ spareParms(self) -> tuple of hou.Parm Return a list of the spare (user-defined) parameters on this node. """ pass def setParmClipData(self): """auto-insert ocstring: HOM_Node::setParmClipData""" pass def addControlParmFolder(self, folder_name=None, parm_name=None): """ addControlParmFolder(self, folder_name=None, parm_name=None) Adds a control parameter folder as the front-most folder at the top- level. This is used to increase visibility of customized control parameters. If a folder of the same name already exists, no new folder will be created. If folder_name is None, it will be set as 'Controls'. If parm_name is None, it will be set as 'folder'. If there are no current folders present, the existing parameters will be grouped together and stored into a new folder named 'Parameters' and placed after the new control parameter folder. """ pass def outputs(): """ outputs(self) -> tuple of hou.Node Return a tuple of the nodes connected to this node's outputs. This method is a shortcut for [connection.inputNode() for connection in self.outputConnections()]. """ pass def parm(parm_path): """ parm(self, parm_path) -> hou.Parm or None Return the parameter at the given path, or None if the parameter doesn't exist. """ pass def selectedItems(include_hidden=False, include_hidden_support_nodes=False): """ selectedItems(self, include_hidden=False, include_hidden_support_nodes=False) -> tuple of hou.NetworkMovableItem Return a tuple containing the children of this node that are selected. Unlike selectedChildren, this method will also return any selected hou.NetworkBox, hou.SubnetIndirectInput, hou.StickyNote, and hou.NetworkDot objects. include_hidden If False, hidden nodes are not included in the result, even if they are selected. Other network item types cannot be hidden, and so are unaffected by the value of this parameter. include_hidden_support_nodes If True, include in the returned tuple any hidden nodes that exist solely to support nodes that are actually selected. This specifically refers to VOP Parameter nodes, but may include other support nodes as well. The following example will print the positions of all selected items in /obj: > for n in hou.node("/obj").selectedItems(): > print n.position() """ pass def createNetworkDot(): """ createNetworkDot(self) -> hou.NetworkDot Creates a network dot inside this network. Raises hou.OperationFailed if this node is not a network. """ pass def allItems(): """ allItems(self) -> tuple of hou.NetworkMovableItem Return a tuple containing all the children of this node. Unlike children, this method will also return hou.NetworkBox, hou.SubnetIndirectInput, hou.StickyNote, and hou.NetworkDot objects. """ pass def deleteScript(): """ deleteScript(self) -> str Return the script that will run when this node is deleted. """ pass def isEditableInsideLockedHDA(): """ isEditableInsideLockedHDA(self) -> bool Return True if the node is an editable node contained inside a locked HDA node and False otherwise. In particular this function will return False for a node that is not inside a locked HDA. """ pass def isTimeDependent(): """ isTimeDependent(self) -> bool Return whether the node is time dependent. A time dependent node is re-evaluated every time the frame changes. """ pass def hm(): """None""" pass def _saveParmClip(): """None""" pass def isFlagWritable(flag): """ isFlagWritable(self, flag) -> bool Return True if the specified flag is writable and False otherwise. flag must be a hou.nodeFlag value. """ pass def networkBoxes(): """ iterNetworkBoxes(self) -> generator of hou.NetworkBox Return a generator that iterates through all the network boxes inside this node. """ pass def setDataBlock(key, block, blocktype): """ setDataBlock(self, key, block, blocktype) Stores the provided data block on the node under the provided key name, marking it with the provided data type. Passing a block value of None will remove any data block with the specified key. """ pass def createInputNode(self, input_index, node_type_name, node_name=None, run_init_scripts=True, load_contents=True, bool, exact_type_name=False): """ createInputNode(self, input_index, node_type_name, node_name=None, run_init_scripts=True, load_contents=True, bool exact_type_name=False) Create a new node and connect it to one of this node's inputs. Return the new node. input_index The index of this node's input connector. node_type_name The name of the type of node to create. See the createNode method for more information. node_name See the createNode method for more information. run_init_scripts See the createNode method for more information. load_contents See the createNode method for more information. exact_type_name See the createNode method for more information. See also the createOutputNode method. """ pass def cachedUserDataDict(name): """ cachedUserDataDict(self, name) -> dict of str to str Return a dictionary containing all the user-defined name/string pairs for this node. See hou.Node.setCachedUserData for more information. """ pass def syncNodeVersionIfNeeded(from_version): """ syncNodeVersionIfNeeded(self, from_version) Synchronize the node from the specified version to the current version of its HDA definition. See also hou.HDADefinition.version. """ pass def creationTime(self): """ creationTime(self) -> datetime.datetime Return the date and time when the node was created. """ pass def saveToCompiledVexFile(): """None""" pass def setParms(self, parm_dict): """ setParms(self, parm_dict) Given a dictionary mapping parm names to values, set each of the corresponding parms on this node to the given value in the dictionary. The following example sets the tx and sy parameters at once: > >>> node = hou.node("/obj").createNode("geo") > >>> node.setParms({"tx": 1, "sy": 3}) Raises hou.OperationFailed if any of the parameter names are not valid. See also the setParmExpressions method. """ pass def parmTemplateGroup(): """None""" pass def dependents(include_children, =, True): """ dependents(self, include_children = True) -> tuple of hou.Node Return a tuple of nodes that are reference this node, either through parameter expressions, referring to the node by name, or using expressions which rely on the data generated by this node. These reflect all the other ways (besides connecting to an input) in which one node may affect another. Note that the result can differ depending last cook of the nodes. """ pass def removeSpareParmFolder(self, folder): """ removeSpareParmFolder(self, folder) Removes an empty folder from the spare parameters. folder is a sequence of folder names. So, to remove the Output folder, use ("Output",) instead of "Output". See also addSpareParmFolder(), hou.ParmTemplateGroup.remove, and hou.ParmTemplateGroup.findFolder. """ pass def _getArgumentAutoComplete(): """None""" pass def isCompiled(): """None""" pass def _parmClipData(): """None""" pass def outputNames(): """ outputNames(self) -> tuple of str Returns a tuple of all output names for this node. """ pass def isHidden(): """ isHidden(self) Return whether the node is hidden in the network editor. Note that Houdini also uses the term "exposed" to refer to nodes that are not hidden. If a visible node is connected to a hidden node, the network editor will display dashed lines for the wire going from the visible node to the hidden node. See also hou.Node.hide. """ pass def motionEffectsNetworkPath(): """ motionEffectsNetworkPath(self) -> str Return a node path representing the location for storing clips. This location may or may not exist. To find or create such a network, use hou.Node.findOrCreateMotionEffectsNetwork. """ pass def insertInput(input_index, item_to_become_input, output_index=0): """ insertInput(self, input_index, item_to_become_input, output_index=0) Insert an input wire. In other words, for each input connector after input_index, shift the contents of that input connector to the next one, and then call hou.Node.setInput. See hou.Node.setInput for the meanings of the parameters. """ pass def needsToCook(time=hou.time(): """ needsToCook(self, time=hou.time()) -> bool Asks if the node needs to re-cook. """ pass def setNamedInput(input_name, item_to_become_input, output_name_or_index): """ setNamedInput(self, input_name, item_to_become_input, output_name_or_index) Connects an output on this node (specified by either an output name or an output index) to the input on the item_to_become_input specified by input_name. """ pass def dataBlockType(key): """ dataBlockType(self, key) -> str Return the data type of the block specified by the key parameter. Raises hou.ValueError if the provided key is not associated with any data block on this node. """ pass def isDisplayDescriptiveNameFlagSet(): """ isDisplayDescriptiveNameFlagSet(self) -> bool Return a boolean to indicate of the node should display its descriptive name in the network editor. """ pass def saveCodeToFile(): """None""" pass def subnetOutputs(): """ subnetOutputs(self) -> tuple of hou.Node Return the hou.Node objects that are produce the subnet's outputs. Raises hou.InvalidNodeType if this node is not a subnetwork. """ pass def destroyCachedUserData(name): """ destroyCachedUserData(self, name) Remove the user-defined cached data with this name. See hou.Node.setCachedUserData for more information. Raises hou.OperationFailed if no user data with this name exists. """ pass def addNodeGroup(name=None): """ addNodeGroup(self, name=None) -> hou.NodeGroup Add a node group to the node and return the new group. If a group of the given name already exists then this function simply returns the existing group without adding a new one. If the name of the group is None or an empty string, then a unique default name is automatically chosen. This function can only be called on nodes that are networks. If it is called on a node that is not a network, then it raises hou.OperationFailed. To remove a node group, use hou.NodeGroup.destroy. """ pass def setFirstInput(item_to_become_input, output_index=0): """ setFirstInput(self, item_to_become_input, output_index=0) A shortcut for self.setInput(0, item_to_become_input). See hou.Node.setInput for more information. """ pass def inputNames(): """ inputNames(self) -> tuple of str Returns a tuple of all input names for this node. Names for input connectors that are hidden are also included. """ pass def setParmsPending(self, parm_dict): """ setParmsPending(self, parm_dict) Given a dictionary mapping parm names to values, sets the pending value of each of the corresponding parms on this node. Raises hou.OperationFailed if any of the parameter names are not valid. See also the setPending method. """ pass def nodeGroup(name): """ nodeGroup(self, name) -> hou.NodeGroup Return a node group contained by the node with the given name, or None if the group does not exist. """ pass def _asVoidPointer(): """None""" pass def findStickyNote(name): """ findStickyNote(self, name) -> hou.StickyNote Return a sticky note with the given name inside this node, or None if no sticky note with the given name exists. """ pass def parmTuple(parm_path): """ parmTuple(self, parm_path) -> hou.ParmTuple or None Return the parm tuple at the given path, or None if it doesn't exist. This method is similar to parm(), except it returns a hou.ParmTuple instead of a hou.Parm. """ pass def copyStickyNote(network_box_to_copy, new_name=None): """ copyStickyNote(self, network_box_to_copy, new_name=None) -> hou.StickyNote Copies a sticky note and returns the copy. If new_name is given, the sticky note will be copied to a new sticky note named new_name (a different name will be generated if there is already a sticky note with that name). Raises hou.OperationFailed if this node is not a network or if the node child type does not match the sticky note's node type. """ pass def eventCallbacks(): """None""" pass def destroy(): """ destroy(self) Delete this node. If you call methods on a Node instance after it has been destroyed, Houdini will raise hou.ObjectWasDeleted. Raises hou.OperationFailed if you try to delete a node inside a locked asset. """ pass def changeNodeType(new_node_type, keep_name=True, keep_parms=True, keep_network_contents=True, force_change_on_node_type_match=False): """ changeNodeType(self, new_node_type, keep_name=True, keep_parms=True, keep_network_contents=True, force_change_on_node_type_match=False) -> hou.Node Changes the node to a new type (within the same context). new_node_type is the internal string name of the type you want to change to. Keep_name, keep_parms, and keep_network_contents indicate that the node should keep the same name, parameter values, and contents, respectively, after its type has changed. force_change_on_node_type_match indicates whether to perform the change even when is already of the specified type. """ pass def evalParmTuple(parm_path): """ evalParmTuple(self, parm_path) -> tuple of int, float, or str Evaluates the specified parameter tuple and returns the result. """ pass def createCompiledDigitalAsset(name=None, hda_file_name=None, description=None): """ createCompiledDigitalAsset(self, name=None, hda_file_name=None, description=None) Create a compiled digital asset from this node. You would typically call this method on vop network nodes, such as Material Shader Builder SHOP, Surface Shader Builder SHOP, or VEX Surface SHOP Type VOPNET. The digital asset does not have contents section, which means it does not have vop network inside, but instead relies on the saved VEX code sections to provide the shader code. After the creation of a compiled HDA, if its VEX code section is ever changed manually, the corresponding vex object code section can be recompiled using hou.HDADefinition.compileCodeSection. name The name of the node type that the new digital asset will define. hda_file_name The name of the hda file where Houdini will save the digital asset. If None Houdini will use $HOME/houdiniX.Y/hda/OPcustom.hda. description The name that will appear in the tab menu. If None, Houdini will use the name for the description. """ pass def simulation(): """None""" pass def outputForViewFlag(): """ outputForViewFlag(self) -> int Return an integer to indicate which output of the node should be used for display purposes. """ pass def inputs(): """ inputs(self) -> tuple of hou.Node Return a tuple of the nodes connected to this node's inputs. If an input is connected to a hou.SubnetIndirectInput, the node connected to the corresponding input on the parent subnet is returned. In other words the presence of the indirect input is hidden. This means the resulting nodes may not all be siblings of the calling node. If a particular input is not connected (or is connected to an indirect input and the corresponding subnet parent input is not connected), a None value is placed in the tuple at that location. """ pass def userDataDict(name): """ userDataDict(self, name) -> dict of str to str Return a dictionary containing all the user-defined name/string pairs for this node. See hou.Node.setUserData for more information. """ pass def outputIndex(output_name): """ outputIndex(self, output_name) Obtains an index of a node output that has the given name. For the node categories that use input names, it returns the index of the output with the given name. """ pass def warnings(): """ warnings(self) -> tuple of str Return the text of any warnings from the last cook of this node, or an empty tuple if there were no warnings. """ pass def saveChildrenToFile(self, nodes, network_boxes, file_name): """ saveChildrenToFile(self, nodes, network_boxes, file_name) Combines separate lists of nods and network boxes into a single sequence, and calls hou.Node.saveItemsToFile. This method is provided for backward compatibility. New code should call saveItemsToFile directly. nodes A sequence of hou.Nodes that are children of this node. network_boxes A sequence of hou.NetworkBoxes that are contained in this node. Note that the contents of the network boxes are not automatically saved, so it is up to you to put them in the list of nodes. """ pass def glob(pattern, ignore_case=False): """ glob(self, pattern, ignore_case=False) -> tuple of hou.Node Return a tuple of children nodes name matches the pattern. The pattern may contain multiple pieces, separated by spaces. An asterisk (*) in a pattern piece will match any character. By default, Houdini will add the nodes from each pattern piece to those already matched. However, if the pattern piece begins with a caret (^), Houdini will remove the matches for that piece from the result. By default the pattern match is case-sensitive. Set ignore_case to True for case-insensitive pattern matching. Note that case insensitivity only applies when matching node names. It does not apply when matching group, network box or bundle names. This method returns an empty tuple if you pass in an empty pattern. > >>> obj = hou.node("/obj") > >>> obj.createNode("geo", "geo1") > > >>> obj.createNode("geo", "geo2") > > >>> obj.createNode("geo", "grid") > > >>> obj.createNode("geo", "garbage") > > >>> obj.createNode("geo", "box") > > > >>> def names(nodes): > ... return [node.name() for node in nodes] > > >>> names(obj.glob("g*")) > ['geo1', 'geo2', 'grid', 'garbage'] > >>> names(obj.glob("ge* ga*")) > ['geo1', 'geo2', 'garbage'] > >>> names(obj.glob("g* ^ga*")) > ['geo1', 'geo2', 'grid'] See also hou.Node.recursiveGlob. """ pass def canGenerateCookCode(check_parent=False): """ canGenerateCookCode(self, check_parent=False) -> bool Return True if the node can generate compiled cook code and False otherwise. If check_parent is true, the parents in the ancestor hierarchy are tested if any of them can generate code. """ pass def updateParmStates(): """ updateParmStates(self) Update the UI states, such as hidden and disabled, for each parameter in the node. UI states can be expressed as conditionals (i.e. Disable When) which require evaluation. Typically in graphical Houdini the Parameter Pane performs the evaluation when the node is selected in order to determine how the node parameters should look in the pane. However in non-graphical Houdini or if the Parameter Pane has not yet loaded the node, then the evaluation does not occur and the UI states remain at their defaults causing methods such as hou.Parm.isDisabled and hou.Parm.isHidden to return incorrect values. In these cases, it is recommended that hou.Node.updateParmStates is called. """ pass def createNetworkBox(name=None): """ createNetworkBox(self, name=None) -> hou.NetworkBox Creates a network box inside this network. Raises hou.OperationFailed if this node is not a network. If you don't specify a name, Houdini gives the box a default name. Network box names are not displayed in the network editor pane. Instead, a "comment" can be specified with the hou.NetworkBox.setComment method, and this comment will appear in the title bar of the network box. """ pass def stampValue(parm_name, default_value): """ stampValue(self, parm_name, default_value) Return a copy stamping floating point or string value. This node must be a downstream stamping operator, such as a Copy SOP, Cache SOP, LSystem SOP, or Copy CHOP. parm_name The name of the stamping variable. default_value The value that this function returns if Houdini is not currently performing stamping, or if parm_name is not a valid variable name. This value may be a float or a string. You might put the following expression in a Python parameter: > node("../copy1").stampValue("sides", 5) """ pass def collapseIntoSubnet(child_nodes, subnet_name=None, subnet_type=None): """ collapseIntoSubnet(self, child_nodes, subnet_name=None, subnet_type=None) -> hou.Node Given a sequence of children nodes of this node, collapse them into a subnetwork. In other words, create a subnet inside this node's network and move the specified children of this network inside that subnet. child_nodes The children nodes of this node that will go in the new subnet. subnet_name The name for the new subnet node, or None if you want Houdini to automatically choose a name. subnet_type The type for the new subnet node, or None if you want Houdini to automatically choose a primary subnetwork type, which is recommended. Raises hou.OperationFailed if a node inside child_nodes is not a child of this network, or if child_nodes is an empty sequence. This example function takes a single node and replaces it with a subnet, moving the node into the subnet.. > def collapseSingleNodeIntoSubnet(node, subnet_name=None): > node.parent().collapseIntoSubnet((node,), subnet_name=None) """ pass def inputIndex(input_name): """ inputIndex(self, input_name) Obtains an index of a node input that has the given name. For the node categories that use input names, it returns the index of the input with the given name. For VOP nodes, the name may also be a node parameter name that has a corresponding input. """ pass def setUserData(name, value): """ setUserData(self, name, value) Add/set a named string on this node instance. name A unique name (key) for the user-defined data. By using different names, you can attach multiple pieces of user-defined data to a node. value The string to store. This name/value pair is stored with the hip file and is included in the output from opscript and hou.Node.asCode. The following example illustrates how to set, access, and delete user-defined data: > >>> n = hou.node("/obj").createNode("geo") > >>> n.setUserData("my data", "my data value") > >>> n.userData("my data") > 'my data value' > >>> n.userDataDict() > {'my data': 'my data value'} > >>> n.destroyUserData("my data") > >>> n.userDataDict() > {} > >>> print n.userData("my data") > None See per-node user-defined data for more information and examples. TIP If you prefix a user data key with nodeinfo_, the key (without the prefix) and the value will be shown as a custom field in the node info popup window. """ pass def setOutputForViewFlag(output): """ setOutputForViewFlag(self, output) Sets which output should be used for display purposes on this node. """ pass def outputLabels(): """ outputLabels(self) -> tuple of str Returns a tuple of all output labels for this node. """ pass def setComment(comment): """ setComment(self, comment) Sets the comment associated with this node. See also appendComment(). """ pass def allSubChildren(top_down=True, recurse_in_locked_nodes=True): """ allSubChildren(self, top_down=True, recurse_in_locked_nodes=True) -> tuple of hou.Node Recursively return all sub children of this node. For example, hou.node("/").allSubChildren() will return all the nodes in the hip file. top_down If True, this function will do a top-down traversal, placing a node in the returned tuple before its children. If False, it will do a bottom-up traversal, placing children before their parents. recurse_in_locked_nodes If True, the function will recurse inside locked child nodes (child nodes for which the isEditable() method returns False) and include children of the locked child nodes in the returned tuple. If False, the function will not recurse inside locked children nodes, and children of the locked child nodes will not be included in the returned tuple. (The locked child nodes, however, will be included.) For example if is True and hou.node("/obj") contains a Simple Female node (a locked node), then the tuple returned by hou.node("/obj").allSubChildren() will include the Simple Female node and its child nodes. If is False, the returned tuple will contain the Simple Female node, but not its child nodes. Note that a tuple is returned, not a generator. This means that it is safe to delete or create nodes while looping through the return value. The following function deletes all children of a particular type that appear anywhere inside a given node: > def removeSubChildrenOfType(node, node_type): > '''Recursively delete all children of a particular type.''' > for child in node.allSubChildren(): > if child.type() == node_type: > child.destroy() This code, for example, removes all the visibility SOPs anywhere under /obj: > >>> removeSubChildrenOfType(hou.node("/obj"), hou.sopNodeTypeCategory().nodeTypes()['visibility']) """ pass def recursiveGlob(pattern, filter=hou.nodeTypeFilter.NoFilter, include_subnets=True): """ recursiveGlob(self, pattern, filter=hou.nodeTypeFilter.NoFilter, include_subnets=True) -> tuple of hou.Node Like hou.Node.glob, return a tuple of children nodes whose name matches the pattern. However, any matching child will have all its children added, recursively. As well, the result may be filtered by node type. Houdini first matches children nodes against the pattern, then recursively adds the subchildren of matching children, and then applies the filter. pattern Child node names will be matched against this string pattern. See hou.Node.glob and hou.NodeBundle for information about the pattern syntax. Note that if a child node matches the pattern and include_subnets is True, all of its subchildren will be added to the result (subject to filtering), regardless of the pattern. filter A hou.nodeTypeFilter enumeration value to limit matched nodes to a particular type (e.g. object nodes, geometry object nodes, surface shader SHOPs, etc.). include_subnets Specifies whether the children of a matching node will also be returned, regardless of the pattern. The pattern and filter behavior is very similar to that used by node bundles in Houdini. See hou.NodeBundle for more information. Raises hou.OperationFailed if the pattern is invalid. """ pass def __creationTime(): """None""" pass def inputConnections(): """ inputConnections(self) -> tuple of hou.NodeConnection Returns a tuple of hou.NodeConnection objects for the connections coming into the top of this node. The tuple will have a length equal to the number of connections coming into the node. Returns an empty tuple if nothing is connected to this node. To get a list of the connected nodes themselves, use hou.Node.inputs. To get a list of all possible connection sites (whether or not anything is connected to them), use hou.Node.inputConnectors. > >>> cookie = hou.node("/obj").createNode("geo").createNode("cookie") > >>> cookie.setInput(1, cookie.parent().createNode("box")) > >>> cookie.inputConnections() > (,) > >>> cookie.inputConnectors() > ((), (,)) See also hou.Node.inputConnectors. """ pass def matchesCurrentDefinition(): """ matchesCurrentDefinition(self) -> bool Return whether the contents of the node are locked to its type definition. """ pass def localVariables(): """ localVariables(self) Return a list of local variables that can be referenced in parameter expressions on this node. """ pass def _loadParmClip(): """None""" pass class NodeConnection(NetworkItem): """ hou.NodeConnection Represents a connection (wire) between two Nodes. OVERVIEW You can get a list of NodeConnection objects from a hou.Node instance using hou.Node.inputConnections and hou.Node.outputConnections. NOTE It is probably easier to use the hou.Node.inputs and hou.Node.outputs methods (which return the endpoints of a node's connections) to traverse the network, rather than dealing with the connections themselves. This object is "read-only". To create or edit connections, use methods on the node, such as hou.Node.setNamedInput, hou.Node.setInput, hou.Node.setFirstInput, hou.Node.setNextInput, hou.Node.createInputNode, and hou.Node.createOutputNode. INPUT AND OUTPUT MEANING The hou.NodeConnection.outputNode and hou.NodeConnection.inputNode are named in relation to the _nodes_, *not* the "input" and "output" ends of the _connector_. So, outputNode() returns the node whose _output_ is this connector. In the diagram, outputNode() on the highlighted connection would return node "A". inputNode() returns the node whose input is this connector. In the diagram, inputNode() on the highlighted connection would return node "C". CONNECTION INDEXES Some nodes have multiple inputs and/or multiple outputs. For example, most VOPs have several inputs and outputs. The Split DOP has multiple outputs. A node with a multi-input, such as the Merge SOP, has multiple "inputs" for each connection, even though in the network editor it is drawn with one "connection point" at the top. Inputs and outputs are always addressed by their position (index). """ def outputName(): """ outputName(self) -> str Returns the name of the output connection on the node that the input side of this connections connects to. """ pass def setSelected(selected, clear_all_selected, =, False): """ setSelected(self, selected, clear_all_selected = False) Selects or de-selects this connection. If the clear_all_selected parameter is set to True, all other selections (both connections, and nodes, network boxes, etc.) will be cleared before this connection is selected. """ pass def inputLabel(): """ inputLabel(self) -> str Returns the label of the input connection on the node that the output side of this connections connects to. """ pass def inputIndex(): """ inputIndex(self) -> int Returns the index of the input connection on the node that the output side of this connections connects to. """ pass def outputLabel(): """ outputLabel(self) -> str Returns the label of the output connection on the node that the input side of this connections connects to. """ pass def inputNode(): """ inputNode(self) -> hou.Node Return the node on the input side of this connection. This is the node that the connection comes from, in the direction of data flow. If this connection goes through an indirect input, this will return the node connected to the parent node (or None if nothing is connected). """ pass def inputItem(): """ inputItem(self) -> hou.NetworkMovableItem If this connection has a subnet indirect input connected to it, return the corresponding hou.SubnetIndirectInput object. If this connection has a node connected to it, return the corresponding hou.Node object. Otherwise, return None. This method is essentially equivalent to the following: > def getInputItem(node_connection): > if node_connection.subnetIndirectInput() is not None: > return node_connection.subnetIndirectInput() > return node_connection.inputNode() """ pass def inputDataType(): """None""" pass def outputDataType(): """None""" pass def outputIndex(): """ outputIndex(self) -> int Returns the index of the output connection on the node that the input side of this connections connects to. If this connection goes through an indirect input, this will return the index of the output connected to the parent node (or 0 if nothing is connected). """ pass def inputName(): """ inputName(self) -> str Returns the name of the input connection on the node that the output side of this connections connects to. """ pass def outputNode(): """ outputNode(self) -> hou.Node Return the node on the output side of this connection. This is the node that the connection goes to, in the direction of data flow. If this connection has a network dot as its output, this method returns None. """ pass def outputItem(): """ outputItem(self) -> hou.NetworkMovableItem Return the node or network dot on the output side of this connection. This is the node or dot that the connection goes to, in the direction of data flow. This method should never return None. """ pass def isSelected(): """ isSelected(self) -> bool Return True if this connection is selected. """ pass def subnetIndirectInput(): """ subnetIndirectInput(self) -> hou.SubnetIndirectInput If this connection has a subnet indirect input connected to it instead of a node, return the corresponding object. Otherwise, return None. See hou.SubnetIndirectInput for information on subnet indirect inputs. """ pass def inputItemOutputIndex(): """ inputItemOutputIndex(self) -> int Returns zero if this connection has a subnet indirect input connected to it. Otherwise return the index of the output connection on the node that the input side of this connections connects to. In combination with the inputItem method, node and subnet indirect inputs can be processed through a common code path for many use cases. """ pass def NodeConnection_swigregister(): """None""" pass class NodeError(Error): """ hou.NodeError Exception class used to set errors on nodes implemented via Python. Raise instances of this class from within Python SOPs, objects, etc. to set an error flag on the node. See Writing Python SOPs for more information. RELATED * hou.NodeWarning * hou.Error """ def description(): """ description(self) -> str Return a description of the class of exception. The description is not related to the exception instance. """ pass def exceptionTypeName(): """ exceptionTypeName(self) -> str Return the name of the exception type. Instances of different subclasses of hou.Error will return different names. Instances of the base class will return "Error". You can also use str(e.__class__) to get the name of the subclass. """ pass def NodeError_swigregister(): """None""" pass class NodeGroup(object): """ hou.NodeGroup Represents a node group. In Houdini, a node group contains a set of nodes from the same network. Each group is named, and you can edit a group's contents from the network view pane by selecting Tools > Show Groups from its right-mouse menu. A node bundle, on the other hand, may contain nodes from multiple networks, and corresponds to a hou.NodeBundle object. You can edit a node bundle from the bundle list pane. """ def parent(): """ parent(self) -> hou.Node Returns the network node containing this group. """ pass def addNode(node): """ addNode(self, node) Add a hou.Node to this group. If the node is already in the group, this method does nothing. If the node is not in the correct network for this group, raises hou.OperationFailed. """ pass def name(): """ name(self) -> str Returns the name of this group. """ pass def removeNode(node): """ removeNode(self, node) Remove a hou.Node from this group. Raises hou.OperationFailed if the node is not in the group. """ pass def clear(): """ clear(self) Remove all nodes from this group. """ pass def asCode(save_creation_commands=False, function_name=None): """ asCode(self, save_creation_commands=False, function_name=None) -> str Returns the Python code necessary to recreate this group. save_creation_commands Generate a creation script for the node group. If set to False (the default), the generated script assumes that the node group already exists. When set to True, the script will begin by creating the node group. function_name If a function_name is specified, the output will be wrapped in a Python function. """ pass def destroy(): """ destroy(self) Delete this group. Does not delete the nodes that were contained in it. """ pass def nodes(): """ nodes(self) -> tuple of hou.Node Return a tuple containing the nodes in this group. """ pass def NodeGroup_swigregister(): """None""" pass class NodeInfoTree(object): """ hou.NodeInfoTree A tree structure designed to contain information about nodes and the data they generate. This class represents a tree structure, where each branch of the tree can have any number of named sub-trees, as well as a two dimensional grid of strings. Most often this grid has two columns ("Property" and "Value"), with some number of rows to represent arbitrary key/value pairs. But the grid can also contain more complex data (such as the volume information in geometry data). """ def branchOrder(): """ branchOrder(self) -> tuple of str Returns the "natural" order of the child branches in the dictionary returned by branches(). This ordering is often not very important, but in situations where there are a large number of branches that do have some sort of natural order (such as the branches for each DOP object returned by a DOP node) this method can help organize the information. This code iterates through all child branches of a node's info tree in their natural order, assuming an RBD simulation created from a default sphere and torus object: > >>> nodeinfo = hou.node('/obj/AutoDopNetwork/output').infoTree() > >>> dopinfo = nodeinfo.branches()['DOP Info'] > >>> objinfo = dopinfo.branches()['Objects'] > >>> objbranches = objinfo.branches() > >>> for objname in objinfo.branchOrder(): > ... obj = objbranches[objname] > ... print objname, ':', obj.branches() > ... > torus_object1 : {'Geometry': } > sphere_object1 : {'Geometry': } """ pass def infoType(): """ infoType(self) -> str Returns a string that can be used to describe the type of data stored in this tree. For example, a tree holding geometry information (generated either by a SOP node or a DOP node) will return "Geometry" from this method. """ pass def name(): """ name(self) -> str Returns the name of this branch of the tree. """ pass def rows(): """ rows(self) -> tuple of tuple of str Return a two dimensional grid of strings. The returned tuple represents the rows of the grid. The contained tuples each represent one row. All contained tuples will be the same length, which will be the length of the tuple returned by the headings() method. """ pass def branches(): """ branches(self) -> dict of str to hou.NodeInfoTree Return a dictionary of all child branches. Each branch has a name, and is a full tree, which may have it's own branches, and so on. """ pass def headings(): """ headings(self) -> tuple of str Returns the titles of the columns for the data returned by the rows() method. Usually this will be simply ('Property', 'Value'), for rows that are simply key/value pairs. But in some cases the headings can help interpret the returned information. """ pass def NodeInfoTree_swigregister(): """None""" pass class NodeType(object): """ hou.NodeType Information common to all instances of a type of node, such as the parameters. For example, the Geometry object and Subdivide SOP are node types. /obj/geo1 and /obj/geo2, on the other hand, are Node instances of the Geometry object node type. A digital asset defines a node type. The nodes contained inside the asset's definition implement the node type's algorithm, and you can customize the parameters in the node type using the Type Properties dialog, You can get a NodeType object from a Node object with hou.Node.type. For example, if /obj/geo1 is a geometry object, hou.node("/obj/geo1").type() will return the NodeType corresponding to all geometry objects. All the node types in Houdini are organized into categories, and a node type is uniquely identified by its category and node type name. For example, objects, SOPs, POPs, etc. are node type categories. You can also access a NodeType object from a category with hou.NodeTypeCategory.nodeTypes. Similarly, you can call hou.nodeType_ with the category and node type name. See also hou.Node and hou.NodeTypeCategory. """ def hasPermanentUserDefaults(): """ hasPermanentUserDefaults(self) -> bool Returns whether a user has set permanent defaults for this node type. See also hou.Parm.hasTemporaryDefaults """ pass def removeAlias(alias): """ removeAlias(self, alias) Remove an alias for this node type. """ pass def sourcePath(): """ sourcePath(self) -> str Return the path to the source for this node type, or "Internal" if it is a built-in node type. If the node was created using the HDK, return the path to the shared object/dll for the node type. > >>> obj_cat = hou.objNodeTypeCategory() > >>> hou.nodeType(obj_cat, "biped_auto_rig").sourcePath() > 'oplib:/Object/biped_auto_rig?Object/biped_auto_rig' > >>> hou.nodeType(obj_cat, "geo").sourcePath() > 'Internal' """ pass def isGenerator(): """ isGenerator(self) -> bool Return if this node type has been flagged as a generator. For example, a grid SOP generates new geometry, while a subdivide SOP does not, and instead processes the geometry passed into it. See also hou.NodeType.minNumInputs. """ pass def hasUnorderedInputs(): """ hasUnorderedInputs(self) -> bool Return whether it is impossible for this node type to have gaps in its connected inputs. For example, the cookie SOP has two inputs, and it's possible for only the second input to be connected, so this method would return False. However, the merge SOP cannot have any gaps in its inputs, so this method would return True. See also hou.Node.inputs, hou.Node.inputConnections, and hou.Node.inputConnectors. """ pass def containedNodeTypes(): """ containedNodeTypes(self) -> tuple of str Return a tuple of all NodeType names of the contents of an HDA. """ pass def instances(): """ instances(self) -> tuple of hou.Node Return a tuple of all the nodes of this type in the current scene. """ pass def setHidden(hidden): """ setHidden(self, hidden) Set whether or not this node type appears in the tab menu. See also hou.NodeType.hidden. """ pass def defaultShape(): """ defaultShape(self) -> str Return the name of the shape used to display a node of this type in the network view if no shape is explicitly assigned to the node. """ pass def defaultHelpUrl(): """ defaultHelpUrl(self) -> str Return a generic URL that the help system will try to resolve to the actual location that stores the node type documentation. The generic URL is in the form "operator:table/optypename" and may include additional information such as a namespace or a version. """ pass def isManager(include_management_types=True): """ isManager(self, include_management_types=True) -> bool Return whether this NodeType is a manager. The manager node instances are /obj, /out, /part, /ch, /shop, /img, and /vex. If include_management_types is set to True then this method will additionally return True if this node type is a management node type such as a SHOP network, or VOP network, etc. """ pass def allInstalledDefinitions(): """ allInstalledDefinitions(self) -> tuple of hou.HDADefinition Search all installed operator type libraries and return a tuple of available hou.HDADefinition objects providing definitions for this node type. Houdini allows multiple otl files to be loaded at the same time that each contain definitions for the same node type. The definition in use is called the current definition. See also hou.HDADefinition.isCurrent. """ pass def childTypeCategory(): """None""" pass def aliases(): """ aliases(self) -> tuple of str Return all current aliases for this node type. See hou.NodeType.addAlias for an example. """ pass def category(): """ category(self) -> hou.NodeTypeCategory Return the node type category for this node type. For example, for the geometry object, the result is the object returned by hou.objNodeTypeCategory. """ pass def hasUnorderedInputs(): """ hasUnorderedInputs(self) -> bool Return whether it is impossible for this node type to have gaps in its connected inputs. For example, the cookie SOP has two inputs, and it's possible for only the second input to be connected, so this method would return False. However, the merge SOP cannot have any gaps in its inputs, so this method would return True. See also hou.Node.inputs, hou.Node.inputConnections, and hou.Node.inputConnectors. """ pass def sourceNetwork(): """ sourceNetwork(self) -> hou.Node or None If this node type is a digital asset, return the Node instance whose contents define the digital asset. Otherwise, return None. """ pass def isWritable(): """ areContentsViewable(self) -> bool Return True if the node network contained in the node type is viewable and False otherwise. """ pass def defaultColor(): """ defaultColor(self) -> hou.Color Return the color used to display a node of this type in the network view if the node's hou.nodeFlag.ColorDefault flag is set. """ pass def source(): """ source(self) -> hou.nodeTypeSource enum value Return a hou.nodeTypeSource enumerated value to indicate if this node type is implemented in VEX, RSL, or the HDK (in C++), or if it is a built-in node type that ships with Houdini. > >>> obj_cat = hou.objNodeTypeCategory() > >>> sop_cat = hou.sopNodeTypeCategory() > >>> hou.nodeType(obj_cat, "biped_auto_rig").source() > nodeTypeSource.Subnet > >>> hou.nodeType(sop_cat, "mountain").source() > nodeTypeSource.VexCode """ pass def embeddedHelp(): """ embeddedHelp(self) -> str Return the help text embedded in this node type. Return an empty string if no embedded help exists. The embedded help is searched for in two different places in the following order: * If an HDK node, the text given by its OP_Operator::getHDKHelp() override * If an HDA node, the corresponding result of hou.HDADefinition.embeddedHelp() """ pass def setDefaultShape(shape): """ setDefaultShape(self, shape) Set the name of the shape used to display a node of this type in the network view if no shape is explicitly assigned to the node. Pass None as the shape parameter to remove the type-specific default. """ pass def hidden(): """ hidden(self) -> bool Return whether or not this node type appears in the tab menu. See also hou.NodeType.setHidden. """ pass def minNumInputs(): """ minNumInputs(self) -> int Return the minimum number of inputs that nodes of this type can have. If these inputs are not connected, the node will generate an error. """ pass def uninstallFromPath(): """None""" pass def areContentsViewable(): """None""" pass def maxNumOutputs(): """ maxNumOutputs(self) -> int Return the maximum number of outputs that nodes of this type can have. Most node types have only one output, but some, like the split dop, can have multiple. """ pass def parmTemplates(): """ parmTemplates(self) -> tuple of hou.ParmTemplate Return a tuple of parm templates for the parameters on this node type. Note that spare parameters on individual node instances are not included in this tuple, since they are independent from the node type. """ pass def hasEditableInputData(): """ hasEditableInputData(self) -> bool Return True if nodes of this node type allow the user to associate data with each input to the node. The purpose of this data may vary from one node type to another. This data can be accessed with methods such as hou.Node.editableInputName and hou.Node.setEditableInputName. """ pass def description(): """ description(self) -> str Return the description of this node type that appears in the tab menu. For example, for the geometry object, the description is "Geometry". This description is also called the operator label in Houdini. """ pass def addAlias(alias): """ addAlias(self, alias) Add an alias for this node type. You can use this alias when creating new nodes. > >>> geo_type = hou.nodeType(hou.objNodeTypeCategory(), "geo") > >>> geo_type.addAlias("transformable") > >>> geo_type.aliases() > ('transformable',) > >>> hou.node("/obj").createNode("transformable") > """ pass def setDefaultColor(color): """ setDefaultColor(self, color) Set the color used to display a node of this type in the network view if the node's hou.nodeFlag.ColorDefault flag is set. Pass None as the color parameter to remove the type-specific default. """ pass def maxNumInputs(): """ maxNumInputs(self) -> int Return the maximum number of inputs that nodes of this type can have. Return 9999 if this node type can accept an unlimited number of inputs (e.g. the merge SOP). """ pass def icon(): """ icon(self) -> str Return the name or path of the icon for this node type. Note that node types that ship with Houdini use a name instead of a full path, and Houdini uses its search path to locate the icon with that name. """ pass def hdaModule(): """ hdaModule(self) -> hou.HDAModule Return the HDAModule object for this node type. If the type is not for a digital asset, the module is empty. Otherwise, the module contains the functions, constants, classes, etc. in the user-defined "PythonModule" section of the digital asset. You can use hou.Node.hdaModule as a shortcut to access the HDAModule from a node instance. See hou.HDAModule for more information. """ pass def definition(): """ definition(self) -> hou.HDADefinition If this node type corresponds to a digital asset, return the hou.HDADefinition. Otherwise, return None. """ pass def name(): """ name(self) -> str Return the name of this node type. For example, for the geometry object type, the name is "geo". The name and the node type category together uniquely identify a node type. """ pass def namespaceOrder(): """ namespaceOrder(self) -> tuple of str Returns a node type name list sorted in the descending namespace precedence order. The node types in the list have the same base type as this node type. They have different namespace and/or version. Houdini uses this list when resolving an unqualified type name in hou.Node.createNode(); it will use the first entry in that list that matches the name specified in the function. > # parse the full name into components > >>> node_type = hou.nodeType(hou.dopNodeTypeCategory(), 'pyrosolver') > >>> node_type.namespaceOrder() > ('pyrosolver::2.0', 'pyrosolver') """ pass def deprecated(): """ deprecated(self) -> bool Return whether or not this node type has been marked deprecated. See also hou.NodeType.deprecationInfo. """ pass def managerFlag(): """None""" pass def nameComponents(): """ nameComponents(self) -> tuple of str Returns a tuple of node type name components that constitute the full node type name. The components in the tuple appear in the following order: scope network type, node type namespace, node type core name, and version. > # parse the full name into components > >>> node_type = hou.nodeType(hou.dopNodeTypeCategory(), 'pyrosolver::2.0') > >>> node_type.nameComponents() > ('', '', 'pyrosolver', '2.0') """ pass def parmTemplateGroup(): """ parmTemplateGroup(self) -> hou.ParmTemplateGroup Return the group of parm templates corresponding to this node type's parameter interface. See hou.ParmTemplateGroup for more information on parm template groups. To change the parameter interface for a node type defined by a digital asset, see hou.HDADefinition.setParmTemplateGroup. """ pass def isReadable(): """ isReadable(self) -> bool Return True if this node type is readable and False otherwise. A readable node type is one that you can create node instances from. """ pass def generatorFlag(): """None""" pass def helpUrl(): """ helpUrl(self) -> str Return the URL where the node type stores the documentation, e.g., a file name or an HDA section path. May return an empty string if node type does not know where the documentation is. """ pass def _asVoidPointer(): """None""" pass def nameWithCategory(): """ nameWithCategory(self) -> str Return the name of the node type, prefixed with the name of the node type category. For example, for the geometry object, this function returns "Object/geo". The category name and type name together uniquely identify a node type. > >>> hou.nodeType(hou.objNodeTypeCategory(), "geo").nameWithCategory() > 'Object/geo' """ pass def deprecationInfo(): """ deprecationInfo(self) -> dict of str to str or hou.NodeType If the node type has been marked deprecated, this call will return the deprecation information as a dictionary. The currently supported keys are: 'version' The version of Houdini where this operator got deprecated. The form is either major.minor, or major.minor.build (e.g. 14.0 or 14.5.122). This item is always present. 'new_type' The new node type this node was replaced with. This can be used to create a system of automatic node replacement. 'reason' This lists the reason given for the deprecation, in case there is no new node to replace with. """ pass class NodeTypeCategory(object): """ hou.NodeTypeCategory Represents a category of node types, such as surface nodes (SOPs) or dynamics nodes (DOPs). Use hou.nodeTypeCategories to get a dict of node type category names to NodeTypeCategory objects. You can use hou.objNodeTypeCategory, hou.sopNodeTypeCategory, etc. to directly access a particular node type category. See also hou.NodeType and hou.Node. > # Get the names of all the node type categories. > >>> hou.nodeTypeCategories().keys() > ['Shop', 'Cop2', 'CopNet', 'ChopNet', 'Object', 'Driver', > 'Chop', 'Sop', 'Manager', 'Vop', 'Director', 'Dop', 'VopNet'] RELATED * hou.nodeTypeCategories * hou.objNodeTypeCategory * hou.sopNodeTypeCategory * hou.dopNodeTypeCategory * hou.cop2NodeTypeCategory * hou.shopNodeTypeCategory_ * hou.vopNodeTypeCategory * hou.ropNodeTypeCategory * hou.chopNodeTypeCategory * hou.cop2NetNodeTypeCategory * hou.vopNetNodeTypeCategory * hou.chopNetNodeTypeCategory * hou.managerNodeTypeCategory * hou.rootNodeTypeCategory """ def setDefaultWireStyle(): """None""" pass def nodeVerbs(): """ nodeVerbs(self) -> dict of str to hou.SopVerb Return a dict mapping verb names to node verbs in this category. Most verbs are named after their corresponding node type. Alternatively, given a hou.SopNode, one can use hou.SopNode.verb to extract the verb. """ pass def setDefaultColor(): """None""" pass def viewerStates(viewer_type): """ viewerStates(self, viewer_type) -> tuple of hou.ViewerState """ pass def hasSubNetworkType(): """ hasSubNetworkType(self) -> bool Return True if the category contains a node type that creates sub- network nodes. """ pass def defaultShape(): """None""" pass def clearDefaultColors(): """None""" pass def nodeType(type_name): """ nodeType(self, type_name) -> hou.NodeType or None Returns a single node type that matched the provided type name. Returns None if the type name doesn't match a node type in this category. """ pass def nodeTypes(): """ nodeTypes(self) -> dict of str to hou.NodeType Return a dict mapping node type names to node types in this category. For example, if this node type category is SOPs, the keys in the dictionary would be "box", "sphere", "polyextrude", "subdivide", etc. Note that the node types in this category may not all be instances of the same class. For example, most node types in the SOP node type category are instances of hou.SopNodeType, but some, like SHOP networks, CHOP networks, etc. are not. > # Access the box SOP's node type. > hou.sopNodeTypeCategory().nodeTypes()['box'] > def findNodeTypes(node_type_category, pattern): > '''Return a list of node types in a particular node type category > whose names match a pattern.''' > import fnmatch > > return [node_type > for node_type_name, node_type in node_type_category.nodeTypes().items() > if fnmatch.fnmatch(node_type_name, pattern)] See also hou.nodeType_. """ pass def name(): """ name(self) -> str Returns the name of this node type category. """ pass def typeName(): """None""" pass def loadDSO(dso_path): """ loadDSO(self, dso_path) Loads the HDK custom operator identified by the given file path for this node type category. It will use the HOUDINI_DSO_PATH environment variable to find it if necessary. """ pass def _asVoidPointer(): """None""" pass def defaultWireStyle(): """None""" pass def defaultColor(): """None""" pass def label(): """ label(self) -> str Returns the descriptive of this node type category that appears in network editor panes. """ pass def clearDefaultShapes(): """None""" pass def nodeVerb(name): """ nodeVerb(self, name) -> hou.SopVerb or None Return a specific verb from the provided verb name. Returns None if no matching verb is found. """ pass def setDefaultShape(): """None""" pass def NodeTypeCategory_swigregister(): """None""" pass def NodeType_swigregister(): """None""" pass class NodeWarning(Error): """ hou.NodeWarning Exception class used to set warnings on nodes implemented via Python. Raise instances of this class from within Python SOPs, objects, etc. to set an warning messages on the node. See Writing Python SOPs for more information. RELATED * hou.NodeError * hou.Error """ def description(): """ description(self) -> str Return a description of the class of exception. The description is not related to the exception instance. """ pass def exceptionTypeName(): """ exceptionTypeName(self) -> str Return the name of the exception type. Instances of different subclasses of hou.Error will return different names. Instances of the base class will return "Error". You can also use str(e.__class__) to get the name of the subclass. """ pass def NodeWarning_swigregister(): """None""" pass def Node_swigregister(): """None""" pass class NotAvailable(Error): """ hou.NotAvailable Exception class for when an operation attempted to use a feature that is not available. This class is a subclass of hou.Error. RELATED * hou.Error """ def description(): """ description(self) -> str Return a description of the class of exception. The description is not related to the exception instance. """ pass def exceptionTypeName(): """ exceptionTypeName(self) -> str Return the name of the exception type. Instances of different subclasses of hou.Error will return different names. Instances of the base class will return "Error". You can also use str(e.__class__) to get the name of the subclass. """ pass def NotAvailable_swigregister(): """None""" pass class ObjNode(Node): """ hou.ObjNode An instance of an object node in the Houdini scene. Each object has a "transformation" (or "transform") encapsulating its position (or "translation"), rotation, and scale. For a subnet object, the subnet's transform is applied to the objects inside the subnet. An object can have additional transforms from parent objects on top of the transform defined by its parameters, as well as a normally hidden pretransform that defines the object's "rest" or "zero" position (normally all zeros). An object's final position/rotation/scale in world space is defined by (object's transform) * (pretransform) * (parent transform). TIP You can set an object's position/rotation/scale to certain world space values regardless of parent/pre-transform values with the hou.ObjNode.setWorldTransform method. NOTE Houdini does not support shear parameters on objects. If you try to set an object's parameters to a transform containing shear, Houdini will automatically remove the shear. """ def origin(): """ origin(self) -> hou.Vector3 Return the object's origin position, in world space. obj.origin() is equivalent to obj.Vector3(0, 0, 0) * obj.worldTransform(). > # To compute the world space vector from obj1's origin to obj2's origin, you > # can write: > obj2.origin() - obj1.origin() > > # To compute the distance, in world space, between the origins of two > # objects, simply take the length of this vector: > (obj2.origin() - obj1.origin()).length() > > # If there are no rotations or scales, the vtorigin() hscript expression > # function will return the same result as obj2.origin() - obj1.origin(). > # If there are rotations or scales, though, it won't. A Python equivalent > # of vtorigin() is defined by: > def vtorigin(obj1, obj2): > return (obj2.worldTransform() * obj1.worldTransform().inverted()).extractTranslates() See also the hou.ObjNode.worldTransform and hou.ObjNode.getTransformToNode methods. """ pass def parmTransform(): """ parmTransform(self) -> hou.Matrix4 Return the transform defined by the parameters on this node. This method can approximately be implemented as follows: > def parmTransform(self): > pivot_transform = hou.hmath.buildTransform({ > "translate":self.evalParmTuple("p"), > "rotate":self.evalParmTuple("pr")}, > transform_order="srt", > rotate_order="xyz") > return ( > pivot_transform.inverted() * > hou.hmath.buildTransform({ > "translate": self.evalParmTuple("t"), > "rotate": self.evalParmTuple("r"), > "scale": [self.evalParm("scale") * s > for s in self.evalParmTuple("s")], > "shear": (0.0, 0.0, 0.0)}, > transform_order=self.parm("xOrd").evalAsString(), > rotate_order=self.parm("rOrd").evalAsString()) * > pivot_transform) See the class documentation for the relation between this transform and the world space transform. See also hou.ObjNode.worldTransform. NOTE: For Python Objects, the python code sets the parm transform as well and won't necessarily have any visible parameters. To get the local transform of an object (ie. the transform without any parenting), use hou.ObjNode.localTransform. """ pass def getTransformToNode(obj_node): """ getTransformToNode(self, obj_node) -> hou.Matrix4 Return a matrix that transforms this node to line up with the other node. The following invariant is true: node1.worldTransform() * node1.getTransformToNode(node2) == node2.worldTransform(). This method can be implemented as follows: > def getTransformToNode(self, obj_node): > self.worldTransform().inverted() * obj_node.worldTransform() To align node1 (an ObjNode object) with node2 (another ObjNode object), you don't need to use getTransformToNode(). You can simply write: node1.setWorldTransform(node2.worldTransform()). See also hou.ObjNode.origin(), hou.ObjNode.worldTransform(), and hou.ObjNode.setWorldTransform(). """ pass def isObjectDisplayed(): """ isObjectDisplayed(self) -> bool Return whether or not this object is displayed. This method takes into account both the display flag and the display parameter. If the display parameter is enabled, because the tdisplay parameter is set, this parameter overrides the flag. See also hou.ObjNode.isDisplayFlagSet, which returns the current state of the flag. """ pass def worldTransform(): """ worldTransform(self) -> hou.Matrix4 Return the matrix that transforms this object's geometry into world space. The world transform matrix contains the cumulative transforms of: * The node's pre-transform * The transform defined by the node's parameters * The transforms of parent nodes or containing networks This method can approximately be implemented as follows: > def worldTransform(self): > return (self.localTransform() * self.parentAndSubnetTransform()) See also hou.ObjNode.setWorldTransform and hou.ObjNode.worldTransformAtTime. """ pass def _parmClipData(): """None""" pass def localTransformAtTime(time): """ localTransformAtTime(self, time) -> hou.Matrix4 Return, for the specified time, the matrix that transforms this object's geometry into the space of its input. If the object's local transform is animated, this method provides a way to get the transformation at a specific time. See hou.ObjNode.localTransform for more information. """ pass def setPreTransform(matrix): """ setPreTransform(self, matrix) Set this object's pretransform. See hou.ObjNode.preTransform for more information. """ pass def moveParmTransformIntoPreTransform(): """ moveParmTransformIntoPreTransform(self) Set this object's parm transform to the identity and adjust the pre- transform so that the world transform does not change. This method is implemented approximately as follows: > def moveParmTransformIntoPreTransform(self): > self.setPreTransform(self.parmTransform() * self.preTransform()) > self.setParmTransform(hou.hmath.identityTransform()) See also hou.ObjNode.moveParmRotateIntoPreTransform, hou.ObjNode.moveParmScaleIntoPreTransform, and hou.ObjNode.moveParmTranslateIntoPreTransform. Also see hou.ObjNode.movePreTransformIntoParmTransform. """ pass def movePreTransformIntoParmTransform(): """ movePreTransformIntoParmTransform(self) Set this object's pre-transform to the identity and adjust the parm transform so that the world transform does not change. This method is implemented approximately as follows: > def movePreTransformIntoParmTransform(self): > self.setParmTransform(self.parmTransform() * self.preTransform()) > self.setPreTransform(hou.hmath.identityTransform()) See also hou.ObjNode.movePreTransformIntoParmTransform. """ pass def parentAndSubnetTransform(): """ parentAndSubnetTransform(self) -> hou.Matrix4 Return the input node's world space transform (if there is an input connected), combined with the world space transform of the containing subnet object (if there is one). See the class documentation for more information. This method can approximately be implemented as follows: > def parentAndSubnetTransform(self): > if len(self.inputConnectors()[0]) != 0: > return self.inputs()[0].worldTransform() > > containing_subnet = self.parent() > if containing_subnet.type().category() == hou.objNodeTypeCategory(): > return containing_subnet.worldTransform() > > return hou.hmath.identityMatrix() """ pass def localTransform(): """ localTransform(self) -> hou.Matrix4 Return the matrix that transforms this object's geometry into space of its input. The local transform matrix contains the cumulative transforms of: * The node's pre-transform * The transform defined by the node's transform parameters * The transform adjustment by the node's lookat and path parameters The local transform matrix, independent of the node's pre-transform, can be obtained as follows: > def localTransformIgnorePreTransform(self): > return (self.localTransform() * self.preTransform().inverted()) See also hou.ObjNode.localTransformAtTime and hou.ObjNode.worldTransform. """ pass def buildLookatRotation(to_node, up_vector=None): """ buildLookatRotation(self, to_node, up_vector=None) -> hou.Matrix4 Return a matrix that will rotate this object to look at the specified object. The returned hou.Matrix4 object transforms this object from its current position in world space so that its negative z axis points at the origin of the to_node object. up_vector can either be a hou.Vector3 object or None. If it is None, this method uses an up vector of hou.Vector3(0, 1, 0). You can extract the rotation values from the return value with hou.Matrix4.extractRotates. You can set an object's transform with hou.ObjNode.setWorldTransform. > # Set the cam1 object's transform so it points at geo1. > cam1 = hou.node("/obj/cam1") > lookat_obj = hou.node("/obj/geo1") > cam1.setWorldTransform(cam1.buildLookatRotation(lookat_obj)) See also hou.ObjNode.setWorldTransform. """ pass def isDisplayFlagSet(): """ isDisplayFlagSet(self) -> bool Return whether or not this object's display flag is turned on. Note that the display flag and the display parameter both determine whether the object is actually displayed. Use hou.ObjNode.isObjectDisplayed to determine if the object is actually displayed. """ pass def setParmPivotTransform(matrix, fail_on_locked_parms=False): """ setParmPivotTransform(self, matrix, fail_on_locked_parms=False) Sets the pivot transform controlled by this object's parameters. This method will adjust the pivot translate and pivot rotate values of this object to achieve the desired transform. It will not compensate for any changes this causes to the world transform of this object. If fail_on_locked_parms is True, and any of the pivot translate or pivot rotate rotate parameters of the object are locked, this method will raise hou.OperationFailed. If it is False and any of those parameters are locked, this method will change their values but leave them locked. See also hou.ObjNode.parmPivotTransform and hou.ObjNode.setParmTransform. This method can be approximately implemented as follows, ignoring locked parameters: > def setParmPivotTransform(self, matrix): > parm_values = matrix.explode( > transform_order=self.parm('xOrd').evalAsString(), > rotate_order=self.parm('rOrd').evalAsString(), > pivot=hou.Vector3()) > > for parm_name, key in ('p', 'translate'), ('pr', 'rotate'): > self.parmTuple(parm_name).set(parm_values[key]) See also hou.Matrix4.explode. """ pass def renderNode(): """ renderNode(self) -> hou.Node or None If this object contains SOPs or DOPs, return the one that has its render flag on. Otherwise, return None. """ pass def isShowingOrigin(): """ isShowingOrigin(self) -> bool Return whether or not this object displays its local origin gnomon in the viewport. Note that you can change this setting by right-clicking on the node. """ pass def displayNode(): """ displayNode(self) -> hou.Node or None If this object contains SOPs or DOPs, return the one that has its display flag on. Otherwise, return None. """ pass def combine(nodes): """ combine(self, nodes) Combine the geometry from the given list of hou.ObjNode's into this object. After this operation, the old objects will be deleted. Raises hou.ObjectWasDeleted if any of the nodes no longer exist in Houdini. Raises TypeError if any of the nodes are not of type hou.ObjNode. These exceptions are raised prior to performing the combine operation to avoid partial results. """ pass def _alembicGetCameraDict(): """Return camera information.""" pass def isUsingXray(): """ isUsingXray(self) -> bool Return whether or not this object displays its geometry in xray mode. Houdini displays xrayed geometry in wireframe and makes it visible even when it is hidden behind another surface. Note that you can change this setting by right-clicking on the node. """ pass def moveParmRotateIntoPreTransform(): """ moveParmRotateIntoPreTransform(self) Set this object's rotate values to zero and adjust the pre-transform so that the object's world transform does not change. Suppose: * W is the world transform, * L is the parameter transform without any rotate component, * L' is the existing parm transform, * P is the desired new pre-transform, * P' is the current pre-transform, * O is the parent transform combined with the containing subnet's, transform Then, * W = L * P * O and W = L' * P' * O * L * P = L' * P' * P = L^ * L' * P' So, this method is implemented approximately as follows: > def moveParmRotateIntoPreTransform(self): > old_parm_transform = self.parmTransform() > self.parmTuple("r").set((0.0, 0.0, 0.0)) > self.setPreTransform( > self.parmTransform() * old_parm_transform * self.preTransform()) See also hou.ObjNode.preTransform and the class documentation. """ pass def useXray(on): """ useXray(self, on) Turn this object's xray mode on or off. See also hou.ObjNode.isUsingXray. """ pass def isSelectableInViewport(): """ isSelectableInViewport(self) -> bool Return whether or not the selectable flag is set. When it is not set, it is not possible to select this object or any of its geometry interactively in the viewport. """ pass def material(operation, parameter): """ material(self, operation, parameter) Manages object-local overrides of material parameters. This is basically the scripting equivalent of the Material Override menu in the parameter editor for objects. It allows you to create parameters on an object that override the equivalent values on the object's material. The operation argument should be one of the following strings: "override" Create parameters on the object to override _all_ material parameters. "select" Select and create object parameters to override material parameters. "remove" Removes _all_ object parameter overrides. "rmdefault" Removes any unchanged object parameters (that is, that are currently set to their default value). "sync" Synchronize the object parameter overrides with the parameter definitions on the material. "revert" Revert any parameter overrides on the object to their values on the material. "addlist" (Followed by a second argument containing a list of parameter names strings.) Creates object parameters to override the named parameters on the material. > > myobject = hou.node("/obj/obj1") > > # Add all material overrides > myobject.material("override") > > # Remove all material overrides > myobject.material("remove") > > # Add specific overrides for "baseColor" and "roughness" parameters > myobject.material("addlist", ["baseColor", "roughness"]) """ pass def parmPivotTransform(): """ parmPivotTransform(self) -> hou.Matrix4 Return the pivot transform defined by the parameters on this node. This method can approximately be implemented as follows: > def parmPivotTransform(self): > pivot_transform = hou.hmath.buildTranslate(self.evalParmTuple("p")) > return ( > hou.hmath.buildTransform({ > "translate": self.evalParmTuple("p"), > "rotate": self.evalParmTuple("pr")}, > transform_order="srt", > rotate_order="xyz") See also hou.ObjNode.parmTransform. """ pass def setCookTransform(matrix): """ setCookTransform(self, matrix) Set the parameter transform for the Python object that's cooking. Call this method from objects implemented in Python to set the result of the cook. Note that an object implemented in Python controls the parameter transform (i.e. the result of hou.ObjNode.parmTransform). The world transform (i.e. the result of hou.ObjNode.worldTransform) is still affected by parent node's transforms, pre-transforms, etc. This method raises hou.OperationFailed if you call it on an object that is not implemented in Python or if you call it from outside that object's Python cook code. See the Transforms from Disk example. """ pass def setWorldTransform(matrix, fail_on_locked_parms=False): """ setWorldTransform(self, matrix, fail_on_locked_parms=False) Adjust this object's parameters to achieve the desired world transformation. This method will adjust the translate, rotate, and scale values of this object to achieve the desired final world transform. It accounts for the transforms of containing networks, parent transforms, and pre-transforms. If fail_on_locked_parms is True, and any of the translate, rotate, or scale parameters of the object are locked, this method raises hou.OperationFailed. If it is False and any of those parameters are locked, this method will change their values but leave them locked. Suppose: * W is the desired new world transform, * W' is the existing world transform, * L is the desired transform defined by the node's parameters, * L' is the existing parm transform, * P is the object's pre-transform, * O is the parent transform combined with the containing subnet's, transform Then, since W = L * P * O we have P = W * O^ * R^. So, this method could be implemented as follows: > def setWorldTransform(self): > self.setParmTransform( > matrix * self.parentAndSubnetTransform().inverted() * self.preTransform().inverted(), > fail_on_locked_parms) Alternately, we can derive L from W' and L' as follows: * W' = L' * P * O * so P * O = L^' * W' * and (P * O)^ = W^' * L' and * W = L * P * O * so L = W * (P * O)^ * giving L = W * W'^ * L' Thus, this method could also be implemented using the current world and parm transforms as follows: > def setWorldTransform(self): > self.setParmTransform( > matrix * self.worldTransform().inverted() * self.parmTransform(), > fail_on_locked_parms) Note that, because parm transforms cannot contain shears, it is possible that the resulting world transform will not match the desired transform. If r is a function that removes shears from a transform then the new world transform will actually be L * P * O = r(W * O^ * P^) * P * O. See also hou.ObjNode.worldTransform and hou.ObjNode.setParmTransform. """ pass def worldTransformAtTime(time): """ worldTransformAtTime(self, time) -> hou.Matrix4 Return, for the specified time, the matrix that transforms this object's geometry into world space. If the object's world transform is animated, this method provides a way to get the transformation at a specific time. See hou.ObjNode.worldTransform for more information. """ pass def _saveParmClip(): """None""" pass def setDisplayFlag(on): """ setDisplayFlag(self, on) Turn the object's display flag on or off. See also hou.ObjNode.isDisplayFlagSet. """ pass def setSelectableInViewport(on): """ setSelectableInViewport(self, on) Set the object's selectable flag. See hou.ObjNode.isSelectableInViewport for more information. """ pass def showOrigin(on): """ showOrigin(self, on) Show or hide this object's local origin gnomon in the viewport. See also hou.ObjNode.isShowingOrigin. """ pass def getTransformFromPointToPoint(pos3, other_node, other_pos3): """ getTransformFromPointToPoint(self, pos3, other_node, other_pos3) -> hou.Matrix4 Return the transform matrix that rotates the point pos3 (in this object node's transform space) to the point other_pos3 (in another object node's transform space). > obj1.getTransformFromPointToPoint(pos1, obj2, pos2) ...is equivalent to... > (obj1.worldTransform().inverted() * > hou.hmath.buildTranslate(-pos1) * > hou.hmath.buildTranslate(pos2) * > obj2.worldTransform()) See also the hou.ObjNode.getTransformToNode and hou.ObjNode.worldTransform methods, and the functions in the hou.hmath module. """ pass def setParmTransform(matrix, fail_on_locked_parms=False): """ setParmTransform(self, matrix, fail_on_locked_parms=False) Sets the transform controlled by this object's parameters. This method will adjust the translate, rotate, and scale values of this object to achieve the desired parameter, or local, transform. It will account for the existing pivot position, transformation order, and rotation order, and will leave them unchanged. Note that object nodes do not currently have shears parameters, so any shears in the matrix will be discarded. If fail_on_locked_parms is True, and any of the translate, rotate, or scale parameters of the object are locked, this method will raise hou.OperationFailed. If it is False and any of those parameters are locked, this method will change their values but leave them locked. See also hou.ObjNode.parmTransform and hou.ObjNode.setWorldTransform. This method can be approximately implemented as follows, ignoring locked parameters: > def setParmTransform(self, matrix): > parm_values = matrix.explode( > transform_order=self.parm('xOrd').evalAsString(), > rotate_order=self.parm('rOrd').evalAsString(), > pivot=hou.Vector3(self.evalParmTuple('p'))) > > for parm_name, key in ('t', 'translate'), ('r', 'rotate'), ('s', 'scale'): > self.parmTuple(parm_name).set(parm_values[key]) See also hou.Matrix4.explode. """ pass def moveParmScaleIntoPreTransform(): """ moveParmScaleIntoPreTransform(self) Set this object's scale values to one and adjust the pre-transform so that the world transform does not change. See hou.ObjNode.moveParmRotateIntoPreTransform for more information. """ pass def preTransform(): """ preTransform(self) -> hou.Matrix4 Return this object's pretransform. The pre-transform allows you to apply a transform after the parameter transform but before input and containing object transforms. See the class documentation for more details. Unlike the parameter transform, the pretransform is not stored using any parameters on the node. Instead, Houdini stores the pretransform as a matrix. Because it is directly as a matrix, the pretransform may contain shears. """ pass def moveParmTranslateIntoPreTransform(): """ moveParmTranslateIntoPreTransform(self) Set this object's translate values to zero and adjust the pre- transform so that the world transform does not change. See hou.ObjNode.moveParmRotateIntoPreTransform for more information. """ pass def ObjNode_swigregister(): """None""" pass class ObjectWasDeleted(Error): """ hou.ObjectWasDeleted Exception class for when you use a stale variable to attempt to access something that was deleted in Houdini. This class is a subclass of hou.Error. For example, setting a variable to a Node object, deleting that node in Houdini, and attempting to call a method using the variable will raise this exception. RELATED * hou.Error """ def description(): """ description(self) -> str Return a description of the class of exception. The description is not related to the exception instance. """ pass def exceptionTypeName(): """ exceptionTypeName(self) -> str Return the name of the exception type. Instances of different subclasses of hou.Error will return different names. Instances of the base class will return "Error". You can also use str(e.__class__) to get the name of the subclass. """ pass def ObjectWasDeleted_swigregister(): """None""" pass class OperationFailed(Error): """ hou.OperationFailed """ def description(): """ description(self) -> str Return a description of the class of exception. The description is not related to the exception instance. """ pass def exceptionTypeName(): """ exceptionTypeName(self) -> str Return the name of the exception type. Instances of different subclasses of hou.Error will return different names. Instances of the base class will return "Error". You can also use str(e.__class__) to get the name of the subclass. """ pass def OperationFailed_swigregister(): """None""" pass class OperationInterrupted(Error): """ hou.OperationInterrupted """ def description(): """ description(self) -> str Return a description of the class of exception. The description is not related to the exception instance. """ pass def exceptionTypeName(): """ exceptionTypeName(self) -> str Return the name of the exception type. Instances of different subclasses of hou.Error will return different names. Instances of the base class will return "Error". You can also use str(e.__class__) to get the name of the subclass. """ pass def OperationInterrupted_swigregister(): """None""" pass class OrboltURLHandler(object): """None""" def updateProgressBar(): """None""" pass def closeSplashScreen(): """None""" pass def OrboltURLHandler_swigregister(): """None""" pass class OrientedBoundingRect(object): """ hou.OrientedBoundingRect An oriented 2D rectangular region. Computes an oriented bounding rectangle for a set of points. """ def center(): """ center(self) -> hou.Vector2 Returns the position of the center of the bounding rectangle. """ pass def isAlmostEqual(brect, tolerance=0.00001): """ isAlmostEqual(self, brect, tolerance=0.00001) -> bool Returns whether this bounding rectangle is equal to another, subject to numerical tolerances. """ pass def sizevec(): """ sizevec(self) -> hou.Vector2 Returns a vector describing the size of the box in the x and y axes. """ pass def orientation(): """ orientation(self) -> hou.Matrix2 Returns a hou.Matrix2 that defines the orientation of the bounding rectangle. """ pass def OrientedBoundingRect_swigregister(): """None""" pass class PackedFragment(PackedPrim): """ hou.PackedFragment A packed fragment primitive. See packed primitives for more information. """ def setEmbeddedGeometry(geo, attrib, name): """ setEmbeddedGeometry(self, geo, attrib, name) Embeds into this primitive all primitives from geo with the value name for the primitive attribute attrib. Use read-only frozen geometry to share geometry between multiple packed fragment primitives. See hou.Geometry.freeze for more information. """ pass def PackedFragment_swigregister(): """None""" pass class PackedGeometry(PackedPrim): """ hou.PackedGeometry A packed geometry primitive. See packed primitives for more information. """ def setEmbeddedGeometry(geo): """ setEmbeddedGeometry(self, geo) Embeds the provided geometry into this primitive. Use read-only frozen geometry to share geometry between multiple packed geometry primitives. See hou.Geometry.freeze for more information. """ pass def getEmbeddedGeometry(): """ getEmbeddedGeometry(self) -> hou.Geometry Returns the geometry of this primitive. """ pass def PackedGeometry_swigregister(): """None""" pass class PackedPrim(Prim): """ hou.PackedPrim A packed primitive. See packed primitives for more information. To set contents of the packed primitive, use the hou.Prim.setIntrinsicValue method: > prim = myGeometry.createPacked("PackedDisk") > prim.setIntrinsicValue("unexpandedfilename", "defgeo.bgeo") To get the list of available "intrinsic attributes" you can set: * View a packed primitive of the type you want in the geometry spreadsheet and turn on display of intrinsic attributes. _or_ * In a Houdini tools command line, type ginfo -IP to see a list of all intrinsic attributes on all packed primitive types. """ def fullTransform(): """ fullTransform(self) -> hou.Matrix4 Returns the full 4x4 transform for this primitive's geometry. This includes translations due to points and any transforms inside the primitive (for example, transforms inside an Alembic file). """ pass def setTransform(m4): """ setTransform(self, m4) Sets this primitive's local transform. This sets the local 3x3 transform _and_ the translation of the point. This does not affect any transforms inside the primitive (for example, transforms inside an Alembic file). Raises hou.GeometryPermissionError if this geometry is not modifiable. m4 A hou.Matrix4 object containing the full transform. """ pass def vertex(index): """ vertex(self, index) -> hou.Vertex A shortcut for self.vertices()[index]. You probably don't need to call this method. This method supports negative indices to index from the end, just like self.vertices()[index] would. Also, like Python's indexing operator, it will raise IndexError when the index is out of range. """ pass def transform(): """ transform(self) -> hou.Matrix3 Returns the local 3x3 transform associated with this primitive. The transform doesn't include the local point transform or any transforms inside the primitive (for example, transforms inside an Alembic file). """ pass def PackedPrim_swigregister(): """None""" pass class Pane(object): """ hou.Pane A rectangular area of the desktop that contains one or more pane tabs. Desktops (and floating panels) are composed of one or more panes. Initially a desktop contains one pane, and more panes are added to it by splitting existing panes in two, either horizontally or vertically. See hou.Desktop for more information about panes and pane tabs. See hou.FloatingPanel for more information about floating panels. """ def floatingPanel(): """None""" pass def isSplitMaximized(): """ isSplitMaximized(self) -> bool Return the true if the Pane is maximized on the split. A split can't be minimized and maximized at the same time. In its default state, a split is not minimized and not maximized. """ pass def setIsSplitMaximized(on): """ setIsSplitMaximized(self, on) -> bool Set the maximized state of a split. """ pass def tabs(): """ tabs(self) -> tuple of hou.PaneTab Return the pane tabs in this pane. """ pass def getSplitParent(): """ getSplitParent(self) -> hou.Pane or None Return the parent split pane if the Pane is nested under a split. """ pass def tabOfType(type, index=0): """ tabOfType(self, type, index=0) -> hou.PaneTab or None Find and return a pane tab with the desired type, or None if no such tab exists in the pane. If there are multiple tabs in the pane with the desired type, then the first found tab is returned. Use index to return the other tabs. For example, use index=0 to return the first found tab, use index=1 to return the second found tab, etc. See also hou.ui.paneTabOfType. """ pass def currentTab(): """ currentTab(self) -> hou.PaneTab Return the currently focused pane tab. See also hou.PaneTab.setIsCurrentTab. """ pass def isMaximized(): """ isMaximized(self) -> bool Return True if this pane is maximized. """ pass def createTab(type): """ createTab(self, type) -> hou.PaneTab Create a new pane tab with the desired type and return it. The new pane tab will be current (i.e. it will be the pane tab that's open). """ pass def isSplit(): """ isSplit(self) -> bool Return True if the pane is a split. """ pass def isSplitMinimized(): """ isSplitMinimized(self) -> bool Return the true if the Pane is minimized on the split. A split can't be minimized and maximized at the same time. In its default state, a split is not minimized and not maximized. """ pass def id(): """None""" pass def getSplitDirection(selfdir): """ getSplitDirection(self,dir) -> double Return the split direction of the parent split. """ pass def splitSwap(): """ splitSwap(self) Swap the left and right panes of an horizontal split Pane. Swap the top and bottom panes of a vertical split Pane. """ pass def getSplitFraction(selffraction): """ getSplitFraction(self,fraction) -> double Return the split fraction of the parent split. """ pass def getSplitChild(selfindex): """ getSplitChild(self,index) -> hou.Pane or None Return the split child Pane at index if the Pane is a split. """ pass def splitHorizontally(): """ splitHorizontally(self) -> hou.Pane Split the pane, adding a new pane to the right, and return the new pane. The new pane will have a single tab whose type is the same as the type of this pane's current tab. See also hou.Pane.splitVertically. """ pass def desktop(): """ desktop(self) -> hou.Desktop or None Return the desktop in which this pane exists, or None if it is in a floating panel that's not attached to the desktop. """ pass def splitVertically(): """ splitVertically(self) -> hou.Pane Split the pane, adding a new pane to the bottom, and return the new pane. The new pane will have a single tab whose type is the same as the type of this pane's current tab. See also hou.Pane.splitHorizontally. """ pass def splitRotate(): """ splitRotate(self) Turn an horizontal split Pane into a vertical split Pane. """ pass def setIsMaximized(on): """ setIsMaximized(self, on) Set the maximized state of this pane. """ pass def setSplitDirection(selfdir): """ setSplitDirection(self,dir) Set the split direction of the parent split. """ pass def setSplitFraction(selffraction): """ setSplitFraction(self,fraction) Set the split fraction of the parent split. """ pass class PaneTab(object): """ hou.PaneTab One of the tabs inside a desktop pane. Each pane type is of a particular type (e.g. scene viewer, network view, parameters, etc.). A pane may contain multiple tabs and displays the contents of one tab at a time. See hou.Desktop for more information about panes and pane tabs. """ def isCurrentTab(): """ isCurrentTab(self) -> bool Return whether this tab is the selected tab in the containing pane. """ pass def floatingPanel(): """ floatingPanel(self) -> hou.FloatingPanel or None Return the floating panel that contains this pane tab or None if the pane tab is not in a floating panel. """ pass def _pressButton(): """None""" pass def setName(name): """ setName(self, name) Set the name of this pane tab. A pane tab name may contain spaces. Note that this name is the internal name of the tab, and is different from the label displayed in the interface. """ pass def clone(): """ clone(self) -> hou.PaneTab Create a floating copy of the pane tab and return the cloned pane tab. The new pane tab is in a new floating panel. """ pass def isFloating(): """ isFloating(self) -> bool Return whether this pane tab is in a floating panel. This method can be approximately implemented as follows: > def isFloating(self): > return self.pane() is None or self.pane().floatingPanel() is not None """ pass def _setValue(): """None""" pass def setPin(pin): """ setPin(self, pin) If pin is True, set the link group membership to hou.paneLinkType.Pinned. Otherwise, set it to hou.paneLinkType.FollowSelection. This method can be implemented using hou.PaneTab.setLinkGroup as follows: > def setPin(self, pin): > if pin: > self.setLinkGroup(hou.paneLinkType.Pinned) > else: > self.setLinkGroup(hou.paneLinkType.FollowSelection) See also hou.PaneTab.setLinkGroup. """ pass def _getValue(): """None""" pass def pane(): """ pane(self) -> hou.Pane or None Return the pane in the desktop that contains this pane tab. Note that pane tabs in regular floating panels are always in a pane, since regular floating panels contain one or more panes. However, some floating panels have their content stripped down to only contain one particular pane tab type, and do not display the user interface to add more pane tabs, split the pane, etc. This method returns None for these stripped down floating panels. """ pass def linkGroup(): """ linkGroup(self) -> hou.paneLinkType enum value Return the link group that this pane tab belongs to. See also hou.PaneTab.isPin. """ pass def close(): """ close(self) Close the pane tab. """ pass def setType(type): """ setType(self, type) -> hou.PaneTab Create a new pane tab of the given type, replace this tab with it, and return the new pane tab. Use the returned pane tab afterward; references to this tab become invalid. """ pass def setIsCurrentTab(): """ setIsCurrentTab(self) Set this tab as the selected tab in the containing pane. """ pass def name(): """ name(self) -> str Return the name of this tab. """ pass def setLinkGroup(group): """ setLinkGroup(self, group) Set the link group membership of this pane tab. """ pass def _getValueNames(): """None""" pass def isPin(): """ isPin(self) -> bool Return whether this pane tab is pinned. This method is equivalent to (self.linkGroup() == hou.paneLinkType.Pinned) See also hou.PaneTab.linkGroup. """ pass def size(): """ contentSize() -> tuple of int Return a 2-tuple containing the pane tab's content area width and height. The width and height do not include the network navigation control area (if any), pane tab borders or tab area. """ pass def type(): """ type(self) -> hou.paneTabType enum value Return the type of this tab (i.e. whether it is a scene viewer, parameter editor, network editor, etc.). """ pass def contentSize(): """None""" pass def PaneTab_swigregister(): """None""" pass def Pane_swigregister(): """None""" pass class Parm(object): """ hou.Parm A parameter in a node. Each parameter has a unique name within its node and exists inside a parameter tuple. REPLACES * chadd * chalias * chautoscope * chkey * chkeyget * chkeyls * chlock * chrefit * chreverse * chrm * chround * chscope * chstretch * opparm * opscript * ch() * chf() * chs() * chsraw() * cht() """ def setAutoSelect(on): """ setAutoSelect(self, on) Changes the autoselect property of the parameter. If this property is on, this parameter defines the default selection state when it is displayed in the animation editor. """ pass def _setClipData(): """None""" pass def evalAsString(): """ evalAsString(self) -> str Evaluates this parameter at the current frame and returns the result as a string. If you want the string contents of the parameter before variable expansion and expression evaluation then call hou.Parm.unexpandedString. Raises hou.TypeError if the value cannot be converted to a string. """ pass def setClipData(self): """auto-insert ocstring: HOM_Parm::setClipData""" pass def menuItems(): """ menuItems(self) -> tuple of str Returns a list of all possible menu items (for a menu parameter). Raises hou.OperationFailed if this parameter is not a menu. """ pass def _loadClip(): """None""" pass def isMultiParmInstance(): """ isMultiParmInstance(self) -> bool Return whether this parameter is an instance of a multi parm. For example, the pt0x, pt1x, pt2x, etc. parameters in an add SOP are instances of a multiparm. """ pass def evalAsFloatAtFrame(frame): """ evalAsFloatAtFrame(self, frame) -> float Evaluates this parameter at a certain frame and returns the result as a float. Raises hou.TypeError if the value cannot be converted to a float. """ pass def set(self, value, language=None, follow_parm_reference=True): """ set(self, value, language=None, follow_parm_reference=True) Sets the parameter value at the current frame. value A float, integer, or string to set the parameter value to. Pass in a hou.Ramp object, as the parameter value, to set the value of a ramp parameter. The ramp object's type needs to match the target ramp's type. Pass in a hou.Geometry object, as the parameter value, to set the value of a geometry data parameter. Pass in a hou.Parm object to create a channel reference from this parameter to the specified parameter. language This option only applies when setting to a hou.Parm value. Specifies the expression language to use when creating a channel reference from this parameter to the given parameter. Set this option to an hou.exprLanguage object or None to choose the default language. follow_parm_reference This option only applies when setting to a hou.Parm value. When this option is set to True then this method will follow channel references and create a channel reference from the referenced parameter to the given parameter. If this parameter currently contains a channel reference to another parameter, then this method will follow channel references and change the value of the referenced parameter. If this is not the desired behavior, then first delete the channel reference with hou.Parm.deleteAllKeyframes. Alternatively if you are setting the value to another parameter and do not want to follow existing channel references then set the optional follow_parm_reference argument to False. Raises hou.TypeError if the type of value does not match the type of this parameter. Raises hou.PermissionError if this parameter is not writable. See also hou.Node.setParms. """ pass def setScope(on): """ setScope(self, on) Changes the scope property of this parameter's channel, which affects whether it is loaded in the animation editor. """ pass def parmsReferencingThis(): """ parmsReferencingThis(self) -> tuple of hou.Parm Return a tuple of all the parameters in the scene that have channel references to this parameter. """ pass def menuLabels(): """ menuLabels(self) -> tuple of str Returns a list of labels for all possible menu items (for a menu parameter). Raises hou.OperationFailed if this parameter is not a menu. """ pass def evalAsFloat(): """ evalAsFloat(self) -> float Evaluates this parameter at the current frame and returns the result as a float. Raises hou.TypeError if the value cannot be converted to a float. """ pass def evalAsGeometryAtFrame(frame): """ evalAsGeometryAtFrame(self, frame) -> hou.Geometry Evaluates this parameter at a certain frame and returns the result as a geometry. Raises hou.TypeError if the parameter is not a geometry. """ pass def rawValue(): """ rawValue(self) -> str Returns the parameter's raw text value without evaluation or expansion. If the parameter has an expression then the expression is returned otherwise the parameter's plain text value is returned. """ pass def evalAsRampAtFrame(frame): """ evalAsRampAtFrame(self, frame) -> hou.Ramp Evaluates this parameter at a certain frame and returns the result as a ramp. Raises hou.TypeError if the parameter is not a ramp. """ pass def isDisabled(): """ isDisabled(self) -> bool Returns the disable state of the parameter, ignoring the lock state. This can be used to read the result of a disable-when conditional. It is recommended that hou.Node.updateParmStates is called before executing this method either in non-graphical Houdini or when the owner node has not yet been loaded into the Parameter Pane. """ pass def removeMultiParmInstance(index): """ removeMultiParmInstance(self, index) Removes the multi parm instance at the given index. """ pass def containingFolderSetParmTuples(): """ containingFolderSetParmTuples(self) -> tuple of hou.ParmTuple Return a tuple of ParmTuples corresponding to the folders containing this parameter. For example, if this parameter is in the Shading folder and the Shading folder is inside the Render folder, this method will return a tuple containing the Render parm tuple and the Shading parm tuple. Any parm tuples returned will be folder sets. If this parameter is not inside a folder, an empty tuple is returned. See also the containingFolders() method, and hou.Node.parmsInFolder and hou.Node.parmTuplesInFolder. """ pass def componentIndex(): """ componentIndex(self) -> int Returns the component index of this parameter. For example, the translation parameter along the x-axis, "tx", would return a component index of 0, while the translation parameter along the y-axis, "ty" would return a component index of 1. """ pass def isAtDefault(compare_temporary_defaults=True, compare_expressions=False): """ isAtDefault(self, compare_temporary_defaults=True, compare_expressions=False) -> bool Returns whether the parameter is currently at its default. compare_temporary_defaults: When is True, isDefault also checks compare_expressions: When is True, isDefault compares the actual See also the revertToDefaults() and revertToAndRestorePermanentDefaults()methods. """ pass def multiParmInstanceIndices(): """ multiParmInstanceIndices(self) -> tuple of int If this parameter is a multi-parameter instance, then return a tuple of indices of where the parameter appears in the multi-parameter block and any nested blocks. Indices for outer multi-parameter blocks are listed first. For example if this parameter appears as the fourth instance in the multi-parameter block then (3,) is returned. As another example if this parameter appears as the third instance in the multi-parameter block and the block itself appears as the first instance of an outer multi-parameter block then (0, 2) is returned. """ pass def isHidden(): """ isHidden(self) -> bool Returns the hidden state of the parameter. This can be used to read the result of a hide-when conditional. It is recommended that hou.Node.updateParmStates is called before executing this method either in non-graphical Houdini or when the owner node has not yet been loaded into the Parameter Pane. """ pass def parentMultiParm(): """ parentMultiParm(self) -> hou.Parm Return the parent multi-parameter if this parameter is a multi- parameter instance and None otherwise. """ pass def evalAsRamp(): """ evalAsRamp(self) -> hou.Ramp Evaluates this parameter at the current frame and returns the result as a ramp. Raises hou.TypeError if the parameter is not a ramp. """ pass def evalAtTime(time): """ evalAtTime(self, time) -> int, float, or str Evalute this parameter at a given time and return the result as an integer, float or string. See also evalAtFrame. """ pass def isAutoscoped(): """ isAutoscoped(self) -> bool Returns whether this parameter's autoscope property is on. """ pass def evalAsNodes(): """ evalAsNodes(self) -> tuple of hou.Node Evaluates this parameter at the current frame and returns the result as a tuple of hou.Node. Raises hou.TypeError if the value cannot be converted to a hou.Node. """ pass def tuple(): """ tuple(self) -> hou.ParmTuple Returns the hou.ParmTuple associated with this parameter. For example, calling this method on the Parm object for the translation parameter "tx", would return a ParmTuple that contains Parm objects for the three translation parameters "tx", "ty" and "tz". If no tuple is associated with the parameter, then the parameter itself is returned in a tuple of size 1. """ pass def deleteKeyframeAtFrame(frame): """ deleteKeyframeAtFrame(self, frame) Removes a keyframe from this parameter at the given frame. This function will raise a hou.ObjectWasDeleted exception if it is invoked on a parameter that does not exist in Houdini. This function will raise a hou.PermissionError exception if writing to the specified parameter is impossible. This function will raise a hou.OperationFailed exception the parameter doesn't have a keyframe at the given frame. See also hou.Parm.deleteAllKeyframes. """ pass def keyframesInRange(start_frame, end_frame): """ keyframesInRange(self, start_frame, end_frame) -> tuple of hou.BaseKeyframe Returns a tuple of keyframes on this parameter that fall in the range start_frame to end_frame, inclusive. If no keyframes are found an empty tuple is returned. """ pass def containingFolders(): """ containingFolders(self) -> tuple of str Returns a tuple of strings corresponding to the names of the folders containing this parameter. For example, if this parameter is in the Shading folder and the Shading folder is inside the Render folder, this method will return ("Render", "Shading"). Note that by folder name, we mean the label used in the parameter dialog, not the internal parameter name. Returns an empty tuple if this parameter is not inside a folder. Note that calling this method on many parameters may be slow. For a faster alternative, see hou.Node.parmsInFolder. See also the containingFolderSetParmTuples method, and hou.Node.parmTuplesInFolder. """ pass def unexpandedString(): """ unexpandedString(self) -> str Returns the contents of the parameter before dollar sign and back- tick expansion. Examples of unexpanded strings would be "image$F.pic", "$HIP/split.hda", or "chs('../font1/text')". If you were to call eval() on them, Houdini would perform variable expansion and back- tick expression evaluation, so you would get back something like "image1.pic" instead of "image$F.pic". Because only string parameters will attempt to do dollar sign and string expansion, this method will raise hou.OperationFailed if called from a non-string parameter. Suppose a string parameter contains keyframes. In this situation, Houdini will not attempt to do string expansion on the parameter's value, so calling this method will raise hou.OperationFailed. Instead of calling this method, you can call expression() to access the first Keyframe's expression. If there are multiple keyframes, you can call keyframes() to get a list of hou.StringKeyframe objects and call expression() on those objects to retrieve the expression. """ pass def evalAsNodesAtFrame(frame): """ evalAsNodesAtFrame(self, frame) -> tuple of hou.Node Evaluates this parameter at a certain frame and returns the result as a tuple of hou.Node. Raises hou.TypeError if the value cannot be converted to a hou.Node. """ pass def evalAsIntAtFrame(frame): """ evalAsIntAtFrame(self, frame) -> int Evaluates this parameter at a certain frame and returns the result as an integer. Raises hou.TypeError if the value cannot be converted to an integer. """ pass def setKeyframe(keyframe): """ setKeyframe(self, keyframe) Sets a keyframe on this parameter. Raises hou.TypeError if keyframe is not of type hou.BaseKeyframe. Raises hou.PermissionError if this parameter is not writable. """ pass def containingFolderIndices(): """ containingFolderIndices(self) -> tuple of int Return a tuple of indices corresponding to the folders containing this parameter. Each index refers to a folder in the corresponding folder set parameter. This method can be implemented as follows: > def containingFolderIndices(self): > return tuple( > list(folder_set_parm_tuple.parmTemplate().folderNames()).index( > folder_name) > for folder_set_parm_tuple, folder_name in zip( > parm.containingFolderSetParmTuples(), parm.containingFolders())) This example makes a parameter visible in the parameter pane by opening all the folders containing it. > def makeParmVisible(parm): > for folder_set_parm_tuple, folder_index in zip( > parm.containingFolderSetParmTuples(), > parm.containingFolderIndices()): > folder_set_parm_tuple[0].set(folder_index) """ pass def setExpression(expression, language=None, replace_expression=True): """ setExpression(self, expression, language=None, replace_expression=True) Sets this parameter's expression. expression: A string containing the expression that will go inside the parameter. language: Either a hou.exprLanguage enumeration value or None. If language is None and the parameter does not already contain an expression, the language will be the node's expression language. (See hou.Node.expressionLanguage.) Otherwise, if language is None and the parameter already has an expression, the expression language will not change. replace_expression: This parameter only has effect if the parameter already contains keyframes. If it is True, Houdini will replace the keyframe before the current time with one containing the new expression. Otherwise, it will always add a keyframe at the current time. Note that this behavior matches what happens when you edit an expression from Houdini's parameter dialog. Unlike hou.Parm.set, this method does not follow channel references. That is, if this parameter is referencing another parameter and you call setExpression(), it change the channel reference expression into the specified expression. If the parameter does not already contain any keyframes, this method is roughly equivalent to setting a keyframe at frame 1, where the keyframe's expression and language are the ones specified. This method can be approximately implemented as follows: > def setExpression(self, expression, language=None, replace_expression=None) > if self.template().type() == hou.parmTemplateType.String: > k = hou.StringKeyframe() > else: > k = hou.Keyframe() > > k.setExpression(expression, language) > > if len(self.keyframes()): > if replace_expression: > k.setTime(self.effectiveKeyframeAtFrame(hou.frame()).time()) > else: > k.setTime(hou.time()) > else > k.setTime(0.0) > > self.setKeyframe(k) See also the expression, expressionLanguage, and setKeyframe methods, hou.Node.expressionLanguage, and hou.Node.setExpressions. """ pass def getReferencedParm(): """ getReferencedParm(self) -> hou.Parm Returns the referenced parameter. If no parameter is referenced, returns this parameter. """ pass def keyframeExtrapolation(): """None""" pass def evalAsInt(): """ evalAsInt(self) -> int Evaluates this parameter at the current frame and returns the result as an integer. Raises hou.TypeError if the value cannot be converted to an integer. """ pass def name(): """ name(self) -> str Returns this parameter's name. """ pass def deleteAllKeyframes(): """ deleteAllKeyframes(self) Removes all keyframes from this parameter. This has no effect if there are no keyframes to delete. The value of the parameter after all keyframes are removed will be the one it evaluated to at the current frame. This function will raise a hou.ObjectWasDeleted exception if it is invoked on a parameter that does not exist in Houdini. This function will raise a hou.PermissionError exception if writing to the specified parameter is impossible. See also hou.Parm.deleteKeyframeAtFrame and hou.ParmTuple.deleteAllKeyframes. """ pass def revertToAndRestorePermanentDefaults(): """ revertToAndRestorePermanentDefaults(self) Changes the value back to the default that ships with Houdini, and restores that default. See also the revertToDefaults() method, and hou.ParmTuple.revertToAndRestorePermanentDefaults """ pass def clipData(self, start=None, end=None, binary=True, use_blosc_compression=True, sample_rate=0): """ clipData(start=None, end=None, binary=True, use_blosc_compression=True, sample_rate=0) -> str Returns the clip data for this parameter. This method is similar to hou.Parm.saveClip, except that it returns the clip data (file contents) instead of saving the animation to a clip file. , , and behave the same as in hou.Parm.saveClip. If is True, return binary clip data, otherwise return plain text (ASCII) clip data. If is True, blosc compress the binary clip data. This cannot be used for plain text (ASCII) clip data. Raises a hou.OperationFailed exception if the parameter does not have animation. Raises a hou.InvalidInput exception if start >= end. If specifying only , ensure that the specified value is less than the global end frame. Likewise, if specifying only , ensure it is larger than the global start frame. Raises a hou.InvalidInput exception if binary = False and use_blosc_compression = True. """ pass def setKeyframes(keyframes): """ setKeyframes(self, keyframes) Sets multiple keyframe on this parameter. Calling this method is more efficient than calling hou.Parm.setKeyframe several times because it sends out only one update event to Houdini for the entire batch of keyframes that are set. keyframes must be a tuple or list of hou.BaseKeyframe objects. Raises hou.PermissionError if this parameter is not writable. """ pass def isSpare(): """ isSpare(self) -> bool Returns whether this parameter is a "spare" (user-defined) parameter. """ pass def evalAsJSONMapAtFrame(frame): """ evalAsJSONMapAtFrame(self, frame) -> hou.JSONMap Evaluates this parameter at a certain frame and returns the result as a JSON map structure (i.e. Python dictionary). Raises hou.TypeError or hou.OperationFailed if the parameter is not a JSON map data parameter. """ pass def setSelect(on): """ setSelect(self, on) Changes the select property of this parameter's channel, which affects whether it is selected in the animation editor. """ pass def evalAtFrame(frame): """ evalAtFrame(self, frame) -> int, float, or str Evalute this parameter at a given frame and return the result as an integer, float or string. See also evalAtTime. """ pass def loadClip(self): """auto-insert ocstring: HOM_Parm::loadClip""" pass def setAutoscope(on): """ setAutoscope(self, on) Changes the autoscope property of the parameter. If this property is on, this parameter is automatically scoped when the object is selected. """ pass def _set(): """None""" pass def hasTemporaryDefaults(): """ hasTemporaryDefaults(self) -> bool Returns whether a default has been explicitly set on the parameter. See also the revertToDefaults() and revertToAndRestorePermanentDefaults()methods. """ pass def _clipData(): """None""" pass def lock(on): """ lock(self, on) Locks (lock(True)) or unlocks (lock(False)) this parameter (this is, makes the value uneditable). Raises hou.PermissionError if this parameter is part of a locked digital asset. """ pass def keyframes(): """ keyframes(self) -> tuple of hou.BaseKeyframe Returns the keyframes on this parameter. """ pass def setPending(value): """ setPending(self, value) Sets the parameter value at the current frame and marks it as pending if the parameter is keyed. Raises hou.TypeError if the type of value does not match this parameter's type. Raises hou.PermissionError if this parameter is not writable. """ pass def parmTemplate(): """ parmTemplate(self) -> hou.ParmTemplate Returns the template for this parameter. """ pass def keyframesAfter(): """None""" pass def isScoped(): """ isSelected(self) -> bool Returns whether this parameter's channel is selected. If it is selected, then it is selected in the animation editor. """ pass def keyframesRefit(refit, refit_tol, refit_preserve_extrema, refit_bezier, resample, resample_rate, resample_tol, range, range_start, range_end, bake_chop): """ keyframesRefit(self, refit, refit_tol, refit_preserve_extrema, refit_bezier, resample, resample_rate, resample_tol, range, range_start, range_end, bake_chop) Performs a refitting operation with resampling and range controls. refit If set to true, a cubic refitting will be performed with the supplied refit options. If set to false, the refitting is skipped and only the resampling or range operation will be performed. refit_tol Refit Tolerance in absolute value. refit_preserve_extrema Preserves the keys that are local minima or maxima. refit_bezier If True, the new keyframes will be set to use bezier() segments. If False, the new keyframes will be set to use cubic() segments. resample If True, a resampling operation is performed prior to the refitting. If False, the channel is used as is. resample_rate Resample rate in frames. If set to 1.0, a keyframe will be added at every frame. resample_tol Resample Tolerance in frames. If set to 1.0, the resampling won't happen if a frame exists within one frame. range If True, the range_start and range_end arguments are used. It's useful when baking cycles when using cycle/cycle offset or oscillate channel extrapolation. If False, the channel range will be used based on the first and last keyframes. range_start Start frame of the range. range_end End frame of the range. bake_chop A hou.parmBakeChop enumeration value. """ pass def hide(on): """ hide(self, on) Sets the UI hidden state of this parameter in its node. Calling this method has the same effect as changing the Invisible checkbox on the Edit Parameter Interface dialog, or hiding the parameter with a hide-when conditional. However, changing the UI state with this function is transient and does not affect node parameter templates, which means that the new state is not saved to .hip file and can be restored when refreshing the node to its spare parameter templates. To permanently change the UI state of a parameter on a node, please use hou.ParmTemplate.hide instead: > parms = hou.node('/obj/node').parmTemplateGroup() > p = parms.find('lookatpath') > p.hide(True) > parms.replace('lookatpath', p) > hou.node('/obj/node').setParmTemplateGroup(parms) """ pass def keyframesBefore(frame): """ keyframesBefore(self, frame) -> tuple of hou.BaseKeyframe Returns a tuple of keyframes on this paramter that occur at or before frame. If no keyframes are found an empty tuple is returned. """ pass def alias(): """ alias(self) -> str Returns the parameter's channel alias name. Returns an empty string if no such name exists. """ pass def _saveClip(): """None""" pass def multiParmInstances(): """ multiParmInstances(self) -> tuple of hou.Parm If this parameter corresponds to the number of instances for a multiparm, return all the parameters corresponding to all instances of this multiparm. Returns an empty tuple if this parameter is not for a multiparm. """ pass def isSelected(): """None""" pass def isLocked(): """ isLocked(self) -> bool Returns whether this parameter is locked (uneditable). """ pass def pressButton(arguments={}): """ pressButton(self, arguments={}) Emulates clicking a button parameter to trigger its callback script. Raises hou.OperationFailed if the callback script could not be run. An optional dictionary of arguments can be passed to the callback script. Raises hou.TypeError if a n argument value type is unsupported. NOTE This can be called on any type parameter to trigger its callback script, it is not limited to only button parameters. arguments An optional dictionary of arguments for the callback script. The dictionary is merged with the keyword values passed to the callback. The arguments values are single values of the following types: int, bool, float, str. """ pass def createClip(parent_node, name, create_new, apply_immediately, current_value_only, create_locked, set_value_to_default): """ createClip(self, parent_node, name, create_new, apply_immediately, current_value_only, create_locked, set_value_to_default) -> hou.ChopNode Creates a Channel CHOP representing this parameter. The Channel CHOP is created with the given name as a child of the given parent node. The parent_node is typically created via hou.Node.findOrCreateMotionEffectsNetwork. create_new: Always create a new Channel CHOP. If set to False, then if a Channel CHOP already exists with the same name, it will be re- used. If the parameter already exists on the Channel CHOP, the older parameter will be removed first. apply_immediately: If set to True, then the export flag on the Channel CHOP will be set. current_value_only: If set to True, then only the current value of the parameter will be stored. create_locked: If set to True, then the parameters are locked on creation. set_value_to_default: If set to True, then the parameters are reverted to their default values on creation See also hou.Node.findOrCreateMotionEffectsNetwork. """ pass def node(): """ node(self) -> hou.Node Returns the node on which this parameter exists. """ pass def expressionLanguage(): """ expressionLanguage(self) -> hou.exprLanguage enum value Returns the parameter's expression's language. If the parameter does not contain an expression, this method will raise hou.OperationFailed. Also, if the parameter contains more than one keyframe then it could contain multiple different expressions, so it also raises hou.OperationFailed in that case. To change the expression language, use hou.Parm.setExpression and explicitly specify the language: parm.setExpression(parm.expression(), language). This method is roughly equivalent to... > parm.keyframes()[0].expressionLanguage() See also the expression(), setExpression(), keyframes(), and setExpressionLanguage() methods. """ pass def isAutoSelected(): """ isAutoSelected(self) -> bool Returns whether this parameter's autoselect property is on. """ pass def description(): """ description(self) -> str Returns this parameter's label. """ pass def evalAsStringAtFrame(frame): """ evalAsStringAtFrame(self, frame) -> str Evaluates this parameter at a certain frame and returns the result as a string. If you want the string contents of the parameter before variable expansion and expression evaluation then call hou.Parm.unexpandedString. Raises hou.TypeError if the value cannot be converted to a string. """ pass def evalAsNodeAtFrame(frame): """ evalAsNodeAtFrame(self, frame) -> hou.Node Evaluates this parameter at a certain frame and returns the result as a hou.Node. Raises hou.TypeError if the value cannot be converted to a hou.Node. """ pass def evalAsGeometry(): """ evalAsGeometry(self) -> hou.Geometry Evaluates this parameter at the current frame and returns the result as a geometry. Raises hou.TypeError if the parameter is not a geometry. """ pass def copyToParmClipboard(): """ copyToParmClipboard(self) Copies this to the parameter clipboard. See also hou.parmClipboardContents. """ pass def appendClip(chop_node, apply_immediately, current_value_only, create_locked, set_value_to_default): """ appendClip(self, chop_node, apply_immediately, current_value_only, create_locked, set_value_to_default) Appends this parameter to the specified Channel CHOP. apply_immediately: If set to True, then the export flag on the Channel CHOP will be set. current_value_only: If set to True, then only the current value of the parameter will be stored. create_locked: If set to True, then the parameters are locked on creation. set_value_to_default: If set to True, then the parameters are reverted to their default values on creation """ pass def disable(on): """ disable(self, on) Sets the UI disable state of this parameter in its node. This is not the same as locking a parameter, as the underlying value can still be modified. It's closer to what a disable-when conditional does, when a parameter is disabled automatically by it. """ pass def insertMultiParmInstance(index): """ insertMultiParmInstance(self, index) Insert a new multi parm instance before the given index. To append a new multi parm instance, set the index to be the current number of instances. The current number can be queried by calling evalAsInt on the this parameter. """ pass def eval(): """ eval(self) -> int, float, or str Evaluates this parameter at the current frame and returns the result. See also the evalAtFrame and evalAtTime methods. """ pass def path(): """ path(self) -> str Returns the full path to this parameter. """ pass def evalAsJSONMap(): """ evalAsJSONMap(self) -> dict of str to str Evaluates this parameter at the current frame and returns the result as a JSON map structure (i.e. Python dictionary). Raises hou.TypeError or hou.OperationFailed if the parameter is not a JSON map data parameter. """ pass def setAlias(alias_name): """ setAlias(self, alias_name) Gives the parameter another name by which it can be referenced in channels. You can pass in an empty string to remove an existing alias name. """ pass def setFromParm(src): """ setFromParm(self, src) Copies the value of an entire parameter, including channels, from the provided src parameter. """ pass def evalAsNode(): """ evalAsNode(self) -> hou.Node Evaluates this parameter at the current frame and returns the result as a hou.Node. Raises hou.TypeError if the value cannot be converted to a hou.Node. """ pass def isConstrained(): """ isConstrained(self) -> bool Returns True if the Parm's parent node is an OBJ that is cooked and has constraints. """ pass def revertToDefaults(): """ revertToDefaults(self) Change the value back to the default(s). See also the revertToAndRestoreFactoryDefaults() method. """ pass def overrideTrack(): """ overrideTrack(self) -> hou.Track or None Returns the CHOP track overriding this parameter, if any. """ pass def asCode(brief=False, save_values=True, save_keyframes=True, save_keys_in_frames=False, save_flag_values=True, save_aliases=True, function_name=None): """ asCode(self, brief=False, save_values=True, save_keyframes=True, save_keys_in_frames=False, save_flag_values=True, save_aliases=True, function_name=None) -> str Returns a script of Python statements that can be executed to set the parameter tuple's values, flags and other properties. To run the script, use either Python's exec or execfile functions. brief When is True, the output script omits commands for setting values and flags that are set to the factory defaults. The script also omits keyframe commands that set unused values, slopes and accelerations. The value of must be either True or False. save_values: When is True, asCode outputs commands for setting the parameter tuple's values. The value of must be either True or False. save_keyframes When is True, asCode outputs commands for creating the parameter tuple's keyframes (if any). The value of must be either True or False. save_keys_in_frames When is True, asCode outputs commands for setting channel and key times in samples (frames) instead of seconds. This parameter has no effect if is set to False. The value of must be either True or False. save_flag_values When is True, asCode outputs commands for setting the parameter tuple's flag values. The value of must be either True or False. save_aliases When is True, asCode outputs commands for setting the parameter tuple's channel aliases. The value of must be either True or False. function_name If is specified, then the output script is wrapped in a Python function definition with the given name. must be a non-zero length string consisting of only alphanumeric and underscore characters. Any invalid characters are internally converted to underscores. The wrapper function takes in a single argument which must be a reference to an existing node parameter tuple. For symmetry, the function also returns the parameter tuple reference. Here is an example of saving the output to a file and then loading it back into Houdini: > # Get a reference to the target parameter tuple. > pt = hou.parmTuple("/obj/geo1/t") > > # Execute asCode and write the output script to file. > script = pt.asCode() > f = open("set_parm_tuple_properties.py", "w") > f.write(script) > f.close() > > # Execute the script. This will set the values, flag values > # and other properties on /obj/geo1's t parameter tuple. It will > # also store a reference to the t parameter tuple into a variable > # named 'hou_parm_tuple'. > execfile("set_parm_tuple_properties.py") Here is an example of saving the output into a function and then calling it in Houdini: > # Get a reference to the target parameter tuple. > node = hou.parmTuple("/obj/geo1/t") > > # Execute asCode and write the function definition to file. > func = p.asCode(function_name="setParmTupleProperties") > f = open("parmtuplelib.py", "w") > f.write(func) > f.close() > > # Call the function definition to set the properties on another > # parameter tuple. > import parmtuplelib > hou_parm_tuple = parmtuplelib.setParmTupleProperties(node.parm("t")) """ pass def setKeyframeExtrapolation(before, extrapol): """ setKeyframeExtrapolation(self, before, extrapol) Sets a extrapolation on this parameter for time before the first keyframe or after the last keyframe. Extrapolation defines how a parm value is evaluated outside the keyframe range. before If set to true, the extrapolation for evaluations before the first keyframe will be set. If set to false, the extrapolation for evaluations after the last keyframe will be set. extrapol A hou.parmExtrapolate enumeration value. This function will raise a hou.ObjectWasDeleted exception if it is invoked on a parameter that does not exist in Houdini. This function will raise a hou.PermissionError exception if writing to the specified parameter is impossible. This function will raise a hou.OperationFailed exception the parameter doesn't have a valid animation channel. """ pass def isTimeDependent(): """ isTimeDependent(self) -> bool Returns whether this parameter is _time dependent_, that is, its value changes depending on the point on the timeline at which it's evaluated. For example the parameter has an expression containing the $F (current frame number) variable. """ pass def isVisible(): """ isVisible(self) -> bool Returns whether or not this parameter would be visible in the parameter dialog for this node. It checks both the parameter's template, and the hidden state of the parameter. This is equivalent to the following code (but runs faster because it avoids creating the hou.ParmTemplate): > >>> p = hou.parm('/obj/geo1/tx') > >>> not p.isHidden() and not p.parmTemplate().isHidden() > True """ pass def saveClip(self, file_name, start=None, end=None, sample_rate=0): """ saveClip(self, file_name, start=None, end=None, sample_rate=0) Saves the animation associated with this parameter to the clip file specified by . The extension of determines the format of the saved file. You can use one of the following extensions: * .clip: save animation as plain text (ASCII) clip file. * .bclip: save animation as a bclip (binary clip) file. * .bclip.sc: save animation as a bclip file using Blosc compression. Set to a non-zero, non-negative value to specify the sample_rate to be used for the clip file. For example, if the current frame rate is 24 (hou.fps), and is set to 12, the animation will be sampled every second frame since is half of the current frame rate. If is not None, start saving the animation from the specified frame (inclusive). Otherwise, the animation will be saved from the global start frame (inclusive). Similarly, if is not None, stop saving the animation at the specified frame (inclusive). Otherwise, the animation will be saved until the global end frame (inclusive). The global start and end frame are specified in the Global Animation Options window. Raises a hou.OperationFailed exception if the parameter does not have animation. Raises a hou.OperationFailed exception if there is an error saving the animation to file. Raises a hou.InvalidInput exception if start >= end. If specifying only , ensure that the specified value is less than the global end frame. Likewise, if specifying only , ensure it is larger than the global start frame. """ pass def expression(): """ expression(self) -> str Returns this parameter's expression. For example, a parameter might contain the Python expression frame() * 2. In this case hou.Parm.eval at frame 2 would return the value 4, while calling expression() would return the string frame() * 2. If the parameter does not contain an expression, this method will raise hou.OperationFailed. Also, if the parameter contains more than one keyframe then it could contain multiple different expressions, so it also raises hou.OperationFailed in that case. This method is roughly equivalent to... > parm.keyframes()[0].expression() See also the setExpression(), expressionLanguage(), keyframes(), and eval() methods. """ pass class ParmTemplate(object): """ hou.ParmTemplate Describes a parameter tuple (its name, type, etc.). This is base class for all parameter templates. ParmTemplates are most often used when describing a parameter in a digital asset definition's parameter interface or when describing an individual node's parameter layout (including its spare parameters). A ParmTemplate describes a parameter and the type of data it holds, but it does not store the current value of a parameter; only hou.Parm objects inside hou.ParmTuple objects actually store parameter values. You can think of a hou.ParmTuple as an instance of a ParmTemplate. For example, the "t" parm tuple on geometry objects can be described by a hou.FloatParmTemplate -- it has a label of "Transform", a data type of hou.parmData.Float, 3 components, a naming scheme of hou.parmNamingScheme.XYZW, etc. Each geometry object node has a hou.ParmTuple named "t" that uses this ParmTemplate. Note that ParmTemplate objects are just data containers, and they have no live relationship with objects in Houdini. For example, a hou.Node object corresponds directly to a node in Houdini, and if the node is renamed in Houdini hou.Node.name will return the new name. ParmTemplates, on the other hand, do not have a live relationship. Creating a ParmTemplate based on a spare parameter or asset definition parameter will simply copy the information into the ParmTemplate object, and modifying the object will not affect the spare parameter/asset parameter. Note also that ParmTemplate objects are always instances of a subclass of this class, so you cannot construct an instance of this class directly. To manipulate the parameters of a digital asset, you can retrieve the asset's current set of ParmTemplates into a hou.ParmTemplateGroup using hou.HDADefinition.parmTemplateGroup. You can then modify the group, adding parameters to it and replacing parameters in it, and save the group back to the asset definition with hou.HDADefinition.setParmTemplateGroup. Similarly, you can change a node's parameter layout with hou.Node.parmTemplateGroup and hou.Node.setParmTemplateGroup. You can also ask a hou.ParmTuple for its ParmTemplate in order to find out information about the parameter, such as allowed ranges of values, the label displayed to the user in the parameter pane, the parameter's popup help, etc. """ def scriptCallbackLanguage(): """ scriptCallbackLanguage(self) -> hou.scriptLanguage enum value Return the language of the script that Houdini runs when this parameter changes. Note that Houdini uses the tags dictionary to store the script callback information. See also the scriptCallback method. """ pass def help(): """ help(self) -> str Return the help that Houdini displays when you hover over the parameter label in the parameter pane. """ pass def isLabelHidden(): """ isLabelHidden(self) -> bool Return whether the label for this parameter is hidden in the parameter pane. """ pass def setLabel(label): """ setLabel(self, label) Change the name of the label that is displayed in the parameter pane. """ pass def setDisableWhen(disable_when): """ setDisableWhen(self, disable_when) This method is deprecated in favor of the setConditional method. """ pass def joinsWithNext(): """ joinsWithNext(self) -> bool Return whether this parameter is displayed on the same line as the next parameter in the parameter pane. """ pass def hide(on): """ hide(self, on) Marks this parameter as visible or invisible in the parameter pane. Note that hidden parameters still exist, and can be evaluated, channel-referenced, etc. They simply will not be displayed in the parameter pane. """ pass def setLook(look): """ setLook(self, look) Set the look of this parameter to a hou.parmLook enum value. See the look method for more information. """ pass def scriptCallback(): """ scriptCallback(self) -> str Return the contents of the script that Houdini runs when this parameter changes. This script is most commonly used in hou.ButtonParmTemplate objects to respond to the button being pressed. Note that Houdini uses the tags dictionary to store the script callback information. """ pass def label(): """ label(self) -> string Return the name of the parameter tuple that is displayed in the parameter pane. """ pass def type(): """ type(self) -> hou.parmTemplateType enum value Return the enumerated value identifying the type of this parameter. Remember that ParmTemplate objects are always instances of a subclass of this class. The following table shows the mapping between hou.parmTemplateType enumeration values and ParmTemplate subclasses: Enumerated Value ParmTemplate Subclass hou.parmTemplateType.Int hou.IntParmTemplate hou.parmTemplateType.Float hou.FloatParmTemplate hou.parmTemplateType.String hou.StringParmTemplate hou.parmTemplateType.Toggle hou.ToggleParmTemplate hou.parmTemplateType.Menu hou.MenuParmTemplate hou.parmTemplateType.Button hou.ButtonParmTemplate hou.parmTemplateType.FolderSet hou.FolderSetParmTemplate hou.parmTemplateType.Folder hou.FolderParmTemplate hou.parmTemplateType.Separator hou.SeparatorParmTemplate hou.parmTemplateType.Label hou.LabelParmTemplate hou.parmTemplateType.Ramp hou.RampParmTemplate """ pass def namingScheme(): """ namingScheme(self) -> hou.parmNamingScheme enum value Return the naming scheme used to name parameters inside the parm tuple for this ParmTemplate. For example, if the naming scheme is hou.parmNamingScheme.XYZW and the parm template is named "foo" and has 3 components, the parameters will be named "foox", "fooy", and "fooz". On the other hand, if the naming scheme was hou.parmNamingScheme.Base1, the parameters would be named "foo1", "foo2", and "foo3". Note that when the parm template only has 1 component, the parm name is the same as the parm tuple name. See hou.parmNamingScheme for more information. """ pass def numComponents(): """ numComponents(self) -> int Return the number of values stored inside hou.ParmTuple instances of this ParmTemplate. For example, if this parm template has 3 components, there will be 3 parameter fields displayed in the parameter pane and there will be 3 hou.Parm objects inside a hou.ParmTuple based off this parm template. """ pass def setName(name): """ setName(self, name) Change the internal name of this parm template. Remember that ParmTemplates just store data, so the name change will not have any effect unless this parm template is later used to modify a parameter layout in Houdini. """ pass def tags(): """ tags(self) -> dict of string to string Return a dictionary of extra data stored in the parm template. Houdini uses this dictionary to attach arbitrary data to parm templates. The keys in this dictionary vary depending on the ParmTemplate type and its use. """ pass def dataType(): """ dataType(self) -> hou.parmData enum value Return the data type stored in hou.Parm instances inside hou.ParmTuple instances corresponding to this ParmTemplate. For example, suppose this parm tuple is a hou.FloatParmTemplate with 3 components. The corresponding hou.ParmTuple will have 3 hou.Parm objects inside it, and each will store a floating point value. In this example, this method would return hou.parmData.Float. """ pass def clone(): """ clone(self) -> hou.ParmTemplate Return a copy of this parm template. This method can be called on an instance of a ParmTemplate subclass and an instance of the subclass is properly returned. """ pass def setJoinWithNext(on): """ setJoinWithNext(self, on) Sets whether this parameter is displayed on the same line as the next parameter in the parameter pane. """ pass def setScriptCallback(script_callback): """ setScriptCallback(self, script_callback) Set the callback script to the given string. This script runs in response to a parameter change. See the scriptCallback method for more information. """ pass def setTags(tags): """ setTags(self, tags) Set the dictionary of extra data stored in this parm template. See the tags method for more information. """ pass def setNamingScheme(naming_scheme): """ setNamingScheme(self, naming_scheme) Set the naming scheme used to name parameters inside the parm tuple for this ParmTemplate to a hou.parmNamingScheme enum value. See the namingScheme method for more information. """ pass def look(): """ look(self) -> hou.parmLook enum value Return the look of this parameter in the parameter pane. For example, a tuple of 3 floats can be displayed as a 3D vector or as an RGB color. See hou.parmLook for more information. """ pass def hideLabel(on): """ hideLabel(self, on) Hide or show the label for this parameter in the parameter pane. """ pass def name(): """ name(self) -> string Return the internal name of the parm template. This is the name that hou.ParmTuple objects created from this parm template will have. Note that the names of hou.Parm objects inside ParmTuples based off this ParmTemplate are determined by this name, the number of components in this parm template, and the naming scheme. See the namingScheme method for more information. """ pass def setHelp(help): """ setHelp(self, help) Set the help that Houdini displays when you hover over the parameter label in the parameter pane. """ pass def isHidden(): """ isHidden(self) -> bool Return whether this parameter is hidden in the parameter pane. """ pass def setScriptCallbackLanguage(script_callback_language): """ setScriptCallbackLanguage(self, script_callback_language) Set the script callback language to a hou.scriptLanguage enum value. See the scriptCallbackLanguage method for more information. """ pass def setConditional(type, conditional): """ setConditional(self, type, conditional) Set a conditional string of the given hou.parmCondType type for this parameter. This string consists of rules on how this parameter's display behaves when other parameters change. See the Conditionals section of the help for more information on this string. """ pass def joinWithNext(): """ joinWithNext(self) -> bool This method is deprecated in favor of the joinsWithNext method. """ pass def asCode(function_name=None, variable_name=None): """ asCode(self, function_name=None, variable_name=None) -> str Return a string containing Python statements that can be executed to recreate the parameter template. To run the string, use Python's compile, or execfile functions or the exec statement. function_name If is specified, then the code returned creates a Python function with the given name. must be a non-zero length string consisting of only alphanumeric and underscore characters. Any invalid characters are internally converted to underscores. The function returns a reference to the newly created parameter template object. variable_name The name of a Python variable that the result code will assign to. If None, Houdini uses the variable name "hou_parm_template". Here is an example of saving the output to a file and then loading it back into Houdini: > # Get a reference to the target parameter template. > node = hou.node("/obj/geo1") > parm_template = node.parm("tx").parmTemplate() > > # Execute asCode and write the output script to a file. > code = parm_template.asCode() > source_file = open("create_parm_template.py", "w") > source_file.write(code) > source_file.close() > > # Execute the script. The new parameter template will be stored > # in the 'hou_parm_template' variable. > execfile("create_parm_template.py") > > # Add a spare parameter to the node using the saved parameter > # template. > node.addSpareParmTuple(hou_parm_template) Here is an example of saving the output into a function in a file and then calling it from Houdini: > # Get a reference to the target parameter template. > node = hou.node("/obj/geo1") > parm_template = node.parm("tx").parmTemplate() > > # Execute asCode and write the function definition to a file. > code = parm_template.asCode(function_name="createParmTemplate") > source_file = open("parmtemplatelib.py", "w") > source_file.write(code) > source_file.close() > > # Call the function definition. > import parmtemplatelib > hou_parm_template = parmtemplatelib.createParmTemplate() > > # Add a spare parameter to the node using the saved parameter > # template. > node.addSpareParmTuple(hou_parm_template) """ pass def disableWhen(): """ disableWhen(self) -> str This method is deprecated in favor of the conditionals method. """ pass def setNumComponents(num_components): """ setNumComponents(self, num_components) -> int Set the number of values stored inside hou.ParmTuple instances of this ParmTemplate. Note that some ParmTemplate subclasses only support one component, so calling this method with a value other than 1 may raise a hou.OperationFailed exception. Also, changing the number of components may automatically change the size of the tuple of default values for some ParmTemplate subclasses. """ pass def conditionals(): """ conditionals(self) -> dict of [Hom:hou.parmCondType] enum value to string Returns the set of conditionals currently affecting this parameter. See the Conditionals section of the help for more information on this string. """ pass class ParmTemplateGroup(object): """ hou.ParmTemplateGroup A group of parameter templates used to represent the parameter layout of a node or the parameters in a digital asset definition. This class stores a group of hou.ParmTemplate objects. You can create an empty group, create a group from a sequence of parm templates, or create a group from the parameter definitions of a digital asset or from a particular node's current parameter layout. Similarly, you can set an asset's parameters or a node's parameter interface to the contents of a parameter group. You can get an asset's parm templates with hou.HDADefinition.parmTemplateGroup and set them with hou.HDADefinition.setParmTemplateGroup. Similarly, you can get an individual node's parameter definition with hou.Node.parmTemplateGroup and set it with hou.Node.setParmTemplateGroup. When setting a node's parameter interface, any parms that are not in the node's type's set of parms will be added as spare parameters. Similarly, if parameters in the node's type are not present in the group, they will be automatically added at the end and made invisible. Also, if they exist but the types, labels, looks, naming schemes, etc are different, Houdini will discard all changes you attempt to make to these reserved parameters except for visibility settings. Note that ParmTemplateGroups store their own copy of the parm templates. Asking for the parm templates in a group will return a copy of the parm templates; modifying those copies will not change the contents of the group. For example, to change a parameter in a group you cannot simply call find and modify the hou.ParmTemplate it returned. Instead, you must call replace. It is important to understand the difference between folder parm templates and folder set parm templates when using ParmTemplateGroups. Folder sets correspond directly to hou.ParmTuple objects -- there is one parm tuple (that contains one parm) for each set of folders, and changing the value of that parm changes which folder is displayed. Individual Folders, on the other hand, do not directly correspond to hou.ParmTuple objects, but they are used in Houdini's dialog and they make it easy to add individual folders and control which parameters are inside a folder. Unlike a hou.FolderSetParmTemplate, a hou.FolderParmTemplate stores the set of parm templates inside that folder. When a node or definition's parameters are set to the contents of a parm template group, the folder sets are determined and the parm tuple name for the set is the name of the first folder in that set. The names of the other folders in the set are not used. ParmTemplateGroups use folder parm templates instead of folder set parm templates. Attempting to add a FolderSetParmTemplate to a group will raise hou.OperationFailed. Asking a parm tuple for its parm template, on the other hand, may return a folder set but will never return a folder. Previously, folder parameter templates and parm template groups did not exist, so the only way to add folders were with special methods like hou.HDADefinition.addParmFolder and hou.Node.addSpareParmFolder. Now that that they exist, you may create folders by passing folder parm templates to hou.HDADefinition.addParmTuple and hou.Node.addSpareParmTuple. However, using parm template groups is preferred over calling these methods. Note that folder parm templates are also used to represent multiparm blocks, much like the dialog does. The folder parm template's hou.folderType determines whether it is a folder or a multiparm block. Unlike folder parm templates, which do not correspond directly to parameter instances, a multiparm parm template does correspond to an integer parameter that controls the number of instances of the multiparm. """ def entryAtIndices(indices): """ entryAtIndices(self, indices) -> hou.ParmTemplate Given a sequence of integer indices return a copy of the hou.ParmTemplate object at that location. The indices are of the format returned by findIndices. Like the hou.ParmTemplate.find and hou.ParmTemplate.entries methods, this method returns a copy of the parm template stored inside this group. Modifying the copied parm template will not affect the contents of this group. Use replace to change a parm template. Raises hou.OperationFailed if the indices are invalid, including when the indices sequence is empty. This method could be implemented as follows: > def entryAtIndices(self, indices): > if len(indices) == 0: > raise hou.OperationFailed("Invalid indices") > parm_template = self.entries()[indices[0]] > > # If there are multiple indices then we should have just looked up > # a folder parm template. > for index in indices[1:]: > parm_template = parm_template.parmTemplates()[index] > return parm_template """ pass def setToDialogScript(dialog_script): """ setToDialogScript(dialog_script) Set the contents of this group to match the parameters defined by the given dialog script string. Raises hou.OperationFailed if there is an error in the dialog script contents. """ pass def addParmTemplate(parm_template): """ addParmTemplate(self, parm_template) This method is simply an alias for the append method. It makes it easier to treat parm template groups and hou.FolderParmTemplate objects uniformly, since hou.FolderParmTemplate has an addParmTemplate method. """ pass def entriesWithoutFolders(): """ entriesWithoutFolders(self) -> tuple of hou.ParmTemplate Return a tuple containing all the non-folder parm templates inside this group. The output is the flattened set of parm templates in the group, and includes the non-folder parms inside folders. Like entries, this method returns a copy of the parm templates inside this group. Note that this function does not return parm templates for entries inside multiparm blocks. Also see the entries method for the example function allParmTemplates. """ pass def replace(name_or_parm_template_or_indices, parm_template): """ replace(self, name_or_parm_template_or_indices, parm_template) Replace a parm template inside this group with another parm template. name_or_parm_template_or_indices Either the name of the parm template being replaced, a copy of the parm template, or a tuple of integer indices that identify the parm template and any containing folders. This method changes the contents of this group. Note that it stores a copy of the parm template in the group, so future changes to the parm template passed in will not affect the group. See the find method for a simple example of how to use this method. Note that parm templates for reserved parameters (for example, the transform parameters in object-level digital assets) can be replaced in the parm template group, but all aspects of reserved parameters except for their visibility and join settings will be restored to their defaults when you save this group to a node or asset definition. Raises hou.OperationFailed if the parm template doesn't exist. """ pass def sourceNodeType(): """ sourceNodeType(self) -> hou.NodeType or None Return the node type that the parameter template group was generated from. If the group was not generated from a node type, then return None. Raises hou.ObjectWasDeleted if the source node type has been destroyed. """ pass def find(name): """ find(self, name) -> hou.ParmTemplate or None Search in this group for a parm template whose name matches the specified one. Return a copy of the parm template or None if no match was found. Note that this function returns a copy of the parm template stored in this group. Modifying the copy will not affect the parameters in this group. The following example shows how to use the find and replace methods to modify the "pos" parm template in the group: > >>> parm_template = group.find("pos") > >>> parm_template.setLabel("Position") > >>> parm_template.replace("pos", parm_template) If you created the group from existing parameters, folder parm templates in the same folder set will share the same name, so searching for a folder using this method may return the first folder in the folder set. To instead search for a folder by its folder label, use findFolder. Note that, in general, the group does not prevent you from adding two parameters with the same name. In this case, searching for a parameter with this name will return the first one. Note, though, that when when setting this group to a node or asset definition's parms, either the duplicate parameters will be renamed on an exception will be raised. See the rename_conflicting_parms parameter to hou.HDADefinition.setParmTemplateGroup for more information. """ pass def append(parm_template): """ append(self, parm_template) Add a parm template after all existing parm templates, outside of any folder. See also appendToFolder. """ pass def findFolder(label_or_labels): """ findFolder(self, label_or_labels) -> hou.FolderParmTemplate or None Search in this group for a folder parm template with the given label. Return a copy of the hou.FolderParmTemplate or None if the folder wasn't found. label_or_labels Either a string containing the folder's label or a tuple of strings containing the labels of containing folders as well as the folder's label. Note that a folder parm template's label is what appears in the interface in the parameter dialog. The folder parm template's name is used to determine the name of the parm tuple for the folder set, if the folder is the first in the folder set. See the documentation for this class for more information. """ pass def containingFolderIndices(name_or_parm_template_or_indices): """ containingFolderIndices(self, name_or_parm_template_or_indices) -> tuple of int Return the indices of the folder in this group containing a given parm template. Return an empty tuple if no match was found. See replace for a description of the parameter and findIndices for a description of the return value. Raises hou.OperationFailed if the parameter is not inside the group or is not inside a folder. """ pass def findIndicesForFolder(label_or_labels): """ findIndicesForFolder(self, label_or_labels) -> tuple of int Search in this group for a folder parm template with the given label. Return an empty tuple if no match was found. See findFolder for a description of the parameter and findIndices for a description of the return value. Note that this method does not accept a parm template. However, if you have a folder parm template and want to find its indices, simply call findIndices on the folder parm template. """ pass def asDialogScript(rename_conflicting_parms=False, full_info=False): """ asDialogScript(rename_conflicting_parms=False, full_info=False) Return a string containing the dialog script file contents corresponding to this parm template group. Houdini saves parameter definitions in this format when saving digital asset definitions (in the DialogScript section of the digital asset) and when saving parameter layouts of nodes. The default behavior for reserved parameters is to output baseparm tokens for reserved parameters so that it is resistant to changes in their definition. To change this, use full_info=True. """ pass def findIndices(name_or_parm_template): """ findIndices(self, name_or_parm_template) -> tuple of int Search in this group for a parm template and return a tuple of integers corresponding to the indices of the parm in the group. Return an empty tuple if no match was found. name_or_parm_template Either the name of the parm template or another hou.ParmTemplate object to compare against when searching for a match. If the parm template was found and it is not inside any folders, the result tuple will contain a single integer with the index of the parm template. Otherwise, the first entry will be the index of a folder inside the group, the next will be an index of a folder inside that folder, and so on until the last index is an index of a parm template inside a folder. See also findIndicesForFolder. """ pass def insertAfter(name_or_parm_template_or_indices, parm_template): """ insertAfter(self, name_or_parm_template_or_indices, parm_template) Insert a parm template inside this group after an existing one. The new parm template will be in the same folder as the existing one. See replace for a description of the name/ parm template/indices parameter. Use appendToFolder to add an entry to a empty folder. Use append to add an entry to an empty parm template group. """ pass def isHidden(name_or_parm_template_or_indices): """ isHidden(self, name_or_parm_template_or_indices) -> bool Return whether the given parameter is itself hidden or lies inside a hidden folder. See replace for a description of the name/parm template/indices parameter. Note that if the parameter is inside a hidden folder but the parameter is not marked as hidden, calling hou.ParmTemplate.isHidden on the parm template will return False, while this method will return True. """ pass def parmTemplates(): """ parmTemplates(self) -> tuple of hou.ParmTemplate This method is simply an alias for the entries method. It makes it easier to search down through a parm template group for items nested in folders, since the hou.FolderParmTemplate class also has a method named parmTemplates. The following example shows how to look up the labels for a folder parameter given its indices: > def folderLabels(parm_template_group, indices): > container = parm_template_group > result = [] > for index in indices: > container = container.parmTemplates()[index] > result.append(container.label()) > return result """ pass def insertBefore(name_or_parm_template_or_indices, parm_template): """ insertBefore(self, name_or_parm_template_or_indices, parm_template) Insert a parm template inside this group before an existing one. The new parm template will be in the same folder as the existing one. See replace for a description of the name/parm template/indices parameter. Use appendToFolder to add an entry to a empty folder. Use append to add an entry to an empty parm template group. """ pass def entries(): """ entries(self) -> tuple of hou.ParmTemplate Return a tuple containing copies of the parm templates inside this group. Note that folders are returned as hou.FolderParmTemplate objects, and each folder parm template contains the parm templates inside it. Use hou.FolderParmTemplate.parmTemplates to access the elements in a folder. The following example creates a function named allParmTemplates that returns a single sequence of parm templates, including folders, for all parm templates in the group: > def allParmTemplates(group_or_folder): > for parm_template in group_or_folder.parmTemplates(): > yield parm_template > > # Note that we don't want to return parm templates inside multiparm > # blocks, so we verify that the folder parm template is actually > # for a folder. > if (parm_template.type() == hou.parmTemplateType.Folder and > parm_template.isActualFolder()): > for sub_parm_template in allParmTemplates(parm_template): > yield sub_parm_template See also the parmTemplates method. """ pass def hide(name_or_parm_template_or_indices, on): """ hide(self, name_or_parm_template_or_indices, on) Hide a parameter by making it invisible. The parameter still exists in the group, but parameter dialogs will not display it. See replace for a description of the name/parm template/indices parameter. This method could be implemented as follows: > def hide(self, name_or_parm_template_or_indices, on): > parm_template = self.find(name_or_parm_template_or_indices) > parm_template.hide(on) > self.replace(name_or_parm_template_or_indices, parm_template) See also hideFolder and hou.ParmTemplate.hide. """ pass def isFolderHidden(label_or_labels): """ isFolderHidden(self, label_or_labels) -> bool Return whether a folder or one of its containing folders is hidden. Note that if a folder is inside a hidden folder but this folder is not marked as hidden, calling hou.ParmTemplate.isHidden on the folder parm template will return False, while this method will return True. You may pass in either a string containing a single folder name or a sequence of strings to identify a nested folder. For example, the sequence ("Render", "Dicing") identifies the Dicing folder inside the Render folder. The folder is hidden if on is True and unhidden if it is False. """ pass def sourceNode(): """ sourceNode(self) -> hou.Node or None Return the node that the parameter template group was generated from. If the group was not generated from a node, then return None. Raises hou.ObjectWasDeleted if the source node has been destroyed. """ pass def appendToFolder(label_or_labels_or_parm_template_or_indices, parm_template): """ appendToFolder(self, label_or_labels_or_parm_template_or_indices, parm_template) Add a parm template to the bottom of an existing folder. Note that you cannot add to a folder by simply looking up the folder parm template and calling hou.FolderParmTemplate.addParmTemplate on it, because asking for a folder will return a deep copy. The parm templates inside the copied folder will be separate from those inside this group, and modifying the folder will not affect the group. Consider the following example: > >>> folder = group.findFolder("Transform") > # "folder" now has its own copy of the parms inside it. > >>> folder.addParmTemplate(new_parm_template) > # "folder"'s parm templates are updated, but the group's parm templates are > # unchanged. > > >>> group.appendToFolder(folder, new_parm_template) > # The group is modified. "folder"'s contents are unchanged. """ pass def clear(): """ clear(self) Remove all parm templates from this group. """ pass def remove(name_or_parm_template_or_indices): """ remove(self, name_or_parm_template_or_indices) Remove a parm template from the group. Note that if you remove a folder, all of the parm templates in the folder are also removed. See replace for a description of the name/parm template/indices parameter. Raises hou.OperationFailed if the parm template could not be found. """ pass def asCode(function_name=None, variable_name=None): """ asCode(self, function_name=None, variable_name=None) Return Python code that will recreate this group. function_name If not None, the returned code will create a Python function. variable_name The name of the variable that will be assigned the newly-created parm template group. """ pass def containingFolder(name_or_parm_template): """ containingFolder(self, name_or_parm_template) -> hou.FolderParmTemplate Return a copy of the hou.FolderParmTemplate in this group containing a parm template. name_or_parm_template Either the name of the parm template or another hou.ParmTemplate object to compare against when searching for a match. Raises hou.OperationFailed if the parameter is not inside the group or is not inside a folder. """ pass def hideFolder(label_or_labels, on): """ hideFolder(self, label_or_labels, on) Hide a folder and all the parameters in it. You may pass in either a string containing a single folder name or a sequence of strings to identify a nested folder. For example, the sequence ("Render", "Dicing") identifies the Dicing folder inside the Render folder. The folder is hidden if on is True and unhidden if it is False. The following example hides the Transform parameter in a geometry object: > >>> group = geo_node.parmTemplateGroup() > >>> group.hideFolder("Transform", True) > >>> geo_node.setParmTemplateGroup(group) The following example hides the Dicing folder inside the Render folder on a geometry object: > >>> group = geo_node.parmTemplateGroup() > >>> group.hideFolder(("Render", "Dicing"), True) > >>> geo_node.setParmTemplateGroup(group) This method could be implemented as follows: > def hideFolder(self, label_or_labels, on): > self.hide(self.findFolder(label_or_labels), on) See also hide. """ pass def ParmTemplateGroup_swigregister(): """None""" pass def ParmTemplate_swigregister(): """None""" pass class ParmTuple(object): """ hou.ParmTuple A tuple of one or more node parameters. Each parameter tuple has a unique name within its node. The ParmTuple class behaves like a Python sequence, so you can index into it using square brackets, iterate over it, call len on it, etc. The elements inside the parameter tuple are hou.Parm objects. A parameter tuple's name may only contain letters, numbers, and underscores. For example, objects contain a parameter tuple named "t" that contains three integer parameters. The names of the parameters inside the tuple are determined from the parameter tuple's name and its naming scheme. For example, the "t" parameter uses the XYZW naming scheme, so the three parameters inside it are named "tx", "ty", and "tz". Note that if the parameter tuple only contains one parameter, the tuple and the parameter inside it may have the same name. In addition to a name, a parameter tuple also has a label that is displayed to the user in the parameter dialog. For example, the "t" parameter's label is "Translate". The label may contain spaces and punctuation characters. Each parameter in a tuple stores a value. Different instances of parm tuples in different nodes will store their own set of parameter values. The value in a parameter may be animated, in which case the parameter evaluates to a different result depending on the current time on the playbar. See hou.Keyframe for more information about animated parameters. Each hou.NodeType has a set of parameter tuple descriptions associated with it, and each instance of a hou.Node has a corresponding set of parameter tuple instances. The parameter tuples store specific values that are saved with the node. The descriptions of the parameter tuples, however, are represented by a hou.ParmTemplate. A parameter template describes the type, default values, ranges, etc. of a parameter tuple. See also hou.parmTuple_ and hou.Node.parmTuple. """ def _setClipData(): """None""" pass def evalAsRamps(): """ evalAsRamps(self) -> hou.Ramp Evaluates this parameter tuple at the current frame and returns the result as a tuple containing a hou.Ramp object. Raises hou.TypeError if this is not a ramp parameter. """ pass def help(): """None""" pass def lock(bool_values): """ lock(self, bool_values) Lock or unlock all the parameters in this tuple. Houdini displays locked parameters as disabled and does not let you change their values. bool_values Either a single True or False value to be applied to all components of this parameter or a sequence of them where each value corresponds to a single component. Where an element of bool_values is True, that component will be locked (uneditable), and where an element is False, the corresponding component will be unlocked (editable). For example, the parameter tuple for "translation" contains Parm objects for translation along each of the axes, "tx", "ty" and "tz". If lock is called with the following tuple of boolean values, (True, True, False), then the parameter "tx" and "ty" will be locked and made non-editable, while "tz" will be unlocked and made editable. Raises hou.InvalidSize if bool_values has a different length than this parameter tuple. Raises hou.PermissionError if any of the parameters in this parameter tuple are not writable. """ pass def parentMultiParm(): """ parentMultiParm(self) -> hou.Parm Return the parent multi-parameter if this parameter is a multi- parameter instance and None otherwise. """ pass def setAutoscope(bool_values): """ setAutoscope(self, bool_values) Changes the autoscope property of components of this parameter tuple. bool_values A sequence of True or False values, where each value corresponds to a component of this parameter. Where an element of bool_values is True, that component will be autoscope. For example, the parameter tuple for "translation" contains Parm objects for translation along each of the axes, "tx", "ty" and "tz". If setAutoscope is called with the following tuple of boolean values, (True, True, False), then the parameter "tx" and "ty" will be automatically scoped, while "tz" will not. Raises hou.InvalidSize if values has a different length than this parameter tuple. Raises hou.PermissionError if any of the parameters in this parameter tuple are not writable. """ pass def _loadClip(): """None""" pass def isMultiParmInstance(): """ isMultiParmInstance(self) -> bool Return whether this parameter is an instance of a multi parm. For example, the pt0, pt1, pt2, etc. parameter tuples in an add SOP are instances of a multiparm. """ pass def setPending(values): """ setPending(self, values) Sets the value of a parameter in the tuple at the current frame and marks it as pending if the parameter is keyed. values A sequence of floats or strings, corresponding to the components of this parameter tuple. For example, the parameter tuple for "translation" contains Parm objects for translation along each of the axes, "tx", "ty" and "tz". If set is called with following tuple of floats, (2.5, 4.0, 5.5), then the parameter "tx" with be set to 2.5, "ty" will be set to 4.0 and "tz" will be set to 5.5. Raises hou.InvalidSize if values has a different length than this parameter tuple. Raises hou.PermissionError if any of the parameters in this parameter tuple are not writable. """ pass def parmTemplate(): """ parmTemplate(self) -> hou.ParmTemplate Return this parameter tuple's template. Note that a folder parameter will have a hou.FolderSetParmTemplate template and a multiparm parameter will have a hou.FolderParmTemplate template. """ pass def evalAsGeometries(): """ evalAsGeometries(self) -> tuple of hou.Geometry Evaluates this parameter tuple at the current frame and returns the result as a tuple containing a hou.Geometry object. Raises hou.TypeError if a value cannot be converted to a hou.Geometry. """ pass def multiParmInstances(): """ multiParmInstances(self) -> tuple of hou.ParmTuple If this parameter corresponds to the number of instances for a multiparm, return all the parameter tuples corresponding to all instances of this multiparm. Returns an empty tuple if this parameter is not for a multiparm. """ pass def _clipData(): """None""" pass def hide(on): """ hide(self, on) Sets the UI hidden state of this parameter tuple in its node. Calling this method is equivalent to changing the Invisible checkbox on the Edit Parameter Interface dialog, or hiding the parameter with a hide-when conditional. To hide a folder, use hou.Node.setParmTemplateGroup. This method cannot be used to hide a folder because a parm tuple corresponds to a set of folders, not an individual folder. To change the visibility of all new instances of the node type defined by a digital asset, use hou.HDADefinition.setParmTemplateGroup as in the following example: > def showParmTupleInDefinition(parm_tuple, visible): > '''parm_tuple is a hou.ParmTuple on an instance of the digital asset.''' > definition = parm_tuple.node().type().definition() > parm_template_group = definition.parmTemplateGroup() > parm_template = parm_template_group.find(parm_tuple.name()) > parm_template.hide(not visible) > parm_template_group.replace(parm_tuple.name(), parm_template) > definition.setParmTemplateGroup(parm_template_group) """ pass def evalAsStrings(): """ evalAsStrings(self) -> tuple of str Evaluates this parameter tuple at the current frame and returns the result as a tuple of strings. Raises hou.TypeError if a value cannot be converted to a string. """ pass def isDisabled(): """ isDisabled(self) -> bool Returns the disable state of the parameter tuple, ignoring the lock state. This can be used to read the result of a disable-when conditional. It is recommended that hou.Node.updateParmStates is called before executing this method either in non-graphical Houdini or when the owner node has not yet been loaded into the Parameter Pane. """ pass def copyToParmClipboard(): """ copyToParmClipboard(self) Copies this to the parameter clipboard. See also hou.parmClipboardContents. """ pass def evalAsStringsAtFrame(frame): """ evalAsStringsAtFrame(self, frame) -> tuple of str Evaluates the parameter tuple at a frame and returns the result as a tuple of strings. Raises hou.TypeError if a value cannot be converted to a string. """ pass def setClipData(self): """auto-insert ocstring: HOM_ParmTuple::setClipData""" pass def deleteAllKeyframes(): """ deleteAllKeyframes(self) Remove all the keyframes from this parameter tuple. This method be approximately implemented as follows: > def deleteAllKeyframes(self): > for parm in self: > parm.deleteAllKeyframes() See also hou.Parm.deleteAllKeyframes. """ pass def isAtDefault(compare_temporary_defaults=True, compare_expressions=False): """ isAtDefault(self, compare_temporary_defaults=True, compare_expressions=False) -> bool Returns whether the parameter tuple is currently at its defaults. compare_temporary_defaults: When is True, isDefault also checks compare_expressions: When is True, isDefault compares the actual See also the revertToDefaults() and revertToAndRestorePermanentDefaults()methods. """ pass def set(self, values, language=None, follow_parm_references=True): """ set(self, values, language=None, follow_parm_references=True) Sets the values of the parameters in the tuple at the current frame. values A sequence of floats, integers or strings, corresponding to the components of this parameter tuple. For example, the parameter tuple for "translation" contains hou.Parm objects for translation along each of the axes, "tx", "ty" and "tz". If set is called with the following tuple of floats, (2.5, 4.0, 5.5), then the parameter "tx" with be set to 2.5, "ty" will be set to 4.0 and "tz" will be set to 5.5. You can also pass in a hou.ParmTuple object for this argument to create channel references from the parameters in this tuple to the parameters in the passed-in tuple. If this tuple has more parameters than the passed-in tuple then no work is performed on the extra parameters. If the passed-in tuple has more parameters than this tuple then the the extra parameters are ignored. language This option only applies when setting to a hou.ParmTuple value. Specifies the expression language to use when creating channel references from this parameter tuple to the given parameter tuple. Set this option to an hou.exprLanguage object or None to choose the default language. follow_parm_references This option only applies when setting to a hou.ParmTuple value. When this option is set to True then this method will follow channel references and create channel references from the referenced parameter tuple to the given parameter tuple. If this parameter tuple currently contains channel references to another parameter tuple, then this method will follow channel references and change the value of the referenced parameter tuple. If this is not the desired behavior, then first delete the channel reference with hou.ParmTuple.deleteAllKeyframes. Alternatively if you are setting the value to another parameter tuple and do not want to follow existing channel references then set the optional follow_parm_references argument to False. Raises hou.InvalidSize if values has a different length than this parameter tuple. Raises hou.PermissionError if any of the parameters in this parameter tuple are not writable. """ pass def evalAsIntsAtFrame(frame): """ evalAsIntsAtFrame(self, frame) -> tuple of int Evaluates this parameter tuple at a certain frame and returns the result as a tuple of integers. Raises hou.TypeError if a value cannot be converted to an integer. """ pass def isHidden(): """ isHidden(self) -> bool Returns the hidden state of the parameter tuple. This can be used to read the result of a hide-when conditional. It is recommended that hou.Node.updateParmStates is called before executing this method either in non-graphical Houdini or when the owner node has not yet been loaded into the Parameter Pane. """ pass def node(): """ node(self) -> hou.Node Return the node containing this parameter tuple. """ pass def evalAtTime(time): """ evalAtTime(self, time) -> tuple of int, float, str, or hou.Ramp Evalute the parameter tuple at a given time and return the result as a tuple of integers, floats, strings, or a Ramp object, depending on the type of the parameter. See also evalAtFrame. """ pass def description(): """ description(self) -> str Return this parameter tuple's label that is displayed in the parameter dialog. """ pass def evalAsGeometriesAtFrame(frame): """ evalAsGeometriesAtFrame(self, frame) -> tuple of hou.Geometry Evaluates this parameter tuple at a certain frame and returns the result as a tuple containing a hou.Geometry object. Raises hou.TypeError if a value cannot be converted to a hou.Geometry. """ pass def disable(on): """ disable(self, on) Sets the UI disable state of this parameter tuple in its node. This is not the same as locking a parameter, as the underlying value can still be modified. It's closer to what a disable-when conditional does, when a parameter is disabled automatically by it. """ pass def evalAsFloats(): """ evalAsFloats(self) -> tuple of float Evaluates this parameter tuple at the current frame and returns the result as a tuple of floats. Raises hou.TypeError if a value cannot be converted to a float. """ pass def appendClip(chop_node, apply_immediately, current_value_only, create_locked, set_value_to_default): """ appendClip(self, chop_node, apply_immediately, current_value_only, create_locked, set_value_to_default) Appends this parameter to the specified Channel CHOP. apply_immediately: If set to True, then the export flag on the Channel CHOP will be set. current_value_only: If set to True, then only the current value of the parameter will be stored. create_locked: If set to True, then the parameters are locked on creation. set_value_to_default: If set to True, then the parameters are reverted to their default values on creation """ pass def evalAsFloatsAtFrame(frame): """ evalAsFloatsAtFrame(self, frame) -> tuple of float Evaluates this parameter tuple at a certain frame and returns the result as a tuple of floats. Raises hou.TypeError if a value cannot be converted to a float. """ pass def evalAsRampsAtFrame(frame): """ evalAsRampsAtFrame(self, frame) -> hou.Ramp Evaluates this parameter tuple at a certain frame and returns the result as a tuple containing a hou.Ramp object. Raises hou.TypeError if this is not a ramp parameter. """ pass def eval(): """ eval(self) -> tuple of int, float, str, or hou.Ramp Evalute this parameter tuple at the current frame and returns the result as a tuple of integers, floats or strings, or a hou.Ramp object, depending on the type of the parameter. See also the evalAtFrame and evalAtTime methods. """ pass def _saveClip(): """None""" pass def name(): """ name(self) -> str Return the name of this parameter tuple. Note that the parameter tuple's name and its naming scheme determine the names of the parameters inside it. > >>> node = hou.node("/obj").createNode("geo") > >>> node.parmTuple("t").parmTemplate().namingScheme() > parmNamingScheme.XYZW > >>> [parm.name() for parm in node.parmTuple("t")] > ['tx', 'ty', 'tz'] > > >>> parm_tuple = node.parent().createNode("cam").parmTuple("dcolor") > >>> parm_tuple.parmTemplate().namingScheme() > parmNamingScheme.RGBA > >>> [parm.name() for parm in parm_tuple] > ['dcolorr', 'dcolorg', 'dcolorb'] """ pass def multiParmInstanceIndices(): """None""" pass def isConstrained(): """None""" pass def createClip(parent_node, name, create_new, apply_immediately, current_value_only, create_locked, set_value_to_default): """ createClip(self, parent_node, name, create_new, apply_immediately, current_value_only, create_locked, set_value_to_default) -> hou.ChopNode Creates a Channel CHOP representing this parameter. The Channel CHOP is created with the given name as a child of the given parent node. The parent_node is typically created via hou.Node.findOrCreateMotionEffectsNetwork. create_new: Always create a new Channel CHOP. If set to False, then if a Channel CHOP already exists with the same name, it will be re- used. If the parameter already exists on the Channel CHOP, the older parameter will be removed first. apply_immediately: If set to True, then the export flag on the Channel CHOP will be set. current_value_only: If set to True, then only the current value of the parameter will be stored. create_locked: If set to True, then the parameters are locked on creation. set_value_to_default: If set to True, then the parameters are reverted to their default values on creation See also hou.Node.findOrCreateMotionEffectsNetwork. """ pass def clipData(self, start=None, end=None, binary=True, use_blosc_compression=True, sample_rate=0): """ clipData(start=None, end=None, binary=True, use_blosc_compression=True, sample_rate=0) -> str Returns the clip data for the parameters of this tuple. This method is similar to hou.ParmTuple.saveClip, except that it returns the clip data (file contents) instead of saving the animation to a clip file. , , and behave the same as in hou.ParmTuple.saveClip. If is True, return binary clip data, otherwise return plain text (ASCII) clip data. If is True, blosc compress the binary clip data. This cannot be used for plain text (ASCII) clip data. Raises a hou.OperationFailed exception if none of the parameters of this tuple have animation. Raises a hou.InvalidInput exception if start >= end. If specifying only , ensure that the specified value is less than the global end frame. Likewise, if specifying only , ensure it is larger than the global start frame. Raises a hou.InvalidInput exception if binary = False and use_blosc_compression = True. """ pass def revertToDefaults(): """ revertToDefaults(self) Changes the value back to the default(s). See also the revertToAndRestoreFactoryDefaults() method. """ pass def isSpare(): """ isSpare(self) -> bool Returns whether the parameter is a "spare" (user-defined) parameter. """ pass def _set(): """None""" pass def asCode(): """None""" pass def evalAsInts(): """ evalAsInts(self) -> tuple of int Evaluates this parameter tuple at the current frame and returns the result as a tuple of integers. Raises hou.TypeError if a value cannot be converted to an integer. """ pass def evalAtFrame(frame): """ evalAtFrame(self, frame) -> tuple of int, float, str, or hou.Ramp Evalute the parameter tuple at a given frame and return the result as a tuple of integers, floats, strings, or a Ramp object, depending on the type of the parameter. See also evalAtTime. """ pass def loadClip(self): """auto-insert ocstring: HOM_ParmTuple::loadClip""" pass def revertToAndRestorePermanentDefaults(): """ revertToAndRestorePermanentDefaults(self) Changes the value back to the defaults that ship with Houdini, and restore those defaults. See also the revertToDefaults() method. """ pass def saveClip(self, file_name, start=None, end=None, sample_rate=0): """ saveClip(self, file_name, start=None, end=None, sample_rate=0) Saves the animation associated with the parameters of this tuple to the clip file specified by . The extension of determines the format of the saved file. You can use one of the following extensions: * .clip: save animation as plain text (ASCII) clip file. * .bclip: save animation as a bclip (binary clip) file. * .bclip.sc: save animation as a bclip file using Blosc compression. Set to a non-zero, non-negative value to specify the sample_rate to be used for the clip file. For example, if the current frame rate is 24 (hou.fps), and is set to 12, the animation will be sampled every second frame since is half of the current frame rate. If is not None, start saving the animation from the specified frame (inclusive). Otherwise, the animation will be saved from the global start frame (inclusive). Similarly, if is not None, stop saving the animation at the specified frame (inclusive). Otherwise, the animation will be saved until the global end frame (inclusive). The global start and end frame are specified in the Global Animation Options window. Raises a hou.OperationFailed exception if none of the parameters of this tuple have animation. Raises a hou.OperationFailed exception if there is an error saving the animation to file. Raises a hou.InvalidInput exception if start >= end. If specifying only , ensure that the specified value is less than the global end frame. Likewise, if specifying only , ensure it is larger than the global start frame. """ pass def helpUrl(): """None""" pass def _asVoidPointer(): """None""" pass def ParmTuple_swigregister(): """None""" pass def Parm_swigregister(): """None""" pass class PathBasedPaneTab(PaneTab): """ hou.PathBasedPaneTab REPLACES * bookmark * pane * mousepath() """ def setCurrentNode(node, pick_node, =, True): """ setCurrentNode(self, node, pick_node = True) """ pass def currentNode(): """ currentNode(self) -> Node """ pass def cd(path): """ cd(self, path) """ pass def pwd(): """ pwd(self) -> Node """ pass def setPwd(node): """ setPwd(self, node) """ pass def PathBasedPaneTab_swigregister(): """None""" pass class PerfMonEvent(object): """ hou.PerfMonEvent Represents an event that is recorded by the performance monitor and used to generate time and memory growth statistics for profiles. Note that all methods in this class may raise an hou.OperationFailed exception if the event was not actually recorded in the Performance Monitor. This can happen if hou.perfMon.startEvent or hou.perfMon.startCookEvent was called when the Performance Monitor was not recording. NOTE The stopTime(), memory() and time() methods have been removed. Memory and time values are now returned by the stop() method. RELATED * hou.perfMon * hou.PerfMonProfile * hou.PerfMonRecordOptions * Performance monitor pane """ def object(): """ object(self) -> str Return the object that the event applies to. Return None if the event is not associated with an object. """ pass def stop(): """ stop(self) Stop the event timer and return a 2-tuple, (