Skip to content

Commit 356254c

Browse files
committed
Prevented copying IOs nodes in subgraph
1 parent b4fcad0 commit 356254c

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

material_maker/nodes/ios/ios.gd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
class_name MMGraphNodeIOs
12
extends MMGraphNodeGeneric
23

34
func _ready():

material_maker/panels/graph_edit/graph_edit.gd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -917,6 +917,8 @@ func serialize_selection(nodes = [], with_inputs : bool = false) -> Dictionary:
917917
if nodes.is_empty():
918918
for c in get_children():
919919
if c is GraphElement and c.selected and c.name != "Material" and c.name != "Brush":
920+
if generator != top_generator and c is MMGraphNodeIOs:
921+
continue
920922
nodes.append(c)
921923
if nodes.is_empty():
922924
return {}
@@ -942,6 +944,8 @@ func serialize_selection(nodes = [], with_inputs : bool = false) -> Dictionary:
942944
func can_copy() -> bool:
943945
for c in get_children():
944946
if c is GraphElement and c.selected and c.name != "Material" and c.name != "Brush":
947+
if generator != top_generator and c is MMGraphNodeIOs:
948+
return false
945949
return true
946950
return false
947951

0 commit comments

Comments
 (0)