I need to get camera list in hip file.
I tried to this :
node.allSubChildren or toolutils.findAllChildNodesOfType
but, It is very slow because recursion.
I want to use data from ‘Scene View’ that has camera list.
How to use this data in python ??
How to get camera list in viewport data ( python)
3999 4 2-
- JMoon
- Member
- 9 posts
- Joined: May 2015
- Offline
-
- Leaf
- Member
- 12 posts
- Joined: May 2017
- Offline
-
- JMoon
- Member
- 9 posts
- Joined: May 2015
- Offline
-
- jsmack
- Member
- 8177 posts
- Joined: Sept. 2011
- Offline
If you want not just ‘cam’ cameras, but hda cameras such as vrcam and any custom cameras a studio might use, you can try ‘recursiveGlob’. It seems reasonably fast for how complex it sounds. The trick is to use a filter.
root = hou.node('/') camera_nodes = root.recursiveGlob('*', hou.nodeTypeFilter.ObjCamera) # '*' is a pattern which matches the globbed node names
-
- JMoon
- Member
- 9 posts
- Joined: May 2015
- Offline
-
- Quick Links


