Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 33 additions & 23 deletions python/tk_houdini_alembicnode/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
)

Copy link

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

sop_nodes = hou.nodeType(hou.sopNodeTypeCategory(), cls.HOU_SOP_ALEMBIC_TYPE)
rop_nodes = hou.nodeType(hou.ropNodeTypeCategory(), cls.HOU_ROP_ALEMBIC_TYPE)

Copy link

Choose a reason for hiding this comment

The 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.")
Expand Down Expand Up @@ -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(
Copy link

Choose a reason for hiding this comment

The 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.")
Expand Down Expand Up @@ -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(
Copy link

Choose a reason for hiding this comment

The 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()
)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

return tk_alembic_nodes

@classmethod
Expand Down