-
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,16 +81,18 @@ def convert_back_to_tk_alembic_nodes(cls, app): | |
|
||
# get all rop/sop alembic nodes in the session | ||
alembic_nodes = [] | ||
alembic_nodes.extend( | ||
hou.nodeType( | ||
hou.sopNodeTypeCategory(), cls.HOU_SOP_ALEMBIC_TYPE | ||
).instances() | ||
) | ||
alembic_nodes.extend( | ||
hou.nodeType( | ||
hou.ropNodeTypeCategory(), cls.HOU_ROP_ALEMBIC_TYPE | ||
).instances() | ||
) | ||
|
||
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 commentThe reason will be displayed to describe this comment to others. Learn more. blank line contains whitespace |
||
if sop_nodes: | ||
alembic_nodes.extend( | ||
sop_nodes.instances() | ||
) | ||
if rop_nodes: | ||
alembic_nodes.extend( | ||
rop_nodes.instances() | ||
) | ||
|
||
if not alembic_nodes: | ||
app.log_debug("No Alembic Nodes found for conversion.") | ||
|
@@ -190,12 +192,16 @@ def convert_to_regular_alembic_nodes(cls, app): | |
|
||
# get all instances of tk alembic rop/sop nodes | ||
tk_alembic_nodes = [] | ||
tk_alembic_nodes.extend( | ||
hou.nodeType(hou.sopNodeTypeCategory(), tk_node_type).instances() | ||
) | ||
tk_alembic_nodes.extend( | ||
hou.nodeType(hou.ropNodeTypeCategory(), tk_node_type).instances() | ||
) | ||
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 commentThe reason will be displayed to describe this comment to others. Learn more. trailing whitespace |
||
sop_nodes.instances() | ||
) | ||
if rop_nodes: | ||
tk_alembic_nodes.extend( | ||
rop_nodes.instances() | ||
) | ||
|
||
if not tk_alembic_nodes: | ||
app.log_debug("No Toolkit Alembic Nodes found for conversion.") | ||
|
@@ -278,13 +284,17 @@ def get_all_tk_alembic_nodes(cls): | |
|
||
# get all instances of tk alembic rop/sop nodes | ||
tk_alembic_nodes = [] | ||
tk_alembic_nodes.extend( | ||
hou.nodeType(hou.sopNodeTypeCategory(), tk_node_type).instances() | ||
) | ||
tk_alembic_nodes.extend( | ||
hou.nodeType(hou.ropNodeTypeCategory(), tk_node_type).instances() | ||
) | ||
|
||
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 commentThe reason will be displayed to describe this comment to others. Learn more. trailing whitespace |
||
sop_nodes.instances() | ||
) | ||
if rop_nodes: | ||
tk_alembic_nodes.extend( | ||
rop_nodes.instances() | ||
) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. blank line contains whitespace |
||
return tk_alembic_nodes | ||
|
||
@classmethod | ||
|
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