Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

[QUAD] Houdini: Ability to properly duplicate ROP #6350

Closed
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
15 changes: 14 additions & 1 deletion openpype/hosts/houdini/api/plugin.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
"""Houdini specific Avalon/Pyblish plugin definitions."""
import sys
from uuid import uuid4
from abc import (
ABCMeta
)
Expand Down Expand Up @@ -118,15 +119,27 @@ def cache_subsets(shared_data):
if shared_data.get("houdini_cached_subsets") is None:
cache = dict()
cache_legacy = dict()
instance_id_list = []

for node in lsattr("id", "pyblish.avalon.instance"):

creator_identifier_parm = node.parm("creator_identifier")
instance_id_parm = node.parm("instance_id")
if creator_identifier_parm:
# creator instance
creator_id = creator_identifier_parm.eval()
instance_id = instance_id_parm.eval()
# Regenerating instance in case of identical values between nodes
Copy link

Choose a reason for hiding this comment

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

line too long (85 > 79 characters)

if instance_id in instance_id_list or node.path() != node.parm("instance_node").eval():
Copy link

Choose a reason for hiding this comment

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

line too long (107 > 79 characters)

new_data = {
"instance_node": node.path(),
"instance_id": str(uuid4()),
"subset": node.name()
}
# Refreshing node values
imprint(hou.node(node.path()), new_data, update=True)
cache.setdefault(creator_id, []).append(node)

instance_id_list.append(instance_id)
else:
# legacy instance
family_parm = node.parm("family")
Expand Down
Loading