summaryrefslogtreecommitdiff
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
parentf6c39830cb7cf0d664bdfa25642b333a1249b96f (diff)
ClassDB: Provide the enum name of integer constants
-rw-r--r--core/bind/core_bind.cpp120
-rw-r--r--core/bind/core_bind.h9
-rw-r--r--core/class_db.cpp83
-rw-r--r--core/class_db.h27
-rw-r--r--core/global_constants.cpp1011
-rw-r--r--core/global_constants.h3
-rw-r--r--core/image.cpp112
-rw-r--r--core/io/http_client.cpp140
-rw-r--r--core/io/http_client.h1
-rw-r--r--core/io/ip.cpp16
-rw-r--r--core/io/networked_multiplayer_peer.cpp12
-rw-r--r--core/io/stream_peer_ssl.cpp9
-rw-r--r--core/io/stream_peer_tcp.cpp8
-rw-r--r--core/io/xml_parser.cpp14
-rw-r--r--core/method_bind.h26
-rw-r--r--core/object.cpp6
-rw-r--r--core/os/input.cpp8
-rw-r--r--core/register_core_types.cpp4
-rw-r--r--core/simple_type.h74
-rw-r--r--core/type_info.h63
-rw-r--r--core/undo_redo.cpp6
-rw-r--r--editor/editor_export.cpp32
-rw-r--r--editor/editor_file_dialog.cpp18
-rw-r--r--editor/editor_plugin.cpp34
-rw-r--r--main/performance.cpp58
-rw-r--r--modules/enet/networked_multiplayer_enet.cpp10
-rw-r--r--modules/visual_script/visual_script_func_nodes.cpp21
-rw-r--r--modules/visual_script/visual_script_nodes.cpp6
-rw-r--r--modules/visual_script/visual_script_nodes.h2
-rw-r--r--modules/visual_script/visual_script_yield_nodes.cpp12
-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
-rw-r--r--servers/arvr/arvr_interface.cpp6
-rw-r--r--servers/arvr_server.cpp12
-rw-r--r--servers/physics_2d_server.cpp158
-rw-r--r--servers/physics_2d_server.h2
-rw-r--r--servers/physics_server.cpp259
-rw-r--r--servers/physics_server.h2
107 files changed, 2166 insertions, 2001 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index 273ef78669..e28fa16cfd 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -151,12 +151,12 @@ void _ResourceSaver::_bind_methods() {
ClassDB::bind_method(D_METHOD("save", "path", "resource", "flags"), &_ResourceSaver::save, DEFVAL(0));
ClassDB::bind_method(D_METHOD("get_recognized_extensions", "type"), &_ResourceSaver::get_recognized_extensions);
- BIND_CONSTANT(FLAG_RELATIVE_PATHS);
- BIND_CONSTANT(FLAG_BUNDLE_RESOURCES);
- BIND_CONSTANT(FLAG_CHANGE_PATH);
- BIND_CONSTANT(FLAG_OMIT_EDITOR_PROPERTIES);
- BIND_CONSTANT(FLAG_SAVE_BIG_ENDIAN);
- BIND_CONSTANT(FLAG_COMPRESS);
+ BIND_ENUM_CONSTANT(FLAG_RELATIVE_PATHS);
+ BIND_ENUM_CONSTANT(FLAG_BUNDLE_RESOURCES);
+ BIND_ENUM_CONSTANT(FLAG_CHANGE_PATH);
+ BIND_ENUM_CONSTANT(FLAG_OMIT_EDITOR_PROPERTIES);
+ BIND_ENUM_CONSTANT(FLAG_SAVE_BIG_ENDIAN);
+ BIND_ENUM_CONSTANT(FLAG_COMPRESS);
}
_ResourceSaver::_ResourceSaver() {
@@ -1104,49 +1104,49 @@ void _OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_power_seconds_left"), &_OS::get_power_seconds_left);
ClassDB::bind_method(D_METHOD("get_power_percent_left"), &_OS::get_power_percent_left);
- BIND_CONSTANT(DAY_SUNDAY);
- BIND_CONSTANT(DAY_MONDAY);
- BIND_CONSTANT(DAY_TUESDAY);
- BIND_CONSTANT(DAY_WEDNESDAY);
- BIND_CONSTANT(DAY_THURSDAY);
- BIND_CONSTANT(DAY_FRIDAY);
- BIND_CONSTANT(DAY_SATURDAY);
-
- BIND_CONSTANT(MONTH_JANUARY);
- BIND_CONSTANT(MONTH_FEBRUARY);
- BIND_CONSTANT(MONTH_MARCH);
- BIND_CONSTANT(MONTH_APRIL);
- BIND_CONSTANT(MONTH_MAY);
- BIND_CONSTANT(MONTH_JUNE);
- BIND_CONSTANT(MONTH_JULY);
- BIND_CONSTANT(MONTH_AUGUST);
- BIND_CONSTANT(MONTH_SEPTEMBER);
- BIND_CONSTANT(MONTH_OCTOBER);
- BIND_CONSTANT(MONTH_NOVEMBER);
- BIND_CONSTANT(MONTH_DECEMBER);
-
- BIND_CONSTANT(SCREEN_ORIENTATION_LANDSCAPE);
- BIND_CONSTANT(SCREEN_ORIENTATION_PORTRAIT);
- BIND_CONSTANT(SCREEN_ORIENTATION_REVERSE_LANDSCAPE);
- BIND_CONSTANT(SCREEN_ORIENTATION_REVERSE_PORTRAIT);
- BIND_CONSTANT(SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
- BIND_CONSTANT(SCREEN_ORIENTATION_SENSOR_PORTRAIT);
- BIND_CONSTANT(SCREEN_ORIENTATION_SENSOR);
-
- BIND_CONSTANT(SYSTEM_DIR_DESKTOP);
- BIND_CONSTANT(SYSTEM_DIR_DCIM);
- BIND_CONSTANT(SYSTEM_DIR_DOCUMENTS);
- BIND_CONSTANT(SYSTEM_DIR_DOWNLOADS);
- BIND_CONSTANT(SYSTEM_DIR_MOVIES);
- BIND_CONSTANT(SYSTEM_DIR_MUSIC);
- BIND_CONSTANT(SYSTEM_DIR_PICTURES);
- BIND_CONSTANT(SYSTEM_DIR_RINGTONES);
-
- BIND_CONSTANT(POWERSTATE_UNKNOWN);
- BIND_CONSTANT(POWERSTATE_ON_BATTERY);
- BIND_CONSTANT(POWERSTATE_NO_BATTERY);
- BIND_CONSTANT(POWERSTATE_CHARGING);
- BIND_CONSTANT(POWERSTATE_CHARGED);
+ BIND_ENUM_CONSTANT(DAY_SUNDAY);
+ BIND_ENUM_CONSTANT(DAY_MONDAY);
+ BIND_ENUM_CONSTANT(DAY_TUESDAY);
+ BIND_ENUM_CONSTANT(DAY_WEDNESDAY);
+ BIND_ENUM_CONSTANT(DAY_THURSDAY);
+ BIND_ENUM_CONSTANT(DAY_FRIDAY);
+ BIND_ENUM_CONSTANT(DAY_SATURDAY);
+
+ BIND_ENUM_CONSTANT(MONTH_JANUARY);
+ BIND_ENUM_CONSTANT(MONTH_FEBRUARY);
+ BIND_ENUM_CONSTANT(MONTH_MARCH);
+ BIND_ENUM_CONSTANT(MONTH_APRIL);
+ BIND_ENUM_CONSTANT(MONTH_MAY);
+ BIND_ENUM_CONSTANT(MONTH_JUNE);
+ BIND_ENUM_CONSTANT(MONTH_JULY);
+ BIND_ENUM_CONSTANT(MONTH_AUGUST);
+ BIND_ENUM_CONSTANT(MONTH_SEPTEMBER);
+ BIND_ENUM_CONSTANT(MONTH_OCTOBER);
+ BIND_ENUM_CONSTANT(MONTH_NOVEMBER);
+ BIND_ENUM_CONSTANT(MONTH_DECEMBER);
+
+ BIND_ENUM_CONSTANT(SCREEN_ORIENTATION_LANDSCAPE);
+ BIND_ENUM_CONSTANT(SCREEN_ORIENTATION_PORTRAIT);
+ BIND_ENUM_CONSTANT(SCREEN_ORIENTATION_REVERSE_LANDSCAPE);
+ BIND_ENUM_CONSTANT(SCREEN_ORIENTATION_REVERSE_PORTRAIT);
+ BIND_ENUM_CONSTANT(SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
+ BIND_ENUM_CONSTANT(SCREEN_ORIENTATION_SENSOR_PORTRAIT);
+ BIND_ENUM_CONSTANT(SCREEN_ORIENTATION_SENSOR);
+
+ BIND_ENUM_CONSTANT(SYSTEM_DIR_DESKTOP);
+ BIND_ENUM_CONSTANT(SYSTEM_DIR_DCIM);
+ BIND_ENUM_CONSTANT(SYSTEM_DIR_DOCUMENTS);
+ BIND_ENUM_CONSTANT(SYSTEM_DIR_DOWNLOADS);
+ BIND_ENUM_CONSTANT(SYSTEM_DIR_MOVIES);
+ BIND_ENUM_CONSTANT(SYSTEM_DIR_MUSIC);
+ BIND_ENUM_CONSTANT(SYSTEM_DIR_PICTURES);
+ BIND_ENUM_CONSTANT(SYSTEM_DIR_RINGTONES);
+
+ BIND_ENUM_CONSTANT(POWERSTATE_UNKNOWN);
+ BIND_ENUM_CONSTANT(POWERSTATE_ON_BATTERY);
+ BIND_ENUM_CONSTANT(POWERSTATE_NO_BATTERY);
+ BIND_ENUM_CONSTANT(POWERSTATE_CHARGING);
+ BIND_ENUM_CONSTANT(POWERSTATE_CHARGED);
}
_OS::_OS() {
@@ -1772,15 +1772,15 @@ void _File::_bind_methods() {
ClassDB::bind_method(D_METHOD("file_exists", "path"), &_File::file_exists);
ClassDB::bind_method(D_METHOD("get_modified_time", "file"), &_File::get_modified_time);
- BIND_CONSTANT(READ);
- BIND_CONSTANT(WRITE);
- BIND_CONSTANT(READ_WRITE);
- BIND_CONSTANT(WRITE_READ);
+ BIND_ENUM_CONSTANT(READ);
+ BIND_ENUM_CONSTANT(WRITE);
+ BIND_ENUM_CONSTANT(READ_WRITE);
+ BIND_ENUM_CONSTANT(WRITE_READ);
- BIND_CONSTANT(COMPRESSION_FASTLZ);
- BIND_CONSTANT(COMPRESSION_DEFLATE);
- BIND_CONSTANT(COMPRESSION_ZSTD);
- BIND_CONSTANT(COMPRESSION_GZIP);
+ BIND_ENUM_CONSTANT(COMPRESSION_FASTLZ);
+ BIND_ENUM_CONSTANT(COMPRESSION_DEFLATE);
+ BIND_ENUM_CONSTANT(COMPRESSION_ZSTD);
+ BIND_ENUM_CONSTANT(COMPRESSION_GZIP);
}
_File::_File() {
@@ -2285,9 +2285,9 @@ void _Thread::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_active"), &_Thread::is_active);
ClassDB::bind_method(D_METHOD("wait_to_finish"), &_Thread::wait_to_finish);
- BIND_CONSTANT(PRIORITY_LOW);
- BIND_CONSTANT(PRIORITY_NORMAL);
- BIND_CONSTANT(PRIORITY_HIGH);
+ BIND_ENUM_CONSTANT(PRIORITY_LOW);
+ BIND_ENUM_CONSTANT(PRIORITY_NORMAL);
+ BIND_ENUM_CONSTANT(PRIORITY_HIGH);
}
_Thread::_Thread() {
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index 61c80aaba3..22d1c2f52f 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -85,6 +85,8 @@ public:
_ResourceSaver();
};
+VARIANT_ENUM_CAST(_ResourceSaver::SaverFlags);
+
class MainLoop;
class _OS : public Object {
@@ -310,6 +312,8 @@ public:
_OS();
};
+VARIANT_ENUM_CAST(_OS::Weekday);
+VARIANT_ENUM_CAST(_OS::Month);
VARIANT_ENUM_CAST(_OS::SystemDir);
VARIANT_ENUM_CAST(_OS::ScreenOrientation);
@@ -447,6 +451,9 @@ public:
virtual ~_File();
};
+VARIANT_ENUM_CAST(_File::ModeFlags);
+VARIANT_ENUM_CAST(_File::CompressionMode);
+
class _Directory : public Reference {
GDCLASS(_Directory, Reference);
@@ -578,6 +585,8 @@ public:
~_Thread();
};
+VARIANT_ENUM_CAST(_Thread::Priority);
+
class _ClassDB : public Object {
GDCLASS(_ClassDB, Object)
diff --git a/core/class_db.cpp b/core/class_db.cpp
index 0503f7c6fc..6cd7586a54 100644
--- a/core/class_db.cpp
+++ b/core/class_db.cpp
@@ -583,7 +583,7 @@ MethodBind *ClassDB::get_method(StringName p_class, StringName p_name) {
return NULL;
}
-void ClassDB::bind_integer_constant(const StringName &p_class, const StringName &p_name, int p_constant) {
+void ClassDB::bind_integer_constant(const StringName &p_class, const StringName &p_enum, const StringName &p_name, int p_constant) {
OBJTYPE_WLOCK;
@@ -600,6 +600,16 @@ void ClassDB::bind_integer_constant(const StringName &p_class, const StringName
type->constant_map[p_name] = p_constant;
#ifdef DEBUG_METHODS_ENABLED
+ List<StringName> *constants_list = type->enum_map.getptr(p_enum);
+
+ if (constants_list) {
+ constants_list->push_back(p_name);
+ } else {
+ List<StringName> new_list;
+ new_list.push_back(p_name);
+ type->enum_map[p_enum] = new_list;
+ }
+
type->constant_order.push_back(p_name);
#endif
}
@@ -655,6 +665,77 @@ int ClassDB::get_integer_constant(const StringName &p_class, const StringName &p
return 0;
}
+#ifdef DEBUG_METHODS_ENABLED
+StringName ClassDB::get_integer_constant_enum(const StringName &p_class, const StringName &p_name, bool p_no_inheritance) {
+
+ OBJTYPE_RLOCK;
+
+ ClassInfo *type = classes.getptr(p_class);
+
+ while (type) {
+
+ const StringName *k = NULL;
+ while ((k = type->enum_map.next(k))) {
+
+ List<StringName> &constants_list = type->enum_map.get(*k);
+ const List<StringName>::Element *found = constants_list.find(p_name);
+ if (found)
+ return found->get();
+ }
+
+ if (p_no_inheritance)
+ break;
+
+ type = type->inherits_ptr;
+ }
+
+ return StringName();
+}
+
+void ClassDB::get_enum_list(const StringName &p_class, List<StringName> *p_enums, bool p_no_inheritance) {
+
+ OBJTYPE_RLOCK;
+
+ ClassInfo *type = classes.getptr(p_class);
+
+ while (type) {
+
+ const StringName *k = NULL;
+ while ((k = type->enum_map.next(k))) {
+ p_enums->push_back(*k);
+ }
+
+ if (p_no_inheritance)
+ break;
+
+ type = type->inherits_ptr;
+ }
+}
+
+void ClassDB::get_enum_constants(const StringName &p_class, const StringName &p_enum, List<StringName> *p_constants, bool p_no_inheritance) {
+
+ OBJTYPE_RLOCK;
+
+ ClassInfo *type = classes.getptr(p_class);
+
+ while (type) {
+
+ const List<StringName> *constants = type->enum_map.getptr(p_enum);
+
+ if (constants) {
+ for (const List<StringName>::Element *E = constants->front(); E; E = E->next()) {
+ p_constants->push_back(E->get());
+ }
+ }
+
+ if (p_no_inheritance)
+ break;
+
+ type = type->inherits_ptr;
+ }
+}
+#endif
+
void ClassDB::add_signal(StringName p_class, const MethodInfo &p_signal) {
OBJTYPE_WLOCK;
diff --git a/core/class_db.h b/core/class_db.h
index 4287c5990f..8d9192adcc 100644
--- a/core/class_db.h
+++ b/core/class_db.h
@@ -138,6 +138,7 @@ public:
HashMap<StringName, MethodInfo, StringNameHasher> signal_map;
List<PropertyInfo> property_list;
#ifdef DEBUG_METHODS_ENABLED
+ HashMap<StringName, List<StringName> > enum_map;
List<StringName> constant_order;
List<StringName> method_order;
Set<StringName> methods_in_properties;
@@ -488,9 +489,16 @@ public:
static void add_virtual_method(const StringName &p_class, const MethodInfo &p_method, bool p_virtual = true);
static void get_virtual_methods(const StringName &p_class, List<MethodInfo> *p_methods, bool p_no_inheritance = false);
- static void bind_integer_constant(const StringName &p_class, const StringName &p_name, int p_constant);
+ static void bind_integer_constant(const StringName &p_class, const StringName &p_enum, const StringName &p_name, int p_constant);
static void get_integer_constant_list(const StringName &p_class, List<String> *p_constants, bool p_no_inheritance = false);
static int get_integer_constant(const StringName &p_class, const StringName &p_name, bool *p_success = NULL);
+
+#ifdef DEBUG_METHODS_ENABLED
+ static StringName get_integer_constant_enum(const StringName &p_class, const StringName &p_name, bool p_no_inheritance = false);
+ static void get_enum_list(const StringName &p_class, List<StringName> *p_enums, bool p_no_inheritance = false);
+ static void get_enum_constants(const StringName &p_class, const StringName &p_enum, List<StringName> *p_constants, bool p_no_inheritance = false);
+#endif
+
static StringName get_category(const StringName &p_node);
static bool get_setter_and_type_for_property(const StringName &p_class, const StringName &p_prop, StringName &r_class, StringName &r_setter);
@@ -509,8 +517,23 @@ public:
static void cleanup();
};
+#ifdef DEBUG_METHODS_ENABLED
+
+#define BIND_CONSTANT(m_constant) \
+ ClassDB::bind_integer_constant(get_class_static(), StringName(), #m_constant, m_constant);
+
+#define BIND_ENUM_CONSTANT(m_constant) \
+ ClassDB::bind_integer_constant(get_class_static(), __constant_get_enum_name(m_constant, #m_constant), #m_constant, m_constant);
+
+#else
+
#define BIND_CONSTANT(m_constant) \
- ClassDB::bind_integer_constant(get_class_static(), #m_constant, m_constant);
+ ClassDB::bind_integer_constant(get_class_static(), StringName(), #m_constant, m_constant);
+
+#define BIND_ENUM_CONSTANT(m_constant) \
+ ClassDB::bind_integer_constant(get_class_static(), StringName(), #m_constant, m_constant);
+
+#endif
#ifdef TOOLS_ENABLED
diff --git a/core/global_constants.cpp b/core/global_constants.cpp
index 9e745ecb98..d296b678b9 100644
--- a/core/global_constants.cpp
+++ b/core/global_constants.cpp
@@ -10,7 +10,7 @@
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
+/* "Software") to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
@@ -36,504 +36,563 @@
struct _GlobalConstant {
+#ifdef DEBUG_METHODS_ENABLED
+ StringName enum_name;
+#endif
const char *name;
int value;
+
+ _GlobalConstant() {}
+
+#ifdef DEBUG_METHODS_ENABLED
+ _GlobalConstant(const StringName &p_enum_name, const char *p_name, int p_value) {
+ enum_name = p_enum_name;
+ name = p_name;
+ value = p_value;
+ }
+#else
+ _GlobalConstant(const char *p_name, int p_value) {
+ name = p_name;
+ value = p_value;
+ }
+#endif
};
+static Vector<_GlobalConstant> _global_constants;
+
+#ifdef DEBUG_METHODS_ENABLED
+
+#define BIND_GLOBAL_CONSTANT(m_constant) \
+ _global_constants.push_back(_GlobalConstant(StringName(), #m_constant, m_constant));
+
+#define BIND_GLOBAL_ENUM_CONSTANT(m_constant) \
+ _global_constants.push_back(_GlobalConstant(__constant_get_enum_name(m_constant, #m_constant), #m_constant, m_constant));
+
+#define BIND_GLOBAL_ENUM_CONSTANT_CUSTOM(m_custom_name, m_constant) \
+ _global_constants.push_back(_GlobalConstant(__constant_get_enum_name(m_constant, #m_constant), m_custom_name, m_constant));
+
+#else
+
#define BIND_GLOBAL_CONSTANT(m_constant) \
- { #m_constant, m_constant }
+ _global_constants.push_back(_GlobalConstant(#m_constant, m_constant));
+
+#define BIND_GLOBAL_ENUM_CONSTANT(m_constant) \
+ _global_constants.push_back(_GlobalConstant(#m_constant, m_constant));
+
+#define BIND_GLOBAL_ENUM_CONSTANT_CUSTOM(m_custom_name, m_constant) \
+ _global_constants.push_back(_GlobalConstant(m_custom_name, m_constant));
+
+#endif
+
+VARIANT_ENUM_CAST(KeyList);
+VARIANT_ENUM_CAST(KeyModifierMask);
-static _GlobalConstant _global_constants[] = {
+void register_global_constants() {
//{ KEY_BACKSPACE, VK_BACK },// (0x08) // backspace
- BIND_GLOBAL_CONSTANT(MARGIN_LEFT),
- BIND_GLOBAL_CONSTANT(MARGIN_TOP),
- BIND_GLOBAL_CONSTANT(MARGIN_RIGHT),
- BIND_GLOBAL_CONSTANT(MARGIN_BOTTOM),
- BIND_GLOBAL_CONSTANT(VERTICAL),
- BIND_GLOBAL_CONSTANT(HORIZONTAL),
- BIND_GLOBAL_CONSTANT(HALIGN_LEFT),
- BIND_GLOBAL_CONSTANT(HALIGN_CENTER),
- BIND_GLOBAL_CONSTANT(HALIGN_RIGHT),
- BIND_GLOBAL_CONSTANT(VALIGN_TOP),
- BIND_GLOBAL_CONSTANT(VALIGN_CENTER),
- BIND_GLOBAL_CONSTANT(VALIGN_BOTTOM),
+ BIND_GLOBAL_ENUM_CONSTANT(MARGIN_LEFT);
+ BIND_GLOBAL_ENUM_CONSTANT(MARGIN_TOP);
+ BIND_GLOBAL_ENUM_CONSTANT(MARGIN_RIGHT);
+ BIND_GLOBAL_ENUM_CONSTANT(MARGIN_BOTTOM);
+
+ BIND_GLOBAL_ENUM_CONSTANT(VERTICAL);
+ BIND_GLOBAL_ENUM_CONSTANT(HORIZONTAL);
+
+ BIND_GLOBAL_ENUM_CONSTANT(HALIGN_LEFT);
+ BIND_GLOBAL_ENUM_CONSTANT(HALIGN_CENTER);
+ BIND_GLOBAL_ENUM_CONSTANT(HALIGN_RIGHT);
+
+ BIND_GLOBAL_ENUM_CONSTANT(VALIGN_TOP);
+ BIND_GLOBAL_ENUM_CONSTANT(VALIGN_CENTER);
+ BIND_GLOBAL_ENUM_CONSTANT(VALIGN_BOTTOM);
// hueg list of keys
- BIND_GLOBAL_CONSTANT(SPKEY),
-
- BIND_GLOBAL_CONSTANT(KEY_ESCAPE),
- BIND_GLOBAL_CONSTANT(KEY_TAB),
- BIND_GLOBAL_CONSTANT(KEY_BACKTAB),
- BIND_GLOBAL_CONSTANT(KEY_BACKSPACE),
- BIND_GLOBAL_CONSTANT(KEY_ENTER),
- BIND_GLOBAL_CONSTANT(KEY_KP_ENTER),
- BIND_GLOBAL_CONSTANT(KEY_INSERT),
- BIND_GLOBAL_CONSTANT(KEY_DELETE),
- BIND_GLOBAL_CONSTANT(KEY_PAUSE),
- BIND_GLOBAL_CONSTANT(KEY_PRINT),
- BIND_GLOBAL_CONSTANT(KEY_SYSREQ),
- BIND_GLOBAL_CONSTANT(KEY_CLEAR),
- BIND_GLOBAL_CONSTANT(KEY_HOME),
- BIND_GLOBAL_CONSTANT(KEY_END),
- BIND_GLOBAL_CONSTANT(KEY_LEFT),
- BIND_GLOBAL_CONSTANT(KEY_UP),
- BIND_GLOBAL_CONSTANT(KEY_RIGHT),
- BIND_GLOBAL_CONSTANT(KEY_DOWN),
- BIND_GLOBAL_CONSTANT(KEY_PAGEUP),
- BIND_GLOBAL_CONSTANT(KEY_PAGEDOWN),
- BIND_GLOBAL_CONSTANT(KEY_SHIFT),
- BIND_GLOBAL_CONSTANT(KEY_CONTROL),
- BIND_GLOBAL_CONSTANT(KEY_META),
- BIND_GLOBAL_CONSTANT(KEY_ALT),
- BIND_GLOBAL_CONSTANT(KEY_CAPSLOCK),
- BIND_GLOBAL_CONSTANT(KEY_NUMLOCK),
- BIND_GLOBAL_CONSTANT(KEY_SCROLLLOCK),
- BIND_GLOBAL_CONSTANT(KEY_F1),
- BIND_GLOBAL_CONSTANT(KEY_F2),
- BIND_GLOBAL_CONSTANT(KEY_F3),
- BIND_GLOBAL_CONSTANT(KEY_F4),
- BIND_GLOBAL_CONSTANT(KEY_F5),
- BIND_GLOBAL_CONSTANT(KEY_F6),
- BIND_GLOBAL_CONSTANT(KEY_F7),
- BIND_GLOBAL_CONSTANT(KEY_F8),
- BIND_GLOBAL_CONSTANT(KEY_F9),
- BIND_GLOBAL_CONSTANT(KEY_F10),
- BIND_GLOBAL_CONSTANT(KEY_F11),
- BIND_GLOBAL_CONSTANT(KEY_F12),
- BIND_GLOBAL_CONSTANT(KEY_F13),
- BIND_GLOBAL_CONSTANT(KEY_F14),
- BIND_GLOBAL_CONSTANT(KEY_F15),
- BIND_GLOBAL_CONSTANT(KEY_F16),
- BIND_GLOBAL_CONSTANT(KEY_KP_MULTIPLY),
- BIND_GLOBAL_CONSTANT(KEY_KP_DIVIDE),
- BIND_GLOBAL_CONSTANT(KEY_KP_SUBTRACT),
- BIND_GLOBAL_CONSTANT(KEY_KP_PERIOD),
- BIND_GLOBAL_CONSTANT(KEY_KP_ADD),
- BIND_GLOBAL_CONSTANT(KEY_KP_0),
- BIND_GLOBAL_CONSTANT(KEY_KP_1),
- BIND_GLOBAL_CONSTANT(KEY_KP_2),
- BIND_GLOBAL_CONSTANT(KEY_KP_3),
- BIND_GLOBAL_CONSTANT(KEY_KP_4),
- BIND_GLOBAL_CONSTANT(KEY_KP_5),
- BIND_GLOBAL_CONSTANT(KEY_KP_6),
- BIND_GLOBAL_CONSTANT(KEY_KP_7),
- BIND_GLOBAL_CONSTANT(KEY_KP_8),
- BIND_GLOBAL_CONSTANT(KEY_KP_9),
- BIND_GLOBAL_CONSTANT(KEY_SUPER_L),
- BIND_GLOBAL_CONSTANT(KEY_SUPER_R),
- BIND_GLOBAL_CONSTANT(KEY_MENU),
- BIND_GLOBAL_CONSTANT(KEY_HYPER_L),
- BIND_GLOBAL_CONSTANT(KEY_HYPER_R),
- BIND_GLOBAL_CONSTANT(KEY_HELP),
- BIND_GLOBAL_CONSTANT(KEY_DIRECTION_L),
- BIND_GLOBAL_CONSTANT(KEY_DIRECTION_R),
- BIND_GLOBAL_CONSTANT(KEY_BACK),
- BIND_GLOBAL_CONSTANT(KEY_FORWARD),
- BIND_GLOBAL_CONSTANT(KEY_STOP),
- BIND_GLOBAL_CONSTANT(KEY_REFRESH),
- BIND_GLOBAL_CONSTANT(KEY_VOLUMEDOWN),
- BIND_GLOBAL_CONSTANT(KEY_VOLUMEMUTE),
- BIND_GLOBAL_CONSTANT(KEY_VOLUMEUP),
- BIND_GLOBAL_CONSTANT(KEY_BASSBOOST),
- BIND_GLOBAL_CONSTANT(KEY_BASSUP),
- BIND_GLOBAL_CONSTANT(KEY_BASSDOWN),
- BIND_GLOBAL_CONSTANT(KEY_TREBLEUP),
- BIND_GLOBAL_CONSTANT(KEY_TREBLEDOWN),
- BIND_GLOBAL_CONSTANT(KEY_MEDIAPLAY),
- BIND_GLOBAL_CONSTANT(KEY_MEDIASTOP),
- BIND_GLOBAL_CONSTANT(KEY_MEDIAPREVIOUS),
- BIND_GLOBAL_CONSTANT(KEY_MEDIANEXT),
- BIND_GLOBAL_CONSTANT(KEY_MEDIARECORD),
- BIND_GLOBAL_CONSTANT(KEY_HOMEPAGE),
- BIND_GLOBAL_CONSTANT(KEY_FAVORITES),
- BIND_GLOBAL_CONSTANT(KEY_SEARCH),
- BIND_GLOBAL_CONSTANT(KEY_STANDBY),
- BIND_GLOBAL_CONSTANT(KEY_OPENURL),
- BIND_GLOBAL_CONSTANT(KEY_LAUNCHMAIL),
- BIND_GLOBAL_CONSTANT(KEY_LAUNCHMEDIA),
- BIND_GLOBAL_CONSTANT(KEY_LAUNCH0),
- BIND_GLOBAL_CONSTANT(KEY_LAUNCH1),
- BIND_GLOBAL_CONSTANT(KEY_LAUNCH2),
- BIND_GLOBAL_CONSTANT(KEY_LAUNCH3),
- BIND_GLOBAL_CONSTANT(KEY_LAUNCH4),
- BIND_GLOBAL_CONSTANT(KEY_LAUNCH5),
- BIND_GLOBAL_CONSTANT(KEY_LAUNCH6),
- BIND_GLOBAL_CONSTANT(KEY_LAUNCH7),
- BIND_GLOBAL_CONSTANT(KEY_LAUNCH8),
- BIND_GLOBAL_CONSTANT(KEY_LAUNCH9),
- BIND_GLOBAL_CONSTANT(KEY_LAUNCHA),
- BIND_GLOBAL_CONSTANT(KEY_LAUNCHB),
- BIND_GLOBAL_CONSTANT(KEY_LAUNCHC),
- BIND_GLOBAL_CONSTANT(KEY_LAUNCHD),
- BIND_GLOBAL_CONSTANT(KEY_LAUNCHE),
- BIND_GLOBAL_CONSTANT(KEY_LAUNCHF),
-
- BIND_GLOBAL_CONSTANT(KEY_UNKNOWN),
- BIND_GLOBAL_CONSTANT(KEY_SPACE),
- BIND_GLOBAL_CONSTANT(KEY_EXCLAM),
- BIND_GLOBAL_CONSTANT(KEY_QUOTEDBL),
- BIND_GLOBAL_CONSTANT(KEY_NUMBERSIGN),
- BIND_GLOBAL_CONSTANT(KEY_DOLLAR),
- BIND_GLOBAL_CONSTANT(KEY_PERCENT),
- BIND_GLOBAL_CONSTANT(KEY_AMPERSAND),
- BIND_GLOBAL_CONSTANT(KEY_APOSTROPHE),
- BIND_GLOBAL_CONSTANT(KEY_PARENLEFT),
- BIND_GLOBAL_CONSTANT(KEY_PARENRIGHT),
- BIND_GLOBAL_CONSTANT(KEY_ASTERISK),
- BIND_GLOBAL_CONSTANT(KEY_PLUS),
- BIND_GLOBAL_CONSTANT(KEY_COMMA),
- BIND_GLOBAL_CONSTANT(KEY_MINUS),
- BIND_GLOBAL_CONSTANT(KEY_PERIOD),
- BIND_GLOBAL_CONSTANT(KEY_SLASH),
- BIND_GLOBAL_CONSTANT(KEY_0),
- BIND_GLOBAL_CONSTANT(KEY_1),
- BIND_GLOBAL_CONSTANT(KEY_2),
- BIND_GLOBAL_CONSTANT(KEY_3),
- BIND_GLOBAL_CONSTANT(KEY_4),
- BIND_GLOBAL_CONSTANT(KEY_5),
- BIND_GLOBAL_CONSTANT(KEY_6),
- BIND_GLOBAL_CONSTANT(KEY_7),
- BIND_GLOBAL_CONSTANT(KEY_8),
- BIND_GLOBAL_CONSTANT(KEY_9),
- BIND_GLOBAL_CONSTANT(KEY_COLON),
- BIND_GLOBAL_CONSTANT(KEY_SEMICOLON),
- BIND_GLOBAL_CONSTANT(KEY_LESS),
- BIND_GLOBAL_CONSTANT(KEY_EQUAL),
- BIND_GLOBAL_CONSTANT(KEY_GREATER),
- BIND_GLOBAL_CONSTANT(KEY_QUESTION),
- BIND_GLOBAL_CONSTANT(KEY_AT),
- BIND_GLOBAL_CONSTANT(KEY_A),
- BIND_GLOBAL_CONSTANT(KEY_B),
- BIND_GLOBAL_CONSTANT(KEY_C),
- BIND_GLOBAL_CONSTANT(KEY_D),
- BIND_GLOBAL_CONSTANT(KEY_E),
- BIND_GLOBAL_CONSTANT(KEY_F),
- BIND_GLOBAL_CONSTANT(KEY_G),
- BIND_GLOBAL_CONSTANT(KEY_H),
- BIND_GLOBAL_CONSTANT(KEY_I),
- BIND_GLOBAL_CONSTANT(KEY_J),
- BIND_GLOBAL_CONSTANT(KEY_K),
- BIND_GLOBAL_CONSTANT(KEY_L),
- BIND_GLOBAL_CONSTANT(KEY_M),
- BIND_GLOBAL_CONSTANT(KEY_N),
- BIND_GLOBAL_CONSTANT(KEY_O),
- BIND_GLOBAL_CONSTANT(KEY_P),
- BIND_GLOBAL_CONSTANT(KEY_Q),
- BIND_GLOBAL_CONSTANT(KEY_R),
- BIND_GLOBAL_CONSTANT(KEY_S),
- BIND_GLOBAL_CONSTANT(KEY_T),
- BIND_GLOBAL_CONSTANT(KEY_U),
- BIND_GLOBAL_CONSTANT(KEY_V),
- BIND_GLOBAL_CONSTANT(KEY_W),
- BIND_GLOBAL_CONSTANT(KEY_X),
- BIND_GLOBAL_CONSTANT(KEY_Y),
- BIND_GLOBAL_CONSTANT(KEY_Z),
- BIND_GLOBAL_CONSTANT(KEY_BRACKETLEFT),
- BIND_GLOBAL_CONSTANT(KEY_BACKSLASH),
- BIND_GLOBAL_CONSTANT(KEY_BRACKETRIGHT),
- BIND_GLOBAL_CONSTANT(KEY_ASCIICIRCUM),
- BIND_GLOBAL_CONSTANT(KEY_UNDERSCORE),
- BIND_GLOBAL_CONSTANT(KEY_QUOTELEFT),
- BIND_GLOBAL_CONSTANT(KEY_BRACELEFT),
- BIND_GLOBAL_CONSTANT(KEY_BAR),
- BIND_GLOBAL_CONSTANT(KEY_BRACERIGHT),
- BIND_GLOBAL_CONSTANT(KEY_ASCIITILDE),
- BIND_GLOBAL_CONSTANT(KEY_NOBREAKSPACE),
- BIND_GLOBAL_CONSTANT(KEY_EXCLAMDOWN),
- BIND_GLOBAL_CONSTANT(KEY_CENT),
- BIND_GLOBAL_CONSTANT(KEY_STERLING),
- BIND_GLOBAL_CONSTANT(KEY_CURRENCY),
- BIND_GLOBAL_CONSTANT(KEY_YEN),
- BIND_GLOBAL_CONSTANT(KEY_BROKENBAR),
- BIND_GLOBAL_CONSTANT(KEY_SECTION),
- BIND_GLOBAL_CONSTANT(KEY_DIAERESIS),
- BIND_GLOBAL_CONSTANT(KEY_COPYRIGHT),
- BIND_GLOBAL_CONSTANT(KEY_ORDFEMININE),
- BIND_GLOBAL_CONSTANT(KEY_GUILLEMOTLEFT),
- BIND_GLOBAL_CONSTANT(KEY_NOTSIGN),
- BIND_GLOBAL_CONSTANT(KEY_HYPHEN),
- BIND_GLOBAL_CONSTANT(KEY_REGISTERED),
- BIND_GLOBAL_CONSTANT(KEY_MACRON),
- BIND_GLOBAL_CONSTANT(KEY_DEGREE),
- BIND_GLOBAL_CONSTANT(KEY_PLUSMINUS),
- BIND_GLOBAL_CONSTANT(KEY_TWOSUPERIOR),
- BIND_GLOBAL_CONSTANT(KEY_THREESUPERIOR),
- BIND_GLOBAL_CONSTANT(KEY_ACUTE),
- BIND_GLOBAL_CONSTANT(KEY_MU),
- BIND_GLOBAL_CONSTANT(KEY_PARAGRAPH),
- BIND_GLOBAL_CONSTANT(KEY_PERIODCENTERED),
- BIND_GLOBAL_CONSTANT(KEY_CEDILLA),
- BIND_GLOBAL_CONSTANT(KEY_ONESUPERIOR),
- BIND_GLOBAL_CONSTANT(KEY_MASCULINE),
- BIND_GLOBAL_CONSTANT(KEY_GUILLEMOTRIGHT),
- BIND_GLOBAL_CONSTANT(KEY_ONEQUARTER),
- BIND_GLOBAL_CONSTANT(KEY_ONEHALF),
- BIND_GLOBAL_CONSTANT(KEY_THREEQUARTERS),
- BIND_GLOBAL_CONSTANT(KEY_QUESTIONDOWN),
- BIND_GLOBAL_CONSTANT(KEY_AGRAVE),
- BIND_GLOBAL_CONSTANT(KEY_AACUTE),
- BIND_GLOBAL_CONSTANT(KEY_ACIRCUMFLEX),
- BIND_GLOBAL_CONSTANT(KEY_ATILDE),
- BIND_GLOBAL_CONSTANT(KEY_ADIAERESIS),
- BIND_GLOBAL_CONSTANT(KEY_ARING),
- BIND_GLOBAL_CONSTANT(KEY_AE),
- BIND_GLOBAL_CONSTANT(KEY_CCEDILLA),
- BIND_GLOBAL_CONSTANT(KEY_EGRAVE),
- BIND_GLOBAL_CONSTANT(KEY_EACUTE),
- BIND_GLOBAL_CONSTANT(KEY_ECIRCUMFLEX),
- BIND_GLOBAL_CONSTANT(KEY_EDIAERESIS),
- BIND_GLOBAL_CONSTANT(KEY_IGRAVE),
- BIND_GLOBAL_CONSTANT(KEY_IACUTE),
- BIND_GLOBAL_CONSTANT(KEY_ICIRCUMFLEX),
- BIND_GLOBAL_CONSTANT(KEY_IDIAERESIS),
- BIND_GLOBAL_CONSTANT(KEY_ETH),
- BIND_GLOBAL_CONSTANT(KEY_NTILDE),
- BIND_GLOBAL_CONSTANT(KEY_OGRAVE),
- BIND_GLOBAL_CONSTANT(KEY_OACUTE),
- BIND_GLOBAL_CONSTANT(KEY_OCIRCUMFLEX),
- BIND_GLOBAL_CONSTANT(KEY_OTILDE),
- BIND_GLOBAL_CONSTANT(KEY_ODIAERESIS),
- BIND_GLOBAL_CONSTANT(KEY_MULTIPLY),
- BIND_GLOBAL_CONSTANT(KEY_OOBLIQUE),
- BIND_GLOBAL_CONSTANT(KEY_UGRAVE),
- BIND_GLOBAL_CONSTANT(KEY_UACUTE),
- BIND_GLOBAL_CONSTANT(KEY_UCIRCUMFLEX),
- BIND_GLOBAL_CONSTANT(KEY_UDIAERESIS),
- BIND_GLOBAL_CONSTANT(KEY_YACUTE),
- BIND_GLOBAL_CONSTANT(KEY_THORN),
- BIND_GLOBAL_CONSTANT(KEY_SSHARP),
-
- BIND_GLOBAL_CONSTANT(KEY_DIVISION),
- BIND_GLOBAL_CONSTANT(KEY_YDIAERESIS),
-
- BIND_GLOBAL_CONSTANT(KEY_CODE_MASK),
- BIND_GLOBAL_CONSTANT(KEY_MODIFIER_MASK),
-
- BIND_GLOBAL_CONSTANT(KEY_MASK_SHIFT),
- BIND_GLOBAL_CONSTANT(KEY_MASK_ALT),
- BIND_GLOBAL_CONSTANT(KEY_MASK_META),
- BIND_GLOBAL_CONSTANT(KEY_MASK_CTRL),
- BIND_GLOBAL_CONSTANT(KEY_MASK_CMD),
- BIND_GLOBAL_CONSTANT(KEY_MASK_KPAD),
- BIND_GLOBAL_CONSTANT(KEY_MASK_GROUP_SWITCH),
+ BIND_GLOBAL_CONSTANT(SPKEY);
+
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_ESCAPE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_TAB);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_BACKTAB);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_BACKSPACE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_ENTER);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_ENTER);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_INSERT);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_DELETE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_PAUSE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_PRINT);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_SYSREQ);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_CLEAR);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_HOME);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_END);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_LEFT);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_UP);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_RIGHT);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_DOWN);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_PAGEUP);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_PAGEDOWN);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_SHIFT);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_CONTROL);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_META);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_ALT);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_CAPSLOCK);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_NUMLOCK);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_SCROLLLOCK);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_F1);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_F2);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_F3);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_F4);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_F5);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_F6);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_F7);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_F8);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_F9);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_F10);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_F11);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_F12);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_F13);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_F14);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_F15);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_F16);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_MULTIPLY);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_DIVIDE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_SUBTRACT);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_PERIOD);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_ADD);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_0);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_1);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_2);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_3);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_4);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_5);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_6);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_7);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_8);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_KP_9);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_SUPER_L);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_SUPER_R);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_MENU);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_HYPER_L);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_HYPER_R);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_HELP);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_DIRECTION_L);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_DIRECTION_R);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_BACK);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_FORWARD);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_STOP);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_REFRESH);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_VOLUMEDOWN);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_VOLUMEMUTE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_VOLUMEUP);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_BASSBOOST);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_BASSUP);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_BASSDOWN);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_TREBLEUP);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_TREBLEDOWN);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_MEDIAPLAY);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_MEDIASTOP);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_MEDIAPREVIOUS);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_MEDIANEXT);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_MEDIARECORD);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_HOMEPAGE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_FAVORITES);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_SEARCH);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_STANDBY);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_OPENURL);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCHMAIL);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCHMEDIA);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCH0);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCH1);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCH2);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCH3);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCH4);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCH5);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCH6);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCH7);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCH8);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCH9);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCHA);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCHB);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCHC);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCHD);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCHE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_LAUNCHF);
+
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_UNKNOWN);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_SPACE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_EXCLAM);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_QUOTEDBL);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_NUMBERSIGN);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_DOLLAR);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_PERCENT);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_AMPERSAND);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_APOSTROPHE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_PARENLEFT);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_PARENRIGHT);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_ASTERISK);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_PLUS);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_COMMA);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_MINUS);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_PERIOD);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_SLASH);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_0);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_1);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_2);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_3);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_4);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_5);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_6);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_7);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_8);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_9);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_COLON);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_SEMICOLON);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_LESS);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_EQUAL);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_GREATER);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_QUESTION);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_AT);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_A);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_B);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_C);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_D);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_E);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_F);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_G);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_H);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_I);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_J);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_K);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_L);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_M);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_N);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_O);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_P);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_Q);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_R);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_S);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_T);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_U);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_V);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_W);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_X);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_Y);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_Z);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_BRACKETLEFT);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_BACKSLASH);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_BRACKETRIGHT);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_ASCIICIRCUM);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_UNDERSCORE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_QUOTELEFT);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_BRACELEFT);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_BAR);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_BRACERIGHT);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_ASCIITILDE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_NOBREAKSPACE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_EXCLAMDOWN);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_CENT);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_STERLING);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_CURRENCY);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_YEN);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_BROKENBAR);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_SECTION);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_DIAERESIS);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_COPYRIGHT);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_ORDFEMININE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_GUILLEMOTLEFT);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_NOTSIGN);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_HYPHEN);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_REGISTERED);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_MACRON);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_DEGREE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_PLUSMINUS);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_TWOSUPERIOR);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_THREESUPERIOR);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_ACUTE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_MU);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_PARAGRAPH);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_PERIODCENTERED);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_CEDILLA);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_ONESUPERIOR);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_MASCULINE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_GUILLEMOTRIGHT);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_ONEQUARTER);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_ONEHALF);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_THREEQUARTERS);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_QUESTIONDOWN);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_AGRAVE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_AACUTE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_ACIRCUMFLEX);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_ATILDE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_ADIAERESIS);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_ARING);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_AE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_CCEDILLA);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_EGRAVE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_EACUTE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_ECIRCUMFLEX);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_EDIAERESIS);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_IGRAVE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_IACUTE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_ICIRCUMFLEX);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_IDIAERESIS);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_ETH);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_NTILDE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_OGRAVE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_OACUTE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_OCIRCUMFLEX);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_OTILDE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_ODIAERESIS);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_MULTIPLY);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_OOBLIQUE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_UGRAVE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_UACUTE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_UCIRCUMFLEX);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_UDIAERESIS);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_YACUTE);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_THORN);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_SSHARP);
+
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_DIVISION);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_YDIAERESIS);
+
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_CODE_MASK);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_MODIFIER_MASK);
+
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_MASK_SHIFT);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_MASK_ALT);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_MASK_META);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_MASK_CTRL);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_MASK_CMD);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_MASK_KPAD);
+ BIND_GLOBAL_ENUM_CONSTANT(KEY_MASK_GROUP_SWITCH);
// mouse
- BIND_GLOBAL_CONSTANT(BUTTON_LEFT),
- BIND_GLOBAL_CONSTANT(BUTTON_RIGHT),
- BIND_GLOBAL_CONSTANT(BUTTON_MIDDLE),
- BIND_GLOBAL_CONSTANT(BUTTON_WHEEL_UP),
- BIND_GLOBAL_CONSTANT(BUTTON_WHEEL_DOWN),
- BIND_GLOBAL_CONSTANT(BUTTON_WHEEL_LEFT),
- BIND_GLOBAL_CONSTANT(BUTTON_WHEEL_RIGHT),
- BIND_GLOBAL_CONSTANT(BUTTON_MASK_LEFT),
- BIND_GLOBAL_CONSTANT(BUTTON_MASK_RIGHT),
- BIND_GLOBAL_CONSTANT(BUTTON_MASK_MIDDLE),
+ BIND_GLOBAL_CONSTANT(BUTTON_LEFT);
+ BIND_GLOBAL_CONSTANT(BUTTON_RIGHT);
+ BIND_GLOBAL_CONSTANT(BUTTON_MIDDLE);
+ BIND_GLOBAL_CONSTANT(BUTTON_WHEEL_UP);
+ BIND_GLOBAL_CONSTANT(BUTTON_WHEEL_DOWN);
+ BIND_GLOBAL_CONSTANT(BUTTON_WHEEL_LEFT);
+ BIND_GLOBAL_CONSTANT(BUTTON_WHEEL_RIGHT);
+ BIND_GLOBAL_CONSTANT(BUTTON_MASK_LEFT);
+ BIND_GLOBAL_CONSTANT(BUTTON_MASK_RIGHT);
+ BIND_GLOBAL_CONSTANT(BUTTON_MASK_MIDDLE);
//joypads
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_0),
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_1),
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_2),
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_3),
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_4),
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_5),
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_6),
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_7),
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_8),
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_9),
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_10),
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_11),
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_12),
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_13),
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_14),
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_15),
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_MAX),
-
- BIND_GLOBAL_CONSTANT(JOY_SONY_CIRCLE),
- BIND_GLOBAL_CONSTANT(JOY_SONY_X),
- BIND_GLOBAL_CONSTANT(JOY_SONY_SQUARE),
- BIND_GLOBAL_CONSTANT(JOY_SONY_TRIANGLE),
-
- BIND_GLOBAL_CONSTANT(JOY_XBOX_B),
- BIND_GLOBAL_CONSTANT(JOY_XBOX_A),
- BIND_GLOBAL_CONSTANT(JOY_XBOX_X),
- BIND_GLOBAL_CONSTANT(JOY_XBOX_Y),
-
- BIND_GLOBAL_CONSTANT(JOY_DS_A),
- BIND_GLOBAL_CONSTANT(JOY_DS_B),
- BIND_GLOBAL_CONSTANT(JOY_DS_X),
- BIND_GLOBAL_CONSTANT(JOY_DS_Y),
-
- BIND_GLOBAL_CONSTANT(JOY_SELECT),
- BIND_GLOBAL_CONSTANT(JOY_START),
- BIND_GLOBAL_CONSTANT(JOY_DPAD_UP),
- BIND_GLOBAL_CONSTANT(JOY_DPAD_DOWN),
- BIND_GLOBAL_CONSTANT(JOY_DPAD_LEFT),
- BIND_GLOBAL_CONSTANT(JOY_DPAD_RIGHT),
- BIND_GLOBAL_CONSTANT(JOY_L),
- BIND_GLOBAL_CONSTANT(JOY_L2),
- BIND_GLOBAL_CONSTANT(JOY_L3),
- BIND_GLOBAL_CONSTANT(JOY_R),
- BIND_GLOBAL_CONSTANT(JOY_R2),
- BIND_GLOBAL_CONSTANT(JOY_R3),
-
- BIND_GLOBAL_CONSTANT(JOY_AXIS_0),
- BIND_GLOBAL_CONSTANT(JOY_AXIS_1),
- BIND_GLOBAL_CONSTANT(JOY_AXIS_2),
- BIND_GLOBAL_CONSTANT(JOY_AXIS_3),
- BIND_GLOBAL_CONSTANT(JOY_AXIS_4),
- BIND_GLOBAL_CONSTANT(JOY_AXIS_5),
- BIND_GLOBAL_CONSTANT(JOY_AXIS_6),
- BIND_GLOBAL_CONSTANT(JOY_AXIS_7),
- BIND_GLOBAL_CONSTANT(JOY_AXIS_MAX),
-
- BIND_GLOBAL_CONSTANT(JOY_ANALOG_LX),
- BIND_GLOBAL_CONSTANT(JOY_ANALOG_LY),
-
- BIND_GLOBAL_CONSTANT(JOY_ANALOG_RX),
- BIND_GLOBAL_CONSTANT(JOY_ANALOG_RY),
-
- BIND_GLOBAL_CONSTANT(JOY_ANALOG_L2),
- BIND_GLOBAL_CONSTANT(JOY_ANALOG_R2),
+ BIND_GLOBAL_CONSTANT(JOY_BUTTON_0);
+ BIND_GLOBAL_CONSTANT(JOY_BUTTON_1);
+ BIND_GLOBAL_CONSTANT(JOY_BUTTON_2);
+ BIND_GLOBAL_CONSTANT(JOY_BUTTON_3);
+ BIND_GLOBAL_CONSTANT(JOY_BUTTON_4);
+ BIND_GLOBAL_CONSTANT(JOY_BUTTON_5);
+ BIND_GLOBAL_CONSTANT(JOY_BUTTON_6);
+ BIND_GLOBAL_CONSTANT(JOY_BUTTON_7);
+ BIND_GLOBAL_CONSTANT(JOY_BUTTON_8);
+ BIND_GLOBAL_CONSTANT(JOY_BUTTON_9);
+ BIND_GLOBAL_CONSTANT(JOY_BUTTON_10);
+ BIND_GLOBAL_CONSTANT(JOY_BUTTON_11);
+ BIND_GLOBAL_CONSTANT(JOY_BUTTON_12);
+ BIND_GLOBAL_CONSTANT(JOY_BUTTON_13);
+ BIND_GLOBAL_CONSTANT(JOY_BUTTON_14);
+ BIND_GLOBAL_CONSTANT(JOY_BUTTON_15);
+ BIND_GLOBAL_CONSTANT(JOY_BUTTON_MAX);
+
+ BIND_GLOBAL_CONSTANT(JOY_SONY_CIRCLE);
+ BIND_GLOBAL_CONSTANT(JOY_SONY_X);
+ BIND_GLOBAL_CONSTANT(JOY_SONY_SQUARE);
+ BIND_GLOBAL_CONSTANT(JOY_SONY_TRIANGLE);
+
+ BIND_GLOBAL_CONSTANT(JOY_XBOX_B);
+ BIND_GLOBAL_CONSTANT(JOY_XBOX_A);
+ BIND_GLOBAL_CONSTANT(JOY_XBOX_X);
+ BIND_GLOBAL_CONSTANT(JOY_XBOX_Y);
+
+ BIND_GLOBAL_CONSTANT(JOY_DS_A);
+ BIND_GLOBAL_CONSTANT(JOY_DS_B);
+ BIND_GLOBAL_CONSTANT(JOY_DS_X);
+ BIND_GLOBAL_CONSTANT(JOY_DS_Y);
+
+ BIND_GLOBAL_CONSTANT(JOY_SELECT);
+ BIND_GLOBAL_CONSTANT(JOY_START);
+ BIND_GLOBAL_CONSTANT(JOY_DPAD_UP);
+ BIND_GLOBAL_CONSTANT(JOY_DPAD_DOWN);
+ BIND_GLOBAL_CONSTANT(JOY_DPAD_LEFT);
+ BIND_GLOBAL_CONSTANT(JOY_DPAD_RIGHT);
+ BIND_GLOBAL_CONSTANT(JOY_L);
+ BIND_GLOBAL_CONSTANT(JOY_L2);
+ BIND_GLOBAL_CONSTANT(JOY_L3);
+ BIND_GLOBAL_CONSTANT(JOY_R);
+ BIND_GLOBAL_CONSTANT(JOY_R2);
+ BIND_GLOBAL_CONSTANT(JOY_R3);
+
+ BIND_GLOBAL_CONSTANT(JOY_AXIS_0);
+ BIND_GLOBAL_CONSTANT(JOY_AXIS_1);
+ BIND_GLOBAL_CONSTANT(JOY_AXIS_2);
+ BIND_GLOBAL_CONSTANT(JOY_AXIS_3);
+ BIND_GLOBAL_CONSTANT(JOY_AXIS_4);
+ BIND_GLOBAL_CONSTANT(JOY_AXIS_5);
+ BIND_GLOBAL_CONSTANT(JOY_AXIS_6);
+ BIND_GLOBAL_CONSTANT(JOY_AXIS_7);
+ BIND_GLOBAL_CONSTANT(JOY_AXIS_MAX);
+
+ BIND_GLOBAL_CONSTANT(JOY_ANALOG_LX);
+ BIND_GLOBAL_CONSTANT(JOY_ANALOG_LY);
+
+ BIND_GLOBAL_CONSTANT(JOY_ANALOG_RX);
+ BIND_GLOBAL_CONSTANT(JOY_ANALOG_RY);
+
+ BIND_GLOBAL_CONSTANT(JOY_ANALOG_L2);
+ BIND_GLOBAL_CONSTANT(JOY_ANALOG_R2);
// error list
- BIND_GLOBAL_CONSTANT(OK),
- BIND_GLOBAL_CONSTANT(FAILED), ///< Generic fail error
- BIND_GLOBAL_CONSTANT(ERR_UNAVAILABLE), ///< What is requested is unsupported/unavailable
- BIND_GLOBAL_CONSTANT(ERR_UNCONFIGURED), ///< The object being used hasn't been properly set up yet
- BIND_GLOBAL_CONSTANT(ERR_UNAUTHORIZED), ///< Missing credentials for requested resource
- BIND_GLOBAL_CONSTANT(ERR_PARAMETER_RANGE_ERROR), ///< Parameter given out of range
- BIND_GLOBAL_CONSTANT(ERR_OUT_OF_MEMORY), ///< Out of memory
- BIND_GLOBAL_CONSTANT(ERR_FILE_NOT_FOUND),
- BIND_GLOBAL_CONSTANT(ERR_FILE_BAD_DRIVE),
- BIND_GLOBAL_CONSTANT(ERR_FILE_BAD_PATH),
- BIND_GLOBAL_CONSTANT(ERR_FILE_NO_PERMISSION),
- BIND_GLOBAL_CONSTANT(ERR_FILE_ALREADY_IN_USE),
- BIND_GLOBAL_CONSTANT(ERR_FILE_CANT_OPEN),
- BIND_GLOBAL_CONSTANT(ERR_FILE_CANT_WRITE),
- BIND_GLOBAL_CONSTANT(ERR_FILE_CANT_READ),
- BIND_GLOBAL_CONSTANT(ERR_FILE_UNRECOGNIZED),
- BIND_GLOBAL_CONSTANT(ERR_FILE_CORRUPT),
- BIND_GLOBAL_CONSTANT(ERR_FILE_MISSING_DEPENDENCIES),
- BIND_GLOBAL_CONSTANT(ERR_FILE_EOF),
- BIND_GLOBAL_CONSTANT(ERR_CANT_OPEN), ///< Can't open a resource/socket/file
- BIND_GLOBAL_CONSTANT(ERR_CANT_CREATE),
- BIND_GLOBAL_CONSTANT(ERR_PARSE_ERROR),
- BIND_GLOBAL_CONSTANT(ERR_QUERY_FAILED),
- BIND_GLOBAL_CONSTANT(ERR_ALREADY_IN_USE),
- BIND_GLOBAL_CONSTANT(ERR_LOCKED), ///< resource is locked
- BIND_GLOBAL_CONSTANT(ERR_TIMEOUT),
- BIND_GLOBAL_CONSTANT(ERR_CANT_AQUIRE_RESOURCE),
- BIND_GLOBAL_CONSTANT(ERR_INVALID_DATA), ///< Data passed is invalid
- BIND_GLOBAL_CONSTANT(ERR_INVALID_PARAMETER), ///< Parameter passed is invalid
- BIND_GLOBAL_CONSTANT(ERR_ALREADY_EXISTS), ///< When adding ), item already exists
- BIND_GLOBAL_CONSTANT(ERR_DOES_NOT_EXIST), ///< When retrieving/erasing ), it item does not exist
- BIND_GLOBAL_CONSTANT(ERR_DATABASE_CANT_READ), ///< database is full
- BIND_GLOBAL_CONSTANT(ERR_DATABASE_CANT_WRITE), ///< database is full
- BIND_GLOBAL_CONSTANT(ERR_COMPILATION_FAILED),
- BIND_GLOBAL_CONSTANT(ERR_METHOD_NOT_FOUND),
- BIND_GLOBAL_CONSTANT(ERR_LINK_FAILED),
- BIND_GLOBAL_CONSTANT(ERR_SCRIPT_FAILED),
- BIND_GLOBAL_CONSTANT(ERR_CYCLIC_LINK),
- BIND_GLOBAL_CONSTANT(ERR_BUSY),
- BIND_GLOBAL_CONSTANT(ERR_HELP), ///< user requested help!!
- BIND_GLOBAL_CONSTANT(ERR_BUG), ///< a bug in the software certainly happened ), due to a double check failing or unexpected behavior.
- BIND_GLOBAL_CONSTANT(ERR_WTF),
-
- BIND_GLOBAL_CONSTANT(PROPERTY_HINT_NONE),
- BIND_GLOBAL_CONSTANT(PROPERTY_HINT_RANGE),
- BIND_GLOBAL_CONSTANT(PROPERTY_HINT_EXP_RANGE),
- BIND_GLOBAL_CONSTANT(PROPERTY_HINT_ENUM),
- BIND_GLOBAL_CONSTANT(PROPERTY_HINT_EXP_EASING),
- BIND_GLOBAL_CONSTANT(PROPERTY_HINT_LENGTH),
- BIND_GLOBAL_CONSTANT(PROPERTY_HINT_KEY_ACCEL),
- BIND_GLOBAL_CONSTANT(PROPERTY_HINT_FLAGS),
-
- BIND_GLOBAL_CONSTANT(PROPERTY_HINT_LAYERS_2D_RENDER),
- BIND_GLOBAL_CONSTANT(PROPERTY_HINT_LAYERS_2D_PHYSICS),
- BIND_GLOBAL_CONSTANT(PROPERTY_HINT_LAYERS_3D_RENDER),
- BIND_GLOBAL_CONSTANT(PROPERTY_HINT_LAYERS_3D_PHYSICS),
-
- BIND_GLOBAL_CONSTANT(PROPERTY_HINT_FILE),
- BIND_GLOBAL_CONSTANT(PROPERTY_HINT_DIR),
- BIND_GLOBAL_CONSTANT(PROPERTY_HINT_GLOBAL_FILE),
- BIND_GLOBAL_CONSTANT(PROPERTY_HINT_GLOBAL_DIR),
- BIND_GLOBAL_CONSTANT(PROPERTY_HINT_RESOURCE_TYPE),
- BIND_GLOBAL_CONSTANT(PROPERTY_HINT_MULTILINE_TEXT),
- BIND_GLOBAL_CONSTANT(PROPERTY_HINT_COLOR_NO_ALPHA),
- BIND_GLOBAL_CONSTANT(PROPERTY_HINT_IMAGE_COMPRESS_LOSSY),
- BIND_GLOBAL_CONSTANT(PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS),
-
- BIND_GLOBAL_CONSTANT(PROPERTY_USAGE_STORAGE),
- BIND_GLOBAL_CONSTANT(PROPERTY_USAGE_EDITOR),
- BIND_GLOBAL_CONSTANT(PROPERTY_USAGE_NETWORK),
-
- BIND_GLOBAL_CONSTANT(PROPERTY_USAGE_EDITOR_HELPER),
- BIND_GLOBAL_CONSTANT(PROPERTY_USAGE_CHECKABLE),
- BIND_GLOBAL_CONSTANT(PROPERTY_USAGE_CHECKED),
- BIND_GLOBAL_CONSTANT(PROPERTY_USAGE_INTERNATIONALIZED),
- BIND_GLOBAL_CONSTANT(PROPERTY_USAGE_GROUP),
- BIND_GLOBAL_CONSTANT(PROPERTY_USAGE_CATEGORY),
- BIND_GLOBAL_CONSTANT(PROPERTY_USAGE_STORE_IF_NONZERO),
- BIND_GLOBAL_CONSTANT(PROPERTY_USAGE_STORE_IF_NONONE),
- BIND_GLOBAL_CONSTANT(PROPERTY_USAGE_NO_INSTANCE_STATE),
- BIND_GLOBAL_CONSTANT(PROPERTY_USAGE_RESTART_IF_CHANGED),
- BIND_GLOBAL_CONSTANT(PROPERTY_USAGE_SCRIPT_VARIABLE),
-
- BIND_GLOBAL_CONSTANT(PROPERTY_USAGE_DEFAULT),
- BIND_GLOBAL_CONSTANT(PROPERTY_USAGE_DEFAULT_INTL),
- BIND_GLOBAL_CONSTANT(PROPERTY_USAGE_NOEDITOR),
-
- BIND_GLOBAL_CONSTANT(METHOD_FLAG_NORMAL),
- BIND_GLOBAL_CONSTANT(METHOD_FLAG_EDITOR),
- BIND_GLOBAL_CONSTANT(METHOD_FLAG_NOSCRIPT),
- BIND_GLOBAL_CONSTANT(METHOD_FLAG_CONST),
- BIND_GLOBAL_CONSTANT(METHOD_FLAG_REVERSE),
- BIND_GLOBAL_CONSTANT(METHOD_FLAG_VIRTUAL),
- BIND_GLOBAL_CONSTANT(METHOD_FLAG_FROM_SCRIPT),
- BIND_GLOBAL_CONSTANT(METHOD_FLAGS_DEFAULT),
-
- { "TYPE_NIL", Variant::NIL },
- { "TYPE_BOOL", Variant::BOOL },
- { "TYPE_INT", Variant::INT },
- { "TYPE_REAL", Variant::REAL },
- { "TYPE_STRING", Variant::STRING },
- { "TYPE_VECTOR2", Variant::VECTOR2 }, // 5
- { "TYPE_RECT2", Variant::RECT2 },
- { "TYPE_VECTOR3", Variant::VECTOR3 },
- { "TYPE_TRANSFORM2D", Variant::TRANSFORM2D },
- { "TYPE_PLANE", Variant::PLANE },
- { "TYPE_QUAT", Variant::QUAT }, // 10
- { "TYPE_RECT3", Variant::RECT3 },
- { "TYPE_BASIS", Variant::BASIS },
- { "TYPE_TRANSFORM", Variant::TRANSFORM },
- { "TYPE_COLOR", Variant::COLOR },
- { "TYPE_NODE_PATH", Variant::NODE_PATH }, // 15
- { "TYPE_RID", Variant::_RID },
- { "TYPE_OBJECT", Variant::OBJECT },
- { "TYPE_DICTIONARY", Variant::DICTIONARY }, // 20
- { "TYPE_ARRAY", Variant::ARRAY },
- { "TYPE_RAW_ARRAY", Variant::POOL_BYTE_ARRAY },
- { "TYPE_INT_ARRAY", Variant::POOL_INT_ARRAY },
- { "TYPE_REAL_ARRAY", Variant::POOL_REAL_ARRAY },
- { "TYPE_STRING_ARRAY", Variant::POOL_STRING_ARRAY },
- { "TYPE_VECTOR2_ARRAY", Variant::POOL_VECTOR2_ARRAY }, // 25
- { "TYPE_VECTOR3_ARRAY", Variant::POOL_VECTOR3_ARRAY },
- { "TYPE_COLOR_ARRAY", Variant::POOL_COLOR_ARRAY },
- { "TYPE_MAX", Variant::VARIANT_MAX },
- { NULL, 0 }
+ BIND_GLOBAL_ENUM_CONSTANT(OK);
+ BIND_GLOBAL_ENUM_CONSTANT(FAILED); ///< Generic fail error
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_UNAVAILABLE); ///< What is requested is unsupported/unavailable
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_UNCONFIGURED); ///< The object being used hasn't been properly set up yet
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_UNAUTHORIZED); ///< Missing credentials for requested resource
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_PARAMETER_RANGE_ERROR); ///< Parameter given out of range
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_OUT_OF_MEMORY); ///< Out of memory
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_NOT_FOUND);
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_BAD_DRIVE);
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_BAD_PATH);
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_NO_PERMISSION);
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_ALREADY_IN_USE);
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_CANT_OPEN);
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_CANT_WRITE);
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_CANT_READ);
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_UNRECOGNIZED);
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_CORRUPT);
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_MISSING_DEPENDENCIES);
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_FILE_EOF);
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_CANT_OPEN); ///< Can't open a resource/socket/file
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_CANT_CREATE);
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_PARSE_ERROR);
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_QUERY_FAILED);
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_ALREADY_IN_USE);
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_LOCKED); ///< resource is locked
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_TIMEOUT);
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_CANT_AQUIRE_RESOURCE);
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_INVALID_DATA); ///< Data passed is invalid
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_INVALID_PARAMETER); ///< Parameter passed is invalid
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_ALREADY_EXISTS); ///< When adding ), item already exists
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_DOES_NOT_EXIST); ///< When retrieving/erasing ), it item does not exist
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_DATABASE_CANT_READ); ///< database is full
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_DATABASE_CANT_WRITE); ///< database is full
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_COMPILATION_FAILED);
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_METHOD_NOT_FOUND);
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_LINK_FAILED);
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_SCRIPT_FAILED);
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_CYCLIC_LINK);
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_BUSY);
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_HELP); ///< user requested help!!
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_BUG); ///< a bug in the software certainly happened ), due to a double check failing or unexpected behavior.
+ BIND_GLOBAL_ENUM_CONSTANT(ERR_WTF);
+
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_NONE);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_RANGE);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_EXP_RANGE);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_ENUM);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_EXP_EASING);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_LENGTH);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_KEY_ACCEL);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_FLAGS);
+
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_LAYERS_2D_RENDER);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_LAYERS_2D_PHYSICS);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_LAYERS_3D_RENDER);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_LAYERS_3D_PHYSICS);
+
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_FILE);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_DIR);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_GLOBAL_FILE);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_GLOBAL_DIR);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_RESOURCE_TYPE);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_MULTILINE_TEXT);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_COLOR_NO_ALPHA);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_IMAGE_COMPRESS_LOSSY);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS);
+
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_STORAGE);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_EDITOR);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_NETWORK);
+
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_EDITOR_HELPER);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_CHECKABLE);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_CHECKED);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_INTERNATIONALIZED);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_GROUP);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_CATEGORY);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_STORE_IF_NONZERO);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_STORE_IF_NONONE);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_NO_INSTANCE_STATE);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_RESTART_IF_CHANGED);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_SCRIPT_VARIABLE);
+
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_DEFAULT);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_DEFAULT_INTL);
+ BIND_GLOBAL_ENUM_CONSTANT(PROPERTY_USAGE_NOEDITOR);
+
+ BIND_GLOBAL_ENUM_CONSTANT(METHOD_FLAG_NORMAL);
+ BIND_GLOBAL_ENUM_CONSTANT(METHOD_FLAG_EDITOR);
+ BIND_GLOBAL_ENUM_CONSTANT(METHOD_FLAG_NOSCRIPT);
+ BIND_GLOBAL_ENUM_CONSTANT(METHOD_FLAG_CONST);
+ BIND_GLOBAL_ENUM_CONSTANT(METHOD_FLAG_REVERSE);
+ BIND_GLOBAL_ENUM_CONSTANT(METHOD_FLAG_VIRTUAL);
+ BIND_GLOBAL_ENUM_CONSTANT(METHOD_FLAG_FROM_SCRIPT);
+ BIND_GLOBAL_ENUM_CONSTANT(METHOD_FLAGS_DEFAULT);
+
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_NIL", Variant::NIL);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_BOOL", Variant::BOOL);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_INT", Variant::INT);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_REAL", Variant::REAL);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_STRING", Variant::STRING);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR2", Variant::VECTOR2); // 5
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RECT2", Variant::RECT2);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR3", Variant::VECTOR3);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_TRANSFORM2D", Variant::TRANSFORM2D);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_PLANE", Variant::PLANE);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_QUAT", Variant::QUAT); // 10
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RECT3", Variant::RECT3);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_BASIS", Variant::BASIS);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_TRANSFORM", Variant::TRANSFORM);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_COLOR", Variant::COLOR);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_NODE_PATH", Variant::NODE_PATH); // 15
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RID", Variant::_RID);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_OBJECT", Variant::OBJECT);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_DICTIONARY", Variant::DICTIONARY); // 20
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_ARRAY", Variant::ARRAY);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_RAW_ARRAY", Variant::POOL_BYTE_ARRAY);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_INT_ARRAY", Variant::POOL_INT_ARRAY);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_REAL_ARRAY", Variant::POOL_REAL_ARRAY);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_STRING_ARRAY", Variant::POOL_STRING_ARRAY);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR2_ARRAY", Variant::POOL_VECTOR2_ARRAY); // 25
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_VECTOR3_ARRAY", Variant::POOL_VECTOR3_ARRAY);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_COLOR_ARRAY", Variant::POOL_COLOR_ARRAY);
+ BIND_GLOBAL_ENUM_CONSTANT_CUSTOM("TYPE_MAX", Variant::VARIANT_MAX);
+}
-};
+void unregister_global_constants() {
+
+ _global_constants.clear();
+}
int GlobalConstants::get_global_constant_count() {
- int i = 0;
- while (_global_constants[i].name)
- i++;
- return i;
+ return _global_constants.size();
+}
+
+#ifdef DEBUG_METHODS_ENABLED
+StringName GlobalConstants::get_global_constant_enum(int p_idx) {
+
+ return _global_constants[p_idx].enum_name;
+}
+#else
+StringName GlobalConstants::get_global_constant_enum(int p_idx) {
+
+ return StringName();
}
+#endif
const char *GlobalConstants::get_global_constant_name(int p_idx) {
diff --git a/core/global_constants.h b/core/global_constants.h
index f298fc31c7..ad639d0afa 100644
--- a/core/global_constants.h
+++ b/core/global_constants.h
@@ -30,9 +30,12 @@
#ifndef GLOBAL_CONSTANTS_H
#define GLOBAL_CONSTANTS_H
+#include "string_db.h"
+
class GlobalConstants {
public:
static int get_global_constant_count();
+ static StringName get_global_constant_enum(int p_idx);
static const char *get_global_constant_name(int p_idx);
static int get_global_constant_value(int p_idx);
};
diff --git a/core/image.cpp b/core/image.cpp
index a4864458b5..91572e44e4 100644
--- a/core/image.cpp
+++ b/core/image.cpp
@@ -2275,62 +2275,62 @@ void Image::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE), "_set_data", "_get_data");
- BIND_CONSTANT(FORMAT_L8); //luminance
- BIND_CONSTANT(FORMAT_LA8); //luminance-alpha
- BIND_CONSTANT(FORMAT_R8);
- BIND_CONSTANT(FORMAT_RG8);
- BIND_CONSTANT(FORMAT_RGB8);
- BIND_CONSTANT(FORMAT_RGBA8);
- BIND_CONSTANT(FORMAT_RGBA4444);
- BIND_CONSTANT(FORMAT_RGBA5551);
- BIND_CONSTANT(FORMAT_RF); //float
- BIND_CONSTANT(FORMAT_RGF);
- BIND_CONSTANT(FORMAT_RGBF);
- BIND_CONSTANT(FORMAT_RGBAF);
- BIND_CONSTANT(FORMAT_RH); //half float
- BIND_CONSTANT(FORMAT_RGH);
- BIND_CONSTANT(FORMAT_RGBH);
- BIND_CONSTANT(FORMAT_RGBAH);
- BIND_CONSTANT(FORMAT_RGBE9995);
- BIND_CONSTANT(FORMAT_DXT1); //s3tc bc1
- BIND_CONSTANT(FORMAT_DXT3); //bc2
- BIND_CONSTANT(FORMAT_DXT5); //bc3
- BIND_CONSTANT(FORMAT_RGTC_R);
- BIND_CONSTANT(FORMAT_RGTC_RG);
- BIND_CONSTANT(FORMAT_BPTC_RGBA); //btpc bc6h
- BIND_CONSTANT(FORMAT_BPTC_RGBF); //float /
- BIND_CONSTANT(FORMAT_BPTC_RGBFU); //unsigned float
- BIND_CONSTANT(FORMAT_PVRTC2); //pvrtc
- BIND_CONSTANT(FORMAT_PVRTC2A);
- BIND_CONSTANT(FORMAT_PVRTC4);
- BIND_CONSTANT(FORMAT_PVRTC4A);
- BIND_CONSTANT(FORMAT_ETC); //etc1
- BIND_CONSTANT(FORMAT_ETC2_R11); //etc2
- BIND_CONSTANT(FORMAT_ETC2_R11S); //signed ); NOT srgb.
- BIND_CONSTANT(FORMAT_ETC2_RG11);
- BIND_CONSTANT(FORMAT_ETC2_RG11S);
- BIND_CONSTANT(FORMAT_ETC2_RGB8);
- BIND_CONSTANT(FORMAT_ETC2_RGBA8);
- BIND_CONSTANT(FORMAT_ETC2_RGB8A1);
- BIND_CONSTANT(FORMAT_MAX);
-
- BIND_CONSTANT(INTERPOLATE_NEAREST);
- BIND_CONSTANT(INTERPOLATE_BILINEAR);
- BIND_CONSTANT(INTERPOLATE_CUBIC);
-
- BIND_CONSTANT(ALPHA_NONE);
- BIND_CONSTANT(ALPHA_BIT);
- BIND_CONSTANT(ALPHA_BLEND);
-
- BIND_CONSTANT(COMPRESS_S3TC);
- BIND_CONSTANT(COMPRESS_PVRTC2);
- BIND_CONSTANT(COMPRESS_PVRTC4);
- BIND_CONSTANT(COMPRESS_ETC);
- BIND_CONSTANT(COMPRESS_ETC2);
-
- BIND_CONSTANT(COMPRESS_SOURCE_GENERIC);
- BIND_CONSTANT(COMPRESS_SOURCE_SRGB);
- BIND_CONSTANT(COMPRESS_SOURCE_NORMAL);
+ BIND_ENUM_CONSTANT(FORMAT_L8); //luminance
+ BIND_ENUM_CONSTANT(FORMAT_LA8); //luminance-alpha
+ BIND_ENUM_CONSTANT(FORMAT_R8);
+ BIND_ENUM_CONSTANT(FORMAT_RG8);
+ BIND_ENUM_CONSTANT(FORMAT_RGB8);
+ BIND_ENUM_CONSTANT(FORMAT_RGBA8);
+ BIND_ENUM_CONSTANT(FORMAT_RGBA4444);
+ BIND_ENUM_CONSTANT(FORMAT_RGBA5551);
+ BIND_ENUM_CONSTANT(FORMAT_RF); //float
+ BIND_ENUM_CONSTANT(FORMAT_RGF);
+ BIND_ENUM_CONSTANT(FORMAT_RGBF);
+ BIND_ENUM_CONSTANT(FORMAT_RGBAF);
+ BIND_ENUM_CONSTANT(FORMAT_RH); //half float
+ BIND_ENUM_CONSTANT(FORMAT_RGH);
+ BIND_ENUM_CONSTANT(FORMAT_RGBH);
+ BIND_ENUM_CONSTANT(FORMAT_RGBAH);
+ BIND_ENUM_CONSTANT(FORMAT_RGBE9995);
+ BIND_ENUM_CONSTANT(FORMAT_DXT1); //s3tc bc1
+ BIND_ENUM_CONSTANT(FORMAT_DXT3); //bc2
+ BIND_ENUM_CONSTANT(FORMAT_DXT5); //bc3
+ BIND_ENUM_CONSTANT(FORMAT_RGTC_R);
+ BIND_ENUM_CONSTANT(FORMAT_RGTC_RG);
+ BIND_ENUM_CONSTANT(FORMAT_BPTC_RGBA); //btpc bc6h
+ BIND_ENUM_CONSTANT(FORMAT_BPTC_RGBF); //float /
+ BIND_ENUM_CONSTANT(FORMAT_BPTC_RGBFU); //unsigned float
+ BIND_ENUM_CONSTANT(FORMAT_PVRTC2); //pvrtc
+ BIND_ENUM_CONSTANT(FORMAT_PVRTC2A);
+ BIND_ENUM_CONSTANT(FORMAT_PVRTC4);
+ BIND_ENUM_CONSTANT(FORMAT_PVRTC4A);
+ BIND_ENUM_CONSTANT(FORMAT_ETC); //etc1
+ BIND_ENUM_CONSTANT(FORMAT_ETC2_R11); //etc2
+ BIND_ENUM_CONSTANT(FORMAT_ETC2_R11S); //signed ); NOT srgb.
+ BIND_ENUM_CONSTANT(FORMAT_ETC2_RG11);
+ BIND_ENUM_CONSTANT(FORMAT_ETC2_RG11S);
+ BIND_ENUM_CONSTANT(FORMAT_ETC2_RGB8);
+ BIND_ENUM_CONSTANT(FORMAT_ETC2_RGBA8);
+ BIND_ENUM_CONSTANT(FORMAT_ETC2_RGB8A1);
+ BIND_ENUM_CONSTANT(FORMAT_MAX);
+
+ BIND_ENUM_CONSTANT(INTERPOLATE_NEAREST);
+ BIND_ENUM_CONSTANT(INTERPOLATE_BILINEAR);
+ BIND_ENUM_CONSTANT(INTERPOLATE_CUBIC);
+
+ BIND_ENUM_CONSTANT(ALPHA_NONE);
+ BIND_ENUM_CONSTANT(ALPHA_BIT);
+ BIND_ENUM_CONSTANT(ALPHA_BLEND);
+
+ BIND_ENUM_CONSTANT(COMPRESS_S3TC);
+ BIND_ENUM_CONSTANT(COMPRESS_PVRTC2);
+ BIND_ENUM_CONSTANT(COMPRESS_PVRTC4);
+ BIND_ENUM_CONSTANT(COMPRESS_ETC);
+ BIND_ENUM_CONSTANT(COMPRESS_ETC2);
+
+ BIND_ENUM_CONSTANT(COMPRESS_SOURCE_GENERIC);
+ BIND_ENUM_CONSTANT(COMPRESS_SOURCE_SRGB);
+ BIND_ENUM_CONSTANT(COMPRESS_SOURCE_NORMAL);
}
void Image::set_compress_bc_func(void (*p_compress_func)(Image *, CompressSource)) {
diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp
index 4d5b88cfa1..1c35c6edeb 100644
--- a/core/io/http_client.cpp
+++ b/core/io/http_client.cpp
@@ -650,84 +650,84 @@ void HTTPClient::_bind_methods() {
ClassDB::bind_method(D_METHOD("query_string_from_dict", "fields"), &HTTPClient::query_string_from_dict);
- BIND_CONSTANT(METHOD_GET);
- BIND_CONSTANT(METHOD_HEAD);
- BIND_CONSTANT(METHOD_POST);
- BIND_CONSTANT(METHOD_PUT);
- BIND_CONSTANT(METHOD_DELETE);
- BIND_CONSTANT(METHOD_OPTIONS);
- BIND_CONSTANT(METHOD_TRACE);
- BIND_CONSTANT(METHOD_CONNECT);
- BIND_CONSTANT(METHOD_MAX);
-
- BIND_CONSTANT(STATUS_DISCONNECTED);
- BIND_CONSTANT(STATUS_RESOLVING); //resolving hostname (if passed a hostname)
- BIND_CONSTANT(STATUS_CANT_RESOLVE);
- BIND_CONSTANT(STATUS_CONNECTING); //connecting to ip
- BIND_CONSTANT(STATUS_CANT_CONNECT);
- BIND_CONSTANT(STATUS_CONNECTED); //connected ); requests only accepted here
- BIND_CONSTANT(STATUS_REQUESTING); // request in progress
- BIND_CONSTANT(STATUS_BODY); // request resulted in body ); which must be read
- BIND_CONSTANT(STATUS_CONNECTION_ERROR);
- BIND_CONSTANT(STATUS_SSL_HANDSHAKE_ERROR);
-
- BIND_CONSTANT(RESPONSE_CONTINUE);
- BIND_CONSTANT(RESPONSE_SWITCHING_PROTOCOLS);
- BIND_CONSTANT(RESPONSE_PROCESSING);
+ BIND_ENUM_CONSTANT(METHOD_GET);
+ BIND_ENUM_CONSTANT(METHOD_HEAD);
+ BIND_ENUM_CONSTANT(METHOD_POST);
+ BIND_ENUM_CONSTANT(METHOD_PUT);
+ BIND_ENUM_CONSTANT(METHOD_DELETE);
+ BIND_ENUM_CONSTANT(METHOD_OPTIONS);
+ BIND_ENUM_CONSTANT(METHOD_TRACE);
+ BIND_ENUM_CONSTANT(METHOD_CONNECT);
+ BIND_ENUM_CONSTANT(METHOD_MAX);
+
+ BIND_ENUM_CONSTANT(STATUS_DISCONNECTED);
+ BIND_ENUM_CONSTANT(STATUS_RESOLVING); //resolving hostname (if passed a hostname)
+ BIND_ENUM_CONSTANT(STATUS_CANT_RESOLVE);
+ BIND_ENUM_CONSTANT(STATUS_CONNECTING); //connecting to ip
+ BIND_ENUM_CONSTANT(STATUS_CANT_CONNECT);
+ BIND_ENUM_CONSTANT(STATUS_CONNECTED); //connected ); requests only accepted here
+ BIND_ENUM_CONSTANT(STATUS_REQUESTING); // request in progress
+ BIND_ENUM_CONSTANT(STATUS_BODY); // request resulted in body ); which must be read
+ BIND_ENUM_CONSTANT(STATUS_CONNECTION_ERROR);
+ BIND_ENUM_CONSTANT(STATUS_SSL_HANDSHAKE_ERROR);
+
+ BIND_ENUM_CONSTANT(RESPONSE_CONTINUE);
+ BIND_ENUM_CONSTANT(RESPONSE_SWITCHING_PROTOCOLS);
+ BIND_ENUM_CONSTANT(RESPONSE_PROCESSING);
// 2xx successful
- BIND_CONSTANT(RESPONSE_OK);
- BIND_CONSTANT(RESPONSE_CREATED);
- BIND_CONSTANT(RESPONSE_ACCEPTED);
- BIND_CONSTANT(RESPONSE_NON_AUTHORITATIVE_INFORMATION);
- BIND_CONSTANT(RESPONSE_NO_CONTENT);
- BIND_CONSTANT(RESPONSE_RESET_CONTENT);
- BIND_CONSTANT(RESPONSE_PARTIAL_CONTENT);
- BIND_CONSTANT(RESPONSE_MULTI_STATUS);
- BIND_CONSTANT(RESPONSE_IM_USED);
+ BIND_ENUM_CONSTANT(RESPONSE_OK);
+ BIND_ENUM_CONSTANT(RESPONSE_CREATED);
+ BIND_ENUM_CONSTANT(RESPONSE_ACCEPTED);
+ BIND_ENUM_CONSTANT(RESPONSE_NON_AUTHORITATIVE_INFORMATION);
+ BIND_ENUM_CONSTANT(RESPONSE_NO_CONTENT);
+ BIND_ENUM_CONSTANT(RESPONSE_RESET_CONTENT);
+ BIND_ENUM_CONSTANT(RESPONSE_PARTIAL_CONTENT);
+ BIND_ENUM_CONSTANT(RESPONSE_MULTI_STATUS);
+ BIND_ENUM_CONSTANT(RESPONSE_IM_USED);
// 3xx redirection
- BIND_CONSTANT(RESPONSE_MULTIPLE_CHOICES);
- BIND_CONSTANT(RESPONSE_MOVED_PERMANENTLY);
- BIND_CONSTANT(RESPONSE_FOUND);
- BIND_CONSTANT(RESPONSE_SEE_OTHER);
- BIND_CONSTANT(RESPONSE_NOT_MODIFIED);
- BIND_CONSTANT(RESPONSE_USE_PROXY);
- BIND_CONSTANT(RESPONSE_TEMPORARY_REDIRECT);
+ BIND_ENUM_CONSTANT(RESPONSE_MULTIPLE_CHOICES);
+ BIND_ENUM_CONSTANT(RESPONSE_MOVED_PERMANENTLY);
+ BIND_ENUM_CONSTANT(RESPONSE_FOUND);
+ BIND_ENUM_CONSTANT(RESPONSE_SEE_OTHER);
+ BIND_ENUM_CONSTANT(RESPONSE_NOT_MODIFIED);
+ BIND_ENUM_CONSTANT(RESPONSE_USE_PROXY);
+ BIND_ENUM_CONSTANT(RESPONSE_TEMPORARY_REDIRECT);
// 4xx client error
- BIND_CONSTANT(RESPONSE_BAD_REQUEST);
- BIND_CONSTANT(RESPONSE_UNAUTHORIZED);
- BIND_CONSTANT(RESPONSE_PAYMENT_REQUIRED);
- BIND_CONSTANT(RESPONSE_FORBIDDEN);
- BIND_CONSTANT(RESPONSE_NOT_FOUND);
- BIND_CONSTANT(RESPONSE_METHOD_NOT_ALLOWED);
- BIND_CONSTANT(RESPONSE_NOT_ACCEPTABLE);
- BIND_CONSTANT(RESPONSE_PROXY_AUTHENTICATION_REQUIRED);
- BIND_CONSTANT(RESPONSE_REQUEST_TIMEOUT);
- BIND_CONSTANT(RESPONSE_CONFLICT);
- BIND_CONSTANT(RESPONSE_GONE);
- BIND_CONSTANT(RESPONSE_LENGTH_REQUIRED);
- BIND_CONSTANT(RESPONSE_PRECONDITION_FAILED);
- BIND_CONSTANT(RESPONSE_REQUEST_ENTITY_TOO_LARGE);
- BIND_CONSTANT(RESPONSE_REQUEST_URI_TOO_LONG);
- BIND_CONSTANT(RESPONSE_UNSUPPORTED_MEDIA_TYPE);
- BIND_CONSTANT(RESPONSE_REQUESTED_RANGE_NOT_SATISFIABLE);
- BIND_CONSTANT(RESPONSE_EXPECTATION_FAILED);
- BIND_CONSTANT(RESPONSE_UNPROCESSABLE_ENTITY);
- BIND_CONSTANT(RESPONSE_LOCKED);
- BIND_CONSTANT(RESPONSE_FAILED_DEPENDENCY);
- BIND_CONSTANT(RESPONSE_UPGRADE_REQUIRED);
+ BIND_ENUM_CONSTANT(RESPONSE_BAD_REQUEST);
+ BIND_ENUM_CONSTANT(RESPONSE_UNAUTHORIZED);
+ BIND_ENUM_CONSTANT(RESPONSE_PAYMENT_REQUIRED);
+ BIND_ENUM_CONSTANT(RESPONSE_FORBIDDEN);
+ BIND_ENUM_CONSTANT(RESPONSE_NOT_FOUND);
+ BIND_ENUM_CONSTANT(RESPONSE_METHOD_NOT_ALLOWED);
+ BIND_ENUM_CONSTANT(RESPONSE_NOT_ACCEPTABLE);
+ BIND_ENUM_CONSTANT(RESPONSE_PROXY_AUTHENTICATION_REQUIRED);
+ BIND_ENUM_CONSTANT(RESPONSE_REQUEST_TIMEOUT);
+ BIND_ENUM_CONSTANT(RESPONSE_CONFLICT);
+ BIND_ENUM_CONSTANT(RESPONSE_GONE);
+ BIND_ENUM_CONSTANT(RESPONSE_LENGTH_REQUIRED);
+ BIND_ENUM_CONSTANT(RESPONSE_PRECONDITION_FAILED);
+ BIND_ENUM_CONSTANT(RESPONSE_REQUEST_ENTITY_TOO_LARGE);
+ BIND_ENUM_CONSTANT(RESPONSE_REQUEST_URI_TOO_LONG);
+ BIND_ENUM_CONSTANT(RESPONSE_UNSUPPORTED_MEDIA_TYPE);
+ BIND_ENUM_CONSTANT(RESPONSE_REQUESTED_RANGE_NOT_SATISFIABLE);
+ BIND_ENUM_CONSTANT(RESPONSE_EXPECTATION_FAILED);
+ BIND_ENUM_CONSTANT(RESPONSE_UNPROCESSABLE_ENTITY);
+ BIND_ENUM_CONSTANT(RESPONSE_LOCKED);
+ BIND_ENUM_CONSTANT(RESPONSE_FAILED_DEPENDENCY);
+ BIND_ENUM_CONSTANT(RESPONSE_UPGRADE_REQUIRED);
// 5xx server error
- BIND_CONSTANT(RESPONSE_INTERNAL_SERVER_ERROR);
- BIND_CONSTANT(RESPONSE_NOT_IMPLEMENTED);
- BIND_CONSTANT(RESPONSE_BAD_GATEWAY);
- BIND_CONSTANT(RESPONSE_SERVICE_UNAVAILABLE);
- BIND_CONSTANT(RESPONSE_GATEWAY_TIMEOUT);
- BIND_CONSTANT(RESPONSE_HTTP_VERSION_NOT_SUPPORTED);
- BIND_CONSTANT(RESPONSE_INSUFFICIENT_STORAGE);
- BIND_CONSTANT(RESPONSE_NOT_EXTENDED);
+ BIND_ENUM_CONSTANT(RESPONSE_INTERNAL_SERVER_ERROR);
+ BIND_ENUM_CONSTANT(RESPONSE_NOT_IMPLEMENTED);
+ BIND_ENUM_CONSTANT(RESPONSE_BAD_GATEWAY);
+ BIND_ENUM_CONSTANT(RESPONSE_SERVICE_UNAVAILABLE);
+ BIND_ENUM_CONSTANT(RESPONSE_GATEWAY_TIMEOUT);
+ BIND_ENUM_CONSTANT(RESPONSE_HTTP_VERSION_NOT_SUPPORTED);
+ BIND_ENUM_CONSTANT(RESPONSE_INSUFFICIENT_STORAGE);
+ BIND_ENUM_CONSTANT(RESPONSE_NOT_EXTENDED);
}
void HTTPClient::set_read_chunk_size(int p_size) {
diff --git a/core/io/http_client.h b/core/io/http_client.h
index 3cee1e0c6b..cc5f1ed935 100644
--- a/core/io/http_client.h
+++ b/core/io/http_client.h
@@ -197,6 +197,7 @@ public:
~HTTPClient();
};
+VARIANT_ENUM_CAST(HTTPClient::ResponseCode)
VARIANT_ENUM_CAST(HTTPClient::Method);
VARIANT_ENUM_CAST(HTTPClient::Status);
diff --git a/core/io/ip.cpp b/core/io/ip.cpp
index c869bdad9b..0e2b5ed519 100644
--- a/core/io/ip.cpp
+++ b/core/io/ip.cpp
@@ -242,18 +242,18 @@ void IP::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_local_addresses"), &IP::_get_local_addresses);
ClassDB::bind_method(D_METHOD("clear_cache", "hostname"), &IP::clear_cache, DEFVAL(""));
- BIND_CONSTANT(RESOLVER_STATUS_NONE);
- BIND_CONSTANT(RESOLVER_STATUS_WAITING);
- BIND_CONSTANT(RESOLVER_STATUS_DONE);
- BIND_CONSTANT(RESOLVER_STATUS_ERROR);
+ BIND_ENUM_CONSTANT(RESOLVER_STATUS_NONE);
+ BIND_ENUM_CONSTANT(RESOLVER_STATUS_WAITING);
+ BIND_ENUM_CONSTANT(RESOLVER_STATUS_DONE);
+ BIND_ENUM_CONSTANT(RESOLVER_STATUS_ERROR);
BIND_CONSTANT(RESOLVER_MAX_QUERIES);
BIND_CONSTANT(RESOLVER_INVALID_ID);
- BIND_CONSTANT(TYPE_NONE);
- BIND_CONSTANT(TYPE_IPV4);
- BIND_CONSTANT(TYPE_IPV6);
- BIND_CONSTANT(TYPE_ANY);
+ BIND_ENUM_CONSTANT(TYPE_NONE);
+ BIND_ENUM_CONSTANT(TYPE_IPV4);
+ BIND_ENUM_CONSTANT(TYPE_IPV6);
+ BIND_ENUM_CONSTANT(TYPE_ANY);
}
IP *IP::singleton = NULL;
diff --git a/core/io/networked_multiplayer_peer.cpp b/core/io/networked_multiplayer_peer.cpp
index 105b8dce44..402526a52c 100644
--- a/core/io/networked_multiplayer_peer.cpp
+++ b/core/io/networked_multiplayer_peer.cpp
@@ -44,13 +44,13 @@ void NetworkedMultiplayerPeer::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_refuse_new_connections", "enable"), &NetworkedMultiplayerPeer::set_refuse_new_connections);
ClassDB::bind_method(D_METHOD("is_refusing_new_connections"), &NetworkedMultiplayerPeer::is_refusing_new_connections);
- BIND_CONSTANT(TRANSFER_MODE_UNRELIABLE);
- BIND_CONSTANT(TRANSFER_MODE_UNRELIABLE_ORDERED);
- BIND_CONSTANT(TRANSFER_MODE_RELIABLE);
+ BIND_ENUM_CONSTANT(TRANSFER_MODE_UNRELIABLE);
+ BIND_ENUM_CONSTANT(TRANSFER_MODE_UNRELIABLE_ORDERED);
+ BIND_ENUM_CONSTANT(TRANSFER_MODE_RELIABLE);
- BIND_CONSTANT(CONNECTION_DISCONNECTED);
- BIND_CONSTANT(CONNECTION_CONNECTING);
- BIND_CONSTANT(CONNECTION_CONNECTED);
+ BIND_ENUM_CONSTANT(CONNECTION_DISCONNECTED);
+ BIND_ENUM_CONSTANT(CONNECTION_CONNECTING);
+ BIND_ENUM_CONSTANT(CONNECTION_CONNECTED);
BIND_CONSTANT(TARGET_PEER_BROADCAST);
BIND_CONSTANT(TARGET_PEER_SERVER);
diff --git a/core/io/stream_peer_ssl.cpp b/core/io/stream_peer_ssl.cpp
index ef3c264375..24f6473330 100644
--- a/core/io/stream_peer_ssl.cpp
+++ b/core/io/stream_peer_ssl.cpp
@@ -55,10 +55,11 @@ void StreamPeerSSL::_bind_methods() {
ClassDB::bind_method(D_METHOD("connect_to_stream", "stream", "validate_certs", "for_hostname"), &StreamPeerSSL::connect_to_stream, DEFVAL(false), DEFVAL(String()));
ClassDB::bind_method(D_METHOD("get_status"), &StreamPeerSSL::get_status);
ClassDB::bind_method(D_METHOD("disconnect_from_stream"), &StreamPeerSSL::disconnect_from_stream);
- BIND_CONSTANT(STATUS_DISCONNECTED);
- BIND_CONSTANT(STATUS_CONNECTED);
- BIND_CONSTANT(STATUS_ERROR_NO_CERTIFICATE);
- BIND_CONSTANT(STATUS_ERROR_HOSTNAME_MISMATCH);
+
+ BIND_ENUM_CONSTANT(STATUS_DISCONNECTED);
+ BIND_ENUM_CONSTANT(STATUS_CONNECTED);
+ BIND_ENUM_CONSTANT(STATUS_ERROR_NO_CERTIFICATE);
+ BIND_ENUM_CONSTANT(STATUS_ERROR_HOSTNAME_MISMATCH);
}
StreamPeerSSL::StreamPeerSSL() {
diff --git a/core/io/stream_peer_tcp.cpp b/core/io/stream_peer_tcp.cpp
index 5c859ea7c0..ae5603aa31 100644
--- a/core/io/stream_peer_tcp.cpp
+++ b/core/io/stream_peer_tcp.cpp
@@ -55,10 +55,10 @@ void StreamPeerTCP::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_connected_port"), &StreamPeerTCP::get_connected_port);
ClassDB::bind_method(D_METHOD("disconnect_from_host"), &StreamPeerTCP::disconnect_from_host);
- BIND_CONSTANT(STATUS_NONE);
- BIND_CONSTANT(STATUS_CONNECTING);
- BIND_CONSTANT(STATUS_CONNECTED);
- BIND_CONSTANT(STATUS_ERROR);
+ BIND_ENUM_CONSTANT(STATUS_NONE);
+ BIND_ENUM_CONSTANT(STATUS_CONNECTING);
+ BIND_ENUM_CONSTANT(STATUS_CONNECTED);
+ BIND_ENUM_CONSTANT(STATUS_ERROR);
}
Ref<StreamPeerTCP> StreamPeerTCP::create_ref() {
diff --git a/core/io/xml_parser.cpp b/core/io/xml_parser.cpp
index e5f4433b8f..d8b69b0951 100644
--- a/core/io/xml_parser.cpp
+++ b/core/io/xml_parser.cpp
@@ -373,13 +373,13 @@ void XMLParser::_bind_methods() {
ClassDB::bind_method(D_METHOD("open", "file"), &XMLParser::open);
ClassDB::bind_method(D_METHOD("open_buffer", "buffer"), &XMLParser::open_buffer);
- BIND_CONSTANT(NODE_NONE);
- BIND_CONSTANT(NODE_ELEMENT);
- BIND_CONSTANT(NODE_ELEMENT_END);
- BIND_CONSTANT(NODE_TEXT);
- BIND_CONSTANT(NODE_COMMENT);
- BIND_CONSTANT(NODE_CDATA);
- BIND_CONSTANT(NODE_UNKNOWN);
+ BIND_ENUM_CONSTANT(NODE_NONE);
+ BIND_ENUM_CONSTANT(NODE_ELEMENT);
+ BIND_ENUM_CONSTANT(NODE_ELEMENT_END);
+ BIND_ENUM_CONSTANT(NODE_TEXT);
+ BIND_ENUM_CONSTANT(NODE_COMMENT);
+ BIND_ENUM_CONSTANT(NODE_CDATA);
+ BIND_ENUM_CONSTANT(NODE_UNKNOWN);
};
Error XMLParser::read() {
diff --git a/core/method_bind.h b/core/method_bind.h
index 9bf0323733..157a67ca20 100644
--- a/core/method_bind.h
+++ b/core/method_bind.h
@@ -124,6 +124,9 @@ struct VariantCaster<const T &> {
#endif
+// Object enum casts must go here
+VARIANT_ENUM_CAST(Object::ConnectFlags);
+
#define CHECK_ARG(m_arg) \
if ((m_arg - 1) < p_arg_count) { \
Variant::Type argtype = get_argument_type(m_arg - 1); \
@@ -148,14 +151,35 @@ struct VariantCaster<const T &> {
VARIANT_ENUM_CAST(Vector3::Axis);
VARIANT_ENUM_CAST(Error);
-VARIANT_ENUM_CAST(wchar_t);
VARIANT_ENUM_CAST(Margin);
VARIANT_ENUM_CAST(Corner);
VARIANT_ENUM_CAST(Orientation);
VARIANT_ENUM_CAST(HAlign);
+VARIANT_ENUM_CAST(VAlign);
+VARIANT_ENUM_CAST(PropertyHint);
+VARIANT_ENUM_CAST(PropertyUsageFlags);
+VARIANT_ENUM_CAST(MethodFlags);
VARIANT_ENUM_CAST(Variant::Type);
VARIANT_ENUM_CAST(Variant::Operator);
+template <>
+struct VariantCaster<wchar_t> {
+ static _FORCE_INLINE_ wchar_t cast(const Variant &p_variant) {
+ return (wchar_t)p_variant.operator int();
+ }
+};
+#ifdef PTRCALL_ENABLED
+template <>
+struct PtrToArg<wchar_t> {
+ _FORCE_INLINE_ static wchar_t convert(const void *p_ptr) {
+ return wchar_t(*reinterpret_cast<const int *>(p_ptr));
+ }
+ _FORCE_INLINE_ static void encode(wchar_t p_val, const void *p_ptr) {
+ *(int *)p_ptr = p_val;
+ }
+};
+#endif
+
class MethodBind {
int method_id;
diff --git a/core/object.cpp b/core/object.cpp
index 06c2603b74..a43a9c85b1 100644
--- a/core/object.cpp
+++ b/core/object.cpp
@@ -1737,9 +1737,9 @@ void Object::_bind_methods() {
BIND_CONSTANT(NOTIFICATION_POSTINITIALIZE);
BIND_CONSTANT(NOTIFICATION_PREDELETE);
- BIND_CONSTANT(CONNECT_DEFERRED);
- BIND_CONSTANT(CONNECT_PERSIST);
- BIND_CONSTANT(CONNECT_ONESHOT);
+ BIND_ENUM_CONSTANT(CONNECT_DEFERRED);
+ BIND_ENUM_CONSTANT(CONNECT_PERSIST);
+ BIND_ENUM_CONSTANT(CONNECT_ONESHOT);
}
void Object::call_deferred(const StringName &p_method, VARIANT_ARG_DECLARE) {
diff --git a/core/os/input.cpp b/core/os/input.cpp
index c7b32b939a..81ca31da25 100644
--- a/core/os/input.cpp
+++ b/core/os/input.cpp
@@ -86,10 +86,10 @@ void Input::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_custom_mouse_cursor", "image", "hotspot"), &Input::set_custom_mouse_cursor, DEFVAL(Vector2()));
ClassDB::bind_method(D_METHOD("parse_input_event", "event"), &Input::parse_input_event);
- BIND_CONSTANT(MOUSE_MODE_VISIBLE);
- BIND_CONSTANT(MOUSE_MODE_HIDDEN);
- BIND_CONSTANT(MOUSE_MODE_CAPTURED);
- BIND_CONSTANT(MOUSE_MODE_CONFINED);
+ BIND_ENUM_CONSTANT(MOUSE_MODE_VISIBLE);
+ BIND_ENUM_CONSTANT(MOUSE_MODE_HIDDEN);
+ BIND_ENUM_CONSTANT(MOUSE_MODE_CAPTURED);
+ BIND_ENUM_CONSTANT(MOUSE_MODE_CONFINED);
ADD_SIGNAL(MethodInfo("joy_connection_changed", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::BOOL, "connected")));
}
diff --git a/core/register_core_types.cpp b/core/register_core_types.cpp
index fca9afbf5e..e5441093ac 100644
--- a/core/register_core_types.cpp
+++ b/core/register_core_types.cpp
@@ -75,6 +75,8 @@ static _Geometry *_geometry = NULL;
extern Mutex *_global_mutex;
+extern void register_global_constants();
+extern void unregister_global_constants();
extern void register_variant_methods();
extern void unregister_variant_methods();
@@ -88,6 +90,7 @@ void register_core_types() {
StringName::setup();
+ register_global_constants();
register_variant_methods();
CoreStringNames::create();
@@ -218,6 +221,7 @@ void unregister_core_types() {
ObjectDB::cleanup();
unregister_variant_methods();
+ unregister_global_constants();
ClassDB::cleanup();
ResourceCache::clear();
diff --git a/core/simple_type.h b/core/simple_type.h
index 6003bd393f..b4a6dd1fa8 100644
--- a/core/simple_type.h
+++ b/core/simple_type.h
@@ -33,95 +33,21 @@
/* Batch of specializations to obtain the actual simple type */
template <class T>
-struct GetSimpleType {
-
- T type;
-};
-
-template <class T>
struct GetSimpleTypeT {
typedef T type_t;
};
template <class T>
-struct GetSimpleType<T &> {
-
- T type;
-};
-
-template <class T>
struct GetSimpleTypeT<T &> {
typedef T type_t;
};
template <class T>
-struct GetSimpleType<T const> {
-
- T type;
- _FORCE_INLINE_ GetSimpleType() {}
-};
-
-template <class T>
struct GetSimpleTypeT<T const> {
typedef T type_t;
};
-template <class T>
-struct GetSimpleType<const T &> {
-
- T type;
- _FORCE_INLINE_ GetSimpleType() {}
-};
-
-template <class T>
-struct GetSimpleType<T *> {
-
- T *type;
- _FORCE_INLINE_ GetSimpleType() { type = NULL; }
-};
-
-template <class T>
-struct GetSimpleType<const T *> {
-
- T *type;
- _FORCE_INLINE_ GetSimpleType() { type = NULL; }
-};
-
-#define SIMPLE_NUMERIC_TYPE(m_type) \
- template <> \
- struct GetSimpleType<m_type> { \
- m_type type; \
- _FORCE_INLINE_ GetSimpleType() { type = (m_type)0; } \
- }; \
- template <> \
- struct GetSimpleType<m_type const> { \
- m_type type; \
- _FORCE_INLINE_ GetSimpleType() { type = (m_type)0; } \
- }; \
- template <> \
- struct GetSimpleType<m_type &> { \
- m_type type; \
- _FORCE_INLINE_ GetSimpleType() { type = (m_type)0; } \
- }; \
- template <> \
- struct GetSimpleType<const m_type &> { \
- m_type type; \
- _FORCE_INLINE_ GetSimpleType() { type = (m_type)0; } \
- };
-
-SIMPLE_NUMERIC_TYPE(bool);
-SIMPLE_NUMERIC_TYPE(uint8_t);
-SIMPLE_NUMERIC_TYPE(int8_t);
-SIMPLE_NUMERIC_TYPE(uint16_t);
-SIMPLE_NUMERIC_TYPE(int16_t);
-SIMPLE_NUMERIC_TYPE(uint32_t);
-SIMPLE_NUMERIC_TYPE(int32_t);
-SIMPLE_NUMERIC_TYPE(int64_t);
-SIMPLE_NUMERIC_TYPE(uint64_t);
-SIMPLE_NUMERIC_TYPE(float);
-SIMPLE_NUMERIC_TYPE(double);
-
#endif
diff --git a/core/type_info.h b/core/type_info.h
index 10912fd074..0603126996 100644
--- a/core/type_info.h
+++ b/core/type_info.h
@@ -1,6 +1,8 @@
#ifndef GET_TYPE_INFO_H
#define GET_TYPE_INFO_H
+#ifdef DEBUG_METHODS_ENABLED
+
template <bool C, typename T = void>
struct EnableIf {
@@ -40,8 +42,8 @@ struct GetTypeInfo {
enum { VARIANT_TYPE = Variant::NIL };
static inline StringName get_class_name() {
- ERR_PRINT("Fallback type info. Bug!");
- return ""; // Not "Nil", this is an error
+ ERR_PRINT("GetTypeInfo fallback. Bug!");
+ return StringName(); // Not "Nil", this is an error
}
};
@@ -70,6 +72,7 @@ MAKE_TYPE_INFO(uint32_t, Variant::INT)
MAKE_TYPE_INFO(int32_t, Variant::INT)
MAKE_TYPE_INFO(int64_t, Variant::INT)
MAKE_TYPE_INFO(uint64_t, Variant::INT)
+MAKE_TYPE_INFO(wchar_t, Variant::INT)
MAKE_TYPE_INFO(float, Variant::REAL)
MAKE_TYPE_INFO(double, Variant::REAL)
@@ -152,36 +155,6 @@ MAKE_TEMPLATE_TYPE_INFO(Vector, Plane, Variant::ARRAY)
MAKE_TEMPLATE_TYPE_INFO(PoolVector, Plane, Variant::ARRAY)
MAKE_TEMPLATE_TYPE_INFO(PoolVector, Face3, Variant::POOL_VECTOR3_ARRAY)
-#define MAKE_ENUM_TYPE_INFO(m_enum) \
- template <> \
- struct GetTypeInfo<m_enum> { \
- enum { VARIANT_TYPE = Variant::INT }; \
- static inline StringName get_class_name() { \
- return Variant::get_type_name((Variant::Type)VARIANT_TYPE); \
- } \
- }; \
- template <> \
- struct GetTypeInfo<m_enum const> { \
- enum { VARIANT_TYPE = Variant::INT }; \
- static inline StringName get_class_name() { \
- return Variant::get_type_name((Variant::Type)VARIANT_TYPE); \
- } \
- }; \
- template <> \
- struct GetTypeInfo<m_enum &> { \
- enum { VARIANT_TYPE = Variant::INT }; \
- static inline StringName get_class_name() { \
- return Variant::get_type_name((Variant::Type)VARIANT_TYPE); \
- } \
- }; \
- template <> \
- struct GetTypeInfo<const m_enum &> { \
- enum { VARIANT_TYPE = Variant::INT }; \
- static inline StringName get_class_name() { \
- return Variant::get_type_name((Variant::Type)VARIANT_TYPE); \
- } \
- };
-
template <typename T>
struct GetTypeInfo<T *, typename EnableIf<TypeInherits<Object, T>::value>::type> {
enum { VARIANT_TYPE = Variant::OBJECT };
@@ -200,4 +173,30 @@ struct GetTypeInfo<const T *, typename EnableIf<TypeInherits<Object, T>::value>:
}
};
+#define TEMPL_MAKE_ENUM_TYPE_INFO(m_enum, m_impl) \
+ template <> \
+ struct GetTypeInfo<m_impl> { \
+ enum { VARIANT_TYPE = Variant::INT }; \
+ static inline StringName get_class_name() { return "enum." #m_enum; } \
+ };
+
+#define MAKE_ENUM_TYPE_INFO(m_enum) \
+ TEMPL_MAKE_ENUM_TYPE_INFO(m_enum, m_enum) \
+ TEMPL_MAKE_ENUM_TYPE_INFO(m_enum, m_enum const) \
+ TEMPL_MAKE_ENUM_TYPE_INFO(m_enum, m_enum &) \
+ TEMPL_MAKE_ENUM_TYPE_INFO(m_enum, const m_enum &)
+
+template <typename T>
+inline StringName __constant_get_enum_name(T param, const String &p_constant) {
+ if (GetTypeInfo<T>::VARIANT_TYPE == Variant::NIL)
+ ERR_PRINTS("Missing VARIANT_ENUM_CAST for constant's enum: " + p_constant);
+ return GetTypeInfo<T>::get_class_name();
+}
+
+#else
+
+#define MAKE_ENUM_TYPE_INFO(m_enum)
+
+#endif // DEBUG_METHODS_ENABLED
+
#endif // GET_TYPE_INFO_H
diff --git a/core/undo_redo.cpp b/core/undo_redo.cpp
index 19b9f161b7..bb70146396 100644
--- a/core/undo_redo.cpp
+++ b/core/undo_redo.cpp
@@ -504,7 +504,7 @@ void UndoRedo::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_current_action_name"), &UndoRedo::get_current_action_name);
ClassDB::bind_method(D_METHOD("get_version"), &UndoRedo::get_version);
- BIND_CONSTANT(MERGE_DISABLE);
- BIND_CONSTANT(MERGE_ENDS);
- BIND_CONSTANT(MERGE_ALL);
+ BIND_ENUM_CONSTANT(MERGE_DISABLE);
+ BIND_ENUM_CONSTANT(MERGE_ENDS);
+ BIND_ENUM_CONSTANT(MERGE_ALL);
}
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index fe1dfa281c..597555b847 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -3323,22 +3323,22 @@ void EditorImportExport::_bind_methods() {
- BIND_CONSTANT( ACTION_NONE );
- BIND_CONSTANT( ACTION_COPY );
- BIND_CONSTANT( ACTION_BUNDLE );
-
- BIND_CONSTANT( EXPORT_SELECTED );
- BIND_CONSTANT( EXPORT_RESOURCES );
- BIND_CONSTANT( EXPORT_ALL );
-
- BIND_CONSTANT( IMAGE_ACTION_NONE );
- BIND_CONSTANT( IMAGE_ACTION_COMPRESS_DISK );
- BIND_CONSTANT( IMAGE_ACTION_COMPRESS_RAM );
- BIND_CONSTANT( IMAGE_ACTION_KEEP );
-
- BIND_CONSTANT( SCRIPT_ACTION_NONE );
- BIND_CONSTANT( SCRIPT_ACTION_COMPILE );
- BIND_CONSTANT( SCRIPT_ACTION_ENCRYPT );
+ BIND_ENUM_CONSTANT( ACTION_NONE );
+ BIND_ENUM_CONSTANT( ACTION_COPY );
+ BIND_ENUM_CONSTANT( ACTION_BUNDLE );
+
+ BIND_ENUM_CONSTANT( EXPORT_SELECTED );
+ BIND_ENUM_CONSTANT( EXPORT_RESOURCES );
+ BIND_ENUM_CONSTANT( EXPORT_ALL );
+
+ BIND_ENUM_CONSTANT( IMAGE_ACTION_NONE );
+ BIND_ENUM_CONSTANT( IMAGE_ACTION_COMPRESS_DISK );
+ BIND_ENUM_CONSTANT( IMAGE_ACTION_COMPRESS_RAM );
+ BIND_ENUM_CONSTANT( IMAGE_ACTION_KEEP );
+
+ BIND_ENUM_CONSTANT( SCRIPT_ACTION_NONE );
+ BIND_ENUM_CONSTANT( SCRIPT_ACTION_COMPILE );
+ BIND_ENUM_CONSTANT( SCRIPT_ACTION_ENCRYPT );
};
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp
index d572ee8724..26dbc27136 100644
--- a/editor/editor_file_dialog.cpp
+++ b/editor/editor_file_dialog.cpp
@@ -1187,15 +1187,15 @@ void EditorFileDialog::_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);
}
void EditorFileDialog::set_show_hidden_files(bool p_show) {
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp
index d8c8d419b9..f8ed18bba4 100644
--- a/editor/editor_plugin.cpp
+++ b/editor/editor_plugin.cpp
@@ -468,23 +468,23 @@ void EditorPlugin::_bind_methods() {
ADD_SIGNAL(MethodInfo("scene_closed", PropertyInfo(Variant::STRING, "filepath:String")));
ADD_SIGNAL(MethodInfo("main_screen_changed", PropertyInfo(Variant::STRING, "screen_name:String")));
- BIND_CONSTANT(CONTAINER_TOOLBAR);
- BIND_CONSTANT(CONTAINER_SPATIAL_EDITOR_MENU);
- BIND_CONSTANT(CONTAINER_SPATIAL_EDITOR_SIDE);
- BIND_CONSTANT(CONTAINER_SPATIAL_EDITOR_BOTTOM);
- BIND_CONSTANT(CONTAINER_CANVAS_EDITOR_MENU);
- BIND_CONSTANT(CONTAINER_CANVAS_EDITOR_SIDE);
- BIND_CONSTANT(CONTAINER_PROPERTY_EDITOR_BOTTOM);
-
- BIND_CONSTANT(DOCK_SLOT_LEFT_UL);
- BIND_CONSTANT(DOCK_SLOT_LEFT_BL);
- BIND_CONSTANT(DOCK_SLOT_LEFT_UR);
- BIND_CONSTANT(DOCK_SLOT_LEFT_BR);
- BIND_CONSTANT(DOCK_SLOT_RIGHT_UL);
- BIND_CONSTANT(DOCK_SLOT_RIGHT_BL);
- BIND_CONSTANT(DOCK_SLOT_RIGHT_UR);
- BIND_CONSTANT(DOCK_SLOT_RIGHT_BR);
- BIND_CONSTANT(DOCK_SLOT_MAX);
+ BIND_ENUM_CONSTANT(CONTAINER_TOOLBAR);
+ BIND_ENUM_CONSTANT(CONTAINER_SPATIAL_EDITOR_MENU);
+ BIND_ENUM_CONSTANT(CONTAINER_SPATIAL_EDITOR_SIDE);
+ BIND_ENUM_CONSTANT(CONTAINER_SPATIAL_EDITOR_BOTTOM);
+ BIND_ENUM_CONSTANT(CONTAINER_CANVAS_EDITOR_MENU);
+ BIND_ENUM_CONSTANT(CONTAINER_CANVAS_EDITOR_SIDE);
+ BIND_ENUM_CONSTANT(CONTAINER_PROPERTY_EDITOR_BOTTOM);
+
+ BIND_ENUM_CONSTANT(DOCK_SLOT_LEFT_UL);
+ BIND_ENUM_CONSTANT(DOCK_SLOT_LEFT_BL);
+ BIND_ENUM_CONSTANT(DOCK_SLOT_LEFT_UR);
+ BIND_ENUM_CONSTANT(DOCK_SLOT_LEFT_BR);
+ BIND_ENUM_CONSTANT(DOCK_SLOT_RIGHT_UL);
+ BIND_ENUM_CONSTANT(DOCK_SLOT_RIGHT_BL);
+ BIND_ENUM_CONSTANT(DOCK_SLOT_RIGHT_UR);
+ BIND_ENUM_CONSTANT(DOCK_SLOT_RIGHT_BR);
+ BIND_ENUM_CONSTANT(DOCK_SLOT_MAX);
}
EditorPlugin::EditorPlugin() {
diff --git a/main/performance.cpp b/main/performance.cpp
index 3d8e21bf33..091c52118c 100644
--- a/main/performance.cpp
+++ b/main/performance.cpp
@@ -40,35 +40,35 @@ void Performance::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_monitor", "monitor"), &Performance::get_monitor);
- BIND_CONSTANT(TIME_FPS);
- BIND_CONSTANT(TIME_PROCESS);
- BIND_CONSTANT(TIME_FIXED_PROCESS);
- BIND_CONSTANT(MEMORY_STATIC);
- BIND_CONSTANT(MEMORY_DYNAMIC);
- BIND_CONSTANT(MEMORY_STATIC_MAX);
- BIND_CONSTANT(MEMORY_DYNAMIC_MAX);
- BIND_CONSTANT(MEMORY_MESSAGE_BUFFER_MAX);
- BIND_CONSTANT(OBJECT_COUNT);
- BIND_CONSTANT(OBJECT_RESOURCE_COUNT);
- BIND_CONSTANT(OBJECT_NODE_COUNT);
- BIND_CONSTANT(RENDER_OBJECTS_IN_FRAME);
- BIND_CONSTANT(RENDER_VERTICES_IN_FRAME);
- BIND_CONSTANT(RENDER_MATERIAL_CHANGES_IN_FRAME);
- BIND_CONSTANT(RENDER_SHADER_CHANGES_IN_FRAME);
- BIND_CONSTANT(RENDER_SURFACE_CHANGES_IN_FRAME);
- BIND_CONSTANT(RENDER_DRAW_CALLS_IN_FRAME);
- BIND_CONSTANT(RENDER_USAGE_VIDEO_MEM_TOTAL);
- BIND_CONSTANT(RENDER_VIDEO_MEM_USED);
- BIND_CONSTANT(RENDER_TEXTURE_MEM_USED);
- BIND_CONSTANT(RENDER_VERTEX_MEM_USED);
- BIND_CONSTANT(PHYSICS_2D_ACTIVE_OBJECTS);
- BIND_CONSTANT(PHYSICS_2D_COLLISION_PAIRS);
- BIND_CONSTANT(PHYSICS_2D_ISLAND_COUNT);
- BIND_CONSTANT(PHYSICS_3D_ACTIVE_OBJECTS);
- BIND_CONSTANT(PHYSICS_3D_COLLISION_PAIRS);
- BIND_CONSTANT(PHYSICS_3D_ISLAND_COUNT);
-
- BIND_CONSTANT(MONITOR_MAX);
+ BIND_ENUM_CONSTANT(TIME_FPS);
+ BIND_ENUM_CONSTANT(TIME_PROCESS);
+ BIND_ENUM_CONSTANT(TIME_FIXED_PROCESS);
+ BIND_ENUM_CONSTANT(MEMORY_STATIC);
+ BIND_ENUM_CONSTANT(MEMORY_DYNAMIC);
+ BIND_ENUM_CONSTANT(MEMORY_STATIC_MAX);
+ BIND_ENUM_CONSTANT(MEMORY_DYNAMIC_MAX);
+ BIND_ENUM_CONSTANT(MEMORY_MESSAGE_BUFFER_MAX);
+ BIND_ENUM_CONSTANT(OBJECT_COUNT);
+ BIND_ENUM_CONSTANT(OBJECT_RESOURCE_COUNT);
+ BIND_ENUM_CONSTANT(OBJECT_NODE_COUNT);
+ BIND_ENUM_CONSTANT(RENDER_OBJECTS_IN_FRAME);
+ BIND_ENUM_CONSTANT(RENDER_VERTICES_IN_FRAME);
+ BIND_ENUM_CONSTANT(RENDER_MATERIAL_CHANGES_IN_FRAME);
+ BIND_ENUM_CONSTANT(RENDER_SHADER_CHANGES_IN_FRAME);
+ BIND_ENUM_CONSTANT(RENDER_SURFACE_CHANGES_IN_FRAME);
+ BIND_ENUM_CONSTANT(RENDER_DRAW_CALLS_IN_FRAME);
+ BIND_ENUM_CONSTANT(RENDER_USAGE_VIDEO_MEM_TOTAL);
+ BIND_ENUM_CONSTANT(RENDER_VIDEO_MEM_USED);
+ BIND_ENUM_CONSTANT(RENDER_TEXTURE_MEM_USED);
+ BIND_ENUM_CONSTANT(RENDER_VERTEX_MEM_USED);
+ BIND_ENUM_CONSTANT(PHYSICS_2D_ACTIVE_OBJECTS);
+ BIND_ENUM_CONSTANT(PHYSICS_2D_COLLISION_PAIRS);
+ BIND_ENUM_CONSTANT(PHYSICS_2D_ISLAND_COUNT);
+ BIND_ENUM_CONSTANT(PHYSICS_3D_ACTIVE_OBJECTS);
+ BIND_ENUM_CONSTANT(PHYSICS_3D_COLLISION_PAIRS);
+ BIND_ENUM_CONSTANT(PHYSICS_3D_ISLAND_COUNT);
+
+ BIND_ENUM_CONSTANT(MONITOR_MAX);
}
String Performance::get_monitor_name(Monitor p_monitor) const {
diff --git a/modules/enet/networked_multiplayer_enet.cpp b/modules/enet/networked_multiplayer_enet.cpp
index 68d5c9e611..c76e0c6675 100644
--- a/modules/enet/networked_multiplayer_enet.cpp
+++ b/modules/enet/networked_multiplayer_enet.cpp
@@ -658,11 +658,11 @@ void NetworkedMultiplayerENet::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_compression_mode"), &NetworkedMultiplayerENet::get_compression_mode);
ClassDB::bind_method(D_METHOD("set_bind_ip", "ip"), &NetworkedMultiplayerENet::set_bind_ip);
- BIND_CONSTANT(COMPRESS_NONE);
- BIND_CONSTANT(COMPRESS_RANGE_CODER);
- BIND_CONSTANT(COMPRESS_FASTLZ);
- BIND_CONSTANT(COMPRESS_ZLIB);
- BIND_CONSTANT(COMPRESS_ZSTD);
+ BIND_ENUM_CONSTANT(COMPRESS_NONE);
+ BIND_ENUM_CONSTANT(COMPRESS_RANGE_CODER);
+ BIND_ENUM_CONSTANT(COMPRESS_FASTLZ);
+ BIND_ENUM_CONSTANT(COMPRESS_ZLIB);
+ BIND_ENUM_CONSTANT(COMPRESS_ZSTD);
}
NetworkedMultiplayerENet::NetworkedMultiplayerENet() {
diff --git a/modules/visual_script/visual_script_func_nodes.cpp b/modules/visual_script/visual_script_func_nodes.cpp
index afdf50027e..065ebc3ccf 100644
--- a/modules/visual_script/visual_script_func_nodes.cpp
+++ b/modules/visual_script/visual_script_func_nodes.cpp
@@ -747,10 +747,10 @@ void VisualScriptFunctionCall::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "validate"), "set_validate", "get_validate");
ADD_PROPERTY(PropertyInfo(Variant::INT, "rpc_call_mode", PROPERTY_HINT_ENUM, "Disabled,Reliable,Unreliable,ReliableToID,UnreliableToID"), "set_rpc_call_mode", "get_rpc_call_mode"); //when set, if loaded properly, will override argument count.
- BIND_CONSTANT(CALL_MODE_SELF);
- BIND_CONSTANT(CALL_MODE_NODE_PATH);
- BIND_CONSTANT(CALL_MODE_INSTANCE);
- BIND_CONSTANT(CALL_MODE_BASIC_TYPE);
+ BIND_ENUM_CONSTANT(CALL_MODE_SELF);
+ BIND_ENUM_CONSTANT(CALL_MODE_NODE_PATH);
+ BIND_ENUM_CONSTANT(CALL_MODE_INSTANCE);
+ BIND_ENUM_CONSTANT(CALL_MODE_BASIC_TYPE);
}
class VisualScriptNodeInstanceFunctionCall : public VisualScriptNodeInstance {
@@ -1490,9 +1490,10 @@ void VisualScriptPropertySet::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::STRING, "property"), "set_property", "get_property");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "index"), "set_index", "get_index");
ADD_PROPERTY(PropertyInfo(Variant::INT, "assign_op", PROPERTY_HINT_ENUM, "Assign,Add,Sub,Mul,Div,Mod,ShiftLeft,ShiftRight,BitAnd,BitOr,Bitxor"), "set_assign_op", "get_assign_op");
- BIND_CONSTANT(CALL_MODE_SELF);
- BIND_CONSTANT(CALL_MODE_NODE_PATH);
- BIND_CONSTANT(CALL_MODE_INSTANCE);
+
+ BIND_ENUM_CONSTANT(CALL_MODE_SELF);
+ BIND_ENUM_CONSTANT(CALL_MODE_NODE_PATH);
+ BIND_ENUM_CONSTANT(CALL_MODE_INSTANCE);
}
class VisualScriptNodeInstancePropertySet : public VisualScriptNodeInstance {
@@ -2202,9 +2203,9 @@ void VisualScriptPropertyGet::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::STRING, "property"), "set_property", "get_property");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "index", PROPERTY_HINT_ENUM), "set_index", "get_index");
- BIND_CONSTANT(CALL_MODE_SELF);
- BIND_CONSTANT(CALL_MODE_NODE_PATH);
- BIND_CONSTANT(CALL_MODE_INSTANCE);
+ BIND_ENUM_CONSTANT(CALL_MODE_SELF);
+ BIND_ENUM_CONSTANT(CALL_MODE_NODE_PATH);
+ BIND_ENUM_CONSTANT(CALL_MODE_INSTANCE);
}
class VisualScriptNodeInstancePropertyGet : public VisualScriptNodeInstance {
diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp
index 4f9cd4a33b..15e25c99ee 100644
--- a/modules/visual_script/visual_script_nodes.cpp
+++ b/modules/visual_script/visual_script_nodes.cpp
@@ -2712,9 +2712,9 @@ void VisualScriptCustomNode::_bind_methods() {
ClassDB::bind_method(D_METHOD("_script_changed"), &VisualScriptCustomNode::_script_changed);
- BIND_CONSTANT(START_MODE_BEGIN_SEQUENCE);
- BIND_CONSTANT(START_MODE_CONTINUE_SEQUENCE);
- BIND_CONSTANT(START_MODE_RESUME_YIELD);
+ BIND_ENUM_CONSTANT(START_MODE_BEGIN_SEQUENCE);
+ BIND_ENUM_CONSTANT(START_MODE_CONTINUE_SEQUENCE);
+ BIND_ENUM_CONSTANT(START_MODE_RESUME_YIELD);
BIND_CONSTANT(STEP_PUSH_STACK_BIT);
BIND_CONSTANT(STEP_GO_BACK_BIT);
diff --git a/modules/visual_script/visual_script_nodes.h b/modules/visual_script/visual_script_nodes.h
index 6ce906efe0..b5df761e7d 100644
--- a/modules/visual_script/visual_script_nodes.h
+++ b/modules/visual_script/visual_script_nodes.h
@@ -727,6 +727,8 @@ public:
VisualScriptCustomNode();
};
+VARIANT_ENUM_CAST(VisualScriptCustomNode::StartMode);
+
class VisualScriptSubCall : public VisualScriptNode {
GDCLASS(VisualScriptSubCall, VisualScriptNode)
diff --git a/modules/visual_script/visual_script_yield_nodes.cpp b/modules/visual_script/visual_script_yield_nodes.cpp
index 2e111511b7..df88d2e7f7 100644
--- a/modules/visual_script/visual_script_yield_nodes.cpp
+++ b/modules/visual_script/visual_script_yield_nodes.cpp
@@ -189,9 +189,9 @@ void VisualScriptYield::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Frame,FixedFrame,Time", PROPERTY_USAGE_NOEDITOR), "set_yield_mode", "get_yield_mode");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "wait_time"), "set_wait_time", "get_wait_time");
- BIND_CONSTANT(YIELD_FRAME);
- BIND_CONSTANT(YIELD_FIXED_FRAME);
- BIND_CONSTANT(YIELD_WAIT);
+ BIND_ENUM_CONSTANT(YIELD_FRAME);
+ BIND_ENUM_CONSTANT(YIELD_FIXED_FRAME);
+ BIND_ENUM_CONSTANT(YIELD_WAIT);
}
VisualScriptYield::VisualScriptYield() {
@@ -493,9 +493,9 @@ void VisualScriptYieldSignal::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "node_path", PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE), "set_base_path", "get_base_path");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "signal"), "set_signal", "get_signal");
- BIND_CONSTANT(CALL_MODE_SELF);
- BIND_CONSTANT(CALL_MODE_NODE_PATH);
- BIND_CONSTANT(CALL_MODE_INSTANCE);
+ BIND_ENUM_CONSTANT(CALL_MODE_SELF);
+ BIND_ENUM_CONSTANT(CALL_MODE_NODE_PATH);
+ BIND_ENUM_CONSTANT(CALL_MODE_INSTANCE);
}
class VisualScriptNodeInstanceYieldSignal : public VisualScriptNodeInstance {
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 );
*/
///////////////////////////
diff --git a/servers/arvr/arvr_interface.cpp b/servers/arvr/arvr_interface.cpp
index 81eb011932..1f2e6028b0 100644
--- a/servers/arvr/arvr_interface.cpp
+++ b/servers/arvr/arvr_interface.cpp
@@ -51,9 +51,9 @@ void ARVRInterface::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "primary"), "set_is_primary", "is_primary");
- BIND_CONSTANT(EYE_MONO);
- BIND_CONSTANT(EYE_LEFT);
- BIND_CONSTANT(EYE_RIGHT);
+ BIND_ENUM_CONSTANT(EYE_MONO);
+ BIND_ENUM_CONSTANT(EYE_LEFT);
+ BIND_ENUM_CONSTANT(EYE_RIGHT);
};
StringName ARVRInterface::get_name() const {
diff --git a/servers/arvr_server.cpp b/servers/arvr_server.cpp
index 6398d87007..8a064f9cce 100644
--- a/servers/arvr_server.cpp
+++ b/servers/arvr_server.cpp
@@ -58,12 +58,12 @@ void ARVRServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_interface"), &ARVRServer::add_interface);
ClassDB::bind_method(D_METHOD("remove_interface"), &ARVRServer::remove_interface);
- BIND_CONSTANT(TRACKER_CONTROLLER);
- BIND_CONSTANT(TRACKER_BASESTATION);
- BIND_CONSTANT(TRACKER_ANCHOR);
- BIND_CONSTANT(TRACKER_UNKNOWN);
- BIND_CONSTANT(TRACKER_ANY_KNOWN);
- BIND_CONSTANT(TRACKER_ANY);
+ BIND_ENUM_CONSTANT(TRACKER_CONTROLLER);
+ BIND_ENUM_CONSTANT(TRACKER_BASESTATION);
+ BIND_ENUM_CONSTANT(TRACKER_ANCHOR);
+ BIND_ENUM_CONSTANT(TRACKER_UNKNOWN);
+ BIND_ENUM_CONSTANT(TRACKER_ANY_KNOWN);
+ BIND_ENUM_CONSTANT(TRACKER_ANY);
ADD_SIGNAL(MethodInfo("interface_added", PropertyInfo(Variant::STRING, "name")));
ADD_SIGNAL(MethodInfo("interface_removed", PropertyInfo(Variant::STRING, "name")));
diff --git a/servers/physics_2d_server.cpp b/servers/physics_2d_server.cpp
index 27732b9c29..898c49a1eb 100644
--- a/servers/physics_2d_server.cpp
+++ b/servers/physics_2d_server.cpp
@@ -354,12 +354,12 @@ void Physics2DDirectSpaceState::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_rest_info", "shape"), &Physics2DDirectSpaceState::_get_rest_info);
//ClassDB::bind_method(D_METHOD("cast_motion","shape","xform","motion","exclude","umask"),&Physics2DDirectSpaceState::_intersect_shape,DEFVAL(Array()),DEFVAL(0));
- BIND_CONSTANT(TYPE_MASK_STATIC_BODY);
- BIND_CONSTANT(TYPE_MASK_KINEMATIC_BODY);
- BIND_CONSTANT(TYPE_MASK_RIGID_BODY);
- BIND_CONSTANT(TYPE_MASK_CHARACTER_BODY);
- BIND_CONSTANT(TYPE_MASK_AREA);
- BIND_CONSTANT(TYPE_MASK_COLLISION);
+ BIND_ENUM_CONSTANT(TYPE_MASK_STATIC_BODY);
+ BIND_ENUM_CONSTANT(TYPE_MASK_KINEMATIC_BODY);
+ BIND_ENUM_CONSTANT(TYPE_MASK_RIGID_BODY);
+ BIND_ENUM_CONSTANT(TYPE_MASK_CHARACTER_BODY);
+ BIND_ENUM_CONSTANT(TYPE_MASK_AREA);
+ BIND_ENUM_CONSTANT(TYPE_MASK_COLLISION);
}
int Physics2DShapeQueryResult::get_result_count() const {
@@ -604,79 +604,79 @@ void Physics2DServer::_bind_methods() {
//ClassDB::bind_method(D_METHOD("sync"),&Physics2DServer::sync);
//ClassDB::bind_method(D_METHOD("flush_queries"),&Physics2DServer::flush_queries);
- BIND_CONSTANT(SPACE_PARAM_CONTACT_RECYCLE_RADIUS);
- BIND_CONSTANT(SPACE_PARAM_CONTACT_MAX_SEPARATION);
- BIND_CONSTANT(SPACE_PARAM_BODY_MAX_ALLOWED_PENETRATION);
- BIND_CONSTANT(SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD);
- BIND_CONSTANT(SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD);
- BIND_CONSTANT(SPACE_PARAM_BODY_TIME_TO_SLEEP);
- BIND_CONSTANT(SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS);
-
- BIND_CONSTANT(SHAPE_LINE);
- BIND_CONSTANT(SHAPE_SEGMENT);
- BIND_CONSTANT(SHAPE_CIRCLE);
- BIND_CONSTANT(SHAPE_RECTANGLE);
- BIND_CONSTANT(SHAPE_CAPSULE);
- BIND_CONSTANT(SHAPE_CONVEX_POLYGON);
- BIND_CONSTANT(SHAPE_CONCAVE_POLYGON);
- BIND_CONSTANT(SHAPE_CUSTOM);
-
- BIND_CONSTANT(AREA_PARAM_GRAVITY);
- BIND_CONSTANT(AREA_PARAM_GRAVITY_VECTOR);
- BIND_CONSTANT(AREA_PARAM_GRAVITY_IS_POINT);
- BIND_CONSTANT(AREA_PARAM_GRAVITY_DISTANCE_SCALE);
- BIND_CONSTANT(AREA_PARAM_GRAVITY_POINT_ATTENUATION);
- BIND_CONSTANT(AREA_PARAM_LINEAR_DAMP);
- BIND_CONSTANT(AREA_PARAM_ANGULAR_DAMP);
- BIND_CONSTANT(AREA_PARAM_PRIORITY);
-
- BIND_CONSTANT(AREA_SPACE_OVERRIDE_DISABLED);
- BIND_CONSTANT(AREA_SPACE_OVERRIDE_COMBINE);
- BIND_CONSTANT(AREA_SPACE_OVERRIDE_COMBINE_REPLACE);
- BIND_CONSTANT(AREA_SPACE_OVERRIDE_REPLACE);
- BIND_CONSTANT(AREA_SPACE_OVERRIDE_REPLACE_COMBINE);
-
- BIND_CONSTANT(BODY_MODE_STATIC);
- BIND_CONSTANT(BODY_MODE_KINEMATIC);
- BIND_CONSTANT(BODY_MODE_RIGID);
- BIND_CONSTANT(BODY_MODE_CHARACTER);
-
- BIND_CONSTANT(BODY_PARAM_BOUNCE);
- BIND_CONSTANT(BODY_PARAM_FRICTION);
- BIND_CONSTANT(BODY_PARAM_MASS);
- BIND_CONSTANT(BODY_PARAM_INERTIA);
- BIND_CONSTANT(BODY_PARAM_GRAVITY_SCALE);
- BIND_CONSTANT(BODY_PARAM_LINEAR_DAMP);
- BIND_CONSTANT(BODY_PARAM_ANGULAR_DAMP);
- BIND_CONSTANT(BODY_PARAM_MAX);
-
- BIND_CONSTANT(BODY_STATE_TRANSFORM);
- BIND_CONSTANT(BODY_STATE_LINEAR_VELOCITY);
- BIND_CONSTANT(BODY_STATE_ANGULAR_VELOCITY);
- BIND_CONSTANT(BODY_STATE_SLEEPING);
- BIND_CONSTANT(BODY_STATE_CAN_SLEEP);
-
- BIND_CONSTANT(JOINT_PIN);
- BIND_CONSTANT(JOINT_GROOVE);
- BIND_CONSTANT(JOINT_DAMPED_SPRING);
-
- BIND_CONSTANT(DAMPED_STRING_REST_LENGTH);
- BIND_CONSTANT(DAMPED_STRING_STIFFNESS);
- BIND_CONSTANT(DAMPED_STRING_DAMPING);
-
- BIND_CONSTANT(CCD_MODE_DISABLED);
- BIND_CONSTANT(CCD_MODE_CAST_RAY);
- BIND_CONSTANT(CCD_MODE_CAST_SHAPE);
-
- //BIND_CONSTANT( TYPE_BODY );
- //BIND_CONSTANT( TYPE_AREA );
-
- BIND_CONSTANT(AREA_BODY_ADDED);
- BIND_CONSTANT(AREA_BODY_REMOVED);
-
- BIND_CONSTANT(INFO_ACTIVE_OBJECTS);
- BIND_CONSTANT(INFO_COLLISION_PAIRS);
- BIND_CONSTANT(INFO_ISLAND_COUNT);
+ BIND_ENUM_CONSTANT(SPACE_PARAM_CONTACT_RECYCLE_RADIUS);
+ BIND_ENUM_CONSTANT(SPACE_PARAM_CONTACT_MAX_SEPARATION);
+ BIND_ENUM_CONSTANT(SPACE_PARAM_BODY_MAX_ALLOWED_PENETRATION);
+ BIND_ENUM_CONSTANT(SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD);
+ BIND_ENUM_CONSTANT(SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD);
+ BIND_ENUM_CONSTANT(SPACE_PARAM_BODY_TIME_TO_SLEEP);
+ BIND_ENUM_CONSTANT(SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS);
+
+ BIND_ENUM_CONSTANT(SHAPE_LINE);
+ BIND_ENUM_CONSTANT(SHAPE_SEGMENT);
+ BIND_ENUM_CONSTANT(SHAPE_CIRCLE);
+ BIND_ENUM_CONSTANT(SHAPE_RECTANGLE);
+ BIND_ENUM_CONSTANT(SHAPE_CAPSULE);
+ BIND_ENUM_CONSTANT(SHAPE_CONVEX_POLYGON);
+ BIND_ENUM_CONSTANT(SHAPE_CONCAVE_POLYGON);
+ BIND_ENUM_CONSTANT(SHAPE_CUSTOM);
+
+ BIND_ENUM_CONSTANT(AREA_PARAM_GRAVITY);
+ BIND_ENUM_CONSTANT(AREA_PARAM_GRAVITY_VECTOR);
+ BIND_ENUM_CONSTANT(AREA_PARAM_GRAVITY_IS_POINT);
+ BIND_ENUM_CONSTANT(AREA_PARAM_GRAVITY_DISTANCE_SCALE);
+ BIND_ENUM_CONSTANT(AREA_PARAM_GRAVITY_POINT_ATTENUATION);
+ BIND_ENUM_CONSTANT(AREA_PARAM_LINEAR_DAMP);
+ BIND_ENUM_CONSTANT(AREA_PARAM_ANGULAR_DAMP);
+ BIND_ENUM_CONSTANT(AREA_PARAM_PRIORITY);
+
+ BIND_ENUM_CONSTANT(AREA_SPACE_OVERRIDE_DISABLED);
+ BIND_ENUM_CONSTANT(AREA_SPACE_OVERRIDE_COMBINE);
+ BIND_ENUM_CONSTANT(AREA_SPACE_OVERRIDE_COMBINE_REPLACE);
+ BIND_ENUM_CONSTANT(AREA_SPACE_OVERRIDE_REPLACE);
+ BIND_ENUM_CONSTANT(AREA_SPACE_OVERRIDE_REPLACE_COMBINE);
+
+ BIND_ENUM_CONSTANT(BODY_MODE_STATIC);
+ BIND_ENUM_CONSTANT(BODY_MODE_KINEMATIC);
+ BIND_ENUM_CONSTANT(BODY_MODE_RIGID);
+ BIND_ENUM_CONSTANT(BODY_MODE_CHARACTER);
+
+ BIND_ENUM_CONSTANT(BODY_PARAM_BOUNCE);
+ BIND_ENUM_CONSTANT(BODY_PARAM_FRICTION);
+ BIND_ENUM_CONSTANT(BODY_PARAM_MASS);
+ BIND_ENUM_CONSTANT(BODY_PARAM_INERTIA);
+ BIND_ENUM_CONSTANT(BODY_PARAM_GRAVITY_SCALE);
+ BIND_ENUM_CONSTANT(BODY_PARAM_LINEAR_DAMP);
+ BIND_ENUM_CONSTANT(BODY_PARAM_ANGULAR_DAMP);
+ BIND_ENUM_CONSTANT(BODY_PARAM_MAX);
+
+ BIND_ENUM_CONSTANT(BODY_STATE_TRANSFORM);
+ BIND_ENUM_CONSTANT(BODY_STATE_LINEAR_VELOCITY);
+ BIND_ENUM_CONSTANT(BODY_STATE_ANGULAR_VELOCITY);
+ BIND_ENUM_CONSTANT(BODY_STATE_SLEEPING);
+ BIND_ENUM_CONSTANT(BODY_STATE_CAN_SLEEP);
+
+ BIND_ENUM_CONSTANT(JOINT_PIN);
+ BIND_ENUM_CONSTANT(JOINT_GROOVE);
+ BIND_ENUM_CONSTANT(JOINT_DAMPED_SPRING);
+
+ BIND_ENUM_CONSTANT(DAMPED_STRING_REST_LENGTH);
+ BIND_ENUM_CONSTANT(DAMPED_STRING_STIFFNESS);
+ BIND_ENUM_CONSTANT(DAMPED_STRING_DAMPING);
+
+ BIND_ENUM_CONSTANT(CCD_MODE_DISABLED);
+ BIND_ENUM_CONSTANT(CCD_MODE_CAST_RAY);
+ BIND_ENUM_CONSTANT(CCD_MODE_CAST_SHAPE);
+
+ //BIND_ENUM_CONSTANT( TYPE_BODY );
+ //BIND_ENUM_CONSTANT( TYPE_AREA );
+
+ BIND_ENUM_CONSTANT(AREA_BODY_ADDED);
+ BIND_ENUM_CONSTANT(AREA_BODY_REMOVED);
+
+ BIND_ENUM_CONSTANT(INFO_ACTIVE_OBJECTS);
+ BIND_ENUM_CONSTANT(INFO_COLLISION_PAIRS);
+ BIND_ENUM_CONSTANT(INFO_ISLAND_COUNT);
}
Physics2DServer::Physics2DServer() {
diff --git a/servers/physics_2d_server.h b/servers/physics_2d_server.h
index f3acd8df18..905f96a5a9 100644
--- a/servers/physics_2d_server.h
+++ b/servers/physics_2d_server.h
@@ -201,6 +201,8 @@ public:
Physics2DDirectSpaceState();
};
+VARIANT_ENUM_CAST(Physics2DDirectSpaceState::ObjectTypeMask);
+
class Physics2DShapeQueryResult : public Reference {
GDCLASS(Physics2DShapeQueryResult, Reference);
diff --git a/servers/physics_server.cpp b/servers/physics_server.cpp
index 86bf6253ee..c51a59973c 100644
--- a/servers/physics_server.cpp
+++ b/servers/physics_server.cpp
@@ -349,12 +349,12 @@ void PhysicsDirectSpaceState::_bind_methods() {
ClassDB::bind_method(D_METHOD("collide_shape", "shape", "max_results"), &PhysicsDirectSpaceState::_collide_shape, DEFVAL(32));
ClassDB::bind_method(D_METHOD("get_rest_info", "shape"), &PhysicsDirectSpaceState::_get_rest_info);
- BIND_CONSTANT(TYPE_MASK_STATIC_BODY);
- BIND_CONSTANT(TYPE_MASK_KINEMATIC_BODY);
- BIND_CONSTANT(TYPE_MASK_RIGID_BODY);
- BIND_CONSTANT(TYPE_MASK_CHARACTER_BODY);
- BIND_CONSTANT(TYPE_MASK_AREA);
- BIND_CONSTANT(TYPE_MASK_COLLISION);
+ BIND_ENUM_CONSTANT(TYPE_MASK_STATIC_BODY);
+ BIND_ENUM_CONSTANT(TYPE_MASK_KINEMATIC_BODY);
+ BIND_ENUM_CONSTANT(TYPE_MASK_RIGID_BODY);
+ BIND_ENUM_CONSTANT(TYPE_MASK_CHARACTER_BODY);
+ BIND_ENUM_CONSTANT(TYPE_MASK_AREA);
+ BIND_ENUM_CONSTANT(TYPE_MASK_COLLISION);
}
int PhysicsShapeQueryResult::get_result_count() const {
@@ -506,11 +506,11 @@ void PhysicsServer::_bind_methods() {
/* JOINT API */
- BIND_CONSTANT(JOINT_PIN);
- BIND_CONSTANT(JOINT_HINGE);
- BIND_CONSTANT(JOINT_SLIDER);
- BIND_CONSTANT(JOINT_CONE_TWIST);
- BIND_CONSTANT(JOINT_6DOF);
+ BIND_ENUM_CONSTANT(JOINT_PIN);
+ BIND_ENUM_CONSTANT(JOINT_HINGE);
+ BIND_ENUM_CONSTANT(JOINT_SLIDER);
+ BIND_ENUM_CONSTANT(JOINT_CONE_TWIST);
+ BIND_ENUM_CONSTANT(JOINT_6DOF);
ClassDB::bind_method(D_METHOD("joint_create_pin", "body_A", "local_A", "body_B", "local_B"), &PhysicsServer::joint_create_pin);
ClassDB::bind_method(D_METHOD("pin_joint_set_param", "joint", "param", "value"), &PhysicsServer::pin_joint_set_param);
@@ -522,20 +522,21 @@ void PhysicsServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("pin_joint_set_local_b", "joint", "local_B"), &PhysicsServer::pin_joint_set_local_b);
ClassDB::bind_method(D_METHOD("pin_joint_get_local_b", "joint"), &PhysicsServer::pin_joint_get_local_b);
- BIND_CONSTANT(PIN_JOINT_BIAS);
- BIND_CONSTANT(PIN_JOINT_DAMPING);
- BIND_CONSTANT(PIN_JOINT_IMPULSE_CLAMP);
-
- BIND_CONSTANT(HINGE_JOINT_BIAS);
- BIND_CONSTANT(HINGE_JOINT_LIMIT_UPPER);
- BIND_CONSTANT(HINGE_JOINT_LIMIT_LOWER);
- BIND_CONSTANT(HINGE_JOINT_LIMIT_BIAS);
- BIND_CONSTANT(HINGE_JOINT_LIMIT_SOFTNESS);
- BIND_CONSTANT(HINGE_JOINT_LIMIT_RELAXATION);
- BIND_CONSTANT(HINGE_JOINT_MOTOR_TARGET_VELOCITY);
- BIND_CONSTANT(HINGE_JOINT_MOTOR_MAX_IMPULSE);
- BIND_CONSTANT(HINGE_JOINT_FLAG_USE_LIMIT);
- BIND_CONSTANT(HINGE_JOINT_FLAG_ENABLE_MOTOR);
+ BIND_ENUM_CONSTANT(PIN_JOINT_BIAS);
+ BIND_ENUM_CONSTANT(PIN_JOINT_DAMPING);
+ BIND_ENUM_CONSTANT(PIN_JOINT_IMPULSE_CLAMP);
+
+ BIND_ENUM_CONSTANT(HINGE_JOINT_BIAS);
+ BIND_ENUM_CONSTANT(HINGE_JOINT_LIMIT_UPPER);
+ BIND_ENUM_CONSTANT(HINGE_JOINT_LIMIT_LOWER);
+ BIND_ENUM_CONSTANT(HINGE_JOINT_LIMIT_BIAS);
+ BIND_ENUM_CONSTANT(HINGE_JOINT_LIMIT_SOFTNESS);
+ BIND_ENUM_CONSTANT(HINGE_JOINT_LIMIT_RELAXATION);
+ BIND_ENUM_CONSTANT(HINGE_JOINT_MOTOR_TARGET_VELOCITY);
+ BIND_ENUM_CONSTANT(HINGE_JOINT_MOTOR_MAX_IMPULSE);
+
+ BIND_ENUM_CONSTANT(HINGE_JOINT_FLAG_USE_LIMIT);
+ BIND_ENUM_CONSTANT(HINGE_JOINT_FLAG_ENABLE_MOTOR);
ClassDB::bind_method(D_METHOD("joint_create_hinge", "body_A", "hinge_A", "body_B", "hinge_B"), &PhysicsServer::joint_create_hinge);
@@ -550,60 +551,60 @@ void PhysicsServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("slider_joint_set_param", "joint", "param", "value"), &PhysicsServer::slider_joint_set_param);
ClassDB::bind_method(D_METHOD("slider_joint_get_param", "joint", "param"), &PhysicsServer::slider_joint_get_param);
- BIND_CONSTANT(SLIDER_JOINT_LINEAR_LIMIT_UPPER);
- BIND_CONSTANT(SLIDER_JOINT_LINEAR_LIMIT_LOWER);
- BIND_CONSTANT(SLIDER_JOINT_LINEAR_LIMIT_SOFTNESS);
- BIND_CONSTANT(SLIDER_JOINT_LINEAR_LIMIT_RESTITUTION);
- BIND_CONSTANT(SLIDER_JOINT_LINEAR_LIMIT_DAMPING);
- BIND_CONSTANT(SLIDER_JOINT_LINEAR_MOTION_SOFTNESS);
- BIND_CONSTANT(SLIDER_JOINT_LINEAR_MOTION_RESTITUTION);
- BIND_CONSTANT(SLIDER_JOINT_LINEAR_MOTION_DAMPING);
- BIND_CONSTANT(SLIDER_JOINT_LINEAR_ORTHOGONAL_SOFTNESS);
- BIND_CONSTANT(SLIDER_JOINT_LINEAR_ORTHOGONAL_RESTITUTION);
- BIND_CONSTANT(SLIDER_JOINT_LINEAR_ORTHOGONAL_DAMPING);
-
- BIND_CONSTANT(SLIDER_JOINT_ANGULAR_LIMIT_UPPER);
- BIND_CONSTANT(SLIDER_JOINT_ANGULAR_LIMIT_LOWER);
- BIND_CONSTANT(SLIDER_JOINT_ANGULAR_LIMIT_SOFTNESS);
- BIND_CONSTANT(SLIDER_JOINT_ANGULAR_LIMIT_RESTITUTION);
- BIND_CONSTANT(SLIDER_JOINT_ANGULAR_LIMIT_DAMPING);
- BIND_CONSTANT(SLIDER_JOINT_ANGULAR_MOTION_SOFTNESS);
- BIND_CONSTANT(SLIDER_JOINT_ANGULAR_MOTION_RESTITUTION);
- BIND_CONSTANT(SLIDER_JOINT_ANGULAR_MOTION_DAMPING);
- BIND_CONSTANT(SLIDER_JOINT_ANGULAR_ORTHOGONAL_SOFTNESS);
- BIND_CONSTANT(SLIDER_JOINT_ANGULAR_ORTHOGONAL_RESTITUTION);
- BIND_CONSTANT(SLIDER_JOINT_ANGULAR_ORTHOGONAL_DAMPING);
- BIND_CONSTANT(SLIDER_JOINT_MAX);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_LINEAR_LIMIT_UPPER);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_LINEAR_LIMIT_LOWER);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_LINEAR_LIMIT_SOFTNESS);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_LINEAR_LIMIT_RESTITUTION);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_LINEAR_LIMIT_DAMPING);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_LINEAR_MOTION_SOFTNESS);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_LINEAR_MOTION_RESTITUTION);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_LINEAR_MOTION_DAMPING);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_LINEAR_ORTHOGONAL_SOFTNESS);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_LINEAR_ORTHOGONAL_RESTITUTION);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_LINEAR_ORTHOGONAL_DAMPING);
+
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_ANGULAR_LIMIT_UPPER);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_ANGULAR_LIMIT_LOWER);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_ANGULAR_LIMIT_SOFTNESS);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_ANGULAR_LIMIT_RESTITUTION);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_ANGULAR_LIMIT_DAMPING);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_ANGULAR_MOTION_SOFTNESS);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_ANGULAR_MOTION_RESTITUTION);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_ANGULAR_MOTION_DAMPING);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_ANGULAR_ORTHOGONAL_SOFTNESS);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_ANGULAR_ORTHOGONAL_RESTITUTION);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_ANGULAR_ORTHOGONAL_DAMPING);
+ BIND_ENUM_CONSTANT(SLIDER_JOINT_MAX);
ClassDB::bind_method(D_METHOD("joint_create_cone_twist", "body_A", "local_ref_A", "body_B", "local_ref_B"), &PhysicsServer::joint_create_cone_twist);
ClassDB::bind_method(D_METHOD("cone_twist_joint_set_param", "joint", "param", "value"), &PhysicsServer::cone_twist_joint_set_param);
ClassDB::bind_method(D_METHOD("cone_twist_joint_get_param", "joint", "param"), &PhysicsServer::cone_twist_joint_get_param);
- BIND_CONSTANT(CONE_TWIST_JOINT_SWING_SPAN);
- BIND_CONSTANT(CONE_TWIST_JOINT_TWIST_SPAN);
- BIND_CONSTANT(CONE_TWIST_JOINT_BIAS);
- BIND_CONSTANT(CONE_TWIST_JOINT_SOFTNESS);
- BIND_CONSTANT(CONE_TWIST_JOINT_RELAXATION);
-
- BIND_CONSTANT(G6DOF_JOINT_LINEAR_LOWER_LIMIT);
- BIND_CONSTANT(G6DOF_JOINT_LINEAR_UPPER_LIMIT);
- BIND_CONSTANT(G6DOF_JOINT_LINEAR_LIMIT_SOFTNESS);
- BIND_CONSTANT(G6DOF_JOINT_LINEAR_RESTITUTION);
- BIND_CONSTANT(G6DOF_JOINT_LINEAR_DAMPING);
- BIND_CONSTANT(G6DOF_JOINT_ANGULAR_LOWER_LIMIT);
- BIND_CONSTANT(G6DOF_JOINT_ANGULAR_UPPER_LIMIT);
- BIND_CONSTANT(G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS);
- BIND_CONSTANT(G6DOF_JOINT_ANGULAR_DAMPING);
- BIND_CONSTANT(G6DOF_JOINT_ANGULAR_RESTITUTION);
- BIND_CONSTANT(G6DOF_JOINT_ANGULAR_FORCE_LIMIT);
- BIND_CONSTANT(G6DOF_JOINT_ANGULAR_ERP);
- BIND_CONSTANT(G6DOF_JOINT_ANGULAR_MOTOR_TARGET_VELOCITY);
- BIND_CONSTANT(G6DOF_JOINT_ANGULAR_MOTOR_FORCE_LIMIT);
-
- BIND_CONSTANT(G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT);
- BIND_CONSTANT(G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT);
- BIND_CONSTANT(G6DOF_JOINT_FLAG_ENABLE_MOTOR);
+ BIND_ENUM_CONSTANT(CONE_TWIST_JOINT_SWING_SPAN);
+ BIND_ENUM_CONSTANT(CONE_TWIST_JOINT_TWIST_SPAN);
+ BIND_ENUM_CONSTANT(CONE_TWIST_JOINT_BIAS);
+ BIND_ENUM_CONSTANT(CONE_TWIST_JOINT_SOFTNESS);
+ BIND_ENUM_CONSTANT(CONE_TWIST_JOINT_RELAXATION);
+
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_LINEAR_LOWER_LIMIT);
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_LINEAR_UPPER_LIMIT);
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_LINEAR_LIMIT_SOFTNESS);
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_LINEAR_RESTITUTION);
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_LINEAR_DAMPING);
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_ANGULAR_LOWER_LIMIT);
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_ANGULAR_UPPER_LIMIT);
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS);
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_ANGULAR_DAMPING);
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_ANGULAR_RESTITUTION);
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_ANGULAR_FORCE_LIMIT);
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_ANGULAR_ERP);
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_ANGULAR_MOTOR_TARGET_VELOCITY);
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_ANGULAR_MOTOR_FORCE_LIMIT);
+
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT);
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT);
+ BIND_ENUM_CONSTANT(G6DOF_JOINT_FLAG_ENABLE_MOTOR);
ClassDB::bind_method(D_METHOD("joint_get_type", "joint"), &PhysicsServer::joint_get_type);
@@ -642,67 +643,67 @@ void PhysicsServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_process_info", "process_info"), &PhysicsServer::get_process_info);
- BIND_CONSTANT(SHAPE_PLANE);
- BIND_CONSTANT(SHAPE_RAY);
- BIND_CONSTANT(SHAPE_SPHERE);
- BIND_CONSTANT(SHAPE_BOX);
- BIND_CONSTANT(SHAPE_CAPSULE);
- BIND_CONSTANT(SHAPE_CONVEX_POLYGON);
- BIND_CONSTANT(SHAPE_CONCAVE_POLYGON);
- BIND_CONSTANT(SHAPE_HEIGHTMAP);
- BIND_CONSTANT(SHAPE_CUSTOM);
-
- BIND_CONSTANT(AREA_PARAM_GRAVITY);
- BIND_CONSTANT(AREA_PARAM_GRAVITY_VECTOR);
- BIND_CONSTANT(AREA_PARAM_GRAVITY_IS_POINT);
- BIND_CONSTANT(AREA_PARAM_GRAVITY_DISTANCE_SCALE);
- BIND_CONSTANT(AREA_PARAM_GRAVITY_POINT_ATTENUATION);
- BIND_CONSTANT(AREA_PARAM_LINEAR_DAMP);
- BIND_CONSTANT(AREA_PARAM_ANGULAR_DAMP);
- BIND_CONSTANT(AREA_PARAM_PRIORITY);
-
- BIND_CONSTANT(AREA_SPACE_OVERRIDE_DISABLED);
- BIND_CONSTANT(AREA_SPACE_OVERRIDE_COMBINE);
- BIND_CONSTANT(AREA_SPACE_OVERRIDE_COMBINE_REPLACE);
- BIND_CONSTANT(AREA_SPACE_OVERRIDE_REPLACE);
- BIND_CONSTANT(AREA_SPACE_OVERRIDE_REPLACE_COMBINE);
-
- BIND_CONSTANT(BODY_MODE_STATIC);
- BIND_CONSTANT(BODY_MODE_KINEMATIC);
- BIND_CONSTANT(BODY_MODE_RIGID);
- BIND_CONSTANT(BODY_MODE_CHARACTER);
-
- BIND_CONSTANT(BODY_PARAM_BOUNCE);
- BIND_CONSTANT(BODY_PARAM_FRICTION);
- BIND_CONSTANT(BODY_PARAM_MASS);
- BIND_CONSTANT(BODY_PARAM_GRAVITY_SCALE);
- BIND_CONSTANT(BODY_PARAM_ANGULAR_DAMP);
- BIND_CONSTANT(BODY_PARAM_LINEAR_DAMP);
- BIND_CONSTANT(BODY_PARAM_MAX);
-
- BIND_CONSTANT(BODY_STATE_TRANSFORM);
- BIND_CONSTANT(BODY_STATE_LINEAR_VELOCITY);
- BIND_CONSTANT(BODY_STATE_ANGULAR_VELOCITY);
- BIND_CONSTANT(BODY_STATE_SLEEPING);
- BIND_CONSTANT(BODY_STATE_CAN_SLEEP);
+ BIND_ENUM_CONSTANT(SHAPE_PLANE);
+ BIND_ENUM_CONSTANT(SHAPE_RAY);
+ BIND_ENUM_CONSTANT(SHAPE_SPHERE);
+ BIND_ENUM_CONSTANT(SHAPE_BOX);
+ BIND_ENUM_CONSTANT(SHAPE_CAPSULE);
+ BIND_ENUM_CONSTANT(SHAPE_CONVEX_POLYGON);
+ BIND_ENUM_CONSTANT(SHAPE_CONCAVE_POLYGON);
+ BIND_ENUM_CONSTANT(SHAPE_HEIGHTMAP);
+ BIND_ENUM_CONSTANT(SHAPE_CUSTOM);
+
+ BIND_ENUM_CONSTANT(AREA_PARAM_GRAVITY);
+ BIND_ENUM_CONSTANT(AREA_PARAM_GRAVITY_VECTOR);
+ BIND_ENUM_CONSTANT(AREA_PARAM_GRAVITY_IS_POINT);
+ BIND_ENUM_CONSTANT(AREA_PARAM_GRAVITY_DISTANCE_SCALE);
+ BIND_ENUM_CONSTANT(AREA_PARAM_GRAVITY_POINT_ATTENUATION);
+ BIND_ENUM_CONSTANT(AREA_PARAM_LINEAR_DAMP);
+ BIND_ENUM_CONSTANT(AREA_PARAM_ANGULAR_DAMP);
+ BIND_ENUM_CONSTANT(AREA_PARAM_PRIORITY);
+
+ BIND_ENUM_CONSTANT(AREA_SPACE_OVERRIDE_DISABLED);
+ BIND_ENUM_CONSTANT(AREA_SPACE_OVERRIDE_COMBINE);
+ BIND_ENUM_CONSTANT(AREA_SPACE_OVERRIDE_COMBINE_REPLACE);
+ BIND_ENUM_CONSTANT(AREA_SPACE_OVERRIDE_REPLACE);
+ BIND_ENUM_CONSTANT(AREA_SPACE_OVERRIDE_REPLACE_COMBINE);
+
+ BIND_ENUM_CONSTANT(BODY_MODE_STATIC);
+ BIND_ENUM_CONSTANT(BODY_MODE_KINEMATIC);
+ BIND_ENUM_CONSTANT(BODY_MODE_RIGID);
+ BIND_ENUM_CONSTANT(BODY_MODE_CHARACTER);
+
+ BIND_ENUM_CONSTANT(BODY_PARAM_BOUNCE);
+ BIND_ENUM_CONSTANT(BODY_PARAM_FRICTION);
+ BIND_ENUM_CONSTANT(BODY_PARAM_MASS);
+ BIND_ENUM_CONSTANT(BODY_PARAM_GRAVITY_SCALE);
+ BIND_ENUM_CONSTANT(BODY_PARAM_ANGULAR_DAMP);
+ BIND_ENUM_CONSTANT(BODY_PARAM_LINEAR_DAMP);
+ BIND_ENUM_CONSTANT(BODY_PARAM_MAX);
+
+ BIND_ENUM_CONSTANT(BODY_STATE_TRANSFORM);
+ BIND_ENUM_CONSTANT(BODY_STATE_LINEAR_VELOCITY);
+ BIND_ENUM_CONSTANT(BODY_STATE_ANGULAR_VELOCITY);
+ BIND_ENUM_CONSTANT(BODY_STATE_SLEEPING);
+ BIND_ENUM_CONSTANT(BODY_STATE_CAN_SLEEP);
/*
- BIND_CONSTANT( JOINT_PIN );
- BIND_CONSTANT( JOINT_GROOVE );
- BIND_CONSTANT( JOINT_DAMPED_SPRING );
+ BIND_ENUM_CONSTANT( JOINT_PIN );
+ BIND_ENUM_CONSTANT( JOINT_GROOVE );
+ BIND_ENUM_CONSTANT( JOINT_DAMPED_SPRING );
- BIND_CONSTANT( DAMPED_STRING_REST_LENGTH );
- BIND_CONSTANT( DAMPED_STRING_STIFFNESS );
- BIND_CONSTANT( DAMPED_STRING_DAMPING );
+ BIND_ENUM_CONSTANT( DAMPED_STRING_REST_LENGTH );
+ BIND_ENUM_CONSTANT( DAMPED_STRING_STIFFNESS );
+ BIND_ENUM_CONSTANT( DAMPED_STRING_DAMPING );
*/
- //BIND_CONSTANT( TYPE_BODY );
- //BIND_CONSTANT( TYPE_AREA );
+ //BIND_ENUM_CONSTANT( TYPE_BODY );
+ //BIND_ENUM_CONSTANT( TYPE_AREA );
- BIND_CONSTANT(AREA_BODY_ADDED);
- BIND_CONSTANT(AREA_BODY_REMOVED);
+ BIND_ENUM_CONSTANT(AREA_BODY_ADDED);
+ BIND_ENUM_CONSTANT(AREA_BODY_REMOVED);
- BIND_CONSTANT(INFO_ACTIVE_OBJECTS);
- BIND_CONSTANT(INFO_COLLISION_PAIRS);
- BIND_CONSTANT(INFO_ISLAND_COUNT);
+ BIND_ENUM_CONSTANT(INFO_ACTIVE_OBJECTS);
+ BIND_ENUM_CONSTANT(INFO_COLLISION_PAIRS);
+ BIND_ENUM_CONSTANT(INFO_ISLAND_COUNT);
}
PhysicsServer::PhysicsServer() {
diff --git a/servers/physics_server.h b/servers/physics_server.h
index b38e14eb0c..a8c2a7761d 100644
--- a/servers/physics_server.h
+++ b/servers/physics_server.h
@@ -201,6 +201,8 @@ public:
PhysicsDirectSpaceState();
};
+VARIANT_ENUM_CAST(PhysicsDirectSpaceState::ObjectTypeMask);
+
class PhysicsShapeQueryResult : public Reference {
GDCLASS(PhysicsShapeQueryResult, Reference);