summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorIgnacio Etcheverry <ignalfonsore@gmail.com>2017-08-20 17:45:01 +0200
committerIgnacio Etcheverry <ignalfonsore@gmail.com>2017-08-20 22:07:43 +0200
commit32dd9a9f668db31e348c5ef5bc181cdb91c07299 (patch)
tree66d9628611d85ca80f314ee9a65777880ee5ef11 /scene
parentf6c39830cb7cf0d664bdfa25642b333a1249b96f (diff)
ClassDB: Provide the enum name of integer constants
Diffstat (limited to 'scene')
-rw-r--r--scene/2d/back_buffer_copy.cpp6
-rw-r--r--scene/2d/camera_2d.cpp4
-rw-r--r--scene/2d/canvas_item.cpp27
-rw-r--r--scene/2d/light_2d.cpp8
-rw-r--r--scene/2d/light_occluder_2d.cpp6
-rw-r--r--scene/2d/line_2d.cpp16
-rw-r--r--scene/2d/particles_2d.cpp4
-rw-r--r--scene/2d/physics_body_2d.cpp16
-rw-r--r--scene/2d/tile_map.cpp21
-rw-r--r--scene/2d/visibility_notifier_2d.cpp15
-rw-r--r--scene/3d/audio_stream_player_3d.cpp16
-rw-r--r--scene/3d/camera.cpp14
-rw-r--r--scene/3d/character_camera.cpp4
-rw-r--r--scene/3d/gi_probe.cpp8
-rw-r--r--scene/3d/light.cpp36
-rw-r--r--scene/3d/particles.cpp53
-rw-r--r--scene/3d/path.cpp8
-rw-r--r--scene/3d/physics_body.cpp8
-rw-r--r--scene/3d/physics_joint.cpp132
-rw-r--r--scene/3d/reflection_probe.cpp4
-rw-r--r--scene/3d/sprite_3d.cpp16
-rw-r--r--scene/3d/visibility_notifier.cpp7
-rw-r--r--scene/animation/animation_player.cpp4
-rw-r--r--scene/animation/animation_tree_player.cpp20
-rw-r--r--scene/animation/tween.cpp38
-rw-r--r--scene/gui/base_button.cpp12
-rw-r--r--scene/gui/box_container.cpp6
-rw-r--r--scene/gui/button.cpp6
-rw-r--r--scene/gui/control.cpp106
-rw-r--r--scene/gui/file_dialog.cpp19
-rw-r--r--scene/gui/graph_node.cpp6
-rw-r--r--scene/gui/item_list.cpp9
-rw-r--r--scene/gui/label.cpp18
-rw-r--r--scene/gui/line_edit.cpp24
-rw-r--r--scene/gui/line_edit.h1
-rw-r--r--scene/gui/link_button.cpp6
-rw-r--r--scene/gui/patch_9_rect.cpp6
-rw-r--r--scene/gui/popup.cpp1
-rw-r--r--scene/gui/rich_text_label.cpp40
-rw-r--r--scene/gui/split_container.cpp6
-rw-r--r--scene/gui/tabs.cpp18
-rw-r--r--scene/gui/text_edit.cpp20
-rw-r--r--scene/gui/text_edit.h3
-rw-r--r--scene/gui/texture_button.cpp14
-rw-r--r--scene/gui/texture_progress.cpp12
-rw-r--r--scene/gui/texture_progress.h2
-rw-r--r--scene/gui/texture_rect.cpp16
-rw-r--r--scene/gui/tree.cpp24
-rw-r--r--scene/gui/tree.h1
-rw-r--r--scene/main/http_request.cpp26
-rw-r--r--scene/main/http_request.h2
-rwxr-xr-xscene/main/node.cpp28
-rw-r--r--scene/main/node.h2
-rw-r--r--scene/main/scene_tree.cpp25
-rw-r--r--scene/main/scene_tree.h1
-rwxr-xr-xscene/main/timer.cpp4
-rw-r--r--scene/main/viewport.cpp64
-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
71 files changed, 905 insertions, 878 deletions
diff --git a/scene/2d/back_buffer_copy.cpp b/scene/2d/back_buffer_copy.cpp
index 748a527ca0..44bee20d0a 100644
--- a/scene/2d/back_buffer_copy.cpp
+++ b/scene/2d/back_buffer_copy.cpp
@@ -85,9 +85,9 @@ void BackBufferCopy::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "copy_mode", PROPERTY_HINT_ENUM, "Disabled,Rect,Viewport"), "set_copy_mode", "get_copy_mode");
ADD_PROPERTY(PropertyInfo(Variant::RECT2, "rect"), "set_rect", "get_rect");
- BIND_CONSTANT(COPY_MODE_DISABLED);
- BIND_CONSTANT(COPY_MODE_RECT);
- BIND_CONSTANT(COPY_MODE_VIEWPORT);
+ BIND_ENUM_CONSTANT(COPY_MODE_DISABLED);
+ BIND_ENUM_CONSTANT(COPY_MODE_RECT);
+ BIND_ENUM_CONSTANT(COPY_MODE_VIEWPORT);
}
BackBufferCopy::BackBufferCopy() {
diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp
index 20571abdb9..c69c34821c 100644
--- a/scene/2d/camera_2d.cpp
+++ b/scene/2d/camera_2d.cpp
@@ -735,8 +735,8 @@ void Camera2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "editor_draw_limits"), "set_limit_drawing_enabled", "is_limit_drawing_enabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "editor_draw_drag_margin"), "set_margin_drawing_enabled", "is_margin_drawing_enabled");
- BIND_CONSTANT(ANCHOR_MODE_DRAG_CENTER);
- BIND_CONSTANT(ANCHOR_MODE_FIXED_TOP_LEFT);
+ BIND_ENUM_CONSTANT(ANCHOR_MODE_DRAG_CENTER);
+ BIND_ENUM_CONSTANT(ANCHOR_MODE_FIXED_TOP_LEFT);
}
Camera2D::Camera2D() {
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp
index cdd8fdf350..5a519dee69 100644
--- a/scene/2d/canvas_item.cpp
+++ b/scene/2d/canvas_item.cpp
@@ -188,14 +188,15 @@ void CanvasItemMaterial::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "blend_mode", PROPERTY_HINT_ENUM, "Mix,Add,Sub,Mul,Premult Alpha"), "set_blend_mode", "get_blend_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "light_mode", PROPERTY_HINT_ENUM, "Normal,Unshaded,Light Only"), "set_light_mode", "get_light_mode");
- BIND_CONSTANT(BLEND_MODE_MIX);
- BIND_CONSTANT(BLEND_MODE_ADD);
- BIND_CONSTANT(BLEND_MODE_SUB);
- BIND_CONSTANT(BLEND_MODE_MUL);
- BIND_CONSTANT(BLEND_MODE_PREMULT_ALPHA);
- BIND_CONSTANT(LIGHT_MODE_NORMAL);
- BIND_CONSTANT(LIGHT_MODE_UNSHADED);
- BIND_CONSTANT(LIGHT_MODE_LIGHT_ONLY);
+ 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(BLEND_MODE_PREMULT_ALPHA);
+
+ BIND_ENUM_CONSTANT(LIGHT_MODE_NORMAL);
+ BIND_ENUM_CONSTANT(LIGHT_MODE_UNSHADED);
+ BIND_ENUM_CONSTANT(LIGHT_MODE_LIGHT_ONLY);
}
CanvasItemMaterial::CanvasItemMaterial()
@@ -1042,11 +1043,11 @@ void CanvasItem::_bind_methods() {
ADD_SIGNAL(MethodInfo("hide"));
ADD_SIGNAL(MethodInfo("item_rect_changed"));
- BIND_CONSTANT(BLEND_MODE_MIX);
- BIND_CONSTANT(BLEND_MODE_ADD);
- BIND_CONSTANT(BLEND_MODE_SUB);
- BIND_CONSTANT(BLEND_MODE_MUL);
- BIND_CONSTANT(BLEND_MODE_PREMULT_ALPHA);
+ 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(BLEND_MODE_PREMULT_ALPHA);
BIND_CONSTANT(NOTIFICATION_DRAW);
BIND_CONSTANT(NOTIFICATION_VISIBILITY_CHANGED);
diff --git a/scene/2d/light_2d.cpp b/scene/2d/light_2d.cpp
index ffe69fa93f..7a8304299d 100644
--- a/scene/2d/light_2d.cpp
+++ b/scene/2d/light_2d.cpp
@@ -437,10 +437,10 @@ void Light2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL, "shadow_filter_smooth", PROPERTY_HINT_RANGE, "0,64,0.1"), "set_shadow_smooth", "get_shadow_smooth");
ADD_PROPERTY(PropertyInfo(Variant::INT, "shadow_item_cull_mask", PROPERTY_HINT_LAYERS_2D_RENDER), "set_item_shadow_cull_mask", "get_item_shadow_cull_mask");
- BIND_CONSTANT(MODE_ADD);
- BIND_CONSTANT(MODE_SUB);
- BIND_CONSTANT(MODE_MIX);
- BIND_CONSTANT(MODE_MASK);
+ BIND_ENUM_CONSTANT(MODE_ADD);
+ BIND_ENUM_CONSTANT(MODE_SUB);
+ BIND_ENUM_CONSTANT(MODE_MIX);
+ BIND_ENUM_CONSTANT(MODE_MASK);
}
Light2D::Light2D() {
diff --git a/scene/2d/light_occluder_2d.cpp b/scene/2d/light_occluder_2d.cpp
index a1a8e7d9c4..9ba93e4801 100644
--- a/scene/2d/light_occluder_2d.cpp
+++ b/scene/2d/light_occluder_2d.cpp
@@ -87,9 +87,9 @@ void OccluderPolygon2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "cull_mode", PROPERTY_HINT_ENUM, "Disabled,ClockWise,CounterClockWise"), "set_cull_mode", "get_cull_mode");
ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "polygon"), "set_polygon", "get_polygon");
- BIND_CONSTANT(CULL_DISABLED);
- BIND_CONSTANT(CULL_CLOCKWISE);
- BIND_CONSTANT(CULL_COUNTER_CLOCKWISE);
+ BIND_ENUM_CONSTANT(CULL_DISABLED);
+ BIND_ENUM_CONSTANT(CULL_CLOCKWISE);
+ BIND_ENUM_CONSTANT(CULL_COUNTER_CLOCKWISE);
}
OccluderPolygon2D::OccluderPolygon2D() {
diff --git a/scene/2d/line_2d.cpp b/scene/2d/line_2d.cpp
index 5438557d0b..6e7bfe63c8 100644
--- a/scene/2d/line_2d.cpp
+++ b/scene/2d/line_2d.cpp
@@ -322,16 +322,16 @@ void Line2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL, "sharp_limit"), "set_sharp_limit", "get_sharp_limit");
ADD_PROPERTY(PropertyInfo(Variant::INT, "round_precision"), "set_round_precision", "get_round_precision");
- BIND_CONSTANT(LINE_JOINT_SHARP);
- BIND_CONSTANT(LINE_JOINT_BEVEL);
- BIND_CONSTANT(LINE_JOINT_ROUND);
+ BIND_ENUM_CONSTANT(LINE_JOINT_SHARP);
+ BIND_ENUM_CONSTANT(LINE_JOINT_BEVEL);
+ BIND_ENUM_CONSTANT(LINE_JOINT_ROUND);
- BIND_CONSTANT(LINE_CAP_NONE);
- BIND_CONSTANT(LINE_CAP_BOX);
- BIND_CONSTANT(LINE_CAP_ROUND);
+ BIND_ENUM_CONSTANT(LINE_CAP_NONE);
+ BIND_ENUM_CONSTANT(LINE_CAP_BOX);
+ BIND_ENUM_CONSTANT(LINE_CAP_ROUND);
- BIND_CONSTANT(LINE_TEXTURE_NONE);
- BIND_CONSTANT(LINE_TEXTURE_TILE);
+ BIND_ENUM_CONSTANT(LINE_TEXTURE_NONE);
+ BIND_ENUM_CONSTANT(LINE_TEXTURE_TILE);
ClassDB::bind_method(D_METHOD("_gradient_changed"), &Line2D::_gradient_changed);
}
diff --git a/scene/2d/particles_2d.cpp b/scene/2d/particles_2d.cpp
index a2ec33f403..3fa519c838 100644
--- a/scene/2d/particles_2d.cpp
+++ b/scene/2d/particles_2d.cpp
@@ -388,8 +388,8 @@ void Particles2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "h_frames", PROPERTY_HINT_RANGE, "1,1024,1"), "set_h_frames", "get_h_frames");
ADD_PROPERTY(PropertyInfo(Variant::INT, "v_frames", PROPERTY_HINT_RANGE, "1,1024,1"), "set_v_frames", "get_v_frames");
- BIND_CONSTANT(DRAW_ORDER_INDEX);
- BIND_CONSTANT(DRAW_ORDER_LIFETIME);
+ BIND_ENUM_CONSTANT(DRAW_ORDER_INDEX);
+ BIND_ENUM_CONSTANT(DRAW_ORDER_LIFETIME);
}
Particles2D::Particles2D() {
diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp
index 6ec1642138..547ccf343b 100644
--- a/scene/2d/physics_body_2d.cpp
+++ b/scene/2d/physics_body_2d.cpp
@@ -931,14 +931,14 @@ void RigidBody2D::_bind_methods() {
ADD_SIGNAL(MethodInfo("body_exited", PropertyInfo(Variant::OBJECT, "body")));
ADD_SIGNAL(MethodInfo("sleeping_state_changed"));
- BIND_CONSTANT(MODE_STATIC);
- BIND_CONSTANT(MODE_KINEMATIC);
- BIND_CONSTANT(MODE_RIGID);
- BIND_CONSTANT(MODE_CHARACTER);
-
- BIND_CONSTANT(CCD_MODE_DISABLED);
- BIND_CONSTANT(CCD_MODE_CAST_RAY);
- BIND_CONSTANT(CCD_MODE_CAST_SHAPE);
+ BIND_ENUM_CONSTANT(MODE_STATIC);
+ BIND_ENUM_CONSTANT(MODE_KINEMATIC);
+ BIND_ENUM_CONSTANT(MODE_RIGID);
+ BIND_ENUM_CONSTANT(MODE_CHARACTER);
+
+ BIND_ENUM_CONSTANT(CCD_MODE_DISABLED);
+ BIND_ENUM_CONSTANT(CCD_MODE_CAST_RAY);
+ BIND_ENUM_CONSTANT(CCD_MODE_CAST_SHAPE);
}
RigidBody2D::RigidBody2D()
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp
index 68b026b1b3..5d246e331f 100644
--- a/scene/2d/tile_map.cpp
+++ b/scene/2d/tile_map.cpp
@@ -1315,15 +1315,18 @@ void TileMap::_bind_methods() {
ADD_SIGNAL(MethodInfo("settings_changed"));
BIND_CONSTANT(INVALID_CELL);
- BIND_CONSTANT(MODE_SQUARE);
- BIND_CONSTANT(MODE_ISOMETRIC);
- BIND_CONSTANT(MODE_CUSTOM);
- BIND_CONSTANT(HALF_OFFSET_X);
- BIND_CONSTANT(HALF_OFFSET_Y);
- BIND_CONSTANT(HALF_OFFSET_DISABLED);
- BIND_CONSTANT(TILE_ORIGIN_TOP_LEFT);
- BIND_CONSTANT(TILE_ORIGIN_CENTER);
- BIND_CONSTANT(TILE_ORIGIN_BOTTOM_LEFT);
+
+ BIND_ENUM_CONSTANT(MODE_SQUARE);
+ BIND_ENUM_CONSTANT(MODE_ISOMETRIC);
+ BIND_ENUM_CONSTANT(MODE_CUSTOM);
+
+ BIND_ENUM_CONSTANT(HALF_OFFSET_X);
+ BIND_ENUM_CONSTANT(HALF_OFFSET_Y);
+ BIND_ENUM_CONSTANT(HALF_OFFSET_DISABLED);
+
+ BIND_ENUM_CONSTANT(TILE_ORIGIN_TOP_LEFT);
+ BIND_ENUM_CONSTANT(TILE_ORIGIN_CENTER);
+ BIND_ENUM_CONSTANT(TILE_ORIGIN_BOTTOM_LEFT);
}
TileMap::TileMap() {
diff --git a/scene/2d/visibility_notifier_2d.cpp b/scene/2d/visibility_notifier_2d.cpp
index fb71b61d45..cf478697eb 100644
--- a/scene/2d/visibility_notifier_2d.cpp
+++ b/scene/2d/visibility_notifier_2d.cpp
@@ -35,7 +35,6 @@
#include "scene/animation/animation_player.h"
#include "scene/main/viewport.h"
#include "scene/scene_string_names.h"
-#include "scene/scene_string_names.h"
void VisibilityNotifier2D::_enter_viewport(Viewport *p_viewport) {
@@ -341,13 +340,13 @@ void VisibilityEnabler2D::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "process_parent"), "set_enabler", "is_enabler_enabled", ENABLER_PARENT_PROCESS);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "fixed_process_parent"), "set_enabler", "is_enabler_enabled", ENABLER_PARENT_FIXED_PROCESS);
- BIND_CONSTANT(ENABLER_FREEZE_BODIES);
- BIND_CONSTANT(ENABLER_PAUSE_ANIMATIONS);
- BIND_CONSTANT(ENABLER_PAUSE_PARTICLES);
- BIND_CONSTANT(ENABLER_PAUSE_ANIMATED_SPRITES);
- BIND_CONSTANT(ENABLER_PARENT_PROCESS);
- BIND_CONSTANT(ENABLER_PARENT_FIXED_PROCESS);
- BIND_CONSTANT(ENABLER_MAX);
+ BIND_ENUM_CONSTANT(ENABLER_FREEZE_BODIES);
+ BIND_ENUM_CONSTANT(ENABLER_PAUSE_ANIMATIONS);
+ BIND_ENUM_CONSTANT(ENABLER_PAUSE_PARTICLES);
+ BIND_ENUM_CONSTANT(ENABLER_PAUSE_ANIMATED_SPRITES);
+ BIND_ENUM_CONSTANT(ENABLER_PARENT_PROCESS);
+ BIND_ENUM_CONSTANT(ENABLER_PARENT_FIXED_PROCESS);
+ BIND_ENUM_CONSTANT(ENABLER_MAX);
}
void VisibilityEnabler2D::set_enabler(Enabler p_enabler, bool p_enable) {
diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp
index 6abc2caac8..a1ab9fdf73 100644
--- a/scene/3d/audio_stream_player_3d.cpp
+++ b/scene/3d/audio_stream_player_3d.cpp
@@ -888,16 +888,16 @@ void AudioStreamPlayer3D::_bind_methods() {
ADD_GROUP("Doppler", "doppler_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "doppler_tracking", PROPERTY_HINT_ENUM, "Disabled,Idle,Fixed"), "set_doppler_tracking", "get_doppler_tracking");
- BIND_CONSTANT(ATTENUATION_INVERSE_DISTANCE);
- BIND_CONSTANT(ATTENUATION_INVERSE_SQUARE_DISTANCE);
- BIND_CONSTANT(ATTENUATION_LOGARITHMIC);
+ BIND_ENUM_CONSTANT(ATTENUATION_INVERSE_DISTANCE);
+ BIND_ENUM_CONSTANT(ATTENUATION_INVERSE_SQUARE_DISTANCE);
+ BIND_ENUM_CONSTANT(ATTENUATION_LOGARITHMIC);
- BIND_CONSTANT(OUT_OF_RANGE_MIX);
- BIND_CONSTANT(OUT_OF_RANGE_PAUSE);
+ BIND_ENUM_CONSTANT(OUT_OF_RANGE_MIX);
+ BIND_ENUM_CONSTANT(OUT_OF_RANGE_PAUSE);
- BIND_CONSTANT(DOPPLER_TRACKING_DISABLED);
- BIND_CONSTANT(DOPPLER_TRACKING_IDLE_STEP);
- BIND_CONSTANT(DOPPLER_TRACKING_FIXED_STEP);
+ BIND_ENUM_CONSTANT(DOPPLER_TRACKING_DISABLED);
+ BIND_ENUM_CONSTANT(DOPPLER_TRACKING_IDLE_STEP);
+ BIND_ENUM_CONSTANT(DOPPLER_TRACKING_FIXED_STEP);
}
AudioStreamPlayer3D::AudioStreamPlayer3D() {
diff --git a/scene/3d/camera.cpp b/scene/3d/camera.cpp
index 3c5eb21d38..9db7253fd6 100644
--- a/scene/3d/camera.cpp
+++ b/scene/3d/camera.cpp
@@ -564,15 +564,15 @@ void Camera::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_doppler_tracking"), &Camera::get_doppler_tracking);
//ClassDB::bind_method(D_METHOD("_camera_make_current"),&Camera::_camera_make_current );
- BIND_CONSTANT(PROJECTION_PERSPECTIVE);
- BIND_CONSTANT(PROJECTION_ORTHOGONAL);
+ BIND_ENUM_CONSTANT(PROJECTION_PERSPECTIVE);
+ BIND_ENUM_CONSTANT(PROJECTION_ORTHOGONAL);
- BIND_CONSTANT(KEEP_WIDTH);
- BIND_CONSTANT(KEEP_HEIGHT);
+ BIND_ENUM_CONSTANT(KEEP_WIDTH);
+ BIND_ENUM_CONSTANT(KEEP_HEIGHT);
- BIND_CONSTANT(DOPPLER_TRACKING_DISABLED)
- BIND_CONSTANT(DOPPLER_TRACKING_IDLE_STEP)
- BIND_CONSTANT(DOPPLER_TRACKING_FIXED_STEP)
+ BIND_ENUM_CONSTANT(DOPPLER_TRACKING_DISABLED)
+ BIND_ENUM_CONSTANT(DOPPLER_TRACKING_IDLE_STEP)
+ BIND_ENUM_CONSTANT(DOPPLER_TRACKING_FIXED_STEP)
}
float Camera::get_fov() const {
diff --git a/scene/3d/character_camera.cpp b/scene/3d/character_camera.cpp
index 065e21fccd..ce047f91c2 100644
--- a/scene/3d/character_camera.cpp
+++ b/scene/3d/character_camera.cpp
@@ -659,8 +659,8 @@ void CharacterCamera::_bind_methods() {
ClassDB::bind_method(D_METHOD("_ray_collision"),&CharacterCamera::_ray_collision);
- BIND_CONSTANT( CAMERA_FIXED );
- BIND_CONSTANT( CAMERA_FOLLOW );
+ BIND_ENUM_CONSTANT( CAMERA_FIXED );
+ BIND_ENUM_CONSTANT( CAMERA_FOLLOW );
}
void CharacterCamera::_ray_collision(Vector3 p_point, Vector3 p_normal, int p_subindex, ObjectID p_against,int p_idx) {
diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp
index 2174f924ac..460580d4fe 100644
--- a/scene/3d/gi_probe.cpp
+++ b/scene/3d/gi_probe.cpp
@@ -1488,10 +1488,10 @@ void GIProbe::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "compress"), "set_compress", "is_compressed");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "GIProbeData"), "set_probe_data", "get_probe_data");
- BIND_CONSTANT(SUBDIV_64);
- BIND_CONSTANT(SUBDIV_128);
- BIND_CONSTANT(SUBDIV_256);
- BIND_CONSTANT(SUBDIV_MAX);
+ BIND_ENUM_CONSTANT(SUBDIV_64);
+ BIND_ENUM_CONSTANT(SUBDIV_128);
+ BIND_ENUM_CONSTANT(SUBDIV_256);
+ BIND_ENUM_CONSTANT(SUBDIV_MAX);
}
GIProbe::GIProbe() {
diff --git a/scene/3d/light.cpp b/scene/3d/light.cpp
index 1304954cf3..9fdaa54d87 100644
--- a/scene/3d/light.cpp
+++ b/scene/3d/light.cpp
@@ -235,21 +235,21 @@ void Light::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "editor_only"), "set_editor_only", "is_editor_only");
ADD_GROUP("", "");
- BIND_CONSTANT(PARAM_ENERGY);
- BIND_CONSTANT(PARAM_SPECULAR);
- BIND_CONSTANT(PARAM_RANGE);
- BIND_CONSTANT(PARAM_ATTENUATION);
- BIND_CONSTANT(PARAM_SPOT_ANGLE);
- BIND_CONSTANT(PARAM_SPOT_ATTENUATION);
- BIND_CONSTANT(PARAM_CONTACT_SHADOW_SIZE);
- BIND_CONSTANT(PARAM_SHADOW_MAX_DISTANCE);
- BIND_CONSTANT(PARAM_SHADOW_SPLIT_1_OFFSET);
- BIND_CONSTANT(PARAM_SHADOW_SPLIT_2_OFFSET);
- BIND_CONSTANT(PARAM_SHADOW_SPLIT_3_OFFSET);
- BIND_CONSTANT(PARAM_SHADOW_NORMAL_BIAS);
- BIND_CONSTANT(PARAM_SHADOW_BIAS);
-
- BIND_CONSTANT(PARAM_MAX);
+ BIND_ENUM_CONSTANT(PARAM_ENERGY);
+ BIND_ENUM_CONSTANT(PARAM_SPECULAR);
+ BIND_ENUM_CONSTANT(PARAM_RANGE);
+ BIND_ENUM_CONSTANT(PARAM_ATTENUATION);
+ BIND_ENUM_CONSTANT(PARAM_SPOT_ANGLE);
+ BIND_ENUM_CONSTANT(PARAM_SPOT_ATTENUATION);
+ BIND_ENUM_CONSTANT(PARAM_CONTACT_SHADOW_SIZE);
+ BIND_ENUM_CONSTANT(PARAM_SHADOW_MAX_DISTANCE);
+ BIND_ENUM_CONSTANT(PARAM_SHADOW_SPLIT_1_OFFSET);
+ BIND_ENUM_CONSTANT(PARAM_SHADOW_SPLIT_2_OFFSET);
+ BIND_ENUM_CONSTANT(PARAM_SHADOW_SPLIT_3_OFFSET);
+ BIND_ENUM_CONSTANT(PARAM_SHADOW_NORMAL_BIAS);
+ BIND_ENUM_CONSTANT(PARAM_SHADOW_BIAS);
+
+ BIND_ENUM_CONSTANT(PARAM_MAX);
}
Light::Light(VisualServer::LightType p_type) {
@@ -334,9 +334,9 @@ void DirectionalLight::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "directional_shadow_blend_splits"), "set_blend_splits", "is_blend_splits_enabled");
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_normal_bias", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_param", "get_param", PARAM_SHADOW_NORMAL_BIAS);
- BIND_CONSTANT(SHADOW_ORTHOGONAL);
- BIND_CONSTANT(SHADOW_PARALLEL_2_SPLITS);
- BIND_CONSTANT(SHADOW_PARALLEL_4_SPLITS);
+ BIND_ENUM_CONSTANT(SHADOW_ORTHOGONAL);
+ BIND_ENUM_CONSTANT(SHADOW_PARALLEL_2_SPLITS);
+ BIND_ENUM_CONSTANT(SHADOW_PARALLEL_4_SPLITS);
}
DirectionalLight::DirectionalLight()
diff --git a/scene/3d/particles.cpp b/scene/3d/particles.cpp
index e88a52c76a..70f46e3a0a 100644
--- a/scene/3d/particles.cpp
+++ b/scene/3d/particles.cpp
@@ -347,9 +347,10 @@ void Particles::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "draw_pass_" + itos(i + 1), PROPERTY_HINT_RESOURCE_TYPE, "Mesh"), "set_draw_pass_mesh", "get_draw_pass_mesh", i);
}
- BIND_CONSTANT(DRAW_ORDER_INDEX);
- BIND_CONSTANT(DRAW_ORDER_LIFETIME);
- BIND_CONSTANT(DRAW_ORDER_VIEW_DEPTH);
+ BIND_ENUM_CONSTANT(DRAW_ORDER_INDEX);
+ BIND_ENUM_CONSTANT(DRAW_ORDER_LIFETIME);
+ BIND_ENUM_CONSTANT(DRAW_ORDER_VIEW_DEPTH);
+
BIND_CONSTANT(MAX_DRAW_PASSES);
}
@@ -1487,29 +1488,29 @@ void ParticlesMaterial::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "anim_offset_curve", PROPERTY_HINT_RESOURCE_TYPE, "CurveTexture"), "set_param_texture", "get_param_texture", PARAM_ANIM_OFFSET);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "anim_loop"), "set_flag", "get_flag", FLAG_ANIM_LOOP);
- BIND_CONSTANT(PARAM_INITIAL_LINEAR_VELOCITY);
- BIND_CONSTANT(PARAM_ANGULAR_VELOCITY);
- BIND_CONSTANT(PARAM_ORBIT_VELOCITY);
- BIND_CONSTANT(PARAM_LINEAR_ACCEL);
- BIND_CONSTANT(PARAM_RADIAL_ACCEL);
- BIND_CONSTANT(PARAM_TANGENTIAL_ACCEL);
- BIND_CONSTANT(PARAM_DAMPING);
- BIND_CONSTANT(PARAM_ANGLE);
- BIND_CONSTANT(PARAM_SCALE);
- BIND_CONSTANT(PARAM_HUE_VARIATION);
- BIND_CONSTANT(PARAM_ANIM_SPEED);
- BIND_CONSTANT(PARAM_ANIM_OFFSET);
- BIND_CONSTANT(PARAM_MAX);
-
- BIND_CONSTANT(FLAG_ALIGN_Y_TO_VELOCITY);
- BIND_CONSTANT(FLAG_ROTATE_Y);
- BIND_CONSTANT(FLAG_MAX);
-
- BIND_CONSTANT(EMISSION_SHAPE_POINT);
- BIND_CONSTANT(EMISSION_SHAPE_SPHERE);
- BIND_CONSTANT(EMISSION_SHAPE_BOX);
- BIND_CONSTANT(EMISSION_SHAPE_POINTS);
- BIND_CONSTANT(EMISSION_SHAPE_DIRECTED_POINTS);
+ BIND_ENUM_CONSTANT(PARAM_INITIAL_LINEAR_VELOCITY);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_VELOCITY);
+ BIND_ENUM_CONSTANT(PARAM_ORBIT_VELOCITY);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_ACCEL);
+ BIND_ENUM_CONSTANT(PARAM_RADIAL_ACCEL);
+ BIND_ENUM_CONSTANT(PARAM_TANGENTIAL_ACCEL);
+ BIND_ENUM_CONSTANT(PARAM_DAMPING);
+ BIND_ENUM_CONSTANT(PARAM_ANGLE);
+ BIND_ENUM_CONSTANT(PARAM_SCALE);
+ BIND_ENUM_CONSTANT(PARAM_HUE_VARIATION);
+ BIND_ENUM_CONSTANT(PARAM_ANIM_SPEED);
+ BIND_ENUM_CONSTANT(PARAM_ANIM_OFFSET);
+ BIND_ENUM_CONSTANT(PARAM_MAX);
+
+ BIND_ENUM_CONSTANT(FLAG_ALIGN_Y_TO_VELOCITY);
+ BIND_ENUM_CONSTANT(FLAG_ROTATE_Y);
+ BIND_ENUM_CONSTANT(FLAG_MAX);
+
+ BIND_ENUM_CONSTANT(EMISSION_SHAPE_POINT);
+ BIND_ENUM_CONSTANT(EMISSION_SHAPE_SPHERE);
+ BIND_ENUM_CONSTANT(EMISSION_SHAPE_BOX);
+ BIND_ENUM_CONSTANT(EMISSION_SHAPE_POINTS);
+ BIND_ENUM_CONSTANT(EMISSION_SHAPE_DIRECTED_POINTS);
}
ParticlesMaterial::ParticlesMaterial()
diff --git a/scene/3d/path.cpp b/scene/3d/path.cpp
index f8df21004e..08b82d6b47 100644
--- a/scene/3d/path.cpp
+++ b/scene/3d/path.cpp
@@ -281,10 +281,10 @@ void PathFollow::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_loop", "loop"), &PathFollow::set_loop);
ClassDB::bind_method(D_METHOD("has_loop"), &PathFollow::has_loop);
- BIND_CONSTANT(ROTATION_NONE);
- BIND_CONSTANT(ROTATION_Y);
- BIND_CONSTANT(ROTATION_XY);
- BIND_CONSTANT(ROTATION_XYZ);
+ BIND_ENUM_CONSTANT(ROTATION_NONE);
+ BIND_ENUM_CONSTANT(ROTATION_Y);
+ BIND_ENUM_CONSTANT(ROTATION_XY);
+ BIND_ENUM_CONSTANT(ROTATION_XYZ);
}
void PathFollow::set_offset(float p_offset) {
diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp
index dc8f72d77e..a4a51deb9c 100644
--- a/scene/3d/physics_body.cpp
+++ b/scene/3d/physics_body.cpp
@@ -868,10 +868,10 @@ void RigidBody::_bind_methods() {
ADD_SIGNAL(MethodInfo("body_exited", PropertyInfo(Variant::OBJECT, "body")));
ADD_SIGNAL(MethodInfo("sleeping_state_changed"));
- BIND_CONSTANT(MODE_STATIC);
- BIND_CONSTANT(MODE_KINEMATIC);
- BIND_CONSTANT(MODE_RIGID);
- BIND_CONSTANT(MODE_CHARACTER);
+ BIND_ENUM_CONSTANT(MODE_STATIC);
+ BIND_ENUM_CONSTANT(MODE_KINEMATIC);
+ BIND_ENUM_CONSTANT(MODE_RIGID);
+ BIND_ENUM_CONSTANT(MODE_CHARACTER);
}
RigidBody::RigidBody()
diff --git a/scene/3d/physics_joint.cpp b/scene/3d/physics_joint.cpp
index 61d496935b..55007c6dc6 100644
--- a/scene/3d/physics_joint.cpp
+++ b/scene/3d/physics_joint.cpp
@@ -188,9 +188,9 @@ void PinJoint::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "params/damping", PROPERTY_HINT_RANGE, "0.01,8.0,0.01"), "set_param", "get_param", PARAM_DAMPING);
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "params/impulse_clamp", PROPERTY_HINT_RANGE, "0.0,64.0,0.01"), "set_param", "get_param", PARAM_IMPULSE_CLAMP);
- BIND_CONSTANT(PARAM_BIAS);
- BIND_CONSTANT(PARAM_DAMPING);
- BIND_CONSTANT(PARAM_IMPULSE_CLAMP);
+ BIND_ENUM_CONSTANT(PARAM_BIAS);
+ BIND_ENUM_CONSTANT(PARAM_DAMPING);
+ BIND_ENUM_CONSTANT(PARAM_IMPULSE_CLAMP);
}
void PinJoint::set_param(Param p_param, float p_value) {
@@ -282,19 +282,19 @@ void HingeJoint::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "motor/target_velocity", PROPERTY_HINT_RANGE, "0.01,4096,0.01"), "set_param", "get_param", PARAM_MOTOR_TARGET_VELOCITY);
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "motor/max_impulse", PROPERTY_HINT_RANGE, "0.01,1024,0.01"), "set_param", "get_param", PARAM_MOTOR_MAX_IMPULSE);
- BIND_CONSTANT(PARAM_BIAS);
- BIND_CONSTANT(PARAM_LIMIT_UPPER);
- BIND_CONSTANT(PARAM_LIMIT_LOWER);
- BIND_CONSTANT(PARAM_LIMIT_BIAS);
- BIND_CONSTANT(PARAM_LIMIT_SOFTNESS);
- BIND_CONSTANT(PARAM_LIMIT_RELAXATION);
- BIND_CONSTANT(PARAM_MOTOR_TARGET_VELOCITY);
- BIND_CONSTANT(PARAM_MOTOR_MAX_IMPULSE);
- BIND_CONSTANT(PARAM_MAX);
+ BIND_ENUM_CONSTANT(PARAM_BIAS);
+ BIND_ENUM_CONSTANT(PARAM_LIMIT_UPPER);
+ BIND_ENUM_CONSTANT(PARAM_LIMIT_LOWER);
+ BIND_ENUM_CONSTANT(PARAM_LIMIT_BIAS);
+ BIND_ENUM_CONSTANT(PARAM_LIMIT_SOFTNESS);
+ BIND_ENUM_CONSTANT(PARAM_LIMIT_RELAXATION);
+ BIND_ENUM_CONSTANT(PARAM_MOTOR_TARGET_VELOCITY);
+ BIND_ENUM_CONSTANT(PARAM_MOTOR_MAX_IMPULSE);
+ BIND_ENUM_CONSTANT(PARAM_MAX);
- BIND_CONSTANT(FLAG_USE_LIMIT);
- BIND_CONSTANT(FLAG_ENABLE_MOTOR);
- BIND_CONSTANT(FLAG_MAX);
+ BIND_ENUM_CONSTANT(FLAG_USE_LIMIT);
+ BIND_ENUM_CONSTANT(FLAG_ENABLE_MOTOR);
+ BIND_ENUM_CONSTANT(FLAG_MAX);
}
void HingeJoint::set_param(Param p_param, float p_value) {
@@ -428,31 +428,31 @@ void SliderJoint::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_ortho/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_ORTHOGONAL_RESTITUTION);
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_ortho/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_ORTHOGONAL_DAMPING);
- BIND_CONSTANT(PARAM_LINEAR_LIMIT_UPPER);
- BIND_CONSTANT(PARAM_LINEAR_LIMIT_LOWER);
- BIND_CONSTANT(PARAM_LINEAR_LIMIT_SOFTNESS);
- BIND_CONSTANT(PARAM_LINEAR_LIMIT_RESTITUTION);
- BIND_CONSTANT(PARAM_LINEAR_LIMIT_DAMPING);
- BIND_CONSTANT(PARAM_LINEAR_MOTION_SOFTNESS);
- BIND_CONSTANT(PARAM_LINEAR_MOTION_RESTITUTION);
- BIND_CONSTANT(PARAM_LINEAR_MOTION_DAMPING);
- BIND_CONSTANT(PARAM_LINEAR_ORTHOGONAL_SOFTNESS);
- BIND_CONSTANT(PARAM_LINEAR_ORTHOGONAL_RESTITUTION);
- BIND_CONSTANT(PARAM_LINEAR_ORTHOGONAL_DAMPING);
-
- BIND_CONSTANT(PARAM_ANGULAR_LIMIT_UPPER);
- BIND_CONSTANT(PARAM_ANGULAR_LIMIT_LOWER);
- BIND_CONSTANT(PARAM_ANGULAR_LIMIT_SOFTNESS);
- BIND_CONSTANT(PARAM_ANGULAR_LIMIT_RESTITUTION);
- BIND_CONSTANT(PARAM_ANGULAR_LIMIT_DAMPING);
- BIND_CONSTANT(PARAM_ANGULAR_MOTION_SOFTNESS);
- BIND_CONSTANT(PARAM_ANGULAR_MOTION_RESTITUTION);
- BIND_CONSTANT(PARAM_ANGULAR_MOTION_DAMPING);
- BIND_CONSTANT(PARAM_ANGULAR_ORTHOGONAL_SOFTNESS);
- BIND_CONSTANT(PARAM_ANGULAR_ORTHOGONAL_RESTITUTION);
- BIND_CONSTANT(PARAM_ANGULAR_ORTHOGONAL_DAMPING);
-
- BIND_CONSTANT(PARAM_MAX);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_LIMIT_UPPER);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_LIMIT_LOWER);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_LIMIT_SOFTNESS);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_LIMIT_RESTITUTION);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_LIMIT_DAMPING);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_MOTION_SOFTNESS);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_MOTION_RESTITUTION);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_MOTION_DAMPING);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_ORTHOGONAL_SOFTNESS);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_ORTHOGONAL_RESTITUTION);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_ORTHOGONAL_DAMPING);
+
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_LIMIT_UPPER);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_LIMIT_LOWER);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_LIMIT_SOFTNESS);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_LIMIT_RESTITUTION);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_LIMIT_DAMPING);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_MOTION_SOFTNESS);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_MOTION_RESTITUTION);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_MOTION_DAMPING);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_ORTHOGONAL_SOFTNESS);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_ORTHOGONAL_RESTITUTION);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_ORTHOGONAL_DAMPING);
+
+ BIND_ENUM_CONSTANT(PARAM_MAX);
}
void SliderJoint::set_param(Param p_param, float p_value) {
@@ -560,12 +560,12 @@ void ConeTwistJoint::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_SOFTNESS);
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "relaxation", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_RELAXATION);
- BIND_CONSTANT(PARAM_SWING_SPAN);
- BIND_CONSTANT(PARAM_TWIST_SPAN);
- BIND_CONSTANT(PARAM_BIAS);
- BIND_CONSTANT(PARAM_SOFTNESS);
- BIND_CONSTANT(PARAM_RELAXATION);
- BIND_CONSTANT(PARAM_MAX);
+ BIND_ENUM_CONSTANT(PARAM_SWING_SPAN);
+ BIND_ENUM_CONSTANT(PARAM_TWIST_SPAN);
+ BIND_ENUM_CONSTANT(PARAM_BIAS);
+ BIND_ENUM_CONSTANT(PARAM_SOFTNESS);
+ BIND_ENUM_CONSTANT(PARAM_RELAXATION);
+ BIND_ENUM_CONSTANT(PARAM_MAX);
}
void ConeTwistJoint::set_param(Param p_param, float p_value) {
@@ -773,26 +773,26 @@ void Generic6DOFJoint::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_motor_z/target_velocity"), "set_param_z", "get_param_z", PARAM_ANGULAR_MOTOR_TARGET_VELOCITY);
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_motor_z/force_limit"), "set_param_z", "get_param_z", PARAM_ANGULAR_MOTOR_FORCE_LIMIT);
- BIND_CONSTANT(PARAM_LINEAR_LOWER_LIMIT);
- BIND_CONSTANT(PARAM_LINEAR_UPPER_LIMIT);
- BIND_CONSTANT(PARAM_LINEAR_LIMIT_SOFTNESS);
- BIND_CONSTANT(PARAM_LINEAR_RESTITUTION);
- BIND_CONSTANT(PARAM_LINEAR_DAMPING);
- BIND_CONSTANT(PARAM_ANGULAR_LOWER_LIMIT);
- BIND_CONSTANT(PARAM_ANGULAR_UPPER_LIMIT);
- BIND_CONSTANT(PARAM_ANGULAR_LIMIT_SOFTNESS);
- BIND_CONSTANT(PARAM_ANGULAR_DAMPING);
- BIND_CONSTANT(PARAM_ANGULAR_RESTITUTION);
- BIND_CONSTANT(PARAM_ANGULAR_FORCE_LIMIT);
- BIND_CONSTANT(PARAM_ANGULAR_ERP);
- BIND_CONSTANT(PARAM_ANGULAR_MOTOR_TARGET_VELOCITY);
- BIND_CONSTANT(PARAM_ANGULAR_MOTOR_FORCE_LIMIT);
- BIND_CONSTANT(PARAM_MAX);
-
- BIND_CONSTANT(FLAG_ENABLE_LINEAR_LIMIT);
- BIND_CONSTANT(FLAG_ENABLE_ANGULAR_LIMIT);
- BIND_CONSTANT(FLAG_ENABLE_MOTOR);
- BIND_CONSTANT(FLAG_MAX);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_LOWER_LIMIT);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_UPPER_LIMIT);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_LIMIT_SOFTNESS);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_RESTITUTION);
+ BIND_ENUM_CONSTANT(PARAM_LINEAR_DAMPING);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_LOWER_LIMIT);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_UPPER_LIMIT);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_LIMIT_SOFTNESS);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_DAMPING);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_RESTITUTION);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_FORCE_LIMIT);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_ERP);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_MOTOR_TARGET_VELOCITY);
+ BIND_ENUM_CONSTANT(PARAM_ANGULAR_MOTOR_FORCE_LIMIT);
+ BIND_ENUM_CONSTANT(PARAM_MAX);
+
+ BIND_ENUM_CONSTANT(FLAG_ENABLE_LINEAR_LIMIT);
+ BIND_ENUM_CONSTANT(FLAG_ENABLE_ANGULAR_LIMIT);
+ BIND_ENUM_CONSTANT(FLAG_ENABLE_MOTOR);
+ BIND_ENUM_CONSTANT(FLAG_MAX);
}
void Generic6DOFJoint::set_param_x(Param p_param, float p_value) {
diff --git a/scene/3d/reflection_probe.cpp b/scene/3d/reflection_probe.cpp
index 0dc5b58e45..194146b6b3 100644
--- a/scene/3d/reflection_probe.cpp
+++ b/scene/3d/reflection_probe.cpp
@@ -252,8 +252,8 @@ void ReflectionProbe::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL, "interior_ambient_energy", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_interior_ambient_energy", "get_interior_ambient_energy");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "interior_ambient_contrib", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_interior_ambient_probe_contribution", "get_interior_ambient_probe_contribution");
- BIND_CONSTANT(UPDATE_ONCE);
- BIND_CONSTANT(UPDATE_ALWAYS);
+ BIND_ENUM_CONSTANT(UPDATE_ONCE);
+ BIND_ENUM_CONSTANT(UPDATE_ALWAYS);
}
ReflectionProbe::ReflectionProbe() {
diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp
index 978662f7dc..e45cb6d5b9 100644
--- a/scene/3d/sprite_3d.cpp
+++ b/scene/3d/sprite_3d.cpp
@@ -276,14 +276,14 @@ void SpriteBase3D::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "double_sided"), "set_draw_flag", "get_draw_flag", FLAG_DOUBLE_SIDED);
ADD_PROPERTY(PropertyInfo(Variant::INT, "alpha_cut", PROPERTY_HINT_ENUM, "Disabled,Discard,Opaque Pre-Pass"), "set_alpha_cut_mode", "get_alpha_cut_mode");
- BIND_CONSTANT(FLAG_TRANSPARENT);
- BIND_CONSTANT(FLAG_SHADED);
- BIND_CONSTANT(FLAG_DOUBLE_SIDED);
- BIND_CONSTANT(FLAG_MAX);
-
- BIND_CONSTANT(ALPHA_CUT_DISABLED);
- BIND_CONSTANT(ALPHA_CUT_DISCARD);
- BIND_CONSTANT(ALPHA_CUT_OPAQUE_PREPASS);
+ BIND_ENUM_CONSTANT(FLAG_TRANSPARENT);
+ BIND_ENUM_CONSTANT(FLAG_SHADED);
+ BIND_ENUM_CONSTANT(FLAG_DOUBLE_SIDED);
+ BIND_ENUM_CONSTANT(FLAG_MAX);
+
+ BIND_ENUM_CONSTANT(ALPHA_CUT_DISABLED);
+ BIND_ENUM_CONSTANT(ALPHA_CUT_DISCARD);
+ BIND_ENUM_CONSTANT(ALPHA_CUT_OPAQUE_PREPASS);
}
SpriteBase3D::SpriteBase3D() {
diff --git a/scene/3d/visibility_notifier.cpp b/scene/3d/visibility_notifier.cpp
index cc81a4cb56..f2a4f8688d 100644
--- a/scene/3d/visibility_notifier.cpp
+++ b/scene/3d/visibility_notifier.cpp
@@ -33,7 +33,6 @@
#include "scene/3d/physics_body.h"
#include "scene/animation/animation_player.h"
#include "scene/scene_string_names.h"
-#include "scene/scene_string_names.h"
void VisibilityNotifier::_enter_camera(Camera *p_camera) {
@@ -252,9 +251,9 @@ void VisibilityEnabler::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "pause_animations"), "set_enabler", "is_enabler_enabled", ENABLER_PAUSE_ANIMATIONS);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "freeze_bodies"), "set_enabler", "is_enabler_enabled", ENABLER_FREEZE_BODIES);
- BIND_CONSTANT(ENABLER_FREEZE_BODIES);
- BIND_CONSTANT(ENABLER_PAUSE_ANIMATIONS);
- BIND_CONSTANT(ENABLER_MAX);
+ BIND_ENUM_CONSTANT(ENABLER_FREEZE_BODIES);
+ BIND_ENUM_CONSTANT(ENABLER_PAUSE_ANIMATIONS);
+ BIND_ENUM_CONSTANT(ENABLER_MAX);
}
void VisibilityEnabler::set_enabler(Enabler p_enabler, bool p_enable) {
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index e2a0636466..642f8be6a4 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -1277,8 +1277,8 @@ void AnimationPlayer::_bind_methods() {
ADD_SIGNAL(MethodInfo("animation_changed", PropertyInfo(Variant::STRING, "old_name"), PropertyInfo(Variant::STRING, "new_name")));
ADD_SIGNAL(MethodInfo("animation_started", PropertyInfo(Variant::STRING, "name")));
- BIND_CONSTANT(ANIMATION_PROCESS_FIXED);
- BIND_CONSTANT(ANIMATION_PROCESS_IDLE);
+ BIND_ENUM_CONSTANT(ANIMATION_PROCESS_FIXED);
+ BIND_ENUM_CONSTANT(ANIMATION_PROCESS_IDLE);
}
AnimationPlayer::AnimationPlayer() {
diff --git a/scene/animation/animation_tree_player.cpp b/scene/animation/animation_tree_player.cpp
index c12e97c4a5..fd8b33e666 100644
--- a/scene/animation/animation_tree_player.cpp
+++ b/scene/animation/animation_tree_player.cpp
@@ -1797,16 +1797,16 @@ void AnimationTreePlayer::_bind_methods() {
ADD_GROUP("Playback", "playback_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "playback_process_mode", PROPERTY_HINT_ENUM, "Fixed,Idle"), "set_animation_process_mode", "get_animation_process_mode");
- BIND_CONSTANT(NODE_OUTPUT);
- BIND_CONSTANT(NODE_ANIMATION);
- BIND_CONSTANT(NODE_ONESHOT);
- BIND_CONSTANT(NODE_MIX);
- BIND_CONSTANT(NODE_BLEND2);
- BIND_CONSTANT(NODE_BLEND3);
- BIND_CONSTANT(NODE_BLEND4);
- BIND_CONSTANT(NODE_TIMESCALE);
- BIND_CONSTANT(NODE_TIMESEEK);
- BIND_CONSTANT(NODE_TRANSITION);
+ BIND_ENUM_CONSTANT(NODE_OUTPUT);
+ BIND_ENUM_CONSTANT(NODE_ANIMATION);
+ BIND_ENUM_CONSTANT(NODE_ONESHOT);
+ BIND_ENUM_CONSTANT(NODE_MIX);
+ BIND_ENUM_CONSTANT(NODE_BLEND2);
+ BIND_ENUM_CONSTANT(NODE_BLEND3);
+ BIND_ENUM_CONSTANT(NODE_BLEND4);
+ BIND_ENUM_CONSTANT(NODE_TIMESCALE);
+ BIND_ENUM_CONSTANT(NODE_TIMESEEK);
+ BIND_ENUM_CONSTANT(NODE_TRANSITION);
}
AnimationTreePlayer::AnimationTreePlayer() {
diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp
index 78d3357bb4..45994ba050 100644
--- a/scene/animation/tween.cpp
+++ b/scene/animation/tween.cpp
@@ -224,25 +224,25 @@ void Tween::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "playback_process_mode", PROPERTY_HINT_ENUM, "Fixed,Idle"), "set_tween_process_mode", "get_tween_process_mode");
- BIND_CONSTANT(TWEEN_PROCESS_FIXED);
- BIND_CONSTANT(TWEEN_PROCESS_IDLE);
-
- BIND_CONSTANT(TRANS_LINEAR);
- BIND_CONSTANT(TRANS_SINE);
- BIND_CONSTANT(TRANS_QUINT);
- BIND_CONSTANT(TRANS_QUART);
- BIND_CONSTANT(TRANS_QUAD);
- BIND_CONSTANT(TRANS_EXPO);
- BIND_CONSTANT(TRANS_ELASTIC);
- BIND_CONSTANT(TRANS_CUBIC);
- BIND_CONSTANT(TRANS_CIRC);
- BIND_CONSTANT(TRANS_BOUNCE);
- BIND_CONSTANT(TRANS_BACK);
-
- BIND_CONSTANT(EASE_IN);
- BIND_CONSTANT(EASE_OUT);
- BIND_CONSTANT(EASE_IN_OUT);
- BIND_CONSTANT(EASE_OUT_IN);
+ BIND_ENUM_CONSTANT(TWEEN_PROCESS_FIXED);
+ BIND_ENUM_CONSTANT(TWEEN_PROCESS_IDLE);
+
+ BIND_ENUM_CONSTANT(TRANS_LINEAR);
+ BIND_ENUM_CONSTANT(TRANS_SINE);
+ BIND_ENUM_CONSTANT(TRANS_QUINT);
+ BIND_ENUM_CONSTANT(TRANS_QUART);
+ BIND_ENUM_CONSTANT(TRANS_QUAD);
+ BIND_ENUM_CONSTANT(TRANS_EXPO);
+ BIND_ENUM_CONSTANT(TRANS_ELASTIC);
+ BIND_ENUM_CONSTANT(TRANS_CUBIC);
+ BIND_ENUM_CONSTANT(TRANS_CIRC);
+ BIND_ENUM_CONSTANT(TRANS_BOUNCE);
+ BIND_ENUM_CONSTANT(TRANS_BACK);
+
+ BIND_ENUM_CONSTANT(EASE_IN);
+ BIND_ENUM_CONSTANT(EASE_OUT);
+ BIND_ENUM_CONSTANT(EASE_IN_OUT);
+ BIND_ENUM_CONSTANT(EASE_OUT_IN);
}
Variant &Tween::_get_initial_val(InterpolateData &p_data) {
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp
index 9c20decef0..9054063a4b 100644
--- a/scene/gui/base_button.cpp
+++ b/scene/gui/base_button.cpp
@@ -514,13 +514,13 @@ void BaseButton::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "shortcut", PROPERTY_HINT_RESOURCE_TYPE, "ShortCut"), "set_shortcut", "get_shortcut");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "group", PROPERTY_HINT_RESOURCE_TYPE, "ButtonGroup"), "set_button_group", "get_button_group");
- BIND_CONSTANT(DRAW_NORMAL);
- BIND_CONSTANT(DRAW_PRESSED);
- BIND_CONSTANT(DRAW_HOVER);
- BIND_CONSTANT(DRAW_DISABLED);
+ BIND_ENUM_CONSTANT(DRAW_NORMAL);
+ BIND_ENUM_CONSTANT(DRAW_PRESSED);
+ BIND_ENUM_CONSTANT(DRAW_HOVER);
+ BIND_ENUM_CONSTANT(DRAW_DISABLED);
- BIND_CONSTANT(ACTION_MODE_BUTTON_PRESS);
- BIND_CONSTANT(ACTION_MODE_BUTTON_RELEASE);
+ BIND_ENUM_CONSTANT(ACTION_MODE_BUTTON_PRESS);
+ BIND_ENUM_CONSTANT(ACTION_MODE_BUTTON_RELEASE);
}
BaseButton::BaseButton() {
diff --git a/scene/gui/box_container.cpp b/scene/gui/box_container.cpp
index 16b2cfa083..2cc4be96a7 100644
--- a/scene/gui/box_container.cpp
+++ b/scene/gui/box_container.cpp
@@ -295,9 +295,9 @@ void BoxContainer::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_alignment"), &BoxContainer::get_alignment);
ClassDB::bind_method(D_METHOD("set_alignment", "alignment"), &BoxContainer::set_alignment);
- BIND_CONSTANT(ALIGN_BEGIN);
- BIND_CONSTANT(ALIGN_CENTER);
- BIND_CONSTANT(ALIGN_END);
+ BIND_ENUM_CONSTANT(ALIGN_BEGIN);
+ BIND_ENUM_CONSTANT(ALIGN_CENTER);
+ BIND_ENUM_CONSTANT(ALIGN_END);
ADD_PROPERTY(PropertyInfo(Variant::INT, "alignment", PROPERTY_HINT_ENUM, "Begin,Center,End"), "set_alignment", "get_alignment");
}
diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp
index 5036e4f7f6..c8838f3eca 100644
--- a/scene/gui/button.cpp
+++ b/scene/gui/button.cpp
@@ -245,9 +245,9 @@ void Button::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_text_align"), &Button::get_text_align);
ClassDB::bind_method(D_METHOD("is_flat"), &Button::is_flat);
- BIND_CONSTANT(ALIGN_LEFT);
- BIND_CONSTANT(ALIGN_CENTER);
- BIND_CONSTANT(ALIGN_RIGHT);
+ BIND_ENUM_CONSTANT(ALIGN_LEFT);
+ BIND_ENUM_CONSTANT(ALIGN_CENTER);
+ BIND_ENUM_CONSTANT(ALIGN_RIGHT);
ADD_PROPERTYNZ(PropertyInfo(Variant::STRING, "text", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT_INTL), "set_text", "get_text");
ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT, "icon", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_button_icon", "get_button_icon");
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index c97426ad42..08ff12f878 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -2634,9 +2634,9 @@ void Control::_bind_methods() {
ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT, "theme", PROPERTY_HINT_RESOURCE_TYPE, "Theme"), "set_theme", "get_theme");
ADD_GROUP("", "");
- BIND_CONSTANT(FOCUS_NONE);
- BIND_CONSTANT(FOCUS_CLICK);
- BIND_CONSTANT(FOCUS_ALL);
+ BIND_ENUM_CONSTANT(FOCUS_NONE);
+ BIND_ENUM_CONSTANT(FOCUS_CLICK);
+ BIND_ENUM_CONSTANT(FOCUS_ALL);
BIND_CONSTANT(NOTIFICATION_RESIZED);
BIND_CONSTANT(NOTIFICATION_MOUSE_ENTER);
@@ -2646,56 +2646,56 @@ void Control::_bind_methods() {
BIND_CONSTANT(NOTIFICATION_THEME_CHANGED);
BIND_CONSTANT(NOTIFICATION_MODAL_CLOSE);
- BIND_CONSTANT(CURSOR_ARROW);
- BIND_CONSTANT(CURSOR_IBEAM);
- BIND_CONSTANT(CURSOR_POINTING_HAND);
- BIND_CONSTANT(CURSOR_CROSS);
- BIND_CONSTANT(CURSOR_WAIT);
- BIND_CONSTANT(CURSOR_BUSY);
- BIND_CONSTANT(CURSOR_DRAG);
- BIND_CONSTANT(CURSOR_CAN_DROP);
- BIND_CONSTANT(CURSOR_FORBIDDEN);
- BIND_CONSTANT(CURSOR_VSIZE);
- BIND_CONSTANT(CURSOR_HSIZE);
- BIND_CONSTANT(CURSOR_BDIAGSIZE);
- BIND_CONSTANT(CURSOR_FDIAGSIZE);
- BIND_CONSTANT(CURSOR_MOVE);
- BIND_CONSTANT(CURSOR_VSPLIT);
- BIND_CONSTANT(CURSOR_HSPLIT);
- BIND_CONSTANT(CURSOR_HELP);
-
- BIND_CONSTANT(PRESET_TOP_LEFT);
- BIND_CONSTANT(PRESET_TOP_RIGHT);
- BIND_CONSTANT(PRESET_BOTTOM_LEFT);
- BIND_CONSTANT(PRESET_BOTTOM_RIGHT);
- BIND_CONSTANT(PRESET_CENTER_LEFT);
- BIND_CONSTANT(PRESET_CENTER_TOP);
- BIND_CONSTANT(PRESET_CENTER_RIGHT);
- BIND_CONSTANT(PRESET_CENTER_BOTTOM);
- BIND_CONSTANT(PRESET_CENTER);
- BIND_CONSTANT(PRESET_LEFT_WIDE);
- BIND_CONSTANT(PRESET_TOP_WIDE);
- BIND_CONSTANT(PRESET_RIGHT_WIDE);
- BIND_CONSTANT(PRESET_BOTTOM_WIDE);
- BIND_CONSTANT(PRESET_VCENTER_WIDE);
- BIND_CONSTANT(PRESET_HCENTER_WIDE);
- BIND_CONSTANT(PRESET_WIDE);
-
- BIND_CONSTANT(SIZE_EXPAND);
- BIND_CONSTANT(SIZE_FILL);
- BIND_CONSTANT(SIZE_EXPAND_FILL);
- BIND_CONSTANT(SIZE_SHRINK_CENTER);
- BIND_CONSTANT(SIZE_SHRINK_END);
-
- BIND_CONSTANT(MOUSE_FILTER_STOP);
- BIND_CONSTANT(MOUSE_FILTER_PASS);
- BIND_CONSTANT(MOUSE_FILTER_IGNORE);
-
- BIND_CONSTANT(GROW_DIRECTION_BEGIN);
- BIND_CONSTANT(GROW_DIRECTION_END);
-
- BIND_CONSTANT(ANCHOR_BEGIN);
- BIND_CONSTANT(ANCHOR_END);
+ BIND_ENUM_CONSTANT(CURSOR_ARROW);
+ BIND_ENUM_CONSTANT(CURSOR_IBEAM);
+ BIND_ENUM_CONSTANT(CURSOR_POINTING_HAND);
+ BIND_ENUM_CONSTANT(CURSOR_CROSS);
+ BIND_ENUM_CONSTANT(CURSOR_WAIT);
+ BIND_ENUM_CONSTANT(CURSOR_BUSY);
+ BIND_ENUM_CONSTANT(CURSOR_DRAG);
+ BIND_ENUM_CONSTANT(CURSOR_CAN_DROP);
+ BIND_ENUM_CONSTANT(CURSOR_FORBIDDEN);
+ BIND_ENUM_CONSTANT(CURSOR_VSIZE);
+ BIND_ENUM_CONSTANT(CURSOR_HSIZE);
+ BIND_ENUM_CONSTANT(CURSOR_BDIAGSIZE);
+ BIND_ENUM_CONSTANT(CURSOR_FDIAGSIZE);
+ BIND_ENUM_CONSTANT(CURSOR_MOVE);
+ BIND_ENUM_CONSTANT(CURSOR_VSPLIT);
+ BIND_ENUM_CONSTANT(CURSOR_HSPLIT);
+ BIND_ENUM_CONSTANT(CURSOR_HELP);
+
+ BIND_ENUM_CONSTANT(PRESET_TOP_LEFT);
+ BIND_ENUM_CONSTANT(PRESET_TOP_RIGHT);
+ BIND_ENUM_CONSTANT(PRESET_BOTTOM_LEFT);
+ BIND_ENUM_CONSTANT(PRESET_BOTTOM_RIGHT);
+ BIND_ENUM_CONSTANT(PRESET_CENTER_LEFT);
+ BIND_ENUM_CONSTANT(PRESET_CENTER_TOP);
+ BIND_ENUM_CONSTANT(PRESET_CENTER_RIGHT);
+ BIND_ENUM_CONSTANT(PRESET_CENTER_BOTTOM);
+ BIND_ENUM_CONSTANT(PRESET_CENTER);
+ BIND_ENUM_CONSTANT(PRESET_LEFT_WIDE);
+ BIND_ENUM_CONSTANT(PRESET_TOP_WIDE);
+ BIND_ENUM_CONSTANT(PRESET_RIGHT_WIDE);
+ BIND_ENUM_CONSTANT(PRESET_BOTTOM_WIDE);
+ BIND_ENUM_CONSTANT(PRESET_VCENTER_WIDE);
+ BIND_ENUM_CONSTANT(PRESET_HCENTER_WIDE);
+ BIND_ENUM_CONSTANT(PRESET_WIDE);
+
+ BIND_ENUM_CONSTANT(SIZE_EXPAND);
+ BIND_ENUM_CONSTANT(SIZE_FILL);
+ BIND_ENUM_CONSTANT(SIZE_EXPAND_FILL);
+ BIND_ENUM_CONSTANT(SIZE_SHRINK_CENTER);
+ BIND_ENUM_CONSTANT(SIZE_SHRINK_END);
+
+ BIND_ENUM_CONSTANT(MOUSE_FILTER_STOP);
+ BIND_ENUM_CONSTANT(MOUSE_FILTER_PASS);
+ BIND_ENUM_CONSTANT(MOUSE_FILTER_IGNORE);
+
+ BIND_ENUM_CONSTANT(GROW_DIRECTION_BEGIN);
+ BIND_ENUM_CONSTANT(GROW_DIRECTION_END);
+
+ BIND_ENUM_CONSTANT(ANCHOR_BEGIN);
+ BIND_ENUM_CONSTANT(ANCHOR_END);
ADD_SIGNAL(MethodInfo("resized"));
ADD_SIGNAL(MethodInfo("gui_input", PropertyInfo(Variant::OBJECT, "ev", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index b3530c2971..0b898c4d2e 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -718,16 +718,15 @@ void FileDialog::_bind_methods() {
ADD_SIGNAL(MethodInfo("files_selected", PropertyInfo(Variant::POOL_STRING_ARRAY, "paths")));
ADD_SIGNAL(MethodInfo("dir_selected", PropertyInfo(Variant::STRING, "dir")));
- BIND_CONSTANT(MODE_OPEN_FILE);
- BIND_CONSTANT(MODE_OPEN_FILES);
- BIND_CONSTANT(MODE_OPEN_DIR);
- BIND_CONSTANT(MODE_OPEN_ANY);
-
- BIND_CONSTANT(MODE_SAVE_FILE);
-
- BIND_CONSTANT(ACCESS_RESOURCES);
- BIND_CONSTANT(ACCESS_USERDATA);
- BIND_CONSTANT(ACCESS_FILESYSTEM);
+ BIND_ENUM_CONSTANT(MODE_OPEN_FILE);
+ BIND_ENUM_CONSTANT(MODE_OPEN_FILES);
+ BIND_ENUM_CONSTANT(MODE_OPEN_DIR);
+ BIND_ENUM_CONSTANT(MODE_OPEN_ANY);
+ BIND_ENUM_CONSTANT(MODE_SAVE_FILE);
+
+ BIND_ENUM_CONSTANT(ACCESS_RESOURCES);
+ BIND_ENUM_CONSTANT(ACCESS_USERDATA);
+ BIND_ENUM_CONSTANT(ACCESS_FILESYSTEM);
ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Open one,Open many,Open folder,Open any,Save"), "set_mode", "get_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "access", PROPERTY_HINT_ENUM, "Resources,User data,File system"), "set_access", "get_access");
diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp
index b9062295b5..4b4ecc5e98 100644
--- a/scene/gui/graph_node.cpp
+++ b/scene/gui/graph_node.cpp
@@ -710,9 +710,9 @@ void GraphNode::_bind_methods() {
ADD_SIGNAL(MethodInfo("close_request"));
ADD_SIGNAL(MethodInfo("resize_request", PropertyInfo(Variant::VECTOR2, "new_minsize")));
- BIND_CONSTANT(OVERLAY_DISABLED);
- BIND_CONSTANT(OVERLAY_BREAKPOINT);
- BIND_CONSTANT(OVERLAY_POSITION);
+ BIND_ENUM_CONSTANT(OVERLAY_DISABLED);
+ BIND_ENUM_CONSTANT(OVERLAY_BREAKPOINT);
+ BIND_ENUM_CONSTANT(OVERLAY_POSITION);
}
GraphNode::GraphNode() {
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index b30a6000ff..c7889a6cf2 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -1374,10 +1374,11 @@ void ItemList::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "icon_mode", PROPERTY_HINT_ENUM, "Top,Left"), "set_icon_mode", "get_icon_mode");
ADD_PROPERTYNO(PropertyInfo(Variant::REAL, "icon_scale"), "set_icon_scale", "get_icon_scale");
- BIND_CONSTANT(ICON_MODE_TOP);
- BIND_CONSTANT(ICON_MODE_LEFT);
- BIND_CONSTANT(SELECT_SINGLE);
- BIND_CONSTANT(SELECT_MULTI);
+ BIND_ENUM_CONSTANT(ICON_MODE_TOP);
+ BIND_ENUM_CONSTANT(ICON_MODE_LEFT);
+
+ BIND_ENUM_CONSTANT(SELECT_SINGLE);
+ BIND_ENUM_CONSTANT(SELECT_MULTI);
ADD_SIGNAL(MethodInfo("item_selected", PropertyInfo(Variant::INT, "index")));
ADD_SIGNAL(MethodInfo("item_rmb_selected", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::VECTOR2, "atpos")));
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp
index 84074f96a8..cf7303cbe7 100644
--- a/scene/gui/label.cpp
+++ b/scene/gui/label.cpp
@@ -644,15 +644,15 @@ void Label::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_max_lines_visible", "lines_visible"), &Label::set_max_lines_visible);
ClassDB::bind_method(D_METHOD("get_max_lines_visible"), &Label::get_max_lines_visible);
- BIND_CONSTANT(ALIGN_LEFT);
- BIND_CONSTANT(ALIGN_CENTER);
- BIND_CONSTANT(ALIGN_RIGHT);
- BIND_CONSTANT(ALIGN_FILL);
-
- BIND_CONSTANT(VALIGN_TOP);
- BIND_CONSTANT(VALIGN_CENTER);
- BIND_CONSTANT(VALIGN_BOTTOM);
- BIND_CONSTANT(VALIGN_FILL);
+ BIND_ENUM_CONSTANT(ALIGN_LEFT);
+ BIND_ENUM_CONSTANT(ALIGN_CENTER);
+ BIND_ENUM_CONSTANT(ALIGN_RIGHT);
+ BIND_ENUM_CONSTANT(ALIGN_FILL);
+
+ BIND_ENUM_CONSTANT(VALIGN_TOP);
+ BIND_ENUM_CONSTANT(VALIGN_CENTER);
+ BIND_ENUM_CONSTANT(VALIGN_BOTTOM);
+ BIND_ENUM_CONSTANT(VALIGN_FILL);
ADD_PROPERTYNZ(PropertyInfo(Variant::STRING, "text", PROPERTY_HINT_MULTILINE_TEXT, "", PROPERTY_USAGE_DEFAULT_INTL), "set_text", "get_text");
ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "align", PROPERTY_HINT_ENUM, "Left,Center,Right,Fill"), "set_align", "get_align");
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index e91f8add31..24c1f73667 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -1352,18 +1352,18 @@ void LineEdit::_bind_methods() {
ADD_SIGNAL(MethodInfo("text_changed", PropertyInfo(Variant::STRING, "text")));
ADD_SIGNAL(MethodInfo("text_entered", PropertyInfo(Variant::STRING, "text")));
- BIND_CONSTANT(ALIGN_LEFT);
- BIND_CONSTANT(ALIGN_CENTER);
- BIND_CONSTANT(ALIGN_RIGHT);
- BIND_CONSTANT(ALIGN_FILL);
-
- BIND_CONSTANT(MENU_CUT);
- BIND_CONSTANT(MENU_COPY);
- BIND_CONSTANT(MENU_PASTE);
- BIND_CONSTANT(MENU_CLEAR);
- BIND_CONSTANT(MENU_SELECT_ALL);
- BIND_CONSTANT(MENU_UNDO);
- BIND_CONSTANT(MENU_MAX);
+ BIND_ENUM_CONSTANT(ALIGN_LEFT);
+ BIND_ENUM_CONSTANT(ALIGN_CENTER);
+ BIND_ENUM_CONSTANT(ALIGN_RIGHT);
+ BIND_ENUM_CONSTANT(ALIGN_FILL);
+
+ BIND_ENUM_CONSTANT(MENU_CUT);
+ BIND_ENUM_CONSTANT(MENU_COPY);
+ BIND_ENUM_CONSTANT(MENU_PASTE);
+ BIND_ENUM_CONSTANT(MENU_CLEAR);
+ BIND_ENUM_CONSTANT(MENU_SELECT_ALL);
+ BIND_ENUM_CONSTANT(MENU_UNDO);
+ BIND_ENUM_CONSTANT(MENU_MAX);
ADD_PROPERTYNZ(PropertyInfo(Variant::STRING, "text"), "set_text", "get_text");
ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "align", PROPERTY_HINT_ENUM, "Left,Center,Right,Fill"), "set_align", "get_align");
diff --git a/scene/gui/line_edit.h b/scene/gui/line_edit.h
index fb0eaa9446..7d04e4618b 100644
--- a/scene/gui/line_edit.h
+++ b/scene/gui/line_edit.h
@@ -186,5 +186,6 @@ public:
};
VARIANT_ENUM_CAST(LineEdit::Align);
+VARIANT_ENUM_CAST(LineEdit::MenuItems);
#endif
diff --git a/scene/gui/link_button.cpp b/scene/gui/link_button.cpp
index 9cb67b75e2..632e9ec4fc 100644
--- a/scene/gui/link_button.cpp
+++ b/scene/gui/link_button.cpp
@@ -130,9 +130,9 @@ void LinkButton::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_underline_mode", "underline_mode"), &LinkButton::set_underline_mode);
ClassDB::bind_method(D_METHOD("get_underline_mode"), &LinkButton::get_underline_mode);
- BIND_CONSTANT(UNDERLINE_MODE_ALWAYS);
- BIND_CONSTANT(UNDERLINE_MODE_ON_HOVER);
- BIND_CONSTANT(UNDERLINE_MODE_NEVER);
+ BIND_ENUM_CONSTANT(UNDERLINE_MODE_ALWAYS);
+ BIND_ENUM_CONSTANT(UNDERLINE_MODE_ON_HOVER);
+ BIND_ENUM_CONSTANT(UNDERLINE_MODE_NEVER);
ADD_PROPERTYNZ(PropertyInfo(Variant::STRING, "text"), "set_text", "get_text");
ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "underline", PROPERTY_HINT_ENUM, "Always,On Hover,Never"), "set_underline_mode", "get_underline_mode");
diff --git a/scene/gui/patch_9_rect.cpp b/scene/gui/patch_9_rect.cpp
index 249090830d..71cbef495c 100644
--- a/scene/gui/patch_9_rect.cpp
+++ b/scene/gui/patch_9_rect.cpp
@@ -82,9 +82,9 @@ void NinePatchRect::_bind_methods() {
ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "axis_stretch_horizontal", PROPERTY_HINT_ENUM, "Stretch,Tile,Tile Fit"), "set_h_axis_stretch_mode", "get_h_axis_stretch_mode");
ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "axis_stretch_vertical", PROPERTY_HINT_ENUM, "Stretch,Tile,Tile Fit"), "set_v_axis_stretch_mode", "get_v_axis_stretch_mode");
- 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);
}
void NinePatchRect::set_texture(const Ref<Texture> &p_tex) {
diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp
index b21139f969..ebf18bad41 100644
--- a/scene/gui/popup.cpp
+++ b/scene/gui/popup.cpp
@@ -247,6 +247,7 @@ void Popup::_bind_methods() {
ADD_SIGNAL(MethodInfo("popup_hide"));
ADD_GROUP("Popup", "popup_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "popup_exclusive"), "set_exclusive", "is_exclusive");
+
BIND_CONSTANT(NOTIFICATION_POST_POPUP);
BIND_CONSTANT(NOTIFICATION_POPUP_HIDE);
}
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index 42084ade25..f0efbdc517 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -1915,26 +1915,26 @@ void RichTextLabel::_bind_methods() {
ADD_SIGNAL(MethodInfo("meta_clicked", PropertyInfo(Variant::NIL, "meta")));
- BIND_CONSTANT(ALIGN_LEFT);
- BIND_CONSTANT(ALIGN_CENTER);
- BIND_CONSTANT(ALIGN_RIGHT);
- BIND_CONSTANT(ALIGN_FILL);
-
- BIND_CONSTANT(LIST_NUMBERS);
- BIND_CONSTANT(LIST_LETTERS);
- BIND_CONSTANT(LIST_DOTS);
-
- BIND_CONSTANT(ITEM_FRAME);
- BIND_CONSTANT(ITEM_TEXT);
- BIND_CONSTANT(ITEM_IMAGE);
- BIND_CONSTANT(ITEM_NEWLINE);
- BIND_CONSTANT(ITEM_FONT);
- BIND_CONSTANT(ITEM_COLOR);
- BIND_CONSTANT(ITEM_UNDERLINE);
- BIND_CONSTANT(ITEM_ALIGN);
- BIND_CONSTANT(ITEM_INDENT);
- BIND_CONSTANT(ITEM_LIST);
- BIND_CONSTANT(ITEM_META);
+ BIND_ENUM_CONSTANT(ALIGN_LEFT);
+ BIND_ENUM_CONSTANT(ALIGN_CENTER);
+ BIND_ENUM_CONSTANT(ALIGN_RIGHT);
+ BIND_ENUM_CONSTANT(ALIGN_FILL);
+
+ BIND_ENUM_CONSTANT(LIST_NUMBERS);
+ BIND_ENUM_CONSTANT(LIST_LETTERS);
+ BIND_ENUM_CONSTANT(LIST_DOTS);
+
+ BIND_ENUM_CONSTANT(ITEM_FRAME);
+ BIND_ENUM_CONSTANT(ITEM_TEXT);
+ BIND_ENUM_CONSTANT(ITEM_IMAGE);
+ BIND_ENUM_CONSTANT(ITEM_NEWLINE);
+ BIND_ENUM_CONSTANT(ITEM_FONT);
+ BIND_ENUM_CONSTANT(ITEM_COLOR);
+ BIND_ENUM_CONSTANT(ITEM_UNDERLINE);
+ BIND_ENUM_CONSTANT(ITEM_ALIGN);
+ BIND_ENUM_CONSTANT(ITEM_INDENT);
+ BIND_ENUM_CONSTANT(ITEM_LIST);
+ BIND_ENUM_CONSTANT(ITEM_META);
}
void RichTextLabel::set_visible_characters(int p_visible) {
diff --git a/scene/gui/split_container.cpp b/scene/gui/split_container.cpp
index e3dad08809..5fc3db4672 100644
--- a/scene/gui/split_container.cpp
+++ b/scene/gui/split_container.cpp
@@ -410,9 +410,9 @@ void SplitContainer::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "collapsed"), "set_collapsed", "is_collapsed");
ADD_PROPERTY(PropertyInfo(Variant::INT, "dragger_visibility", PROPERTY_HINT_ENUM, "Visible,Hidden,Hidden & Collapsed"), "set_dragger_visibility", "get_dragger_visibility");
- BIND_CONSTANT(DRAGGER_VISIBLE);
- BIND_CONSTANT(DRAGGER_HIDDEN);
- BIND_CONSTANT(DRAGGER_HIDDEN_COLLAPSED);
+ BIND_ENUM_CONSTANT(DRAGGER_VISIBLE);
+ BIND_ENUM_CONSTANT(DRAGGER_HIDDEN);
+ BIND_ENUM_CONSTANT(DRAGGER_HIDDEN_COLLAPSED);
}
SplitContainer::SplitContainer(bool p_vertical) {
diff --git a/scene/gui/tabs.cpp b/scene/gui/tabs.cpp
index acffbbc499..b0dc88bbb4 100644
--- a/scene/gui/tabs.cpp
+++ b/scene/gui/tabs.cpp
@@ -815,15 +815,15 @@ void Tabs::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "current_tab", PROPERTY_HINT_RANGE, "-1,4096,1", PROPERTY_USAGE_EDITOR), "set_current_tab", "get_current_tab");
ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "tab_close_display_policy", PROPERTY_HINT_ENUM, "Show Never,Show Active Only,Show Always"), "set_tab_close_display_policy", "get_tab_close_display_policy");
- BIND_CONSTANT(ALIGN_LEFT);
- BIND_CONSTANT(ALIGN_CENTER);
- BIND_CONSTANT(ALIGN_RIGHT);
- BIND_CONSTANT(ALIGN_MAX);
-
- BIND_CONSTANT(CLOSE_BUTTON_SHOW_ACTIVE_ONLY);
- BIND_CONSTANT(CLOSE_BUTTON_SHOW_ALWAYS);
- BIND_CONSTANT(CLOSE_BUTTON_SHOW_NEVER);
- BIND_CONSTANT(CLOSE_BUTTON_MAX);
+ BIND_ENUM_CONSTANT(ALIGN_LEFT);
+ BIND_ENUM_CONSTANT(ALIGN_CENTER);
+ BIND_ENUM_CONSTANT(ALIGN_RIGHT);
+ BIND_ENUM_CONSTANT(ALIGN_MAX);
+
+ BIND_ENUM_CONSTANT(CLOSE_BUTTON_SHOW_ACTIVE_ONLY);
+ BIND_ENUM_CONSTANT(CLOSE_BUTTON_SHOW_ALWAYS);
+ BIND_ENUM_CONSTANT(CLOSE_BUTTON_SHOW_NEVER);
+ BIND_ENUM_CONSTANT(CLOSE_BUTTON_MAX);
}
Tabs::Tabs() {
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index f99cbbad89..1ae347c79b 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -4704,9 +4704,9 @@ void TextEdit::_bind_methods() {
ClassDB::bind_method(D_METHOD("_click_selection_held"), &TextEdit::_click_selection_held);
ClassDB::bind_method(D_METHOD("_toggle_draw_caret"), &TextEdit::_toggle_draw_caret);
- BIND_CONSTANT(SEARCH_MATCH_CASE);
- BIND_CONSTANT(SEARCH_WHOLE_WORDS);
- BIND_CONSTANT(SEARCH_BACKWARDS);
+ BIND_ENUM_CONSTANT(SEARCH_MATCH_CASE);
+ BIND_ENUM_CONSTANT(SEARCH_WHOLE_WORDS);
+ BIND_ENUM_CONSTANT(SEARCH_BACKWARDS);
/*
ClassDB::bind_method(D_METHOD("delete_char"),&TextEdit::delete_char);
@@ -4789,13 +4789,13 @@ void TextEdit::_bind_methods() {
ADD_SIGNAL(MethodInfo("breakpoint_toggled", PropertyInfo(Variant::INT, "row")));
ADD_SIGNAL(MethodInfo("symbol_lookup", PropertyInfo(Variant::STRING, "symbol"), PropertyInfo(Variant::INT, "row"), PropertyInfo(Variant::INT, "column")));
- BIND_CONSTANT(MENU_CUT);
- BIND_CONSTANT(MENU_COPY);
- BIND_CONSTANT(MENU_PASTE);
- BIND_CONSTANT(MENU_CLEAR);
- BIND_CONSTANT(MENU_SELECT_ALL);
- BIND_CONSTANT(MENU_UNDO);
- BIND_CONSTANT(MENU_MAX);
+ BIND_ENUM_CONSTANT(MENU_CUT);
+ BIND_ENUM_CONSTANT(MENU_COPY);
+ BIND_ENUM_CONSTANT(MENU_PASTE);
+ BIND_ENUM_CONSTANT(MENU_CLEAR);
+ BIND_ENUM_CONSTANT(MENU_SELECT_ALL);
+ BIND_ENUM_CONSTANT(MENU_UNDO);
+ BIND_ENUM_CONSTANT(MENU_MAX);
GLOBAL_DEF("gui/timers/text_edit_idle_detect_sec", 3);
}
diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h
index c4e0700531..96d6625bc4 100644
--- a/scene/gui/text_edit.h
+++ b/scene/gui/text_edit.h
@@ -535,4 +535,7 @@ public:
~TextEdit();
};
+VARIANT_ENUM_CAST(TextEdit::MenuItems);
+VARIANT_ENUM_CAST(TextEdit::SearchFlags);
+
#endif // TEXT_EDIT_H
diff --git a/scene/gui/texture_button.cpp b/scene/gui/texture_button.cpp
index 7abf8380ce..d307b463d9 100644
--- a/scene/gui/texture_button.cpp
+++ b/scene/gui/texture_button.cpp
@@ -208,13 +208,13 @@ void TextureButton::_bind_methods() {
ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "expand", PROPERTY_HINT_RESOURCE_TYPE, "bool"), "set_expand", "get_expand");
ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "stretch_mode", PROPERTY_HINT_ENUM, "Scale,Tile,Keep,Keep Centered,Keep Aspect,Keep Aspect Centered,Keep Aspect Covered"), "set_stretch_mode", "get_stretch_mode");
- BIND_CONSTANT(STRETCH_SCALE);
- BIND_CONSTANT(STRETCH_TILE);
- BIND_CONSTANT(STRETCH_KEEP);
- BIND_CONSTANT(STRETCH_KEEP_CENTERED);
- BIND_CONSTANT(STRETCH_KEEP_ASPECT);
- BIND_CONSTANT(STRETCH_KEEP_ASPECT_CENTERED);
- BIND_CONSTANT(STRETCH_KEEP_ASPECT_COVERED);
+ BIND_ENUM_CONSTANT(STRETCH_SCALE);
+ BIND_ENUM_CONSTANT(STRETCH_TILE);
+ BIND_ENUM_CONSTANT(STRETCH_KEEP);
+ BIND_ENUM_CONSTANT(STRETCH_KEEP_CENTERED);
+ BIND_ENUM_CONSTANT(STRETCH_KEEP_ASPECT);
+ BIND_ENUM_CONSTANT(STRETCH_KEEP_ASPECT_CENTERED);
+ BIND_ENUM_CONSTANT(STRETCH_KEEP_ASPECT_COVERED);
}
void TextureButton::set_normal_texture(const Ref<Texture> &p_normal) {
diff --git a/scene/gui/texture_progress.cpp b/scene/gui/texture_progress.cpp
index 081c7ddb73..b45c783919 100644
--- a/scene/gui/texture_progress.cpp
+++ b/scene/gui/texture_progress.cpp
@@ -273,12 +273,12 @@ void TextureProgress::_bind_methods() {
ADD_PROPERTYNZ(PropertyInfo(Variant::REAL, "radial_fill_degrees", PROPERTY_HINT_RANGE, "0.0,360.0,0.1,slider"), "set_fill_degrees", "get_fill_degrees");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "radial_center_offset"), "set_radial_center_offset", "get_radial_center_offset");
- BIND_CONSTANT(FILL_LEFT_TO_RIGHT);
- BIND_CONSTANT(FILL_RIGHT_TO_LEFT);
- BIND_CONSTANT(FILL_TOP_TO_BOTTOM);
- BIND_CONSTANT(FILL_BOTTOM_TO_TOP);
- BIND_CONSTANT(FILL_CLOCKWISE);
- BIND_CONSTANT(FILL_COUNTER_CLOCKWISE);
+ BIND_ENUM_CONSTANT(FILL_LEFT_TO_RIGHT);
+ BIND_ENUM_CONSTANT(FILL_RIGHT_TO_LEFT);
+ BIND_ENUM_CONSTANT(FILL_TOP_TO_BOTTOM);
+ BIND_ENUM_CONSTANT(FILL_BOTTOM_TO_TOP);
+ BIND_ENUM_CONSTANT(FILL_CLOCKWISE);
+ BIND_ENUM_CONSTANT(FILL_COUNTER_CLOCKWISE);
}
TextureProgress::TextureProgress() {
diff --git a/scene/gui/texture_progress.h b/scene/gui/texture_progress.h
index c0c2779cf9..3c018febf3 100644
--- a/scene/gui/texture_progress.h
+++ b/scene/gui/texture_progress.h
@@ -89,4 +89,6 @@ private:
Point2 get_relative_center();
};
+VARIANT_ENUM_CAST(TextureProgress::FillMode);
+
#endif // TEXTURE_PROGRESS_H
diff --git a/scene/gui/texture_rect.cpp b/scene/gui/texture_rect.cpp
index 92a3db6a74..db340fd4d7 100644
--- a/scene/gui/texture_rect.cpp
+++ b/scene/gui/texture_rect.cpp
@@ -112,14 +112,14 @@ void TextureRect::_bind_methods() {
ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "expand"), "set_expand", "has_expand");
ADD_PROPERTYNO(PropertyInfo(Variant::INT, "stretch_mode", PROPERTY_HINT_ENUM, "Scale On Expand (Compat),Scale,Tile,Keep,Keep Centered,Keep Aspect,Keep Aspect Centered,Keep Aspect Covered"), "set_stretch_mode", "get_stretch_mode");
- BIND_CONSTANT(STRETCH_SCALE_ON_EXPAND);
- BIND_CONSTANT(STRETCH_SCALE);
- BIND_CONSTANT(STRETCH_TILE);
- BIND_CONSTANT(STRETCH_KEEP);
- BIND_CONSTANT(STRETCH_KEEP_CENTERED);
- BIND_CONSTANT(STRETCH_KEEP_ASPECT);
- BIND_CONSTANT(STRETCH_KEEP_ASPECT_CENTERED);
- BIND_CONSTANT(STRETCH_KEEP_ASPECT_COVERED);
+ BIND_ENUM_CONSTANT(STRETCH_SCALE_ON_EXPAND);
+ BIND_ENUM_CONSTANT(STRETCH_SCALE);
+ BIND_ENUM_CONSTANT(STRETCH_TILE);
+ BIND_ENUM_CONSTANT(STRETCH_KEEP);
+ BIND_ENUM_CONSTANT(STRETCH_KEEP_CENTERED);
+ BIND_ENUM_CONSTANT(STRETCH_KEEP_ASPECT);
+ BIND_ENUM_CONSTANT(STRETCH_KEEP_ASPECT_CENTERED);
+ BIND_ENUM_CONSTANT(STRETCH_KEEP_ASPECT_COVERED);
}
void TextureRect::set_texture(const Ref<Texture> &p_tex) {
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 3e8d8aed8a..f819574e93 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -752,12 +752,12 @@ void TreeItem::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_disable_folding", "disable"), &TreeItem::set_disable_folding);
ClassDB::bind_method(D_METHOD("is_folding_disabled"), &TreeItem::is_folding_disabled);
- BIND_CONSTANT(CELL_MODE_STRING);
- BIND_CONSTANT(CELL_MODE_CHECK);
- BIND_CONSTANT(CELL_MODE_RANGE);
- BIND_CONSTANT(CELL_MODE_RANGE_EXPRESSION);
- BIND_CONSTANT(CELL_MODE_ICON);
- BIND_CONSTANT(CELL_MODE_CUSTOM);
+ BIND_ENUM_CONSTANT(CELL_MODE_STRING);
+ BIND_ENUM_CONSTANT(CELL_MODE_CHECK);
+ BIND_ENUM_CONSTANT(CELL_MODE_RANGE);
+ BIND_ENUM_CONSTANT(CELL_MODE_RANGE_EXPRESSION);
+ BIND_ENUM_CONSTANT(CELL_MODE_ICON);
+ BIND_ENUM_CONSTANT(CELL_MODE_CUSTOM);
}
void TreeItem::clear_children() {
@@ -3658,13 +3658,13 @@ void Tree::_bind_methods() {
ADD_SIGNAL(MethodInfo("item_activated"));
ADD_SIGNAL(MethodInfo("column_title_pressed", PropertyInfo(Variant::INT, "column")));
- BIND_CONSTANT(SELECT_SINGLE);
- BIND_CONSTANT(SELECT_ROW);
- BIND_CONSTANT(SELECT_MULTI);
+ BIND_ENUM_CONSTANT(SELECT_SINGLE);
+ BIND_ENUM_CONSTANT(SELECT_ROW);
+ BIND_ENUM_CONSTANT(SELECT_MULTI);
- BIND_CONSTANT(DROP_MODE_DISABLED);
- BIND_CONSTANT(DROP_MODE_ON_ITEM);
- BIND_CONSTANT(DROP_MODE_INBETWEEN);
+ BIND_ENUM_CONSTANT(DROP_MODE_DISABLED);
+ BIND_ENUM_CONSTANT(DROP_MODE_ON_ITEM);
+ BIND_ENUM_CONSTANT(DROP_MODE_INBETWEEN);
}
Tree::Tree() {
diff --git a/scene/gui/tree.h b/scene/gui/tree.h
index 1e46956cd9..49a410f115 100644
--- a/scene/gui/tree.h
+++ b/scene/gui/tree.h
@@ -583,4 +583,5 @@ public:
};
VARIANT_ENUM_CAST(Tree::SelectMode);
+VARIANT_ENUM_CAST(Tree::DropModeFlags);
#endif
diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp
index a9b2dba186..e57cd857f8 100644
--- a/scene/main/http_request.cpp
+++ b/scene/main/http_request.cpp
@@ -547,19 +547,19 @@ void HTTPRequest::_bind_methods() {
ADD_SIGNAL(MethodInfo("request_completed", PropertyInfo(Variant::INT, "result"), PropertyInfo(Variant::INT, "response_code"), PropertyInfo(Variant::POOL_STRING_ARRAY, "headers"), PropertyInfo(Variant::POOL_BYTE_ARRAY, "body")));
- BIND_CONSTANT(RESULT_SUCCESS);
- //BIND_CONSTANT( RESULT_NO_BODY );
- BIND_CONSTANT(RESULT_CHUNKED_BODY_SIZE_MISMATCH);
- BIND_CONSTANT(RESULT_CANT_CONNECT);
- BIND_CONSTANT(RESULT_CANT_RESOLVE);
- BIND_CONSTANT(RESULT_CONNECTION_ERROR);
- BIND_CONSTANT(RESULT_SSL_HANDSHAKE_ERROR);
- BIND_CONSTANT(RESULT_NO_RESPONSE);
- BIND_CONSTANT(RESULT_BODY_SIZE_LIMIT_EXCEEDED);
- BIND_CONSTANT(RESULT_REQUEST_FAILED);
- BIND_CONSTANT(RESULT_DOWNLOAD_FILE_CANT_OPEN);
- BIND_CONSTANT(RESULT_DOWNLOAD_FILE_WRITE_ERROR);
- BIND_CONSTANT(RESULT_REDIRECT_LIMIT_REACHED);
+ BIND_ENUM_CONSTANT(RESULT_SUCCESS);
+ //BIND_ENUM_CONSTANT( RESULT_NO_BODY );
+ BIND_ENUM_CONSTANT(RESULT_CHUNKED_BODY_SIZE_MISMATCH);
+ BIND_ENUM_CONSTANT(RESULT_CANT_CONNECT);
+ BIND_ENUM_CONSTANT(RESULT_CANT_RESOLVE);
+ BIND_ENUM_CONSTANT(RESULT_CONNECTION_ERROR);
+ BIND_ENUM_CONSTANT(RESULT_SSL_HANDSHAKE_ERROR);
+ BIND_ENUM_CONSTANT(RESULT_NO_RESPONSE);
+ BIND_ENUM_CONSTANT(RESULT_BODY_SIZE_LIMIT_EXCEEDED);
+ BIND_ENUM_CONSTANT(RESULT_REQUEST_FAILED);
+ BIND_ENUM_CONSTANT(RESULT_DOWNLOAD_FILE_CANT_OPEN);
+ BIND_ENUM_CONSTANT(RESULT_DOWNLOAD_FILE_WRITE_ERROR);
+ BIND_ENUM_CONSTANT(RESULT_REDIRECT_LIMIT_REACHED);
}
HTTPRequest::HTTPRequest() {
diff --git a/scene/main/http_request.h b/scene/main/http_request.h
index 6099d4e9bf..104f529eae 100644
--- a/scene/main/http_request.h
+++ b/scene/main/http_request.h
@@ -137,4 +137,6 @@ public:
~HTTPRequest();
};
+VARIANT_ENUM_CAST(HTTPRequest::Result);
+
#endif // HTTPREQUEST_H
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 0474c6fd26..bb99aac166 100755
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -2858,20 +2858,20 @@ void Node::_bind_methods() {
BIND_CONSTANT(NOTIFICATION_INTERNAL_PROCESS);
BIND_CONSTANT(NOTIFICATION_INTERNAL_FIXED_PROCESS);
- BIND_CONSTANT(RPC_MODE_DISABLED);
- BIND_CONSTANT(RPC_MODE_REMOTE);
- BIND_CONSTANT(RPC_MODE_SYNC);
- BIND_CONSTANT(RPC_MODE_MASTER);
- BIND_CONSTANT(RPC_MODE_SLAVE);
-
- BIND_CONSTANT(PAUSE_MODE_INHERIT);
- BIND_CONSTANT(PAUSE_MODE_STOP);
- BIND_CONSTANT(PAUSE_MODE_PROCESS);
-
- BIND_CONSTANT(DUPLICATE_SIGNALS);
- BIND_CONSTANT(DUPLICATE_GROUPS);
- BIND_CONSTANT(DUPLICATE_SCRIPTS);
- BIND_CONSTANT(DUPLICATE_USE_INSTANCING);
+ BIND_ENUM_CONSTANT(RPC_MODE_DISABLED);
+ BIND_ENUM_CONSTANT(RPC_MODE_REMOTE);
+ BIND_ENUM_CONSTANT(RPC_MODE_SYNC);
+ BIND_ENUM_CONSTANT(RPC_MODE_MASTER);
+ BIND_ENUM_CONSTANT(RPC_MODE_SLAVE);
+
+ BIND_ENUM_CONSTANT(PAUSE_MODE_INHERIT);
+ BIND_ENUM_CONSTANT(PAUSE_MODE_STOP);
+ BIND_ENUM_CONSTANT(PAUSE_MODE_PROCESS);
+
+ BIND_ENUM_CONSTANT(DUPLICATE_SIGNALS);
+ BIND_ENUM_CONSTANT(DUPLICATE_GROUPS);
+ BIND_ENUM_CONSTANT(DUPLICATE_SCRIPTS);
+ BIND_ENUM_CONSTANT(DUPLICATE_USE_INSTANCING);
ADD_SIGNAL(MethodInfo("renamed"));
ADD_SIGNAL(MethodInfo("tree_entered"));
diff --git a/scene/main/node.h b/scene/main/node.h
index bb8d80a0c8..6b3ae4f034 100644
--- a/scene/main/node.h
+++ b/scene/main/node.h
@@ -412,6 +412,8 @@ public:
~Node();
};
+VARIANT_ENUM_CAST(Node::DuplicateFlags);
+
typedef Set<Node *, Node::Comparator> NodeSet;
#endif
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index 2e67a1feaf..f0c8a5aebc 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -2202,18 +2202,19 @@ void SceneTree::_bind_methods() {
ADD_SIGNAL(MethodInfo("connection_failed"));
ADD_SIGNAL(MethodInfo("server_disconnected"));
- BIND_CONSTANT(GROUP_CALL_DEFAULT);
- BIND_CONSTANT(GROUP_CALL_REVERSE);
- BIND_CONSTANT(GROUP_CALL_REALTIME);
- BIND_CONSTANT(GROUP_CALL_UNIQUE);
-
- BIND_CONSTANT(STRETCH_MODE_DISABLED);
- BIND_CONSTANT(STRETCH_MODE_2D);
- BIND_CONSTANT(STRETCH_MODE_VIEWPORT);
- BIND_CONSTANT(STRETCH_ASPECT_IGNORE);
- BIND_CONSTANT(STRETCH_ASPECT_KEEP);
- BIND_CONSTANT(STRETCH_ASPECT_KEEP_WIDTH);
- BIND_CONSTANT(STRETCH_ASPECT_KEEP_HEIGHT);
+ BIND_ENUM_CONSTANT(GROUP_CALL_DEFAULT);
+ BIND_ENUM_CONSTANT(GROUP_CALL_REVERSE);
+ BIND_ENUM_CONSTANT(GROUP_CALL_REALTIME);
+ BIND_ENUM_CONSTANT(GROUP_CALL_UNIQUE);
+
+ BIND_ENUM_CONSTANT(STRETCH_MODE_DISABLED);
+ BIND_ENUM_CONSTANT(STRETCH_MODE_2D);
+ BIND_ENUM_CONSTANT(STRETCH_MODE_VIEWPORT);
+
+ BIND_ENUM_CONSTANT(STRETCH_ASPECT_IGNORE);
+ BIND_ENUM_CONSTANT(STRETCH_ASPECT_KEEP);
+ BIND_ENUM_CONSTANT(STRETCH_ASPECT_KEEP_WIDTH);
+ BIND_ENUM_CONSTANT(STRETCH_ASPECT_KEEP_HEIGHT);
}
SceneTree *SceneTree::singleton = NULL;
diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h
index 3543ebee90..08d7c894c7 100644
--- a/scene/main/scene_tree.h
+++ b/scene/main/scene_tree.h
@@ -465,5 +465,6 @@ public:
VARIANT_ENUM_CAST(SceneTree::StretchMode);
VARIANT_ENUM_CAST(SceneTree::StretchAspect);
+VARIANT_ENUM_CAST(SceneTree::CallGroupFlags);
#endif
diff --git a/scene/main/timer.cpp b/scene/main/timer.cpp
index a61d1100e6..0eda2a9b40 100755
--- a/scene/main/timer.cpp
+++ b/scene/main/timer.cpp
@@ -202,8 +202,8 @@ void Timer::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "one_shot"), "set_one_shot", "is_one_shot");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autostart"), "set_autostart", "has_autostart");
- BIND_CONSTANT(TIMER_PROCESS_FIXED);
- BIND_CONSTANT(TIMER_PROCESS_IDLE);
+ BIND_ENUM_CONSTANT(TIMER_PROCESS_FIXED);
+ BIND_ENUM_CONSTANT(TIMER_PROCESS_IDLE);
}
Timer::Timer() {
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index a22d897669..47526c43a5 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -2772,38 +2772,38 @@ void Viewport::_bind_methods() {
ADD_SIGNAL(MethodInfo("size_changed"));
- BIND_CONSTANT(UPDATE_DISABLED);
- BIND_CONSTANT(UPDATE_ONCE);
- BIND_CONSTANT(UPDATE_WHEN_VISIBLE);
- BIND_CONSTANT(UPDATE_ALWAYS);
-
- BIND_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED);
- BIND_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_1);
- BIND_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_4);
- BIND_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_16);
- BIND_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_64);
- BIND_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_256);
- BIND_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_1024);
- BIND_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_MAX);
-
- BIND_CONSTANT(RENDER_INFO_OBJECTS_IN_FRAME);
- BIND_CONSTANT(RENDER_INFO_VERTICES_IN_FRAME);
- BIND_CONSTANT(RENDER_INFO_MATERIAL_CHANGES_IN_FRAME);
- BIND_CONSTANT(RENDER_INFO_SHADER_CHANGES_IN_FRAME);
- BIND_CONSTANT(RENDER_INFO_SURFACE_CHANGES_IN_FRAME);
- BIND_CONSTANT(RENDER_INFO_DRAW_CALLS_IN_FRAME);
- BIND_CONSTANT(RENDER_INFO_MAX);
-
- BIND_CONSTANT(DEBUG_DRAW_DISABLED);
- BIND_CONSTANT(DEBUG_DRAW_UNSHADED);
- BIND_CONSTANT(DEBUG_DRAW_OVERDRAW);
- BIND_CONSTANT(DEBUG_DRAW_WIREFRAME);
-
- BIND_CONSTANT(MSAA_DISABLED);
- BIND_CONSTANT(MSAA_2X);
- BIND_CONSTANT(MSAA_4X);
- BIND_CONSTANT(MSAA_8X);
- BIND_CONSTANT(MSAA_16X);
+ BIND_ENUM_CONSTANT(UPDATE_DISABLED);
+ BIND_ENUM_CONSTANT(UPDATE_ONCE);
+ BIND_ENUM_CONSTANT(UPDATE_WHEN_VISIBLE);
+ BIND_ENUM_CONSTANT(UPDATE_ALWAYS);
+
+ BIND_ENUM_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED);
+ BIND_ENUM_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_1);
+ BIND_ENUM_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_4);
+ BIND_ENUM_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_16);
+ BIND_ENUM_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_64);
+ BIND_ENUM_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_256);
+ BIND_ENUM_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_1024);
+ BIND_ENUM_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_MAX);
+
+ BIND_ENUM_CONSTANT(RENDER_INFO_OBJECTS_IN_FRAME);
+ BIND_ENUM_CONSTANT(RENDER_INFO_VERTICES_IN_FRAME);
+ BIND_ENUM_CONSTANT(RENDER_INFO_MATERIAL_CHANGES_IN_FRAME);
+ BIND_ENUM_CONSTANT(RENDER_INFO_SHADER_CHANGES_IN_FRAME);
+ BIND_ENUM_CONSTANT(RENDER_INFO_SURFACE_CHANGES_IN_FRAME);
+ BIND_ENUM_CONSTANT(RENDER_INFO_DRAW_CALLS_IN_FRAME);
+ BIND_ENUM_CONSTANT(RENDER_INFO_MAX);
+
+ BIND_ENUM_CONSTANT(DEBUG_DRAW_DISABLED);
+ BIND_ENUM_CONSTANT(DEBUG_DRAW_UNSHADED);
+ BIND_ENUM_CONSTANT(DEBUG_DRAW_OVERDRAW);
+ BIND_ENUM_CONSTANT(DEBUG_DRAW_WIREFRAME);
+
+ BIND_ENUM_CONSTANT(MSAA_DISABLED);
+ BIND_ENUM_CONSTANT(MSAA_2X);
+ BIND_ENUM_CONSTANT(MSAA_4X);
+ BIND_ENUM_CONSTANT(MSAA_8X);
+ BIND_ENUM_CONSTANT(MSAA_16X);
}
Viewport::Viewport() {
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 );
*/
///////////////////////////