mirror of
https://github.com/Relintai/material-maker.git
synced 2024-12-23 21:16:54 +01:00
Fixed copy and paste shortcuts
This commit is contained in:
parent
70a8ea6a48
commit
ddd99eee44
@ -190,11 +190,11 @@ func get_free_name(type) -> String:
|
||||
return ""
|
||||
|
||||
func create_nodes(data, position : Vector2 = Vector2(0, 0)) -> Array:
|
||||
if data == null:
|
||||
if !data is Dictionary:
|
||||
return []
|
||||
if data.has("type"):
|
||||
data = { nodes=[data], connections=[] }
|
||||
if typeof(data.nodes) == TYPE_ARRAY and typeof(data.connections) == TYPE_ARRAY:
|
||||
if data.has("nodes") and typeof(data.nodes) == TYPE_ARRAY and data.has("connections") and typeof(data.connections) == TYPE_ARRAY:
|
||||
var new_stuff = mm_loader.add_to_gen_graph(generator, data.nodes, data.connections)
|
||||
for g in new_stuff.generators:
|
||||
g.position += position
|
||||
|
@ -80,10 +80,12 @@ hint_tooltip = "Show hierarchy"
|
||||
icon = SubResource( 4 )
|
||||
[connection signal="connection_request" from="." to="." method="connect_node"]
|
||||
[connection signal="connection_to_empty" from="." to="." method="request_popup"]
|
||||
[connection signal="copy_nodes_request" from="." to="." method="copy"]
|
||||
[connection signal="disconnection_request" from="." to="." method="disconnect_node"]
|
||||
[connection signal="duplicate_nodes_request" from="." to="." method="duplicate_selected"]
|
||||
[connection signal="gui_input" from="." to="." method="_on_GraphEdit_gui_input"]
|
||||
[connection signal="node_selected" from="." to="." method="_on_GraphEdit_node_selected"]
|
||||
[connection signal="paste_nodes_request" from="." to="." method="paste"]
|
||||
[connection signal="timeout" from="Timer" to="." method="do_send_changed_signal"]
|
||||
[connection signal="text_changed" from="GraphUI/SubGraphUI/Label" to="." method="_on_Label_text_changed"]
|
||||
[connection signal="toggled" from="GraphUI/SubGraphUI/ButtonTransmitsSeed" to="." method="_on_ButtonTransmitsSeed_toggled"]
|
||||
|
Loading…
Reference in New Issue
Block a user