summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/animation.cpp18
-rw-r--r--scene/resources/dynamic_font.cpp8
-rw-r--r--scene/resources/dynamic_font.h2
-rw-r--r--scene/resources/environment.cpp37
-rw-r--r--scene/resources/material.cpp164
-rw-r--r--scene/resources/mesh.cpp52
-rw-r--r--scene/resources/mesh.h1
-rw-r--r--scene/resources/multimesh.cpp11
-rw-r--r--scene/resources/packed_scene.cpp12
-rw-r--r--scene/resources/shader.cpp6
-rw-r--r--scene/resources/shader_graph.cpp354
-rw-r--r--scene/resources/sky_box.cpp28
-rw-r--r--scene/resources/style_box.cpp6
-rw-r--r--scene/resources/texture.cpp65
14 files changed, 387 insertions, 377 deletions
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp
index a2ff45c623..8878e59e71 100644
--- a/scene/resources/animation.cpp
+++ b/scene/resources/animation.cpp
@@ -1676,17 +1676,17 @@ void Animation::_bind_methods() {
ClassDB::bind_method(D_METHOD("clear"), &Animation::clear);
- BIND_CONSTANT(TYPE_VALUE);
- BIND_CONSTANT(TYPE_TRANSFORM);
- BIND_CONSTANT(TYPE_METHOD);
+ BIND_ENUM_CONSTANT(TYPE_VALUE);
+ BIND_ENUM_CONSTANT(TYPE_TRANSFORM);
+ BIND_ENUM_CONSTANT(TYPE_METHOD);
- BIND_CONSTANT(INTERPOLATION_NEAREST);
- BIND_CONSTANT(INTERPOLATION_LINEAR);
- BIND_CONSTANT(INTERPOLATION_CUBIC);
+ BIND_ENUM_CONSTANT(INTERPOLATION_NEAREST);
+ BIND_ENUM_CONSTANT(INTERPOLATION_LINEAR);
+ BIND_ENUM_CONSTANT(INTERPOLATION_CUBIC);
- BIND_CONSTANT(UPDATE_CONTINUOUS);
- BIND_CONSTANT(UPDATE_DISCRETE);
- BIND_CONSTANT(UPDATE_TRIGGER);
+ BIND_ENUM_CONSTANT(UPDATE_CONTINUOUS);
+ BIND_ENUM_CONSTANT(UPDATE_DISCRETE);
+ BIND_ENUM_CONSTANT(UPDATE_TRIGGER);
}
void Animation::clear() {
diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp
index e424ee48a8..57b860583e 100644
--- a/scene/resources/dynamic_font.cpp
+++ b/scene/resources/dynamic_font.cpp
@@ -892,10 +892,10 @@ void DynamicFont::_bind_methods() {
ADD_GROUP("Font", "");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "font_data", PROPERTY_HINT_RESOURCE_TYPE, "DynamicFontData"), "set_font_data", "get_font_data");
- BIND_CONSTANT(SPACING_TOP);
- BIND_CONSTANT(SPACING_BOTTOM);
- BIND_CONSTANT(SPACING_CHAR);
- BIND_CONSTANT(SPACING_SPACE);
+ BIND_ENUM_CONSTANT(SPACING_TOP);
+ BIND_ENUM_CONSTANT(SPACING_BOTTOM);
+ BIND_ENUM_CONSTANT(SPACING_CHAR);
+ BIND_ENUM_CONSTANT(SPACING_SPACE);
}
DynamicFont::DynamicFont() {
diff --git a/scene/resources/dynamic_font.h b/scene/resources/dynamic_font.h
index 9024761b96..b8ff2845e7 100644
--- a/scene/resources/dynamic_font.h
+++ b/scene/resources/dynamic_font.h
@@ -236,6 +236,8 @@ public:
~DynamicFont();
};
+VARIANT_ENUM_CAST(DynamicFont::SpacingType);
+
/////////////
class ResourceFormatLoaderDynamicFont : public ResourceFormatLoader {
diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp
index 0bf6a50d93..60a700aad8 100644
--- a/scene/resources/environment.cpp
+++ b/scene/resources/environment.cpp
@@ -1114,23 +1114,26 @@ void Environment::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL, "adjustment_saturation", PROPERTY_HINT_RANGE, "0.01,8,0.01"), "set_adjustment_saturation", "get_adjustment_saturation");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "adjustment_color_correction", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_adjustment_color_correction", "get_adjustment_color_correction");
- BIND_CONSTANT(BG_KEEP);
- BIND_CONSTANT(BG_CLEAR_COLOR);
- BIND_CONSTANT(BG_COLOR);
- BIND_CONSTANT(BG_SKY);
- BIND_CONSTANT(BG_CANVAS);
- BIND_CONSTANT(BG_MAX);
- BIND_CONSTANT(GLOW_BLEND_MODE_ADDITIVE);
- BIND_CONSTANT(GLOW_BLEND_MODE_SCREEN);
- BIND_CONSTANT(GLOW_BLEND_MODE_SOFTLIGHT);
- BIND_CONSTANT(GLOW_BLEND_MODE_REPLACE);
- BIND_CONSTANT(TONE_MAPPER_LINEAR);
- BIND_CONSTANT(TONE_MAPPER_REINHARDT);
- BIND_CONSTANT(TONE_MAPPER_FILMIC);
- BIND_CONSTANT(TONE_MAPPER_ACES);
- BIND_CONSTANT(DOF_BLUR_QUALITY_LOW);
- BIND_CONSTANT(DOF_BLUR_QUALITY_MEDIUM);
- BIND_CONSTANT(DOF_BLUR_QUALITY_HIGH);
+ BIND_ENUM_CONSTANT(BG_KEEP);
+ BIND_ENUM_CONSTANT(BG_CLEAR_COLOR);
+ BIND_ENUM_CONSTANT(BG_COLOR);
+ BIND_ENUM_CONSTANT(BG_SKY);
+ BIND_ENUM_CONSTANT(BG_CANVAS);
+ BIND_ENUM_CONSTANT(BG_MAX);
+
+ BIND_ENUM_CONSTANT(GLOW_BLEND_MODE_ADDITIVE);
+ BIND_ENUM_CONSTANT(GLOW_BLEND_MODE_SCREEN);
+ BIND_ENUM_CONSTANT(GLOW_BLEND_MODE_SOFTLIGHT);
+ BIND_ENUM_CONSTANT(GLOW_BLEND_MODE_REPLACE);
+
+ BIND_ENUM_CONSTANT(TONE_MAPPER_LINEAR);
+ BIND_ENUM_CONSTANT(TONE_MAPPER_REINHARDT);
+ BIND_ENUM_CONSTANT(TONE_MAPPER_FILMIC);
+ BIND_ENUM_CONSTANT(TONE_MAPPER_ACES);
+
+ BIND_ENUM_CONSTANT(DOF_BLUR_QUALITY_LOW);
+ BIND_ENUM_CONSTANT(DOF_BLUR_QUALITY_MEDIUM);
+ BIND_ENUM_CONSTANT(DOF_BLUR_QUALITY_HIGH);
}
Environment::Environment() {
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp
index a111f64e06..555c94a512 100644
--- a/scene/resources/material.cpp
+++ b/scene/resources/material.cpp
@@ -1718,88 +1718,88 @@ void SpatialMaterial::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "uv2_triplanar"), "set_flag", "get_flag", FLAG_UV2_USE_TRIPLANAR);
ADD_PROPERTY(PropertyInfo(Variant::REAL, "uv2_triplanar_sharpness", PROPERTY_HINT_EXP_EASING), "set_uv2_triplanar_blend_sharpness", "get_uv2_triplanar_blend_sharpness");
- BIND_CONSTANT(TEXTURE_ALBEDO);
- BIND_CONSTANT(TEXTURE_METALLIC);
- BIND_CONSTANT(TEXTURE_ROUGHNESS);
- BIND_CONSTANT(TEXTURE_EMISSION);
- BIND_CONSTANT(TEXTURE_NORMAL);
- BIND_CONSTANT(TEXTURE_RIM);
- BIND_CONSTANT(TEXTURE_CLEARCOAT);
- BIND_CONSTANT(TEXTURE_FLOWMAP);
- BIND_CONSTANT(TEXTURE_AMBIENT_OCCLUSION);
- BIND_CONSTANT(TEXTURE_DEPTH);
- BIND_CONSTANT(TEXTURE_SUBSURFACE_SCATTERING);
- BIND_CONSTANT(TEXTURE_REFRACTION);
- BIND_CONSTANT(TEXTURE_DETAIL_MASK);
- BIND_CONSTANT(TEXTURE_DETAIL_ALBEDO);
- BIND_CONSTANT(TEXTURE_DETAIL_NORMAL);
- BIND_CONSTANT(TEXTURE_MAX);
-
- BIND_CONSTANT(DETAIL_UV_1);
- BIND_CONSTANT(DETAIL_UV_2);
-
- BIND_CONSTANT(FEATURE_TRANSPARENT);
- BIND_CONSTANT(FEATURE_EMISSION);
- BIND_CONSTANT(FEATURE_NORMAL_MAPPING);
- BIND_CONSTANT(FEATURE_RIM);
- BIND_CONSTANT(FEATURE_CLEARCOAT);
- BIND_CONSTANT(FEATURE_ANISOTROPY);
- BIND_CONSTANT(FEATURE_AMBIENT_OCCLUSION);
- BIND_CONSTANT(FEATURE_DEPTH_MAPPING);
- BIND_CONSTANT(FEATURE_SUBSURACE_SCATTERING);
- BIND_CONSTANT(FEATURE_REFRACTION);
- BIND_CONSTANT(FEATURE_DETAIL);
- BIND_CONSTANT(FEATURE_MAX);
-
- BIND_CONSTANT(BLEND_MODE_MIX);
- BIND_CONSTANT(BLEND_MODE_ADD);
- BIND_CONSTANT(BLEND_MODE_SUB);
- BIND_CONSTANT(BLEND_MODE_MUL);
-
- BIND_CONSTANT(DEPTH_DRAW_OPAQUE_ONLY);
- BIND_CONSTANT(DEPTH_DRAW_ALWAYS);
- BIND_CONSTANT(DEPTH_DRAW_DISABLED);
- BIND_CONSTANT(DEPTH_DRAW_ALPHA_OPAQUE_PREPASS);
-
- BIND_CONSTANT(CULL_BACK);
- BIND_CONSTANT(CULL_FRONT);
- BIND_CONSTANT(CULL_DISABLED);
-
- BIND_CONSTANT(FLAG_UNSHADED);
- BIND_CONSTANT(FLAG_USE_VERTEX_LIGHTING);
- BIND_CONSTANT(FLAG_ONTOP);
- BIND_CONSTANT(FLAG_ALBEDO_FROM_VERTEX_COLOR);
- BIND_CONSTANT(FLAG_SRGB_VERTEX_COLOR);
- BIND_CONSTANT(FLAG_USE_POINT_SIZE);
- BIND_CONSTANT(FLAG_FIXED_SIZE);
- BIND_CONSTANT(FLAG_UV1_USE_TRIPLANAR);
- BIND_CONSTANT(FLAG_UV2_USE_TRIPLANAR);
- BIND_CONSTANT(FLAG_AO_ON_UV2);
- BIND_CONSTANT(FLAG_USE_ALPHA_SCISSOR);
- BIND_CONSTANT(FLAG_MAX);
-
- BIND_CONSTANT(DIFFUSE_LAMBERT);
- BIND_CONSTANT(DIFFUSE_HALF_LAMBERT);
- BIND_CONSTANT(DIFFUSE_OREN_NAYAR);
- BIND_CONSTANT(DIFFUSE_BURLEY);
- BIND_CONSTANT(DIFFUSE_TOON);
-
- BIND_CONSTANT(SPECULAR_SCHLICK_GGX);
- BIND_CONSTANT(SPECULAR_BLINN);
- BIND_CONSTANT(SPECULAR_PHONG);
- BIND_CONSTANT(SPECULAR_TOON);
- BIND_CONSTANT(SPECULAR_DISABLED);
-
- BIND_CONSTANT(BILLBOARD_DISABLED);
- BIND_CONSTANT(BILLBOARD_ENABLED);
- BIND_CONSTANT(BILLBOARD_FIXED_Y);
- BIND_CONSTANT(BILLBOARD_PARTICLES);
-
- BIND_CONSTANT(TEXTURE_CHANNEL_RED);
- BIND_CONSTANT(TEXTURE_CHANNEL_GREEN);
- BIND_CONSTANT(TEXTURE_CHANNEL_BLUE);
- BIND_CONSTANT(TEXTURE_CHANNEL_ALPHA);
- BIND_CONSTANT(TEXTURE_CHANNEL_GRAYSCALE);
+ BIND_ENUM_CONSTANT(TEXTURE_ALBEDO);
+ BIND_ENUM_CONSTANT(TEXTURE_METALLIC);
+ BIND_ENUM_CONSTANT(TEXTURE_ROUGHNESS);
+ BIND_ENUM_CONSTANT(TEXTURE_EMISSION);
+ BIND_ENUM_CONSTANT(TEXTURE_NORMAL);
+ BIND_ENUM_CONSTANT(TEXTURE_RIM);
+ BIND_ENUM_CONSTANT(TEXTURE_CLEARCOAT);
+ BIND_ENUM_CONSTANT(TEXTURE_FLOWMAP);
+ BIND_ENUM_CONSTANT(TEXTURE_AMBIENT_OCCLUSION);
+ BIND_ENUM_CONSTANT(TEXTURE_DEPTH);
+ BIND_ENUM_CONSTANT(TEXTURE_SUBSURFACE_SCATTERING);
+ BIND_ENUM_CONSTANT(TEXTURE_REFRACTION);
+ BIND_ENUM_CONSTANT(TEXTURE_DETAIL_MASK);
+ BIND_ENUM_CONSTANT(TEXTURE_DETAIL_ALBEDO);
+ BIND_ENUM_CONSTANT(TEXTURE_DETAIL_NORMAL);
+ BIND_ENUM_CONSTANT(TEXTURE_MAX);
+
+ BIND_ENUM_CONSTANT(DETAIL_UV_1);
+ BIND_ENUM_CONSTANT(DETAIL_UV_2);
+
+ BIND_ENUM_CONSTANT(FEATURE_TRANSPARENT);
+ BIND_ENUM_CONSTANT(FEATURE_EMISSION);
+ BIND_ENUM_CONSTANT(FEATURE_NORMAL_MAPPING);
+ BIND_ENUM_CONSTANT(FEATURE_RIM);
+ BIND_ENUM_CONSTANT(FEATURE_CLEARCOAT);
+ BIND_ENUM_CONSTANT(FEATURE_ANISOTROPY);
+ BIND_ENUM_CONSTANT(FEATURE_AMBIENT_OCCLUSION);
+ BIND_ENUM_CONSTANT(FEATURE_DEPTH_MAPPING);
+ BIND_ENUM_CONSTANT(FEATURE_SUBSURACE_SCATTERING);
+ BIND_ENUM_CONSTANT(FEATURE_REFRACTION);
+ BIND_ENUM_CONSTANT(FEATURE_DETAIL);
+ BIND_ENUM_CONSTANT(FEATURE_MAX);
+
+ BIND_ENUM_CONSTANT(BLEND_MODE_MIX);
+ BIND_ENUM_CONSTANT(BLEND_MODE_ADD);
+ BIND_ENUM_CONSTANT(BLEND_MODE_SUB);
+ BIND_ENUM_CONSTANT(BLEND_MODE_MUL);
+
+ BIND_ENUM_CONSTANT(DEPTH_DRAW_OPAQUE_ONLY);
+ BIND_ENUM_CONSTANT(DEPTH_DRAW_ALWAYS);
+ BIND_ENUM_CONSTANT(DEPTH_DRAW_DISABLED);
+ BIND_ENUM_CONSTANT(DEPTH_DRAW_ALPHA_OPAQUE_PREPASS);
+
+ BIND_ENUM_CONSTANT(CULL_BACK);
+ BIND_ENUM_CONSTANT(CULL_FRONT);
+ BIND_ENUM_CONSTANT(CULL_DISABLED);
+
+ BIND_ENUM_CONSTANT(FLAG_UNSHADED);
+ BIND_ENUM_CONSTANT(FLAG_USE_VERTEX_LIGHTING);
+ BIND_ENUM_CONSTANT(FLAG_ONTOP);
+ BIND_ENUM_CONSTANT(FLAG_ALBEDO_FROM_VERTEX_COLOR);
+ BIND_ENUM_CONSTANT(FLAG_SRGB_VERTEX_COLOR);
+ BIND_ENUM_CONSTANT(FLAG_USE_POINT_SIZE);
+ BIND_ENUM_CONSTANT(FLAG_FIXED_SIZE);
+ BIND_ENUM_CONSTANT(FLAG_UV1_USE_TRIPLANAR);
+ BIND_ENUM_CONSTANT(FLAG_UV2_USE_TRIPLANAR);
+ BIND_ENUM_CONSTANT(FLAG_AO_ON_UV2);
+ BIND_ENUM_CONSTANT(FLAG_USE_ALPHA_SCISSOR);
+ BIND_ENUM_CONSTANT(FLAG_MAX);
+
+ BIND_ENUM_CONSTANT(DIFFUSE_LAMBERT);
+ BIND_ENUM_CONSTANT(DIFFUSE_HALF_LAMBERT);
+ BIND_ENUM_CONSTANT(DIFFUSE_OREN_NAYAR);
+ BIND_ENUM_CONSTANT(DIFFUSE_BURLEY);
+ BIND_ENUM_CONSTANT(DIFFUSE_TOON);
+
+ BIND_ENUM_CONSTANT(SPECULAR_SCHLICK_GGX);
+ BIND_ENUM_CONSTANT(SPECULAR_BLINN);
+ BIND_ENUM_CONSTANT(SPECULAR_PHONG);
+ BIND_ENUM_CONSTANT(SPECULAR_TOON);
+ BIND_ENUM_CONSTANT(SPECULAR_DISABLED);
+
+ BIND_ENUM_CONSTANT(BILLBOARD_DISABLED);
+ BIND_ENUM_CONSTANT(BILLBOARD_ENABLED);
+ BIND_ENUM_CONSTANT(BILLBOARD_FIXED_Y);
+ BIND_ENUM_CONSTANT(BILLBOARD_PARTICLES);
+
+ BIND_ENUM_CONSTANT(TEXTURE_CHANNEL_RED);
+ BIND_ENUM_CONSTANT(TEXTURE_CHANNEL_GREEN);
+ BIND_ENUM_CONSTANT(TEXTURE_CHANNEL_BLUE);
+ BIND_ENUM_CONSTANT(TEXTURE_CHANNEL_ALPHA);
+ BIND_ENUM_CONSTANT(TEXTURE_CHANNEL_GRAYSCALE);
}
SpatialMaterial::SpatialMaterial()
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp
index af30e75aed..ebba0ba67f 100644
--- a/scene/resources/mesh.cpp
+++ b/scene/resources/mesh.cpp
@@ -415,13 +415,13 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const {
void Mesh::_bind_methods() {
- BIND_CONSTANT(PRIMITIVE_POINTS);
- BIND_CONSTANT(PRIMITIVE_LINES);
- BIND_CONSTANT(PRIMITIVE_LINE_STRIP);
- BIND_CONSTANT(PRIMITIVE_LINE_LOOP);
- BIND_CONSTANT(PRIMITIVE_TRIANGLES);
- BIND_CONSTANT(PRIMITIVE_TRIANGLE_STRIP);
- BIND_CONSTANT(PRIMITIVE_TRIANGLE_FAN);
+ BIND_ENUM_CONSTANT(PRIMITIVE_POINTS);
+ BIND_ENUM_CONSTANT(PRIMITIVE_LINES);
+ BIND_ENUM_CONSTANT(PRIMITIVE_LINE_STRIP);
+ BIND_ENUM_CONSTANT(PRIMITIVE_LINE_LOOP);
+ BIND_ENUM_CONSTANT(PRIMITIVE_TRIANGLES);
+ BIND_ENUM_CONSTANT(PRIMITIVE_TRIANGLE_STRIP);
+ BIND_ENUM_CONSTANT(PRIMITIVE_TRIANGLE_FAN);
}
Mesh::Mesh() {
@@ -1026,25 +1026,25 @@ void ArrayMesh::_bind_methods() {
BIND_CONSTANT(NO_INDEX_ARRAY);
BIND_CONSTANT(ARRAY_WEIGHTS_SIZE);
- BIND_CONSTANT(ARRAY_VERTEX);
- BIND_CONSTANT(ARRAY_NORMAL);
- BIND_CONSTANT(ARRAY_TANGENT);
- BIND_CONSTANT(ARRAY_COLOR);
- BIND_CONSTANT(ARRAY_TEX_UV);
- BIND_CONSTANT(ARRAY_TEX_UV2);
- BIND_CONSTANT(ARRAY_BONES);
- BIND_CONSTANT(ARRAY_WEIGHTS);
- BIND_CONSTANT(ARRAY_INDEX);
-
- BIND_CONSTANT(ARRAY_FORMAT_VERTEX);
- BIND_CONSTANT(ARRAY_FORMAT_NORMAL);
- BIND_CONSTANT(ARRAY_FORMAT_TANGENT);
- BIND_CONSTANT(ARRAY_FORMAT_COLOR);
- BIND_CONSTANT(ARRAY_FORMAT_TEX_UV);
- BIND_CONSTANT(ARRAY_FORMAT_TEX_UV2);
- BIND_CONSTANT(ARRAY_FORMAT_BONES);
- BIND_CONSTANT(ARRAY_FORMAT_WEIGHTS);
- BIND_CONSTANT(ARRAY_FORMAT_INDEX);
+ BIND_ENUM_CONSTANT(ARRAY_VERTEX);
+ BIND_ENUM_CONSTANT(ARRAY_NORMAL);
+ BIND_ENUM_CONSTANT(ARRAY_TANGENT);
+ BIND_ENUM_CONSTANT(ARRAY_COLOR);
+ BIND_ENUM_CONSTANT(ARRAY_TEX_UV);
+ BIND_ENUM_CONSTANT(ARRAY_TEX_UV2);
+ BIND_ENUM_CONSTANT(ARRAY_BONES);
+ BIND_ENUM_CONSTANT(ARRAY_WEIGHTS);
+ BIND_ENUM_CONSTANT(ARRAY_INDEX);
+
+ BIND_ENUM_CONSTANT(ARRAY_FORMAT_VERTEX);
+ BIND_ENUM_CONSTANT(ARRAY_FORMAT_NORMAL);
+ BIND_ENUM_CONSTANT(ARRAY_FORMAT_TANGENT);
+ BIND_ENUM_CONSTANT(ARRAY_FORMAT_COLOR);
+ BIND_ENUM_CONSTANT(ARRAY_FORMAT_TEX_UV);
+ BIND_ENUM_CONSTANT(ARRAY_FORMAT_TEX_UV2);
+ BIND_ENUM_CONSTANT(ARRAY_FORMAT_BONES);
+ BIND_ENUM_CONSTANT(ARRAY_FORMAT_WEIGHTS);
+ BIND_ENUM_CONSTANT(ARRAY_FORMAT_INDEX);
}
ArrayMesh::ArrayMesh() {
diff --git a/scene/resources/mesh.h b/scene/resources/mesh.h
index ad3c10b6bc..bccb39e8cd 100644
--- a/scene/resources/mesh.h
+++ b/scene/resources/mesh.h
@@ -218,6 +218,7 @@ public:
};
VARIANT_ENUM_CAST(Mesh::ArrayType);
+VARIANT_ENUM_CAST(Mesh::ArrayFormat);
VARIANT_ENUM_CAST(Mesh::PrimitiveType);
VARIANT_ENUM_CAST(Mesh::BlendShapeMode);
diff --git a/scene/resources/multimesh.cpp b/scene/resources/multimesh.cpp
index 231e59cdb5..b65800ebbd 100644
--- a/scene/resources/multimesh.cpp
+++ b/scene/resources/multimesh.cpp
@@ -213,11 +213,12 @@ void MultiMesh::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR3_ARRAY, "transform_array", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_transform_array", "_get_transform_array");
ADD_PROPERTY(PropertyInfo(Variant::POOL_COLOR_ARRAY, "color_array", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_color_array", "_get_color_array");
- BIND_CONSTANT(TRANSFORM_2D);
- BIND_CONSTANT(TRANSFORM_3D);
- BIND_CONSTANT(COLOR_NONE);
- BIND_CONSTANT(COLOR_8BIT);
- BIND_CONSTANT(COLOR_FLOAT);
+ BIND_ENUM_CONSTANT(TRANSFORM_2D);
+ BIND_ENUM_CONSTANT(TRANSFORM_3D);
+
+ BIND_ENUM_CONSTANT(COLOR_NONE);
+ BIND_ENUM_CONSTANT(COLOR_8BIT);
+ BIND_ENUM_CONSTANT(COLOR_FLOAT);
}
MultiMesh::MultiMesh() {
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index 4dfc23fa67..d7ea675a47 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -1689,9 +1689,9 @@ void SceneState::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_connection_flags", "idx"), &SceneState::get_connection_flags);
ClassDB::bind_method(D_METHOD("get_connection_binds", "idx"), &SceneState::get_connection_binds);
- BIND_CONSTANT(GEN_EDIT_STATE_DISABLED);
- BIND_CONSTANT(GEN_EDIT_STATE_INSTANCE);
- BIND_CONSTANT(GEN_EDIT_STATE_MAIN);
+ BIND_ENUM_CONSTANT(GEN_EDIT_STATE_DISABLED);
+ BIND_ENUM_CONSTANT(GEN_EDIT_STATE_INSTANCE);
+ BIND_ENUM_CONSTANT(GEN_EDIT_STATE_MAIN);
}
SceneState::SceneState() {
@@ -1792,9 +1792,9 @@ void PackedScene::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "_bundled"), "_set_bundled_scene", "_get_bundled_scene");
- BIND_CONSTANT(GEN_EDIT_STATE_DISABLED);
- BIND_CONSTANT(GEN_EDIT_STATE_INSTANCE);
- BIND_CONSTANT(GEN_EDIT_STATE_MAIN);
+ BIND_ENUM_CONSTANT(GEN_EDIT_STATE_DISABLED);
+ BIND_ENUM_CONSTANT(GEN_EDIT_STATE_INSTANCE);
+ BIND_ENUM_CONSTANT(GEN_EDIT_STATE_MAIN);
}
PackedScene::PackedScene() {
diff --git a/scene/resources/shader.cpp b/scene/resources/shader.cpp
index b72eb9fbef..acd04a9321 100644
--- a/scene/resources/shader.cpp
+++ b/scene/resources/shader.cpp
@@ -137,9 +137,9 @@ void Shader::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::STRING, "code", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_code", "get_code");
- BIND_CONSTANT(MODE_SPATIAL);
- BIND_CONSTANT(MODE_CANVAS_ITEM);
- BIND_CONSTANT(MODE_PARTICLES);
+ BIND_ENUM_CONSTANT(MODE_SPATIAL);
+ BIND_ENUM_CONSTANT(MODE_CANVAS_ITEM);
+ BIND_ENUM_CONSTANT(MODE_PARTICLES);
}
Shader::Shader() {
diff --git a/scene/resources/shader_graph.cpp b/scene/resources/shader_graph.cpp
index f68aed6af9..ed63e84d4c 100644
--- a/scene/resources/shader_graph.cpp
+++ b/scene/resources/shader_graph.cpp
@@ -272,129 +272,129 @@ void ShaderGraph::_bind_methods() {
//void get_connections(ShaderType p_which,List<Connection> *p_connections) const;
- BIND_CONSTANT( NODE_INPUT ); // all inputs (shader type dependent)
- BIND_CONSTANT( NODE_SCALAR_CONST ); //scalar constant
- BIND_CONSTANT( NODE_VEC_CONST ); //vec3 constant
- BIND_CONSTANT( NODE_RGB_CONST ); //rgb constant (shows a color picker instead)
- BIND_CONSTANT( NODE_XFORM_CONST ); // 4x4 matrix constant
- BIND_CONSTANT( NODE_TIME ); // time in seconds
- BIND_CONSTANT( NODE_SCREEN_TEX ); // screen texture sampler (takes UV) (only usable in fragment shader)
- BIND_CONSTANT( NODE_SCALAR_OP ); // scalar vs scalar op (mul ); add ); div ); etc)
- BIND_CONSTANT( NODE_VEC_OP ); // vec3 vs vec3 op (mul );ad );div );crossprod );etc)
- BIND_CONSTANT( NODE_VEC_SCALAR_OP ); // vec3 vs scalar op (mul ); add ); div ); etc)
- BIND_CONSTANT( NODE_RGB_OP ); // vec3 vs vec3 rgb op (with scalar amount) ); like brighten ); darken ); burn ); dodge ); multiply ); etc.
- BIND_CONSTANT( NODE_XFORM_MULT ); // mat4 x mat4
- BIND_CONSTANT( NODE_XFORM_VEC_MULT ); // mat4 x vec3 mult (with no-translation option)
- BIND_CONSTANT( NODE_XFORM_VEC_INV_MULT ); // mat4 x vec3 inverse mult (with no-translation option)
- BIND_CONSTANT( NODE_SCALAR_FUNC ); // scalar function (sin ); cos ); etc)
- BIND_CONSTANT( NODE_VEC_FUNC ); // vector function (normalize ); negate ); reciprocal ); rgb2hsv ); hsv2rgb ); etc ); etc)
- BIND_CONSTANT( NODE_VEC_LEN ); // vec3 length
- BIND_CONSTANT( NODE_DOT_PROD ); // vec3 . vec3 (dot product -> scalar output)
- BIND_CONSTANT( NODE_VEC_TO_SCALAR ); // 1 vec3 input ); 3 scalar outputs
- BIND_CONSTANT( NODE_SCALAR_TO_VEC ); // 3 scalar input ); 1 vec3 output
- BIND_CONSTANT( NODE_VEC_TO_XFORM ); // 3 vec input ); 1 xform output
- BIND_CONSTANT( NODE_XFORM_TO_VEC ); // 3 vec input ); 1 xform output
- BIND_CONSTANT( NODE_SCALAR_INTERP ); // scalar interpolation (with optional curve)
- BIND_CONSTANT( NODE_VEC_INTERP ); // vec3 interpolation (with optional curve)
- BIND_CONSTANT( NODE_COLOR_RAMP );
- BIND_CONSTANT( NODE_CURVE_MAP );
- BIND_CONSTANT( NODE_SCALAR_INPUT ); // scalar uniform (assignable in material)
- BIND_CONSTANT( NODE_VEC_INPUT ); // vec3 uniform (assignable in material)
- BIND_CONSTANT( NODE_RGB_INPUT ); // color uniform (assignable in material)
- BIND_CONSTANT( NODE_XFORM_INPUT ); // mat4 uniform (assignable in material)
- BIND_CONSTANT( NODE_TEXTURE_INPUT ); // texture input (assignable in material)
- BIND_CONSTANT( NODE_CUBEMAP_INPUT ); // cubemap input (assignable in material)
- BIND_CONSTANT( NODE_DEFAULT_TEXTURE );
- BIND_CONSTANT( NODE_OUTPUT ); // output (shader type dependent)
- BIND_CONSTANT( NODE_COMMENT ); // comment
- BIND_CONSTANT( NODE_TYPE_MAX );
-
- BIND_CONSTANT( SLOT_TYPE_SCALAR );
- BIND_CONSTANT( SLOT_TYPE_VEC );
- BIND_CONSTANT( SLOT_TYPE_XFORM );
- BIND_CONSTANT( SLOT_TYPE_TEXTURE );
- BIND_CONSTANT( SLOT_MAX );
-
- BIND_CONSTANT( SHADER_TYPE_VERTEX );
- BIND_CONSTANT( SHADER_TYPE_FRAGMENT );
- BIND_CONSTANT( SHADER_TYPE_LIGHT );
- BIND_CONSTANT( SHADER_TYPE_MAX );
-
-
- BIND_CONSTANT( SLOT_IN );
- BIND_CONSTANT( SLOT_OUT );
-
- BIND_CONSTANT( GRAPH_OK );
- BIND_CONSTANT( GRAPH_ERROR_CYCLIC );
- BIND_CONSTANT( GRAPH_ERROR_MISSING_CONNECTIONS );
-
- BIND_CONSTANT( SCALAR_OP_ADD );
- BIND_CONSTANT( SCALAR_OP_SUB );
- BIND_CONSTANT( SCALAR_OP_MUL );
- BIND_CONSTANT( SCALAR_OP_DIV );
- BIND_CONSTANT( SCALAR_OP_MOD );
- BIND_CONSTANT( SCALAR_OP_POW );
- BIND_CONSTANT( SCALAR_OP_MAX );
- BIND_CONSTANT( SCALAR_OP_MIN );
- BIND_CONSTANT( SCALAR_OP_ATAN2 );
- BIND_CONSTANT( SCALAR_MAX_OP );
-
- BIND_CONSTANT( VEC_OP_ADD );
- BIND_CONSTANT( VEC_OP_SUB );
- BIND_CONSTANT( VEC_OP_MUL );
- BIND_CONSTANT( VEC_OP_DIV );
- BIND_CONSTANT( VEC_OP_MOD );
- BIND_CONSTANT( VEC_OP_POW );
- BIND_CONSTANT( VEC_OP_MAX );
- BIND_CONSTANT( VEC_OP_MIN );
- BIND_CONSTANT( VEC_OP_CROSS );
- BIND_CONSTANT( VEC_MAX_OP );
-
- BIND_CONSTANT( VEC_SCALAR_OP_MUL );
- BIND_CONSTANT( VEC_SCALAR_OP_DIV );
- BIND_CONSTANT( VEC_SCALAR_OP_POW );
- BIND_CONSTANT( VEC_SCALAR_MAX_OP );
-
- BIND_CONSTANT( RGB_OP_SCREEN );
- BIND_CONSTANT( RGB_OP_DIFFERENCE );
- BIND_CONSTANT( RGB_OP_DARKEN );
- BIND_CONSTANT( RGB_OP_LIGHTEN );
- BIND_CONSTANT( RGB_OP_OVERLAY );
- BIND_CONSTANT( RGB_OP_DODGE );
- BIND_CONSTANT( RGB_OP_BURN );
- BIND_CONSTANT( RGB_OP_SOFT_LIGHT );
- BIND_CONSTANT( RGB_OP_HARD_LIGHT );
- BIND_CONSTANT( RGB_MAX_OP );
-
- BIND_CONSTANT( SCALAR_FUNC_SIN );
- BIND_CONSTANT( SCALAR_FUNC_COS );
- BIND_CONSTANT( SCALAR_FUNC_TAN );
- BIND_CONSTANT( SCALAR_FUNC_ASIN );
- BIND_CONSTANT( SCALAR_FUNC_ACOS );
- BIND_CONSTANT( SCALAR_FUNC_ATAN );
- BIND_CONSTANT( SCALAR_FUNC_SINH );
- BIND_CONSTANT( SCALAR_FUNC_COSH );
- BIND_CONSTANT( SCALAR_FUNC_TANH );
- BIND_CONSTANT( SCALAR_FUNC_LOG );
- BIND_CONSTANT( SCALAR_FUNC_EXP );
- BIND_CONSTANT( SCALAR_FUNC_SQRT );
- BIND_CONSTANT( SCALAR_FUNC_ABS );
- BIND_CONSTANT( SCALAR_FUNC_SIGN );
- BIND_CONSTANT( SCALAR_FUNC_FLOOR );
- BIND_CONSTANT( SCALAR_FUNC_ROUND );
- BIND_CONSTANT( SCALAR_FUNC_CEIL );
- BIND_CONSTANT( SCALAR_FUNC_FRAC );
- BIND_CONSTANT( SCALAR_FUNC_SATURATE );
- BIND_CONSTANT( SCALAR_FUNC_NEGATE );
- BIND_CONSTANT( SCALAR_MAX_FUNC );
-
- BIND_CONSTANT( VEC_FUNC_NORMALIZE );
- BIND_CONSTANT( VEC_FUNC_SATURATE );
- BIND_CONSTANT( VEC_FUNC_NEGATE );
- BIND_CONSTANT( VEC_FUNC_RECIPROCAL );
- BIND_CONSTANT( VEC_FUNC_RGB2HSV );
- BIND_CONSTANT( VEC_FUNC_HSV2RGB );
- BIND_CONSTANT( VEC_MAX_FUNC );
+ BIND_ENUM_CONSTANT( NODE_INPUT ); // all inputs (shader type dependent)
+ BIND_ENUM_CONSTANT( NODE_SCALAR_CONST ); //scalar constant
+ BIND_ENUM_CONSTANT( NODE_VEC_CONST ); //vec3 constant
+ BIND_ENUM_CONSTANT( NODE_RGB_CONST ); //rgb constant (shows a color picker instead)
+ BIND_ENUM_CONSTANT( NODE_XFORM_CONST ); // 4x4 matrix constant
+ BIND_ENUM_CONSTANT( NODE_TIME ); // time in seconds
+ BIND_ENUM_CONSTANT( NODE_SCREEN_TEX ); // screen texture sampler (takes UV) (only usable in fragment shader)
+ BIND_ENUM_CONSTANT( NODE_SCALAR_OP ); // scalar vs scalar op (mul ); add ); div ); etc)
+ BIND_ENUM_CONSTANT( NODE_VEC_OP ); // vec3 vs vec3 op (mul );ad );div );crossprod );etc)
+ BIND_ENUM_CONSTANT( NODE_VEC_SCALAR_OP ); // vec3 vs scalar op (mul ); add ); div ); etc)
+ BIND_ENUM_CONSTANT( NODE_RGB_OP ); // vec3 vs vec3 rgb op (with scalar amount) ); like brighten ); darken ); burn ); dodge ); multiply ); etc.
+ BIND_ENUM_CONSTANT( NODE_XFORM_MULT ); // mat4 x mat4
+ BIND_ENUM_CONSTANT( NODE_XFORM_VEC_MULT ); // mat4 x vec3 mult (with no-translation option)
+ BIND_ENUM_CONSTANT( NODE_XFORM_VEC_INV_MULT ); // mat4 x vec3 inverse mult (with no-translation option)
+ BIND_ENUM_CONSTANT( NODE_SCALAR_FUNC ); // scalar function (sin ); cos ); etc)
+ BIND_ENUM_CONSTANT( NODE_VEC_FUNC ); // vector function (normalize ); negate ); reciprocal ); rgb2hsv ); hsv2rgb ); etc ); etc)
+ BIND_ENUM_CONSTANT( NODE_VEC_LEN ); // vec3 length
+ BIND_ENUM_CONSTANT( NODE_DOT_PROD ); // vec3 . vec3 (dot product -> scalar output)
+ BIND_ENUM_CONSTANT( NODE_VEC_TO_SCALAR ); // 1 vec3 input ); 3 scalar outputs
+ BIND_ENUM_CONSTANT( NODE_SCALAR_TO_VEC ); // 3 scalar input ); 1 vec3 output
+ BIND_ENUM_CONSTANT( NODE_VEC_TO_XFORM ); // 3 vec input ); 1 xform output
+ BIND_ENUM_CONSTANT( NODE_XFORM_TO_VEC ); // 3 vec input ); 1 xform output
+ BIND_ENUM_CONSTANT( NODE_SCALAR_INTERP ); // scalar interpolation (with optional curve)
+ BIND_ENUM_CONSTANT( NODE_VEC_INTERP ); // vec3 interpolation (with optional curve)
+ BIND_ENUM_CONSTANT( NODE_COLOR_RAMP );
+ BIND_ENUM_CONSTANT( NODE_CURVE_MAP );
+ BIND_ENUM_CONSTANT( NODE_SCALAR_INPUT ); // scalar uniform (assignable in material)
+ BIND_ENUM_CONSTANT( NODE_VEC_INPUT ); // vec3 uniform (assignable in material)
+ BIND_ENUM_CONSTANT( NODE_RGB_INPUT ); // color uniform (assignable in material)
+ BIND_ENUM_CONSTANT( NODE_XFORM_INPUT ); // mat4 uniform (assignable in material)
+ BIND_ENUM_CONSTANT( NODE_TEXTURE_INPUT ); // texture input (assignable in material)
+ BIND_ENUM_CONSTANT( NODE_CUBEMAP_INPUT ); // cubemap input (assignable in material)
+ BIND_ENUM_CONSTANT( NODE_DEFAULT_TEXTURE );
+ BIND_ENUM_CONSTANT( NODE_OUTPUT ); // output (shader type dependent)
+ BIND_ENUM_CONSTANT( NODE_COMMENT ); // comment
+ BIND_ENUM_CONSTANT( NODE_TYPE_MAX );
+
+ BIND_ENUM_CONSTANT( SLOT_TYPE_SCALAR );
+ BIND_ENUM_CONSTANT( SLOT_TYPE_VEC );
+ BIND_ENUM_CONSTANT( SLOT_TYPE_XFORM );
+ BIND_ENUM_CONSTANT( SLOT_TYPE_TEXTURE );
+ BIND_ENUM_CONSTANT( SLOT_MAX );
+
+ BIND_ENUM_CONSTANT( SHADER_TYPE_VERTEX );
+ BIND_ENUM_CONSTANT( SHADER_TYPE_FRAGMENT );
+ BIND_ENUM_CONSTANT( SHADER_TYPE_LIGHT );
+ BIND_ENUM_CONSTANT( SHADER_TYPE_MAX );
+
+
+ BIND_ENUM_CONSTANT( SLOT_IN );
+ BIND_ENUM_CONSTANT( SLOT_OUT );
+
+ BIND_ENUM_CONSTANT( GRAPH_OK );
+ BIND_ENUM_CONSTANT( GRAPH_ERROR_CYCLIC );
+ BIND_ENUM_CONSTANT( GRAPH_ERROR_MISSING_CONNECTIONS );
+
+ BIND_ENUM_CONSTANT( SCALAR_OP_ADD );
+ BIND_ENUM_CONSTANT( SCALAR_OP_SUB );
+ BIND_ENUM_CONSTANT( SCALAR_OP_MUL );
+ BIND_ENUM_CONSTANT( SCALAR_OP_DIV );
+ BIND_ENUM_CONSTANT( SCALAR_OP_MOD );
+ BIND_ENUM_CONSTANT( SCALAR_OP_POW );
+ BIND_ENUM_CONSTANT( SCALAR_OP_MAX );
+ BIND_ENUM_CONSTANT( SCALAR_OP_MIN );
+ BIND_ENUM_CONSTANT( SCALAR_OP_ATAN2 );
+ BIND_ENUM_CONSTANT( SCALAR_MAX_OP );
+
+ BIND_ENUM_CONSTANT( VEC_OP_ADD );
+ BIND_ENUM_CONSTANT( VEC_OP_SUB );
+ BIND_ENUM_CONSTANT( VEC_OP_MUL );
+ BIND_ENUM_CONSTANT( VEC_OP_DIV );
+ BIND_ENUM_CONSTANT( VEC_OP_MOD );
+ BIND_ENUM_CONSTANT( VEC_OP_POW );
+ BIND_ENUM_CONSTANT( VEC_OP_MAX );
+ BIND_ENUM_CONSTANT( VEC_OP_MIN );
+ BIND_ENUM_CONSTANT( VEC_OP_CROSS );
+ BIND_ENUM_CONSTANT( VEC_MAX_OP );
+
+ BIND_ENUM_CONSTANT( VEC_SCALAR_OP_MUL );
+ BIND_ENUM_CONSTANT( VEC_SCALAR_OP_DIV );
+ BIND_ENUM_CONSTANT( VEC_SCALAR_OP_POW );
+ BIND_ENUM_CONSTANT( VEC_SCALAR_MAX_OP );
+
+ BIND_ENUM_CONSTANT( RGB_OP_SCREEN );
+ BIND_ENUM_CONSTANT( RGB_OP_DIFFERENCE );
+ BIND_ENUM_CONSTANT( RGB_OP_DARKEN );
+ BIND_ENUM_CONSTANT( RGB_OP_LIGHTEN );
+ BIND_ENUM_CONSTANT( RGB_OP_OVERLAY );
+ BIND_ENUM_CONSTANT( RGB_OP_DODGE );
+ BIND_ENUM_CONSTANT( RGB_OP_BURN );
+ BIND_ENUM_CONSTANT( RGB_OP_SOFT_LIGHT );
+ BIND_ENUM_CONSTANT( RGB_OP_HARD_LIGHT );
+ BIND_ENUM_CONSTANT( RGB_MAX_OP );
+
+ BIND_ENUM_CONSTANT( SCALAR_FUNC_SIN );
+ BIND_ENUM_CONSTANT( SCALAR_FUNC_COS );
+ BIND_ENUM_CONSTANT( SCALAR_FUNC_TAN );
+ BIND_ENUM_CONSTANT( SCALAR_FUNC_ASIN );
+ BIND_ENUM_CONSTANT( SCALAR_FUNC_ACOS );
+ BIND_ENUM_CONSTANT( SCALAR_FUNC_ATAN );
+ BIND_ENUM_CONSTANT( SCALAR_FUNC_SINH );
+ BIND_ENUM_CONSTANT( SCALAR_FUNC_COSH );
+ BIND_ENUM_CONSTANT( SCALAR_FUNC_TANH );
+ BIND_ENUM_CONSTANT( SCALAR_FUNC_LOG );
+ BIND_ENUM_CONSTANT( SCALAR_FUNC_EXP );
+ BIND_ENUM_CONSTANT( SCALAR_FUNC_SQRT );
+ BIND_ENUM_CONSTANT( SCALAR_FUNC_ABS );
+ BIND_ENUM_CONSTANT( SCALAR_FUNC_SIGN );
+ BIND_ENUM_CONSTANT( SCALAR_FUNC_FLOOR );
+ BIND_ENUM_CONSTANT( SCALAR_FUNC_ROUND );
+ BIND_ENUM_CONSTANT( SCALAR_FUNC_CEIL );
+ BIND_ENUM_CONSTANT( SCALAR_FUNC_FRAC );
+ BIND_ENUM_CONSTANT( SCALAR_FUNC_SATURATE );
+ BIND_ENUM_CONSTANT( SCALAR_FUNC_NEGATE );
+ BIND_ENUM_CONSTANT( SCALAR_MAX_FUNC );
+
+ BIND_ENUM_CONSTANT( VEC_FUNC_NORMALIZE );
+ BIND_ENUM_CONSTANT( VEC_FUNC_SATURATE );
+ BIND_ENUM_CONSTANT( VEC_FUNC_NEGATE );
+ BIND_ENUM_CONSTANT( VEC_FUNC_RECIPROCAL );
+ BIND_ENUM_CONSTANT( VEC_FUNC_RGB2HSV );
+ BIND_ENUM_CONSTANT( VEC_FUNC_HSV2RGB );
+ BIND_ENUM_CONSTANT( VEC_MAX_FUNC );
ADD_SIGNAL(MethodInfo("updated"));
@@ -415,60 +415,60 @@ void ShaderGraph::_bind_methods() {
ClassDB::bind_method(D_METHOD("clear"),&ShaderGraph::clear );
- BIND_CONSTANT( NODE_IN ); ///< param 0: name
- BIND_CONSTANT( NODE_OUT ); ///< param 0: name
- BIND_CONSTANT( NODE_CONSTANT ); ///< param 0: value
- BIND_CONSTANT( NODE_PARAMETER ); ///< param 0: name
- BIND_CONSTANT( NODE_ADD );
- BIND_CONSTANT( NODE_SUB );
- BIND_CONSTANT( NODE_MUL );
- BIND_CONSTANT( NODE_DIV );
- BIND_CONSTANT( NODE_MOD );
- BIND_CONSTANT( NODE_SIN );
- BIND_CONSTANT( NODE_COS );
- BIND_CONSTANT( NODE_TAN );
- BIND_CONSTANT( NODE_ARCSIN );
- BIND_CONSTANT( NODE_ARCCOS );
- BIND_CONSTANT( NODE_ARCTAN );
- BIND_CONSTANT( NODE_POW );
- BIND_CONSTANT( NODE_LOG );
- BIND_CONSTANT( NODE_MAX );
- BIND_CONSTANT( NODE_MIN );
- BIND_CONSTANT( NODE_COMPARE );
- BIND_CONSTANT( NODE_TEXTURE ); ///< param 0: texture
- BIND_CONSTANT( NODE_TIME ); ///< param 0: interval length
- BIND_CONSTANT( NODE_NOISE );
- BIND_CONSTANT( NODE_PASS );
- BIND_CONSTANT( NODE_VEC_IN ); ///< param 0: name
- BIND_CONSTANT( NODE_VEC_OUT ); ///< param 0: name
- BIND_CONSTANT( NODE_VEC_CONSTANT ); ///< param 0: value
- BIND_CONSTANT( NODE_VEC_PARAMETER ); ///< param 0: name
- BIND_CONSTANT( NODE_VEC_ADD );
- BIND_CONSTANT( NODE_VEC_SUB );
- BIND_CONSTANT( NODE_VEC_MUL );
- BIND_CONSTANT( NODE_VEC_DIV );
- BIND_CONSTANT( NODE_VEC_MOD );
- BIND_CONSTANT( NODE_VEC_CROSS );
- BIND_CONSTANT( NODE_VEC_DOT );
- BIND_CONSTANT( NODE_VEC_POW );
- BIND_CONSTANT( NODE_VEC_NORMALIZE );
- BIND_CONSTANT( NODE_VEC_TRANSFORM3 );
- BIND_CONSTANT( NODE_VEC_TRANSFORM4 );
- BIND_CONSTANT( NODE_VEC_COMPARE );
- BIND_CONSTANT( NODE_VEC_TEXTURE_2D );
- BIND_CONSTANT( NODE_VEC_TEXTURE_CUBE );
- BIND_CONSTANT( NODE_VEC_NOISE );
- BIND_CONSTANT( NODE_VEC_0 );
- BIND_CONSTANT( NODE_VEC_1 );
- BIND_CONSTANT( NODE_VEC_2 );
- BIND_CONSTANT( NODE_VEC_BUILD );
- BIND_CONSTANT( NODE_VEC_PASS );
- BIND_CONSTANT( NODE_COLOR_CONSTANT );
- BIND_CONSTANT( NODE_COLOR_PARAMETER );
- BIND_CONSTANT( NODE_TEXTURE_PARAMETER );
- BIND_CONSTANT( NODE_TEXTURE_2D_PARAMETER );
- BIND_CONSTANT( NODE_TEXTURE_CUBE_PARAMETER );
- BIND_CONSTANT( NODE_TYPE_MAX );
+ BIND_ENUM_CONSTANT( NODE_IN ); ///< param 0: name
+ BIND_ENUM_CONSTANT( NODE_OUT ); ///< param 0: name
+ BIND_ENUM_CONSTANT( NODE_CONSTANT ); ///< param 0: value
+ BIND_ENUM_CONSTANT( NODE_PARAMETER ); ///< param 0: name
+ BIND_ENUM_CONSTANT( NODE_ADD );
+ BIND_ENUM_CONSTANT( NODE_SUB );
+ BIND_ENUM_CONSTANT( NODE_MUL );
+ BIND_ENUM_CONSTANT( NODE_DIV );
+ BIND_ENUM_CONSTANT( NODE_MOD );
+ BIND_ENUM_CONSTANT( NODE_SIN );
+ BIND_ENUM_CONSTANT( NODE_COS );
+ BIND_ENUM_CONSTANT( NODE_TAN );
+ BIND_ENUM_CONSTANT( NODE_ARCSIN );
+ BIND_ENUM_CONSTANT( NODE_ARCCOS );
+ BIND_ENUM_CONSTANT( NODE_ARCTAN );
+ BIND_ENUM_CONSTANT( NODE_POW );
+ BIND_ENUM_CONSTANT( NODE_LOG );
+ BIND_ENUM_CONSTANT( NODE_MAX );
+ BIND_ENUM_CONSTANT( NODE_MIN );
+ BIND_ENUM_CONSTANT( NODE_COMPARE );
+ BIND_ENUM_CONSTANT( NODE_TEXTURE ); ///< param 0: texture
+ BIND_ENUM_CONSTANT( NODE_TIME ); ///< param 0: interval length
+ BIND_ENUM_CONSTANT( NODE_NOISE );
+ BIND_ENUM_CONSTANT( NODE_PASS );
+ BIND_ENUM_CONSTANT( NODE_VEC_IN ); ///< param 0: name
+ BIND_ENUM_CONSTANT( NODE_VEC_OUT ); ///< param 0: name
+ BIND_ENUM_CONSTANT( NODE_VEC_CONSTANT ); ///< param 0: value
+ BIND_ENUM_CONSTANT( NODE_VEC_PARAMETER ); ///< param 0: name
+ BIND_ENUM_CONSTANT( NODE_VEC_ADD );
+ BIND_ENUM_CONSTANT( NODE_VEC_SUB );
+ BIND_ENUM_CONSTANT( NODE_VEC_MUL );
+ BIND_ENUM_CONSTANT( NODE_VEC_DIV );
+ BIND_ENUM_CONSTANT( NODE_VEC_MOD );
+ BIND_ENUM_CONSTANT( NODE_VEC_CROSS );
+ BIND_ENUM_CONSTANT( NODE_VEC_DOT );
+ BIND_ENUM_CONSTANT( NODE_VEC_POW );
+ BIND_ENUM_CONSTANT( NODE_VEC_NORMALIZE );
+ BIND_ENUM_CONSTANT( NODE_VEC_TRANSFORM3 );
+ BIND_ENUM_CONSTANT( NODE_VEC_TRANSFORM4 );
+ BIND_ENUM_CONSTANT( NODE_VEC_COMPARE );
+ BIND_ENUM_CONSTANT( NODE_VEC_TEXTURE_2D );
+ BIND_ENUM_CONSTANT( NODE_VEC_TEXTURE_CUBE );
+ BIND_ENUM_CONSTANT( NODE_VEC_NOISE );
+ BIND_ENUM_CONSTANT( NODE_VEC_0 );
+ BIND_ENUM_CONSTANT( NODE_VEC_1 );
+ BIND_ENUM_CONSTANT( NODE_VEC_2 );
+ BIND_ENUM_CONSTANT( NODE_VEC_BUILD );
+ BIND_ENUM_CONSTANT( NODE_VEC_PASS );
+ BIND_ENUM_CONSTANT( NODE_COLOR_CONSTANT );
+ BIND_ENUM_CONSTANT( NODE_COLOR_PARAMETER );
+ BIND_ENUM_CONSTANT( NODE_TEXTURE_PARAMETER );
+ BIND_ENUM_CONSTANT( NODE_TEXTURE_2D_PARAMETER );
+ BIND_ENUM_CONSTANT( NODE_TEXTURE_CUBE_PARAMETER );
+ BIND_ENUM_CONSTANT( NODE_TYPE_MAX );
#endif
}
diff --git a/scene/resources/sky_box.cpp b/scene/resources/sky_box.cpp
index cc3cfe4dc0..b7f2feb58d 100644
--- a/scene/resources/sky_box.cpp
+++ b/scene/resources/sky_box.cpp
@@ -49,14 +49,14 @@ void Sky::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "radiance_size", PROPERTY_HINT_ENUM, "32,64,128,256,512,1024,2048"), "set_radiance_size", "get_radiance_size");
- BIND_CONSTANT(RADIANCE_SIZE_32);
- BIND_CONSTANT(RADIANCE_SIZE_64);
- BIND_CONSTANT(RADIANCE_SIZE_128);
- BIND_CONSTANT(RADIANCE_SIZE_256);
- BIND_CONSTANT(RADIANCE_SIZE_512);
- BIND_CONSTANT(RADIANCE_SIZE_1024);
- BIND_CONSTANT(RADIANCE_SIZE_2048);
- BIND_CONSTANT(RADIANCE_SIZE_MAX);
+ BIND_ENUM_CONSTANT(RADIANCE_SIZE_32);
+ BIND_ENUM_CONSTANT(RADIANCE_SIZE_64);
+ BIND_ENUM_CONSTANT(RADIANCE_SIZE_128);
+ BIND_ENUM_CONSTANT(RADIANCE_SIZE_256);
+ BIND_ENUM_CONSTANT(RADIANCE_SIZE_512);
+ BIND_ENUM_CONSTANT(RADIANCE_SIZE_1024);
+ BIND_ENUM_CONSTANT(RADIANCE_SIZE_2048);
+ BIND_ENUM_CONSTANT(RADIANCE_SIZE_MAX);
}
Sky::Sky() {
@@ -517,12 +517,12 @@ void ProceduralSky::_bind_methods() {
ADD_GROUP("Texture", "texture_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "texture_size", PROPERTY_HINT_ENUM, "256,512,1024,2048,4096"), "set_texture_size", "get_texture_size");
- BIND_CONSTANT(TEXTURE_SIZE_256);
- BIND_CONSTANT(TEXTURE_SIZE_512);
- BIND_CONSTANT(TEXTURE_SIZE_1024);
- BIND_CONSTANT(TEXTURE_SIZE_2048);
- BIND_CONSTANT(TEXTURE_SIZE_4096);
- BIND_CONSTANT(TEXTURE_SIZE_MAX);
+ BIND_ENUM_CONSTANT(TEXTURE_SIZE_256);
+ BIND_ENUM_CONSTANT(TEXTURE_SIZE_512);
+ BIND_ENUM_CONSTANT(TEXTURE_SIZE_1024);
+ BIND_ENUM_CONSTANT(TEXTURE_SIZE_2048);
+ BIND_ENUM_CONSTANT(TEXTURE_SIZE_4096);
+ BIND_ENUM_CONSTANT(TEXTURE_SIZE_MAX);
}
ProceduralSky::ProceduralSky() {
diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp
index d6a730647f..9309cef89f 100644
--- a/scene/resources/style_box.cpp
+++ b/scene/resources/style_box.cpp
@@ -296,9 +296,9 @@ void StyleBoxTexture::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "modulate_color"), "set_modulate", "get_modulate");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "draw_center"), "set_draw_center", "get_draw_center");
- BIND_CONSTANT(AXIS_STRETCH_MODE_STRETCH);
- BIND_CONSTANT(AXIS_STRETCH_MODE_TILE);
- BIND_CONSTANT(AXIS_STRETCH_MODE_TILE_FIT);
+ BIND_ENUM_CONSTANT(AXIS_STRETCH_MODE_STRETCH);
+ BIND_ENUM_CONSTANT(AXIS_STRETCH_MODE_TILE);
+ BIND_ENUM_CONSTANT(AXIS_STRETCH_MODE_TILE_FIT);
}
StyleBoxTexture::StyleBoxTexture() {
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index 9a251c029d..f542d2a8de 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -75,14 +75,14 @@ void Texture::_bind_methods() {
ClassDB::bind_method(D_METHOD("draw_rect_region", "canvas_item", "rect", "src_rect", "modulate", "transpose", "normal_map", "clip_uv"), &Texture::draw_rect_region, DEFVAL(Color(1, 1, 1)), DEFVAL(false), DEFVAL(Variant()), DEFVAL(true));
ClassDB::bind_method(D_METHOD("get_data"), &Texture::get_data);
- BIND_CONSTANT(FLAG_MIPMAPS);
- BIND_CONSTANT(FLAG_REPEAT);
- BIND_CONSTANT(FLAG_FILTER);
- BIND_CONSTANT(FLAG_VIDEO_SURFACE);
- BIND_CONSTANT(FLAGS_DEFAULT);
- BIND_CONSTANT(FLAG_ANISOTROPIC_FILTER);
- BIND_CONSTANT(FLAG_CONVERT_TO_LINEAR);
- BIND_CONSTANT(FLAG_MIRRORED_REPEAT);
+ BIND_ENUM_CONSTANT(FLAG_MIPMAPS);
+ BIND_ENUM_CONSTANT(FLAG_REPEAT);
+ BIND_ENUM_CONSTANT(FLAG_FILTER);
+ BIND_ENUM_CONSTANT(FLAG_VIDEO_SURFACE);
+ BIND_ENUM_CONSTANT(FLAGS_DEFAULT);
+ BIND_ENUM_CONSTANT(FLAG_ANISOTROPIC_FILTER);
+ BIND_ENUM_CONSTANT(FLAG_CONVERT_TO_LINEAR);
+ BIND_ENUM_CONSTANT(FLAG_MIRRORED_REPEAT);
}
Texture::Texture() {
@@ -362,9 +362,9 @@ void ImageTexture::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_size_override", "size"), &ImageTexture::set_size_override);
ClassDB::bind_method(D_METHOD("_reload_hook", "rid"), &ImageTexture::_reload_hook);
- BIND_CONSTANT(STORAGE_RAW);
- BIND_CONSTANT(STORAGE_COMPRESS_LOSSY);
- BIND_CONSTANT(STORAGE_COMPRESS_LOSSLESS);
+ BIND_ENUM_CONSTANT(STORAGE_RAW);
+ BIND_ENUM_CONSTANT(STORAGE_COMPRESS_LOSSY);
+ BIND_ENUM_CONSTANT(STORAGE_COMPRESS_LOSSLESS);
}
ImageTexture::ImageTexture() {
@@ -1335,19 +1335,21 @@ void CubeMap::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_lossy_storage_quality", "quality"), &CubeMap::set_lossy_storage_quality);
ClassDB::bind_method(D_METHOD("get_lossy_storage_quality"), &CubeMap::get_lossy_storage_quality);
- BIND_CONSTANT(STORAGE_RAW);
- BIND_CONSTANT(STORAGE_COMPRESS_LOSSY);
- BIND_CONSTANT(STORAGE_COMPRESS_LOSSLESS);
- BIND_CONSTANT(SIDE_LEFT);
- BIND_CONSTANT(SIDE_RIGHT);
- BIND_CONSTANT(SIDE_BOTTOM);
- BIND_CONSTANT(SIDE_TOP);
- BIND_CONSTANT(SIDE_FRONT);
- BIND_CONSTANT(SIDE_BACK);
- BIND_CONSTANT(FLAG_MIPMAPS);
- BIND_CONSTANT(FLAG_REPEAT);
- BIND_CONSTANT(FLAG_FILTER);
- BIND_CONSTANT(FLAGS_DEFAULT);
+ BIND_ENUM_CONSTANT(STORAGE_RAW);
+ BIND_ENUM_CONSTANT(STORAGE_COMPRESS_LOSSY);
+ BIND_ENUM_CONSTANT(STORAGE_COMPRESS_LOSSLESS);
+
+ BIND_ENUM_CONSTANT(SIDE_LEFT);
+ BIND_ENUM_CONSTANT(SIDE_RIGHT);
+ BIND_ENUM_CONSTANT(SIDE_BOTTOM);
+ BIND_ENUM_CONSTANT(SIDE_TOP);
+ BIND_ENUM_CONSTANT(SIDE_FRONT);
+ BIND_ENUM_CONSTANT(SIDE_BACK);
+
+ BIND_ENUM_CONSTANT(FLAG_MIPMAPS);
+ BIND_ENUM_CONSTANT(FLAG_REPEAT);
+ BIND_ENUM_CONSTANT(FLAG_FILTER);
+ BIND_ENUM_CONSTANT(FLAGS_DEFAULT);
}
CubeMap::CubeMap() {
@@ -1366,13 +1368,14 @@ CubeMap::~CubeMap() {
VisualServer::get_singleton()->free(cubemap);
}
-/* BIND_CONSTANT( FLAG_CUBEMAP );
- BIND_CONSTANT( CUBEMAP_LEFT );
- BIND_CONSTANT( CUBEMAP_RIGHT );
- BIND_CONSTANT( CUBEMAP_BOTTOM );
- BIND_CONSTANT( CUBEMAP_TOP );
- BIND_CONSTANT( CUBEMAP_FRONT );
- BIND_CONSTANT( CUBEMAP_BACK );
+/* BIND_ENUM(CubeMapSize);
+ BIND_ENUM_CONSTANT( FLAG_CUBEMAP );
+ BIND_ENUM_CONSTANT( CUBEMAP_LEFT );
+ BIND_ENUM_CONSTANT( CUBEMAP_RIGHT );
+ BIND_ENUM_CONSTANT( CUBEMAP_BOTTOM );
+ BIND_ENUM_CONSTANT( CUBEMAP_TOP );
+ BIND_ENUM_CONSTANT( CUBEMAP_FRONT );
+ BIND_ENUM_CONSTANT( CUBEMAP_BACK );
*/
///////////////////////////