summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/control.cpp2
-rw-r--r--scene/main/viewport.cpp2
-rw-r--r--scene/main/viewport.h2
-rw-r--r--scene/resources/visual_shader_nodes.cpp32
-rw-r--r--scene/resources/visual_shader_nodes.h16
5 files changed, 27 insertions, 27 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index 2cdee4641e..13d7440eb3 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -591,7 +591,7 @@ void Control::_notification(int p_notification) {
case NOTIFICATION_VISIBILITY_CHANGED: {
if (!is_visible_in_tree()) {
if (get_viewport() != nullptr) {
- get_viewport()->_gui_hid_control(this);
+ get_viewport()->_gui_hide_control(this);
}
//remove key focus
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index b29b40ea5f..7fefbc3f3c 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -2422,7 +2422,7 @@ void Viewport::_gui_unfocus_control(Control *p_control) {
}
}
-void Viewport::_gui_hid_control(Control *p_control) {
+void Viewport::_gui_hide_control(Control *p_control) {
if (gui.mouse_focus == p_control) {
_drop_mouse_focus();
}
diff --git a/scene/main/viewport.h b/scene/main/viewport.h
index 52145a7761..878ac47bca 100644
--- a/scene/main/viewport.h
+++ b/scene/main/viewport.h
@@ -387,7 +387,7 @@ private:
void _gui_show_tooltip();
void _gui_remove_control(Control *p_control);
- void _gui_hid_control(Control *p_control);
+ void _gui_hide_control(Control *p_control);
void _gui_force_drag(Control *p_base, const Variant &p_data, Control *p_control);
void _gui_set_drag_preview(Control *p_base, Control *p_control);
diff --git a/scene/resources/visual_shader_nodes.cpp b/scene/resources/visual_shader_nodes.cpp
index cffe0bb5cd..7c4500468b 100644
--- a/scene/resources/visual_shader_nodes.cpp
+++ b/scene/resources/visual_shader_nodes.cpp
@@ -5213,7 +5213,7 @@ int VisualShaderNodeMultiplyAdd::get_input_port_count() const {
}
VisualShaderNodeMultiplyAdd::PortType VisualShaderNodeMultiplyAdd::get_input_port_type(int p_port) const {
- if (type == TYPE_SCALAR) {
+ if (op_type == OP_TYPE_SCALAR) {
return PORT_TYPE_SCALAR;
}
return PORT_TYPE_VECTOR;
@@ -5235,7 +5235,7 @@ int VisualShaderNodeMultiplyAdd::get_output_port_count() const {
}
VisualShaderNodeMultiplyAdd::PortType VisualShaderNodeMultiplyAdd::get_output_port_type(int p_port) const {
- if (type == TYPE_SCALAR) {
+ if (op_type == OP_TYPE_SCALAR) {
return PORT_TYPE_SCALAR;
} else {
return PORT_TYPE_VECTOR;
@@ -5250,10 +5250,10 @@ String VisualShaderNodeMultiplyAdd::generate_code(Shader::Mode p_mode, VisualSha
return "\t" + p_output_vars[0] + " = fma(" + p_input_vars[0] + ", " + p_input_vars[1] + ", " + p_input_vars[2] + ");\n";
}
-void VisualShaderNodeMultiplyAdd::set_type(Type p_type) {
- ERR_FAIL_INDEX((int)p_type, TYPE_MAX);
- if (p_type != type) {
- if (p_type == TYPE_SCALAR) {
+void VisualShaderNodeMultiplyAdd::set_op_type(OpType p_op_type) {
+ ERR_FAIL_INDEX((int)p_op_type, OP_TYPE_MAX);
+ if (p_op_type != op_type) {
+ if (p_op_type == OP_TYPE_SCALAR) {
set_input_port_default_value(0, 0.0);
set_input_port_default_value(1, 0.0);
set_input_port_default_value(2, 0.0);
@@ -5263,29 +5263,29 @@ void VisualShaderNodeMultiplyAdd::set_type(Type p_type) {
set_input_port_default_value(2, Vector3(0.0, 0.0, 0.0));
}
}
- type = p_type;
+ op_type = p_op_type;
emit_changed();
}
-VisualShaderNodeMultiplyAdd::Type VisualShaderNodeMultiplyAdd::get_type() const {
- return type;
+VisualShaderNodeMultiplyAdd::OpType VisualShaderNodeMultiplyAdd::get_op_type() const {
+ return op_type;
}
Vector<StringName> VisualShaderNodeMultiplyAdd::get_editable_properties() const {
Vector<StringName> props;
- props.push_back("type");
+ props.push_back("op_type");
return props;
}
void VisualShaderNodeMultiplyAdd::_bind_methods() {
- ClassDB::bind_method(D_METHOD("set_type", "type"), &VisualShaderNodeMultiplyAdd::set_type);
- ClassDB::bind_method(D_METHOD("get_type"), &VisualShaderNodeMultiplyAdd::get_type);
+ ClassDB::bind_method(D_METHOD("set_op_type", "type"), &VisualShaderNodeMultiplyAdd::set_op_type);
+ ClassDB::bind_method(D_METHOD("get_op_type"), &VisualShaderNodeMultiplyAdd::get_op_type);
- ADD_PROPERTY(PropertyInfo(Variant::INT, "type", PROPERTY_HINT_ENUM, "Scalar,Vector"), "set_type", "get_type");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "op_type", PROPERTY_HINT_ENUM, "Scalar,Vector"), "set_op_type", "get_op_type");
- BIND_ENUM_CONSTANT(TYPE_SCALAR);
- BIND_ENUM_CONSTANT(TYPE_VECTOR);
- BIND_ENUM_CONSTANT(TYPE_MAX);
+ BIND_ENUM_CONSTANT(OP_TYPE_SCALAR);
+ BIND_ENUM_CONSTANT(OP_TYPE_VECTOR);
+ BIND_ENUM_CONSTANT(OP_TYPE_MAX);
}
VisualShaderNodeMultiplyAdd::VisualShaderNodeMultiplyAdd() {
diff --git a/scene/resources/visual_shader_nodes.h b/scene/resources/visual_shader_nodes.h
index 1c986d1ef4..95042f8e56 100644
--- a/scene/resources/visual_shader_nodes.h
+++ b/scene/resources/visual_shader_nodes.h
@@ -2138,14 +2138,14 @@ class VisualShaderNodeMultiplyAdd : public VisualShaderNode {
GDCLASS(VisualShaderNodeMultiplyAdd, VisualShaderNode);
public:
- enum Type {
- TYPE_SCALAR,
- TYPE_VECTOR,
- TYPE_MAX,
+ enum OpType {
+ OP_TYPE_SCALAR,
+ OP_TYPE_VECTOR,
+ OP_TYPE_MAX,
};
protected:
- Type type = TYPE_SCALAR;
+ OpType op_type = OP_TYPE_SCALAR;
protected:
static void _bind_methods();
@@ -2163,14 +2163,14 @@ public:
virtual String generate_code(Shader::Mode p_mode, VisualShader::Type p_type, int p_id, const String *p_input_vars, const String *p_output_vars, bool p_for_preview = false) const override; //if no output is connected, the output var passed will be empty. if no input is connected and input is NIL, the input var passed will be empty
- void set_type(Type p_type);
- Type get_type() const;
+ void set_op_type(OpType p_type);
+ OpType get_op_type() const;
virtual Vector<StringName> get_editable_properties() const override;
VisualShaderNodeMultiplyAdd();
};
-VARIANT_ENUM_CAST(VisualShaderNodeMultiplyAdd::Type)
+VARIANT_ENUM_CAST(VisualShaderNodeMultiplyAdd::OpType)
#endif // VISUAL_SHADER_NODES_H