Inheritence |
|
To create a sticky note, use the hou.Node.createStickyNote() method on the node inside which you want to create the note. To get an existing sticky note, use the hou.Node.findStickyNote() method on the node containing the sticky note. To get a list of all notes in a network, use the hou.Node.stickyNotes() method on the containing node.
Methods
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)
→ str
Prints the Python code necessary to recreate a sticky note.
See hou.Node.asCode() for information on the keyword arguments.
destroy()
Remove and delete the sticky note.
drawBackground()
→ bool
Returns whether the sticky note will draw a colored background and title bar.
isMinimized()
→ bool
Returns whether the sticky note is minimized.
minimizedSize()
→ hou.Vector2
Return the size of this item’s tile in the network editor graph if it is
minimized. Returned as a Vector2
.
resize(vector2)
Resizes a sticky note by the increments in the given hou.Vector2.
Use setSize()
to set the note’s absolute size.
restoredSize()
→ hou.Vector2
Return the size of this item’s tile in the network editor graph if it is
not minimized. Returned as a Vector2
.
setBounds(bounds)
Sets the size and position of this sticky note to the given
hou.BoundingRect bounds
argument. Equivalent to calling setSize
then setPosition
.
setMinimized(on)
Minimizes or restores the sticky note.
setDrawBackground(on)
Turns on or off the drawing of the colored background for the text and the title bar in the network editor. Turning this on makes the sticky note easier to see. Turning it off allows the text to be less obtrusive.
setSize(size)
Sets the size of this sticky note to the given hou.Vector2
size
parameter. Use resize()
to set the note’s size relative to
its current size.
setText(str)
Sets the text of the sticky note.
setTextColor(color)
Sets the color of the text of the sticky note. The color
parameter
should be a hou.Color object.
setTextSize(size)
Sets the size of the text of the sticky note. The size
value specifies
the height (in network units) of the font.
text()
→ str
Return the text displayed in the sticky note.
textColor()
→ hou.Color
Return the color of the text displayed in the sticky note.
textSize()
→ float
Return the size of the text displayed in the sticky note, expressed as the height of the font in network units.
Methods from hou.NetworkItem
networkItemType()
→ hou.networkItemType
Return an enum value indicating what type of network item is represented
by this object. This value is equivalent to using the isinstance
built in
Python function with the matching class
(for example hou.networkItemType.Connection is equivalent to
hou.NodeConnection).
Methods from hou.NetworkMovableItem
name()
→ str
Return this node’s name. See also hou.NetworkMovableItem.path().
setName(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.
digitsInName()
→ 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
.
path()
→ str
Return the full path (i.e. starting with /
) of this node in the network.
relativePathTo(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) '.'
parent()
→ 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() <hou.Node at /obj> >>> print hou.node("/").parent() None
parentNetworkBox()
→ hou.NetworkBox or None
Returns the parent network box which contains this item, or None if it is not inside a network box.
isSelected()
→ bool
Return whether this item is selected.
See also hou.selectedNodes().
isPicked()
→ bool
Equivalent to calling hou.NetworkMovableItem.isSelected().
setSelected(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.
setPicked(on)
Equivalent to calling hou.NetworkMovableItem.setSelected() with default values for all optional parameters.
color()
→ hou.Color
Return the color of this item’s tile in the network editor.
setColor(color)
Sets the color of this item’s tile in the network editor to the given hou.Color.
sessionId()
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.
position()
→ hou.Vector2
Return the position of this item’s tile in the network editor graph as
a Vector2
. See also move()
and setPosition()
.
setPosition(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.
move(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.
shiftPosition(vector2)
Equivalent to calling hou.NetworkMovableItem.move().
size()
→ hou.Vector2
Return the size of this item’s tile in the network editor graph as a
Vector2
.