From 9cadb9e5f327def5239db9812508637f80904228 Mon Sep 17 00:00:00 2001 From: Poommetee Ketson Date: Sun, 22 Oct 2017 01:58:02 +0700 Subject: [PATCH] Bind unbound enums, rearrange some by value --- editor/editor_plugin.cpp | 1 + main/performance.cpp | 2 +- scene/2d/camera_2d.cpp | 2 +- scene/2d/canvas_item.cpp | 2 +- scene/2d/physics_body_2d.cpp | 4 ++-- scene/2d/visibility_notifier_2d.cpp | 4 ++-- scene/3d/gi_probe.cpp | 1 + scene/3d/light.cpp | 2 +- scene/3d/physics_body.cpp | 4 ++-- scene/3d/visibility_notifier.cpp | 2 +- scene/gui/control.cpp | 4 ++-- scene/gui/rich_text_label.cpp | 1 + scene/gui/tabs.cpp | 2 +- scene/main/node.cpp | 4 ++-- scene/resources/texture.cpp | 2 +- servers/arvr_server.cpp | 2 +- servers/physics_2d_server.cpp | 3 ++- servers/physics_server.cpp | 4 ++-- servers/visual_server.cpp | 1 - 19 files changed, 25 insertions(+), 22 deletions(-) diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index 229d6adfef8..c8abc1f9dbb 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -632,6 +632,7 @@ void EditorPlugin::_bind_methods() { 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_CANVAS_EDITOR_BOTTOM); BIND_ENUM_CONSTANT(CONTAINER_PROPERTY_EDITOR_BOTTOM); BIND_ENUM_CONSTANT(DOCK_SLOT_LEFT_UL); diff --git a/main/performance.cpp b/main/performance.cpp index 0f3383c4a88..c4b62559c7b 100644 --- a/main/performance.cpp +++ b/main/performance.cpp @@ -57,10 +57,10 @@ void Performance::_bind_methods() { 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(RENDER_USAGE_VIDEO_MEM_TOTAL); BIND_ENUM_CONSTANT(PHYSICS_2D_ACTIVE_OBJECTS); BIND_ENUM_CONSTANT(PHYSICS_2D_COLLISION_PAIRS); BIND_ENUM_CONSTANT(PHYSICS_2D_ISLAND_COUNT); diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp index 4fcd6893b87..d65a3bfe80d 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_ENUM_CONSTANT(ANCHOR_MODE_DRAG_CENTER); BIND_ENUM_CONSTANT(ANCHOR_MODE_FIXED_TOP_LEFT); + BIND_ENUM_CONSTANT(ANCHOR_MODE_DRAG_CENTER); } Camera2D::Camera2D() { diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp index d9bb6576d98..b41ba7f590d 100644 --- a/scene/2d/canvas_item.cpp +++ b/scene/2d/canvas_item.cpp @@ -1045,11 +1045,11 @@ void CanvasItem::_bind_methods() { BIND_ENUM_CONSTANT(BLEND_MODE_MUL); BIND_ENUM_CONSTANT(BLEND_MODE_PREMULT_ALPHA); + BIND_CONSTANT(NOTIFICATION_TRANSFORM_CHANGED); BIND_CONSTANT(NOTIFICATION_DRAW); BIND_CONSTANT(NOTIFICATION_VISIBILITY_CHANGED); BIND_CONSTANT(NOTIFICATION_ENTER_CANVAS); BIND_CONSTANT(NOTIFICATION_EXIT_CANVAS); - BIND_CONSTANT(NOTIFICATION_TRANSFORM_CHANGED); } Transform2D CanvasItem::get_canvas_transform() const { diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp index d3b37ae9032..f0ee64a53ff 100644 --- a/scene/2d/physics_body_2d.cpp +++ b/scene/2d/physics_body_2d.cpp @@ -910,10 +910,10 @@ void RigidBody2D::_bind_methods() { ADD_SIGNAL(MethodInfo("body_exited", PropertyInfo(Variant::OBJECT, "body"))); ADD_SIGNAL(MethodInfo("sleeping_state_changed")); - BIND_ENUM_CONSTANT(MODE_STATIC); - BIND_ENUM_CONSTANT(MODE_KINEMATIC); BIND_ENUM_CONSTANT(MODE_RIGID); + BIND_ENUM_CONSTANT(MODE_STATIC); BIND_ENUM_CONSTANT(MODE_CHARACTER); + BIND_ENUM_CONSTANT(MODE_KINEMATIC); BIND_ENUM_CONSTANT(CCD_MODE_DISABLED); BIND_ENUM_CONSTANT(CCD_MODE_CAST_RAY); diff --git a/scene/2d/visibility_notifier_2d.cpp b/scene/2d/visibility_notifier_2d.cpp index ca7b6aa0e47..b0fd57baf58 100644 --- a/scene/2d/visibility_notifier_2d.cpp +++ b/scene/2d/visibility_notifier_2d.cpp @@ -341,12 +341,12 @@ void VisibilityEnabler2D::_bind_methods() { ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "process_parent"), "set_enabler", "is_enabler_enabled", ENABLER_PARENT_PROCESS); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "physics_process_parent"), "set_enabler", "is_enabler_enabled", ENABLER_PARENT_PHYSICS_PROCESS); - BIND_ENUM_CONSTANT(ENABLER_FREEZE_BODIES); BIND_ENUM_CONSTANT(ENABLER_PAUSE_ANIMATIONS); + BIND_ENUM_CONSTANT(ENABLER_FREEZE_BODIES); BIND_ENUM_CONSTANT(ENABLER_PAUSE_PARTICLES); - BIND_ENUM_CONSTANT(ENABLER_PAUSE_ANIMATED_SPRITES); BIND_ENUM_CONSTANT(ENABLER_PARENT_PROCESS); BIND_ENUM_CONSTANT(ENABLER_PARENT_PHYSICS_PROCESS); + BIND_ENUM_CONSTANT(ENABLER_PAUSE_ANIMATED_SPRITES); BIND_ENUM_CONSTANT(ENABLER_MAX); } diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp index 9d55a828248..d5a030b35c4 100644 --- a/scene/3d/gi_probe.cpp +++ b/scene/3d/gi_probe.cpp @@ -1478,6 +1478,7 @@ void GIProbe::_bind_methods() { BIND_ENUM_CONSTANT(SUBDIV_64); BIND_ENUM_CONSTANT(SUBDIV_128); BIND_ENUM_CONSTANT(SUBDIV_256); + BIND_ENUM_CONSTANT(SUBDIV_512); BIND_ENUM_CONSTANT(SUBDIV_MAX); } diff --git a/scene/3d/light.cpp b/scene/3d/light.cpp index b7cd9bd2dca..e994f4c79ea 100644 --- a/scene/3d/light.cpp +++ b/scene/3d/light.cpp @@ -248,7 +248,7 @@ void Light::_bind_methods() { 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_SHADOW_BIAS_SPLIT_SCALE); BIND_ENUM_CONSTANT(PARAM_MAX); } diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp index d7fdf94d405..4c661e6a888 100644 --- a/scene/3d/physics_body.cpp +++ b/scene/3d/physics_body.cpp @@ -870,10 +870,10 @@ void RigidBody::_bind_methods() { ADD_SIGNAL(MethodInfo("body_exited", PropertyInfo(Variant::OBJECT, "body"))); ADD_SIGNAL(MethodInfo("sleeping_state_changed")); - BIND_ENUM_CONSTANT(MODE_STATIC); - BIND_ENUM_CONSTANT(MODE_KINEMATIC); BIND_ENUM_CONSTANT(MODE_RIGID); + BIND_ENUM_CONSTANT(MODE_STATIC); BIND_ENUM_CONSTANT(MODE_CHARACTER); + BIND_ENUM_CONSTANT(MODE_KINEMATIC); BIND_ENUM_CONSTANT(AXIS_LOCK_DISABLED); BIND_ENUM_CONSTANT(AXIS_LOCK_X); diff --git a/scene/3d/visibility_notifier.cpp b/scene/3d/visibility_notifier.cpp index d3203bacecc..e60b32a92a0 100644 --- a/scene/3d/visibility_notifier.cpp +++ b/scene/3d/visibility_notifier.cpp @@ -252,8 +252,8 @@ 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_ENUM_CONSTANT(ENABLER_FREEZE_BODIES); BIND_ENUM_CONSTANT(ENABLER_PAUSE_ANIMATIONS); + BIND_ENUM_CONSTANT(ENABLER_FREEZE_BODIES); BIND_ENUM_CONSTANT(ENABLER_MAX); } diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 91c5263bf5e..54a58159ac5 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -2811,12 +2811,12 @@ void Control::_bind_methods() { BIND_ENUM_CONSTANT(PRESET_WIDE); BIND_ENUM_CONSTANT(PRESET_MODE_MINSIZE); - BIND_ENUM_CONSTANT(PRESET_MODE_KEEP_HEIGHT); BIND_ENUM_CONSTANT(PRESET_MODE_KEEP_WIDTH); + BIND_ENUM_CONSTANT(PRESET_MODE_KEEP_HEIGHT); BIND_ENUM_CONSTANT(PRESET_MODE_KEEP_SIZE); - BIND_ENUM_CONSTANT(SIZE_EXPAND); BIND_ENUM_CONSTANT(SIZE_FILL); + BIND_ENUM_CONSTANT(SIZE_EXPAND); BIND_ENUM_CONSTANT(SIZE_EXPAND_FILL); BIND_ENUM_CONSTANT(SIZE_SHRINK_CENTER); BIND_ENUM_CONSTANT(SIZE_SHRINK_END); diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 07b49538d9c..ad519d8d0cb 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -1984,6 +1984,7 @@ void RichTextLabel::_bind_methods() { BIND_ENUM_CONSTANT(ITEM_ALIGN); BIND_ENUM_CONSTANT(ITEM_INDENT); BIND_ENUM_CONSTANT(ITEM_LIST); + BIND_ENUM_CONSTANT(ITEM_TABLE); BIND_ENUM_CONSTANT(ITEM_META); } diff --git a/scene/gui/tabs.cpp b/scene/gui/tabs.cpp index 085f6de6b80..49823e18fc2 100644 --- a/scene/gui/tabs.cpp +++ b/scene/gui/tabs.cpp @@ -820,9 +820,9 @@ void Tabs::_bind_methods() { BIND_ENUM_CONSTANT(ALIGN_RIGHT); BIND_ENUM_CONSTANT(ALIGN_MAX); + BIND_ENUM_CONSTANT(CLOSE_BUTTON_SHOW_NEVER); 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); } diff --git a/scene/main/node.cpp b/scene/main/node.cpp index cee25b53a1b..e6e11de1771 100755 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -2803,12 +2803,12 @@ void Node::_bind_methods() { BIND_CONSTANT(NOTIFICATION_EXIT_TREE); BIND_CONSTANT(NOTIFICATION_MOVED_IN_PARENT); BIND_CONSTANT(NOTIFICATION_READY); + BIND_CONSTANT(NOTIFICATION_PAUSED); + BIND_CONSTANT(NOTIFICATION_UNPAUSED); BIND_CONSTANT(NOTIFICATION_PHYSICS_PROCESS); BIND_CONSTANT(NOTIFICATION_PROCESS); BIND_CONSTANT(NOTIFICATION_PARENTED); BIND_CONSTANT(NOTIFICATION_UNPARENTED); - BIND_CONSTANT(NOTIFICATION_PAUSED); - BIND_CONSTANT(NOTIFICATION_UNPAUSED); BIND_CONSTANT(NOTIFICATION_INSTANCED); BIND_CONSTANT(NOTIFICATION_DRAG_BEGIN); BIND_CONSTANT(NOTIFICATION_DRAG_END); diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp index c202fad1a48..b23ebf2f3eb 100644 --- a/scene/resources/texture.cpp +++ b/scene/resources/texture.cpp @@ -78,11 +78,11 @@ void Texture::_bind_methods() { 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); + BIND_ENUM_CONSTANT(FLAG_VIDEO_SURFACE); } Texture::Texture() { diff --git a/servers/arvr_server.cpp b/servers/arvr_server.cpp index 4dfc40e9e41..00f82ca0f32 100644 --- a/servers/arvr_server.cpp +++ b/servers/arvr_server.cpp @@ -61,8 +61,8 @@ void ARVRServer::_bind_methods() { 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_UNKNOWN); BIND_ENUM_CONSTANT(TRACKER_ANY); ADD_SIGNAL(MethodInfo("interface_added", PropertyInfo(Variant::STRING, "name"))); diff --git a/servers/physics_2d_server.cpp b/servers/physics_2d_server.cpp index 671c31e6a38..b2e1d541abc 100644 --- a/servers/physics_2d_server.cpp +++ b/servers/physics_2d_server.cpp @@ -358,8 +358,8 @@ void Physics2DDirectSpaceState::_bind_methods() { 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); + BIND_ENUM_CONSTANT(TYPE_MASK_AREA); } int Physics2DShapeQueryResult::get_result_count() const { @@ -615,6 +615,7 @@ void Physics2DServer::_bind_methods() { BIND_ENUM_CONSTANT(SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS); BIND_ENUM_CONSTANT(SHAPE_LINE); + BIND_ENUM_CONSTANT(SHAPE_RAY); BIND_ENUM_CONSTANT(SHAPE_SEGMENT); BIND_ENUM_CONSTANT(SHAPE_CIRCLE); BIND_ENUM_CONSTANT(SHAPE_RECTANGLE); diff --git a/servers/physics_server.cpp b/servers/physics_server.cpp index 6d192886a52..360808ce8cb 100644 --- a/servers/physics_server.cpp +++ b/servers/physics_server.cpp @@ -353,8 +353,8 @@ void PhysicsDirectSpaceState::_bind_methods() { 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); + BIND_ENUM_CONSTANT(TYPE_MASK_AREA); } int PhysicsShapeQueryResult::get_result_count() const { @@ -679,8 +679,8 @@ void PhysicsServer::_bind_methods() { 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_ANGULAR_DAMP); BIND_ENUM_CONSTANT(BODY_PARAM_MAX); BIND_ENUM_CONSTANT(BODY_STATE_TRANSFORM); diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp index 64bc9780377..2234ddda0d7 100644 --- a/servers/visual_server.cpp +++ b/servers/visual_server.cpp @@ -1729,7 +1729,6 @@ void VisualServer::_bind_methods() { BIND_ENUM_CONSTANT(ARRAY_FORMAT_BONES); BIND_ENUM_CONSTANT(ARRAY_FORMAT_WEIGHTS); BIND_ENUM_CONSTANT(ARRAY_FORMAT_INDEX); - BIND_ENUM_CONSTANT(ARRAY_COMPRESS_BASE); BIND_ENUM_CONSTANT(ARRAY_COMPRESS_VERTEX); BIND_ENUM_CONSTANT(ARRAY_COMPRESS_NORMAL); BIND_ENUM_CONSTANT(ARRAY_COMPRESS_TANGENT);