mirror of
https://github.com/Relintai/material-maker.git
synced 2025-01-09 05:39:38 +01:00
Update hierarchy pane when renaming a group
This commit is contained in:
parent
7150ac082e
commit
22bacb6673
@ -42,6 +42,10 @@ func get_type() -> String:
|
||||
func get_type_name() -> String:
|
||||
return label
|
||||
|
||||
func set_type_name(l) -> void:
|
||||
if l !=label:
|
||||
label = l
|
||||
emit_hierarchy_changed()
|
||||
|
||||
func toggle_editable() -> bool:
|
||||
editable = !editable
|
||||
|
@ -352,7 +352,7 @@ func on_ButtonUp_pressed() -> void:
|
||||
call_deferred("update_view", generator.get_parent())
|
||||
|
||||
func _on_Label_text_changed(new_text) -> void:
|
||||
generator.label = new_text
|
||||
generator.set_type_name(new_text)
|
||||
|
||||
# Create subgraph
|
||||
|
||||
|
@ -54,7 +54,9 @@ func _on_Rotate_toggled(button_pressed) -> void:
|
||||
$MaterialPreview/Preview3d/ObjectRotate.stop(false)
|
||||
|
||||
func get_materials() -> Array:
|
||||
return [ current_object.get_surface_material(0) ]
|
||||
if current_object != null:
|
||||
return [ current_object.get_surface_material(0) ]
|
||||
return []
|
||||
|
||||
func on_gui_input(event) -> void:
|
||||
if event is InputEventMouseButton:
|
||||
|
Loading…
Reference in New Issue
Block a user