hou.CopNode class

Represents a compositing node.

All Methods Replaces

Inheritence: hou.Node >

Methods

Methods inherited from hou.Node: evalParm, createNode, move, clearParmAliases, inputAncestors, reorderChildrenToEnd, childTypeCategory, children, isInsideLockedHDA, appendComment, addSpareParmTuple, findNetworkBox, fileReferences, relativePathTo, color, removeSpareParmTuple, saveToGallery, __getitem__, indirectInputs, modificationTime, inputConnectors, saveOldStylePresetsFile, loadOldStylePresetsFile, findNetworkBoxes, asXML, runInitScripts, cook, permissions, hdaModule, copyNetworkBox, outputConnections, name, parmsInFolder, parmTuplesInFolder, saveCookCodeToFile, nodeGroups, creator, setNextInput, replaceSpareParmTuple, loadChildrenFromFile, loadPresets, findStickyNotes, setCurrent, moveToGoodPosition, findOrCreateMotionEffectsNetwork, selectedChildren, errors, hide, addPermissions, removePermissions, isSelected, isLocked, extractAndDelete, setPermissions, createStickyNote, isBuiltExplicitly, __ne__, expressionLanguage, stickyNotes, parmTuples, parent, matchCurrentDefinition, __setitem__, isCurrent, path, setPosition, setDeleteScript, setExpressionLanguage, messages, createDigitalAsset, asCode, comment, setSelected, outputConnectors, setInput, saveCompiledCookCodeToFile, reorderChildrenToBeginning, parms, size, parmAliases, extraInputs, reorderChildrenAfter, allowEditingOfContents, layoutChildren, deleteScript, isHidden, fileReferencePatterns, spareParms, setName, outputs, parm, extraOutputs, setCreatorState, isTimeDependent, __eq__, networkBoxes, setColor, info, type, parmToNodeReferences, creationTime, referencedNodes, removeSpareParmFolder, _getArgumentAutoComplete, motionEffectsNetworkPath, insertInput, setFirstInput, addNodeGroup, creatorState, addSpareParmFolder, nodeGroup, collapseIntoSubnet, findStickyNote, parmTuple, copyStickyNote, destroy, changeNodeType, evalParmTuple, node, inputs, digitsInName, warnings, saveChildrenToFile, glob, matchesCurrentDefinition, findParms, createNetworkBox, stampValue, reorderChildrenBefore, setBuiltExplicitly, setComment, allSubChildren, recursiveGlob, sessionId, inputConnections, position

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.

components(self, plane)tuple of strings

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.

getPixelByUV(self, plane, u, v, component=None, interpolate=True)tuple of floats

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.

getPixelHSVByUV(self, u, v, interpolate=True)tuple of floats

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.

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.

imageBounds(self, plane="C")tuple of ints

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.

isBypassed(self)bool

Returns True if the node’s bypass flag is turned on. Returns False otherwise.

isDisplayFlagSet(self)bool

Returns True if the node’s display flag is turned on. Returns False otherwise.

isRenderFlagSet(self)bool

Returns True if the node’s render flag is turned on. Returns False otherwise.

isSingleImage(self)bool

Returns True if the node has a single image. Returns False if the node has an image sequence.

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.

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.

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.

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.

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.

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.

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.

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.

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.

Replaces

, pic expression function , picni expression function , opflag expression function , opget command , opsave command , opset command , res expression function , seqanim expression function , seqend expression function , seqlength expression function , seqstart expression function