summaryrefslogtreecommitdiff
path: root/editor/shader_globals_editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/shader_globals_editor.cpp')
-rw-r--r--editor/shader_globals_editor.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/editor/shader_globals_editor.cpp b/editor/shader_globals_editor.cpp
index 1893c6b6bb..d504d3b137 100644
--- a/editor/shader_globals_editor.cpp
+++ b/editor/shader_globals_editor.cpp
@@ -66,7 +66,7 @@ class ShaderGlobalsEditorInterface : public Object {
GDCLASS(ShaderGlobalsEditorInterface, Object)
void _var_changed() {
- emit_signal("var_changed");
+ emit_signal(SNAME("var_changed"));
}
protected:
@@ -84,7 +84,7 @@ protected:
UndoRedo *undo_redo = EditorNode::get_singleton()->get_undo_redo();
- undo_redo->create_action("Set Shader Global Variable");
+ undo_redo->create_action(TTR("Set Shader Global Variable"));
undo_redo->add_do_method(RS::get_singleton(), "global_variable_set", p_name, p_value);
undo_redo->add_undo_method(RS::get_singleton(), "global_variable_set", p_name, existing);
RS::GlobalVariableType type = RS::get_singleton()->global_variable_get_type(p_name);
@@ -110,7 +110,6 @@ protected:
undo_redo->commit_action();
block_update = false;
- print_line("all good?");
return true;
}
@@ -395,7 +394,7 @@ void ShaderGlobalsEditor::_variable_added() {
Variant value = create_var(RS::GlobalVariableType(variable_type->get_selected()));
- undo_redo->create_action("Add Shader Global Variable");
+ undo_redo->create_action(TTR("Add Shader Global Variable"));
undo_redo->add_do_method(RS::get_singleton(), "global_variable_add", var, RS::GlobalVariableType(variable_type->get_selected()), value);
undo_redo->add_undo_method(RS::get_singleton(), "global_variable_remove", var);
Dictionary gv;
@@ -410,10 +409,9 @@ void ShaderGlobalsEditor::_variable_added() {
}
void ShaderGlobalsEditor::_variable_deleted(const String &p_variable) {
- print_line("deleted " + p_variable);
UndoRedo *undo_redo = EditorNode::get_singleton()->get_undo_redo();
- undo_redo->create_action("Add Shader Global Variable");
+ undo_redo->create_action(TTR("Add Shader Global Variable"));
undo_redo->add_do_method(RS::get_singleton(), "global_variable_remove", p_variable);
undo_redo->add_undo_method(RS::get_singleton(), "global_variable_add", p_variable, RS::get_singleton()->global_variable_get_type(p_variable), RS::get_singleton()->global_variable_get(p_variable));
@@ -425,7 +423,7 @@ void ShaderGlobalsEditor::_variable_deleted(const String &p_variable) {
}
void ShaderGlobalsEditor::_changed() {
- emit_signal("globals_changed");
+ emit_signal(SNAME("globals_changed"));
if (!interface->block_update) {
interface->notify_property_list_changed();
}
@@ -439,7 +437,6 @@ void ShaderGlobalsEditor::_bind_methods() {
void ShaderGlobalsEditor::_notification(int p_what) {
if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
if (is_visible_in_tree()) {
- print_line("OK load settings in globalseditor");
inspector->edit(interface);
}
}