-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for error when getting sgtk alembic nodes. #9
base: master
Are you sure you want to change the base?
Conversation
The following methods are failing :- hou.nodeType(hou.ropNodeTypeCategory(), tk_node_type).instances() hou.nodeType(hou.sopNodeTypeCategory(), tk_node_type).instances() This is because if there are no nodes of that type, the first part of the line returns None, and raises an error as it has no "instances()" method. The nodes need to be gathered first, and if there are are any, THEN get their instances.
tk_alembic_nodes.extend( | ||
rop_nodes.instances() | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blank line contains whitespace
sop_nodes = hou.nodeType(hou.sopNodeTypeCategory(), tk_node_type) | ||
rop_nodes = hou.nodeType(hou.ropNodeTypeCategory(), tk_node_type) | ||
if sop_nodes: | ||
tk_alembic_nodes.extend( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trailing whitespace
sop_nodes = hou.nodeType(hou.sopNodeTypeCategory(), tk_node_type) | ||
rop_nodes = hou.nodeType(hou.ropNodeTypeCategory(), tk_node_type) | ||
if sop_nodes: | ||
tk_alembic_nodes.extend( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trailing whitespace
|
||
sop_nodes = hou.nodeType(hou.sopNodeTypeCategory(), cls.HOU_SOP_ALEMBIC_TYPE) | ||
rop_nodes = hou.nodeType(hou.ropNodeTypeCategory(), cls.HOU_ROP_ALEMBIC_TYPE) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blank line contains whitespace
hou.ropNodeTypeCategory(), cls.HOU_ROP_ALEMBIC_TYPE | ||
).instances() | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Black would make changes.
blank line contains whitespace
The following methods are failing :-
hou.nodeType(hou.ropNodeTypeCategory(), tk_node_type).instances()
hou.nodeType(hou.sopNodeTypeCategory(), tk_node_type).instances()
This is because if there are no nodes of that type, the first part of the line returns None, and raises an error as it has no "instances()" method.
The nodes need to be gathered first, and if there are are any, THEN get their instances.