Skip to content

Commit

Permalink
Fixes in (graph view) nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
RodZill4 committed Nov 12, 2023
1 parent 2ffc536 commit 886eab6
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 10 deletions.
1 change: 1 addition & 0 deletions addons/material_maker/engine/nodes/gen_remote.gd
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class_name MMGenRemote

var widgets = []


func _enter_tree():
fix()
for p in parameters.keys():
Expand Down
3 changes: 1 addition & 2 deletions material_maker/nodes/generic/generic.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion material_maker/nodes/ios/ios.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ extends MMGraphNodeBase

func _ready():
super._ready()
close_button.visible = false

func set_generator(g) -> void:
super.set_generator(g)
Expand Down Expand Up @@ -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)

4 changes: 0 additions & 4 deletions material_maker/nodes/material_export/material_export.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
6 changes: 3 additions & 3 deletions material_maker/nodes/remote/remote.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 886eab6

Please sign in to comment.