Methods ¶
__init__()
Create a LopInstanceIdRule object with default settings.
instanceIds(lopnode, use_last_cook_context_options = True)
→ tuple
of int
Calculates the instance ids that match the pattern on the point instancer
primitive on the stage generated by the provided LOP node
object. The returned tuple of integers are ids from the point instancer’s
ids
attribute. If no ids
attribute is set on the point instancer, the
instances are assumed to have increasing ids starting at 0.
The use_last_cook_context_options
flag indicates that when cooking the
lopnode
, the context option values used on the previous cook should be
used if any context options used by this node do not exist in the global
context option set. If the HOUDINI_NEW_CONTEXT_OPTION_RULES
environment
variable is set, the last cook context options will take priority over any
global options, unless the node being cooked has its display flag set in
which case last cook context options are never used.
primPath()
→ str
Return the path to the point instancer primitive that is used to evaluate the instance id pattern.
setPrimPath(primpath)
Sets the path to the point instancer primitive that is used to evaluate the instance id pattern.
instanceIdPattern()
→ str
Return the pattern that described the instance ids that should be
returned by the instanceIds
method. This pattern accepts standard
Houdini numeric range formatting, like what is provided in SOP group
parameters.
setInstanceIdPattern(pattern)
Sets the pattern that described the instance ids that should be
returned by the instanceIds
method. This pattern accepts standard
Houdini numeric range formatting, like what is provided in SOP group
parameters, such as 2-5
to indicate ids between 2 and 5, or
^15
to exclude id number 15.