python equivalent of opadd
4072 4 1- rdms
- Member
- 201 posts
- Joined: July 2005
- Offline
- Jenny
- Staff
- 121 posts
- Joined: Oct. 2010
- Offline
- graham
- Member
- 1904 posts
- Joined: Nov. 2006
- Offline
As Jenny mentioned the best way to get a list is use the node type category classes and take advantage of their nodeTypes() method. This method gives a dictionary with the node type name as the key and a hou.NodeType object as the value.
The equivalent of just using opadd while at /obj is something like this.
nodetypes = hou.objNodeTypeCategory()
for ntype in nodetypes:
print ntype
The equivalent of just using opadd while at /obj is something like this.
nodetypes = hou.objNodeTypeCategory()
for ntype in nodetypes:
print ntype
Graham Thompson, Technical Artist @ Rockstar Games
- fxrod
- Member
- 133 posts
- Joined: July 2005
- Offline
Hi Graham:
The code that you submitted returns errors.
nodetypes = hou.objNodeTypeCategory()
for ntype in nodetypes:
print ntype
Here's the error:
Traceback (most recent call last):
File “<console>”, line 1, in <module>
TypeError: ‘NodeTypeCategory’ object is not iterable
The code that you submitted returns errors.
nodetypes = hou.objNodeTypeCategory()
for ntype in nodetypes:
print ntype
Here's the error:
Traceback (most recent call last):
File “<console>”, line 1, in <module>
TypeError: ‘NodeTypeCategory’ object is not iterable
Francisco Rodriguez
Effects Animator | Walt Disney Animation Studios
Effects Animator | Walt Disney Animation Studios
- graham
- Member
- 1904 posts
- Joined: Nov. 2006
- Offline
-
- Quick Links