diff --git a/addons/material_maker/engine/nodes/gen_remote.gd b/addons/material_maker/engine/nodes/gen_remote.gd index d0b879ac7..e5168b7ac 100644 --- a/addons/material_maker/engine/nodes/gen_remote.gd +++ b/addons/material_maker/engine/nodes/gen_remote.gd @@ -8,6 +8,7 @@ class_name MMGenRemote var widgets = [] + func _enter_tree(): fix() for p in parameters.keys(): diff --git a/material_maker/nodes/generic/generic.gd b/material_maker/nodes/generic/generic.gd index efc16fb24..1b9ed29cd 100644 --- a/material_maker/nodes/generic/generic.gd +++ b/material_maker/nodes/generic/generic.gd @@ -389,8 +389,7 @@ func update_node() -> void: remove_child(c) c.free() # Show or hide the close button - # TODO! - #show_close = generator.can_be_deleted() + close_button.visible = generator.can_be_deleted() # Rebuild node update_title() # Resize to minimum diff --git a/material_maker/nodes/ios/ios.gd b/material_maker/nodes/ios/ios.gd index 77d256c93..dec1f4e2a 100644 --- a/material_maker/nodes/ios/ios.gd +++ b/material_maker/nodes/ios/ios.gd @@ -2,6 +2,7 @@ extends MMGraphNodeBase func _ready(): super._ready() + close_button.visible = false func set_generator(g) -> void: super.set_generator(g) @@ -54,4 +55,3 @@ func command(command_name : String, command_parameters : Array, update_node : bo if prev != null: var next = parent_generator.serialize().duplicate(true) get_parent().undoredo_create_step("IO update", parent_generator.get_hier_name(), prev, next) - diff --git a/material_maker/nodes/material_export/material_export.gd b/material_maker/nodes/material_export/material_export.gd index 4b49dad09..3d4be2104 100644 --- a/material_maker/nodes/material_export/material_export.gd +++ b/material_maker/nodes/material_export/material_export.gd @@ -9,10 +9,6 @@ const MATERIAL_MENU_PASTE : int = 10001 const MATERIAL_MENU_EDIT_EXPORTS : int = 10002 -func _ready(): - super._ready() - close_button.visible = false - func get_material_nodes() -> Array: if material_nodes.is_empty(): material_nodes = mm_loader.get_material_nodes() diff --git a/material_maker/nodes/remote/remote.gd b/material_maker/nodes/remote/remote.gd index 30b3ca16c..0a466b108 100644 --- a/material_maker/nodes/remote/remote.gd +++ b/material_maker/nodes/remote/remote.gd @@ -67,13 +67,13 @@ func add_control(text : String, control : Control, is_named_param : bool, short_ button.connect("pressed", Callable(self, "move_parameter").bind(control.name, 1)) func update_node() -> void: + await get_tree().process_frame # Show or hide the close button - # TODO! - #show_close = generator.can_be_deleted() + close_button.visible = generator.can_be_deleted() # Delete the contents and wait until it's done for c in grid.get_children(): grid.remove_child(c) - c.free.call_deferred() + c.free() title = generator.get_type_name() controls = {} var parameter_count : int = generator.get_parameter_defs().size()