mirror of
https://github.com/Relintai/material-maker.git
synced 2025-01-25 18:59:18 +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:
|
func get_type_name() -> String:
|
||||||
return label
|
return label
|
||||||
|
|
||||||
|
func set_type_name(l) -> void:
|
||||||
|
if l !=label:
|
||||||
|
label = l
|
||||||
|
emit_hierarchy_changed()
|
||||||
|
|
||||||
func toggle_editable() -> bool:
|
func toggle_editable() -> bool:
|
||||||
editable = !editable
|
editable = !editable
|
||||||
|
@ -352,7 +352,7 @@ func on_ButtonUp_pressed() -> void:
|
|||||||
call_deferred("update_view", generator.get_parent())
|
call_deferred("update_view", generator.get_parent())
|
||||||
|
|
||||||
func _on_Label_text_changed(new_text) -> void:
|
func _on_Label_text_changed(new_text) -> void:
|
||||||
generator.label = new_text
|
generator.set_type_name(new_text)
|
||||||
|
|
||||||
# Create subgraph
|
# Create subgraph
|
||||||
|
|
||||||
|
@ -54,7 +54,9 @@ func _on_Rotate_toggled(button_pressed) -> void:
|
|||||||
$MaterialPreview/Preview3d/ObjectRotate.stop(false)
|
$MaterialPreview/Preview3d/ObjectRotate.stop(false)
|
||||||
|
|
||||||
func get_materials() -> Array:
|
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:
|
func on_gui_input(event) -> void:
|
||||||
if event is InputEventMouseButton:
|
if event is InputEventMouseButton:
|
||||||
|
Loading…
Reference in New Issue
Block a user