mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
flame: set node name
if it doesn't exists in node props then set it from node_id
This commit is contained in:
parent
304584573b
commit
16bd11083d
1 changed files with 4 additions and 1 deletions
|
|
@ -107,7 +107,7 @@ def create_batch_group_conent(batch_nodes, batch_links, batch_group=None):
|
|||
node["id"], node["type"], node["properties"])
|
||||
|
||||
# get node name for checking if exists
|
||||
node_name = node_props.get("name") or node_id
|
||||
node_name = node_props.pop("name", None) or node_id
|
||||
|
||||
if all_batch_nodes.get(node_name):
|
||||
# update existing batch node
|
||||
|
|
@ -116,6 +116,9 @@ def create_batch_group_conent(batch_nodes, batch_links, batch_group=None):
|
|||
# create new batch node
|
||||
batch_node = batch_group.create_node(node_type)
|
||||
|
||||
# set name
|
||||
setattr(batch_node, "name", node_name)
|
||||
|
||||
# set attributes found in node props
|
||||
for key, value in node_props.items():
|
||||
if not hasattr(batch_node, key):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue