Cleanup constructor code in visual shader nodes

This commit is contained in:
Yuri Roubinsky 2020-09-05 15:46:12 +03:00
parent 52f6ac81be
commit f188c41ffd
4 changed files with 63 additions and 135 deletions

View file

@ -1590,8 +1590,6 @@ void VisualShader::_bind_methods() {
} }
VisualShader::VisualShader() { VisualShader::VisualShader() {
shader_mode = Shader::MODE_SPATIAL;
for (int i = 0; i < TYPE_MAX; i++) { for (int i = 0; i < TYPE_MAX; i++) {
Ref<VisualShaderNodeOutput> output; Ref<VisualShaderNodeOutput> output;
output.instance(); output.instance();
@ -1600,8 +1598,6 @@ VisualShader::VisualShader() {
graph[i].nodes[NODE_ID_OUTPUT].node = output; graph[i].nodes[NODE_ID_OUTPUT].node = output;
graph[i].nodes[NODE_ID_OUTPUT].position = Vector2(400, 150); graph[i].nodes[NODE_ID_OUTPUT].position = Vector2(400, 150);
} }
dirty = true;
} }
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
@ -2039,10 +2035,6 @@ void VisualShaderNodeInput::_bind_methods() {
} }
VisualShaderNodeInput::VisualShaderNodeInput() { VisualShaderNodeInput::VisualShaderNodeInput() {
input_name = "[None]";
// changed when set
shader_type = VisualShader::TYPE_MAX;
shader_mode = Shader::MODE_MAX;
} }
////////////// UniformRef ////////////// UniformRef
@ -2234,8 +2226,6 @@ Vector<StringName> VisualShaderNodeUniformRef::get_editable_properties() const {
} }
VisualShaderNodeUniformRef::VisualShaderNodeUniformRef() { VisualShaderNodeUniformRef::VisualShaderNodeUniformRef() {
uniform_name = "[None]";
uniform_type = UniformType::UNIFORM_TYPE_FLOAT;
} }
//////////////////////////////////////////// ////////////////////////////////////////////
@ -2488,7 +2478,6 @@ Vector<StringName> VisualShaderNodeUniform::get_editable_properties() const {
} }
VisualShaderNodeUniform::VisualShaderNodeUniform() { VisualShaderNodeUniform::VisualShaderNodeUniform() {
qualifier = QUAL_NONE;
} }
////////////// GroupBase ////////////// GroupBase
@ -2962,11 +2951,6 @@ String VisualShaderNodeGroupBase::generate_code(Shader::Mode p_mode, VisualShade
} }
VisualShaderNodeGroupBase::VisualShaderNodeGroupBase() { VisualShaderNodeGroupBase::VisualShaderNodeGroupBase() {
size = Size2(0, 0);
inputs = "";
outputs = "";
editable = false;
simple_decl = false;
} }
////////////// Expression ////////////// Expression
@ -3090,7 +3074,6 @@ void VisualShaderNodeExpression::_bind_methods() {
} }
VisualShaderNodeExpression::VisualShaderNodeExpression() { VisualShaderNodeExpression::VisualShaderNodeExpression() {
expression = "";
set_editable(true); set_editable(true);
} }

View file

@ -78,7 +78,7 @@ private:
List<Connection> connections; List<Connection> connections;
} graph[TYPE_MAX]; } graph[TYPE_MAX];
Shader::Mode shader_mode; Shader::Mode shader_mode = Shader::MODE_SPATIAL;
mutable String previous_code; mutable String previous_code;
Array _get_node_connections(Type p_type) const; Array _get_node_connections(Type p_type) const;
@ -95,7 +95,7 @@ private:
static RenderModeEnums render_mode_enums[]; static RenderModeEnums render_mode_enums[];
volatile mutable bool dirty; volatile mutable bool dirty = true;
void _queue_update(); void _queue_update();
union ConnectionKey { union ConnectionKey {
@ -188,7 +188,7 @@ class VisualShaderNode : public Resource {
int connected_output_count = 0; int connected_output_count = 0;
protected: protected:
bool simple_decl; bool simple_decl = false;
static void _bind_methods(); static void _bind_methods();
public: public:
@ -290,8 +290,8 @@ class VisualShaderNodeInput : public VisualShaderNode {
GDCLASS(VisualShaderNodeInput, VisualShaderNode); GDCLASS(VisualShaderNodeInput, VisualShaderNode);
friend class VisualShader; friend class VisualShader;
VisualShader::Type shader_type; VisualShader::Type shader_type = VisualShader::TYPE_MAX;
Shader::Mode shader_mode; Shader::Mode shader_mode = Shader::MODE_MAX;
struct Port { struct Port {
Shader::Mode mode; Shader::Mode mode;
@ -304,7 +304,7 @@ class VisualShaderNodeInput : public VisualShaderNode {
static const Port ports[]; static const Port ports[];
static const Port preview_ports[]; static const Port preview_ports[];
String input_name; String input_name = "[None]";
protected: protected:
static void _bind_methods(); static void _bind_methods();
@ -388,8 +388,8 @@ public:
}; };
private: private:
String uniform_name; String uniform_name = "";
Qualifier qualifier; Qualifier qualifier = QUAL_NONE;
bool global_code_generated = false; bool global_code_generated = false;
protected: protected:
@ -436,8 +436,8 @@ public:
}; };
private: private:
String uniform_name; String uniform_name = "[None]";
UniformType uniform_type; UniformType uniform_type = UniformType::UNIFORM_TYPE_FLOAT;
protected: protected:
static void _bind_methods(); static void _bind_methods();
@ -479,10 +479,10 @@ private:
void _apply_port_changes(); void _apply_port_changes();
protected: protected:
Vector2 size; Vector2 size = Size2(0, 0);
String inputs; String inputs = "";
String outputs; String outputs = "";
bool editable; bool editable = false;
struct Port { struct Port {
PortType type; PortType type;
@ -550,7 +550,7 @@ class VisualShaderNodeExpression : public VisualShaderNodeGroupBase {
GDCLASS(VisualShaderNodeExpression, VisualShaderNodeGroupBase); GDCLASS(VisualShaderNodeExpression, VisualShaderNodeGroupBase);
protected: protected:
String expression; String expression = "";
static void _bind_methods(); static void _bind_methods();

View file

@ -87,7 +87,6 @@ void VisualShaderNodeFloatConstant::_bind_methods() {
} }
VisualShaderNodeFloatConstant::VisualShaderNodeFloatConstant() { VisualShaderNodeFloatConstant::VisualShaderNodeFloatConstant() {
constant = 0.0;
} }
////////////// Scalar(Int) ////////////// Scalar(Int)
@ -147,7 +146,6 @@ void VisualShaderNodeIntConstant::_bind_methods() {
} }
VisualShaderNodeIntConstant::VisualShaderNodeIntConstant() { VisualShaderNodeIntConstant::VisualShaderNodeIntConstant() {
constant = 0;
} }
////////////// Boolean ////////////// Boolean
@ -207,7 +205,6 @@ void VisualShaderNodeBooleanConstant::_bind_methods() {
} }
VisualShaderNodeBooleanConstant::VisualShaderNodeBooleanConstant() { VisualShaderNodeBooleanConstant::VisualShaderNodeBooleanConstant() {
constant = false;
} }
////////////// Color ////////////// Color
@ -271,7 +268,6 @@ void VisualShaderNodeColorConstant::_bind_methods() {
} }
VisualShaderNodeColorConstant::VisualShaderNodeColorConstant() { VisualShaderNodeColorConstant::VisualShaderNodeColorConstant() {
constant = Color(1, 1, 1, 1);
} }
////////////// Vector ////////////// Vector
@ -777,8 +773,6 @@ void VisualShaderNodeTexture::_bind_methods() {
} }
VisualShaderNodeTexture::VisualShaderNodeTexture() { VisualShaderNodeTexture::VisualShaderNodeTexture() {
texture_type = TYPE_DATA;
source = SOURCE_TEXTURE;
} }
////////////// Sample3D ////////////// Sample3D
@ -898,8 +892,6 @@ String VisualShaderNodeSample3D::get_warning(Shader::Mode p_mode, VisualShader::
} }
VisualShaderNodeSample3D::VisualShaderNodeSample3D() { VisualShaderNodeSample3D::VisualShaderNodeSample3D() {
source = SOURCE_TEXTURE;
simple_decl = false;
} }
////////////// Texture2DArray ////////////// Texture2DArray
@ -1143,9 +1135,6 @@ void VisualShaderNodeCubemap::_bind_methods() {
} }
VisualShaderNodeCubemap::VisualShaderNodeCubemap() { VisualShaderNodeCubemap::VisualShaderNodeCubemap() {
texture_type = TYPE_DATA;
source = SOURCE_TEXTURE;
simple_decl = false;
} }
////////////// Float Op ////////////// Float Op
@ -1250,7 +1239,6 @@ void VisualShaderNodeFloatOp::_bind_methods() {
} }
VisualShaderNodeFloatOp::VisualShaderNodeFloatOp() { VisualShaderNodeFloatOp::VisualShaderNodeFloatOp() {
op = OP_ADD;
set_input_port_default_value(0, 0.0); set_input_port_default_value(0, 0.0);
set_input_port_default_value(1, 0.0); set_input_port_default_value(1, 0.0);
} }
@ -1345,7 +1333,6 @@ void VisualShaderNodeIntOp::_bind_methods() {
} }
VisualShaderNodeIntOp::VisualShaderNodeIntOp() { VisualShaderNodeIntOp::VisualShaderNodeIntOp() {
op = OP_ADD;
set_input_port_default_value(0, 0); set_input_port_default_value(0, 0);
set_input_port_default_value(1, 0); set_input_port_default_value(1, 0);
} }
@ -1460,7 +1447,6 @@ void VisualShaderNodeVectorOp::_bind_methods() {
} }
VisualShaderNodeVectorOp::VisualShaderNodeVectorOp() { VisualShaderNodeVectorOp::VisualShaderNodeVectorOp() {
op = OP_ADD;
set_input_port_default_value(0, Vector3()); set_input_port_default_value(0, Vector3());
set_input_port_default_value(1, Vector3()); set_input_port_default_value(1, Vector3());
} }
@ -1628,7 +1614,6 @@ void VisualShaderNodeColorOp::_bind_methods() {
} }
VisualShaderNodeColorOp::VisualShaderNodeColorOp() { VisualShaderNodeColorOp::VisualShaderNodeColorOp() {
op = OP_SCREEN;
set_input_port_default_value(0, Vector3()); set_input_port_default_value(0, Vector3());
set_input_port_default_value(1, Vector3()); set_input_port_default_value(1, Vector3());
} }
@ -1703,7 +1688,6 @@ void VisualShaderNodeTransformMult::_bind_methods() {
} }
VisualShaderNodeTransformMult::VisualShaderNodeTransformMult() { VisualShaderNodeTransformMult::VisualShaderNodeTransformMult() {
op = OP_AxB;
set_input_port_default_value(0, Transform()); set_input_port_default_value(0, Transform());
set_input_port_default_value(1, Transform()); set_input_port_default_value(1, Transform());
} }
@ -1778,7 +1762,6 @@ void VisualShaderNodeTransformVecMult::_bind_methods() {
} }
VisualShaderNodeTransformVecMult::VisualShaderNodeTransformVecMult() { VisualShaderNodeTransformVecMult::VisualShaderNodeTransformVecMult() {
op = OP_AxB;
set_input_port_default_value(0, Transform()); set_input_port_default_value(0, Transform());
set_input_port_default_value(1, Vector3()); set_input_port_default_value(1, Vector3());
} }
@ -1908,7 +1891,6 @@ void VisualShaderNodeFloatFunc::_bind_methods() {
} }
VisualShaderNodeFloatFunc::VisualShaderNodeFloatFunc() { VisualShaderNodeFloatFunc::VisualShaderNodeFloatFunc() {
func = FUNC_SIGN;
set_input_port_default_value(0, 0.0); set_input_port_default_value(0, 0.0);
} }
@ -2003,7 +1985,6 @@ void VisualShaderNodeIntFunc::_bind_methods() {
} }
VisualShaderNodeIntFunc::VisualShaderNodeIntFunc() { VisualShaderNodeIntFunc::VisualShaderNodeIntFunc() {
func = FUNC_SIGN;
set_input_port_default_value(0, 0); set_input_port_default_value(0, 0);
} }
@ -2169,7 +2150,6 @@ void VisualShaderNodeVectorFunc::_bind_methods() {
} }
VisualShaderNodeVectorFunc::VisualShaderNodeVectorFunc() { VisualShaderNodeVectorFunc::VisualShaderNodeVectorFunc() {
func = FUNC_NORMALIZE;
set_input_port_default_value(0, Vector3()); set_input_port_default_value(0, Vector3());
} }
@ -2256,9 +2236,7 @@ void VisualShaderNodeColorFunc::_bind_methods() {
} }
VisualShaderNodeColorFunc::VisualShaderNodeColorFunc() { VisualShaderNodeColorFunc::VisualShaderNodeColorFunc() {
func = FUNC_GRAYSCALE;
set_input_port_default_value(0, Vector3()); set_input_port_default_value(0, Vector3());
simple_decl = false;
} }
////////////// Transform Func ////////////// Transform Func
@ -2328,7 +2306,6 @@ void VisualShaderNodeTransformFunc::_bind_methods() {
} }
VisualShaderNodeTransformFunc::VisualShaderNodeTransformFunc() { VisualShaderNodeTransformFunc::VisualShaderNodeTransformFunc() {
func = FUNC_INVERSE;
set_input_port_default_value(0, Transform()); set_input_port_default_value(0, Transform());
} }
@ -2516,7 +2493,6 @@ void VisualShaderNodeScalarDerivativeFunc::_bind_methods() {
} }
VisualShaderNodeScalarDerivativeFunc::VisualShaderNodeScalarDerivativeFunc() { VisualShaderNodeScalarDerivativeFunc::VisualShaderNodeScalarDerivativeFunc() {
func = FUNC_SUM;
set_input_port_default_value(0, 0.0); set_input_port_default_value(0, 0.0);
} }
@ -2589,7 +2565,6 @@ void VisualShaderNodeVectorDerivativeFunc::_bind_methods() {
} }
VisualShaderNodeVectorDerivativeFunc::VisualShaderNodeVectorDerivativeFunc() { VisualShaderNodeVectorDerivativeFunc::VisualShaderNodeVectorDerivativeFunc() {
func = FUNC_SUM;
set_input_port_default_value(0, Vector3()); set_input_port_default_value(0, Vector3());
} }
@ -3561,12 +3536,6 @@ Vector<StringName> VisualShaderNodeFloatUniform::get_editable_properties() const
} }
VisualShaderNodeFloatUniform::VisualShaderNodeFloatUniform() { VisualShaderNodeFloatUniform::VisualShaderNodeFloatUniform() {
hint = HINT_NONE;
hint_range_min = 0.0;
hint_range_max = 1.0;
hint_range_step = 0.1;
default_value_enabled = false;
default_value = 0.0;
} }
////////////// Integer Uniform ////////////// Integer Uniform
@ -3726,12 +3695,6 @@ Vector<StringName> VisualShaderNodeIntUniform::get_editable_properties() const {
} }
VisualShaderNodeIntUniform::VisualShaderNodeIntUniform() { VisualShaderNodeIntUniform::VisualShaderNodeIntUniform() {
hint = HINT_NONE;
hint_range_min = 0;
hint_range_max = 100;
hint_range_step = 1;
default_value_enabled = false;
default_value = 0;
} }
////////////// Boolean Uniform ////////////// Boolean Uniform
@ -3824,8 +3787,6 @@ Vector<StringName> VisualShaderNodeBooleanUniform::get_editable_properties() con
} }
VisualShaderNodeBooleanUniform::VisualShaderNodeBooleanUniform() { VisualShaderNodeBooleanUniform::VisualShaderNodeBooleanUniform() {
default_value_enabled = false;
default_value = false;
} }
////////////// Color Uniform ////////////// Color Uniform
@ -3916,8 +3877,6 @@ Vector<StringName> VisualShaderNodeColorUniform::get_editable_properties() const
} }
VisualShaderNodeColorUniform::VisualShaderNodeColorUniform() { VisualShaderNodeColorUniform::VisualShaderNodeColorUniform() {
default_value_enabled = false;
default_value = Color(1.0, 1.0, 1.0, 1.0);
} }
////////////// Vector Uniform ////////////// Vector Uniform
@ -4006,8 +3965,6 @@ Vector<StringName> VisualShaderNodeVec3Uniform::get_editable_properties() const
} }
VisualShaderNodeVec3Uniform::VisualShaderNodeVec3Uniform() { VisualShaderNodeVec3Uniform::VisualShaderNodeVec3Uniform() {
default_value_enabled = false;
default_value = Vector3(0.0, 0.0, 0.0);
} }
////////////// Transform Uniform ////////////// Transform Uniform
@ -4100,8 +4057,6 @@ Vector<StringName> VisualShaderNodeTransformUniform::get_editable_properties() c
} }
VisualShaderNodeTransformUniform::VisualShaderNodeTransformUniform() { VisualShaderNodeTransformUniform::VisualShaderNodeTransformUniform() {
default_value_enabled = false;
default_value = Transform(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0);
} }
////////////// Texture Uniform ////////////// Texture Uniform
@ -4271,9 +4226,6 @@ bool VisualShaderNodeTextureUniform::is_qualifier_supported(Qualifier p_qual) co
} }
VisualShaderNodeTextureUniform::VisualShaderNodeTextureUniform() { VisualShaderNodeTextureUniform::VisualShaderNodeTextureUniform() {
texture_type = TYPE_DATA;
color_default = COLOR_DEFAULT_WHITE;
simple_decl = false;
} }
////////////// Texture Uniform (Triplanar) ////////////// Texture Uniform (Triplanar)
@ -4583,7 +4535,6 @@ VisualShaderNodeIf::VisualShaderNodeIf() {
set_input_port_default_value(3, Vector3(0.0, 0.0, 0.0)); set_input_port_default_value(3, Vector3(0.0, 0.0, 0.0));
set_input_port_default_value(4, Vector3(0.0, 0.0, 0.0)); set_input_port_default_value(4, Vector3(0.0, 0.0, 0.0));
set_input_port_default_value(5, Vector3(0.0, 0.0, 0.0)); set_input_port_default_value(5, Vector3(0.0, 0.0, 0.0));
simple_decl = false;
} }
////////////// Switch ////////////// Switch
@ -4645,7 +4596,6 @@ VisualShaderNodeSwitch::VisualShaderNodeSwitch() {
set_input_port_default_value(0, false); set_input_port_default_value(0, false);
set_input_port_default_value(1, Vector3(1.0, 1.0, 1.0)); set_input_port_default_value(1, Vector3(1.0, 1.0, 1.0));
set_input_port_default_value(2, Vector3(0.0, 0.0, 0.0)); set_input_port_default_value(2, Vector3(0.0, 0.0, 0.0));
simple_decl = false;
} }
////////////// Switch(scalar) ////////////// Switch(scalar)
@ -4836,7 +4786,6 @@ void VisualShaderNodeIs::_bind_methods() {
} }
VisualShaderNodeIs::VisualShaderNodeIs() { VisualShaderNodeIs::VisualShaderNodeIs() {
func = FUNC_IS_INF;
set_input_port_default_value(0, 0.0); set_input_port_default_value(0, 0.0);
} }
@ -5072,9 +5021,6 @@ void VisualShaderNodeCompare::_bind_methods() {
} }
VisualShaderNodeCompare::VisualShaderNodeCompare() { VisualShaderNodeCompare::VisualShaderNodeCompare() {
ctype = CTYPE_SCALAR;
func = FUNC_EQUAL;
condition = COND_ALL;
set_input_port_default_value(0, 0.0); set_input_port_default_value(0, 0.0);
set_input_port_default_value(1, 0.0); set_input_port_default_value(1, 0.0);
set_input_port_default_value(2, CMP_EPSILON); set_input_port_default_value(2, CMP_EPSILON);
@ -5167,7 +5113,6 @@ void VisualShaderNodeMultiplyAdd::_bind_methods() {
} }
VisualShaderNodeMultiplyAdd::VisualShaderNodeMultiplyAdd() { VisualShaderNodeMultiplyAdd::VisualShaderNodeMultiplyAdd() {
type = TYPE_SCALAR;
set_input_port_default_value(0, 0.0); set_input_port_default_value(0, 0.0);
set_input_port_default_value(1, 0.0); set_input_port_default_value(1, 0.0);
set_input_port_default_value(2, 0.0); set_input_port_default_value(2, 0.0);

View file

@ -39,7 +39,7 @@
class VisualShaderNodeFloatConstant : public VisualShaderNode { class VisualShaderNodeFloatConstant : public VisualShaderNode {
GDCLASS(VisualShaderNodeFloatConstant, VisualShaderNode); GDCLASS(VisualShaderNodeFloatConstant, VisualShaderNode);
float constant; float constant = 0.0f;
protected: protected:
static void _bind_methods(); static void _bind_methods();
@ -69,7 +69,7 @@ public:
class VisualShaderNodeIntConstant : public VisualShaderNode { class VisualShaderNodeIntConstant : public VisualShaderNode {
GDCLASS(VisualShaderNodeIntConstant, VisualShaderNode); GDCLASS(VisualShaderNodeIntConstant, VisualShaderNode);
int constant; int constant = 0;
protected: protected:
static void _bind_methods(); static void _bind_methods();
@ -99,7 +99,7 @@ public:
class VisualShaderNodeBooleanConstant : public VisualShaderNode { class VisualShaderNodeBooleanConstant : public VisualShaderNode {
GDCLASS(VisualShaderNodeBooleanConstant, VisualShaderNode); GDCLASS(VisualShaderNodeBooleanConstant, VisualShaderNode);
bool constant; bool constant = false;
protected: protected:
static void _bind_methods(); static void _bind_methods();
@ -129,7 +129,7 @@ public:
class VisualShaderNodeColorConstant : public VisualShaderNode { class VisualShaderNodeColorConstant : public VisualShaderNode {
GDCLASS(VisualShaderNodeColorConstant, VisualShaderNode); GDCLASS(VisualShaderNodeColorConstant, VisualShaderNode);
Color constant; Color constant = Color(1, 1, 1, 1);
protected: protected:
static void _bind_methods(); static void _bind_methods();
@ -240,8 +240,8 @@ public:
}; };
private: private:
Source source; Source source = SOURCE_TEXTURE;
TextureType texture_type; TextureType texture_type = TYPE_DATA;
protected: protected:
static void _bind_methods(); static void _bind_methods();
@ -294,7 +294,7 @@ public:
}; };
protected: protected:
Source source; Source source = SOURCE_TEXTURE;
static void _bind_methods(); static void _bind_methods();
@ -360,8 +360,8 @@ public:
}; };
private: private:
Source source; Source source = SOURCE_TEXTURE;
TextureType texture_type; TextureType texture_type = TYPE_DATA;
protected: protected:
static void _bind_methods(); static void _bind_methods();
@ -421,7 +421,7 @@ public:
}; };
protected: protected:
Operator op; Operator op = OP_ADD;
static void _bind_methods(); static void _bind_methods();
@ -463,7 +463,7 @@ public:
}; };
protected: protected:
Operator op; Operator op = OP_ADD;
static void _bind_methods(); static void _bind_methods();
@ -510,7 +510,7 @@ public:
}; };
protected: protected:
Operator op; Operator op = OP_ADD;
static void _bind_methods(); static void _bind_methods();
@ -556,7 +556,7 @@ public:
}; };
protected: protected:
Operator op; Operator op = OP_SCREEN;
static void _bind_methods(); static void _bind_methods();
@ -599,7 +599,7 @@ public:
}; };
protected: protected:
Operator op; Operator op = OP_AxB;
static void _bind_methods(); static void _bind_methods();
@ -642,7 +642,7 @@ public:
}; };
protected: protected:
Operator op; Operator op = OP_AxB;
static void _bind_methods(); static void _bind_methods();
@ -713,7 +713,7 @@ public:
}; };
protected: protected:
Function func; Function func = FUNC_SIGN;
static void _bind_methods(); static void _bind_methods();
@ -756,7 +756,7 @@ public:
}; };
protected: protected:
Function func; Function func = FUNC_SIGN;
static void _bind_methods(); static void _bind_methods();
@ -830,7 +830,7 @@ public:
}; };
protected: protected:
Function func; Function func = FUNC_NORMALIZE;
static void _bind_methods(); static void _bind_methods();
@ -871,7 +871,7 @@ public:
}; };
protected: protected:
Function func; Function func = FUNC_GRAYSCALE;
static void _bind_methods(); static void _bind_methods();
@ -912,7 +912,7 @@ public:
}; };
protected: protected:
Function func; Function func = FUNC_INVERSE;
static void _bind_methods(); static void _bind_methods();
@ -1067,7 +1067,7 @@ public:
}; };
protected: protected:
Function func; Function func = FUNC_SUM;
static void _bind_methods(); static void _bind_methods();
@ -1107,7 +1107,7 @@ public:
}; };
protected: protected:
Function func; Function func = FUNC_SUM;
static void _bind_methods(); static void _bind_methods();
@ -1482,12 +1482,12 @@ public:
}; };
private: private:
Hint hint; Hint hint = HINT_NONE;
float hint_range_min; float hint_range_min = 0.0f;
float hint_range_max; float hint_range_max = 1.0f;
float hint_range_step; float hint_range_step = 0.1f;
bool default_value_enabled; bool default_value_enabled = false;
float default_value; float default_value = 0.0f;
protected: protected:
static void _bind_methods(); static void _bind_methods();
@ -1544,12 +1544,12 @@ public:
}; };
private: private:
Hint hint; Hint hint = HINT_NONE;
int hint_range_min; int hint_range_min = 0;
int hint_range_max; int hint_range_max = 100;
int hint_range_step; int hint_range_step = 1;
bool default_value_enabled; bool default_value_enabled = false;
int default_value; int default_value = 0;
protected: protected:
static void _bind_methods(); static void _bind_methods();
@ -1601,8 +1601,8 @@ class VisualShaderNodeBooleanUniform : public VisualShaderNodeUniform {
GDCLASS(VisualShaderNodeBooleanUniform, VisualShaderNodeUniform); GDCLASS(VisualShaderNodeBooleanUniform, VisualShaderNodeUniform);
private: private:
bool default_value_enabled; bool default_value_enabled = false;
bool default_value; bool default_value = false;
protected: protected:
static void _bind_methods(); static void _bind_methods();
@ -1640,8 +1640,8 @@ class VisualShaderNodeColorUniform : public VisualShaderNodeUniform {
GDCLASS(VisualShaderNodeColorUniform, VisualShaderNodeUniform); GDCLASS(VisualShaderNodeColorUniform, VisualShaderNodeUniform);
private: private:
bool default_value_enabled; bool default_value_enabled = false;
Color default_value; Color default_value = Color(1.0, 1.0, 1.0, 1.0);
protected: protected:
static void _bind_methods(); static void _bind_methods();
@ -1679,7 +1679,7 @@ class VisualShaderNodeVec3Uniform : public VisualShaderNodeUniform {
GDCLASS(VisualShaderNodeVec3Uniform, VisualShaderNodeUniform); GDCLASS(VisualShaderNodeVec3Uniform, VisualShaderNodeUniform);
private: private:
bool default_value_enabled; bool default_value_enabled = false;
Vector3 default_value; Vector3 default_value;
protected: protected:
@ -1718,8 +1718,8 @@ class VisualShaderNodeTransformUniform : public VisualShaderNodeUniform {
GDCLASS(VisualShaderNodeTransformUniform, VisualShaderNodeUniform); GDCLASS(VisualShaderNodeTransformUniform, VisualShaderNodeUniform);
private: private:
bool default_value_enabled; bool default_value_enabled = false;
Transform default_value; Transform default_value = Transform(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0);
protected: protected:
static void _bind_methods(); static void _bind_methods();
@ -1770,8 +1770,8 @@ public:
}; };
protected: protected:
TextureType texture_type; TextureType texture_type = TYPE_DATA;
ColorDefault color_default; ColorDefault color_default = COLOR_DEFAULT_WHITE;
protected: protected:
static void _bind_methods(); static void _bind_methods();
@ -1973,7 +1973,7 @@ public:
}; };
protected: protected:
Function func; Function func = FUNC_IS_INF;
protected: protected:
static void _bind_methods(); static void _bind_methods();
@ -2032,9 +2032,9 @@ public:
}; };
protected: protected:
ComparisonType ctype; ComparisonType ctype = CTYPE_SCALAR;
Function func; Function func = FUNC_EQUAL;
Condition condition; Condition condition = COND_ALL;
protected: protected:
static void _bind_methods(); static void _bind_methods();
@ -2082,7 +2082,7 @@ public:
}; };
protected: protected:
Type type; Type type = TYPE_SCALAR;
protected: protected:
static void _bind_methods(); static void _bind_methods();