Extract LOP data property using python #
- In Houdini LOPs direct access to primitives is not possible.
- To get the bounding box (bbox) of a primitive, there are no expressions in LOPs to directly extract values from primitives.
- In Python, you can use
hou.node(/path/to/prim).stage().GetObjectAtPath("/prim.extentsHint").Get()
to get the min/max bounds of a primitive. - A simpler solution is to insert a
sopmodify
node before the node you need to get thebbox
to, link thebbox
to theOUT
of the container, and get the surface node reference
Note: This method works in Houdini’s LOP context, where direct primitive access is limited. It provides a workaround to extract bounding box information using Python scripting and node manipulation.