opglob command
Expands a pattern into a list of operator names.
Replaced by: hou.findNodeBundle, hou.Node
See also: opfind
Usages
-
opglob [-r | -f] [-n relative_to_op] operator_pattern -
opglob [-r | -f] -m mask_op_path [-F filter] mask_pattern
If the operator_pattern starts with the @ symbol, then it is expanded to the given bundle, group, or network box. In the case where a bundle, group, and/or network box share the same name, the order of precedence is bundles, then groups, and finally network boxes.
For the second usage, the -m option specifies that mask_pattern is a mask to be evaluated relative to the operator given by mask_op_path. This can be used to obtain the expanded list of operators from any “mask” parameters such as the Light Mask parameter on Geometry Objects. The optional -F option specifies the operator type filter according to the following table.
|
'!!CHOP!!' |
Any CHOP |
|
'!!CHOPNET!!' |
CHOP Networks |
|
'!!COP!!' |
Any COP |
|
'!!COPNET!!' |
COP Networks |
|
'!!OBJ!!' |
Any Object |
|
'!!OBJ/BONE!!' |
Bone Objects |
|
'!!OBJ/CAMERA!!' |
Camera Objects |
|
'!!OBJ/FOG!!' |
Fog Objects |
|
'!!OBJ/GEOMETRY!!' |
Geometry Objects |
|
'!!OBJ/GEOMETRY,OBJ/FOG!!' |
Geometry and Fog Objects |
|
'!!OBJ/LIGHT!!' |
Light Objects |
|
'!!OBJ/SubnetObjects!!' |
Objects contained in the subnetwork |
|
'!!POP!!' |
Any POP |
|
'!!POPNET!!' |
POP Networks |
|
'!!ROP!!' |
Any Output Driver |
|
'!!SHOP!!' |
Any SHOP |
|
'!!SOP!!' |
Any SOP |
|
'!!VOP!!' |
Any VOP |
|
'!!VOPNET!!' |
VOP Networks |
Options
|
|
Output paths relative to the current working operator. |
|
|
Output full paths. |
|
|
Relative paths in the operator_pattern are evaluated relative to the relative_to_op node. If this option is not specified, paths are assumed to be relative to the current node. |
Examples
opglob @package
Expands the bundle named package or the group named package in the current working operator.
opglob @package ^/obj/light1
Expands the bundle named package or the group named package in the current working operator but excludes the node /obj/light1:
opglob -f @packageExpands the bundle named package or the group named package in the current working operator and output full paths.
opglob ./@package
Expands the group named package even if a bundle with the same name exists.
opglob /obj/subnet1/@package
Expands the group named package that is within /obj/subnet1.
opglob -r /obj/subnet1/@packageExpands the group named package that is within /obj/subnet1 but return relative paths.
set mask = `chs("/obj/model/lightmask")` opglob -f -m /obj/model -F '!!OBJ/LIGHT!!' $maskExpands to the exact list of lights used by the /obj/model Geometry Object in its Light Mask parameter.