diff options
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/area_2d.cpp | 4 | ||||
-rw-r--r-- | scene/2d/camera_2d.cpp | 2 | ||||
-rw-r--r-- | scene/2d/collision_object_2d.cpp | 4 | ||||
-rw-r--r-- | scene/2d/remote_transform_2d.cpp | 2 | ||||
-rw-r--r-- | scene/2d/tile_map.cpp | 2 | ||||
-rw-r--r-- | scene/3d/area.cpp | 4 | ||||
-rw-r--r-- | scene/3d/collision_object.cpp | 4 | ||||
-rw-r--r-- | scene/3d/physics_joint.cpp | 26 | ||||
-rw-r--r-- | scene/3d/physics_joint.h | 8 | ||||
-rw-r--r-- | scene/3d/remote_transform.cpp | 2 | ||||
-rw-r--r-- | scene/3d/skeleton.cpp | 4 | ||||
-rw-r--r-- | scene/3d/visual_instance.cpp | 2 | ||||
-rw-r--r-- | scene/animation/animation_player.cpp | 2 | ||||
-rw-r--r-- | scene/animation/animation_tree_player.cpp | 2 | ||||
-rw-r--r-- | scene/animation/tween.cpp | 24 | ||||
-rw-r--r-- | scene/gui/control.cpp | 2 | ||||
-rw-r--r-- | scene/gui/option_button.cpp | 22 | ||||
-rw-r--r-- | scene/gui/option_button.h | 6 | ||||
-rw-r--r-- | scene/gui/popup_menu.cpp | 12 | ||||
-rw-r--r-- | scene/gui/popup_menu.h | 4 | ||||
-rw-r--r-- | scene/gui/tree.cpp | 2 | ||||
-rw-r--r-- | scene/main/canvas_layer.cpp | 2 | ||||
-rwxr-xr-x | scene/main/node.cpp | 26 | ||||
-rw-r--r-- | scene/main/scene_tree.cpp | 4 | ||||
-rw-r--r-- | scene/main/viewport.cpp | 4 |
25 files changed, 88 insertions, 88 deletions
diff --git a/scene/2d/area_2d.cpp b/scene/2d/area_2d.cpp index 841e2ef7d3..02a0509449 100644 --- a/scene/2d/area_2d.cpp +++ b/scene/2d/area_2d.cpp @@ -480,7 +480,7 @@ Array Area2D::get_overlapping_areas() const { bool Area2D::overlaps_area(Node *p_area) const { ERR_FAIL_NULL_V(p_area, false); - const Map<ObjectID, AreaState>::Element *E = area_map.find(p_area->get_instance_ID()); + const Map<ObjectID, AreaState>::Element *E = area_map.find(p_area->get_instance_id()); if (!E) return false; return E->get().in_tree; @@ -489,7 +489,7 @@ bool Area2D::overlaps_area(Node *p_area) const { bool Area2D::overlaps_body(Node *p_body) const { ERR_FAIL_NULL_V(p_body, false); - const Map<ObjectID, BodyState>::Element *E = body_map.find(p_body->get_instance_ID()); + const Map<ObjectID, BodyState>::Element *E = body_map.find(p_body->get_instance_id()); if (!E) return false; return E->get().in_tree; diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp index 908c95b50c..93bfc6f705 100644 --- a/scene/2d/camera_2d.cpp +++ b/scene/2d/camera_2d.cpp @@ -580,7 +580,7 @@ void Camera2D::set_custom_viewport(Node *p_viewport) { custom_viewport = p_viewport->cast_to<Viewport>(); if (custom_viewport) { - custom_viewport_id = custom_viewport->get_instance_ID(); + custom_viewport_id = custom_viewport->get_instance_id(); } else { custom_viewport_id = 0; } diff --git a/scene/2d/collision_object_2d.cpp b/scene/2d/collision_object_2d.cpp index eb47682884..45f956ea97 100644 --- a/scene/2d/collision_object_2d.cpp +++ b/scene/2d/collision_object_2d.cpp @@ -372,9 +372,9 @@ CollisionObject2D::CollisionObject2D(RID p_rid, bool p_area) { if (p_area) { - Physics2DServer::get_singleton()->area_attach_object_instance_ID(rid, get_instance_ID()); + Physics2DServer::get_singleton()->area_attach_object_instance_id(rid, get_instance_id()); } else { - Physics2DServer::get_singleton()->body_attach_object_instance_ID(rid, get_instance_ID()); + Physics2DServer::get_singleton()->body_attach_object_instance_id(rid, get_instance_id()); } } diff --git a/scene/2d/remote_transform_2d.cpp b/scene/2d/remote_transform_2d.cpp index 4298377499..cbd7ac06f5 100644 --- a/scene/2d/remote_transform_2d.cpp +++ b/scene/2d/remote_transform_2d.cpp @@ -39,7 +39,7 @@ void RemoteTransform2D::_update_cache() { return; } - cache = node->get_instance_ID(); + cache = node->get_instance_id(); } } diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index 02dcc7d059..f8bf3edb99 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -589,7 +589,7 @@ Map<TileMap::PosKey, TileMap::Quadrant>::Element *TileMap::_create_quadrant(cons xform.set_origin(q.pos); //q.canvas_item = VisualServer::get_singleton()->canvas_item_create(); q.body = Physics2DServer::get_singleton()->body_create(use_kinematic ? Physics2DServer::BODY_MODE_KINEMATIC : Physics2DServer::BODY_MODE_STATIC); - Physics2DServer::get_singleton()->body_attach_object_instance_ID(q.body, get_instance_ID()); + Physics2DServer::get_singleton()->body_attach_object_instance_id(q.body, get_instance_id()); Physics2DServer::get_singleton()->body_set_collision_layer(q.body, collision_layer); Physics2DServer::get_singleton()->body_set_collision_mask(q.body, collision_mask); Physics2DServer::get_singleton()->body_set_param(q.body, Physics2DServer::BODY_PARAM_FRICTION, friction); diff --git a/scene/3d/area.cpp b/scene/3d/area.cpp index 59227070b3..c64b807e43 100644 --- a/scene/3d/area.cpp +++ b/scene/3d/area.cpp @@ -475,7 +475,7 @@ Array Area::get_overlapping_areas() const { bool Area::overlaps_area(Node *p_area) const { ERR_FAIL_NULL_V(p_area, false); - const Map<ObjectID, AreaState>::Element *E = area_map.find(p_area->get_instance_ID()); + const Map<ObjectID, AreaState>::Element *E = area_map.find(p_area->get_instance_id()); if (!E) return false; return E->get().in_tree; @@ -484,7 +484,7 @@ bool Area::overlaps_area(Node *p_area) const { bool Area::overlaps_body(Node *p_body) const { ERR_FAIL_NULL_V(p_body, false); - const Map<ObjectID, BodyState>::Element *E = body_map.find(p_body->get_instance_ID()); + const Map<ObjectID, BodyState>::Element *E = body_map.find(p_body->get_instance_id()); if (!E) return false; return E->get().in_tree; diff --git a/scene/3d/collision_object.cpp b/scene/3d/collision_object.cpp index 5a3d8e013f..2686cd81df 100644 --- a/scene/3d/collision_object.cpp +++ b/scene/3d/collision_object.cpp @@ -346,9 +346,9 @@ CollisionObject::CollisionObject(RID p_rid, bool p_area) { total_subshapes = 0; if (p_area) { - PhysicsServer::get_singleton()->area_attach_object_instance_ID(rid, get_instance_ID()); + PhysicsServer::get_singleton()->area_attach_object_instance_id(rid, get_instance_id()); } else { - PhysicsServer::get_singleton()->body_attach_object_instance_ID(rid, get_instance_ID()); + PhysicsServer::get_singleton()->body_attach_object_instance_id(rid, get_instance_id()); } //set_transform_notify(true); } diff --git a/scene/3d/physics_joint.cpp b/scene/3d/physics_joint.cpp index 3fb5c828c2..61d496935b 100644 --- a/scene/3d/physics_joint.cpp +++ b/scene/3d/physics_joint.cpp @@ -979,9 +979,9 @@ Generic6DOFJoint::Generic6DOFJoint() { void PhysicsJoint::_set(const String& p_name, const Variant& p_value) { if (p_name=="body_A") - set_body_A(p_value); + set_body_a(p_value); else if (p_name=="body_B") - set_body_B(p_value); + set_body_b(p_value); else if (p_name=="active") set_active(p_value); else if (p_name=="no_collision") @@ -990,9 +990,9 @@ void PhysicsJoint::_set(const String& p_name, const Variant& p_value) { Variant PhysicsJoint::_get(const String& p_name) const { if (p_name=="body_A") - return get_body_A(); + return get_body_a(); else if (p_name=="body_B") - return get_body_B(); + return get_body_b(); else if (p_name=="active") return is_active(); else if (p_name=="no_collision") @@ -1034,7 +1034,7 @@ void PhysicsJoint::_notification(int p_what) { if (indicator.is_valid()) { indicator_instance=VisualServer::get_singleton()->instance_create(indicator,get_world()->get_scenario()); - VisualServer::get_singleton()->instance_attach_object_instance_ID( indicator_instance,get_instance_ID() ); + VisualServer::get_singleton()->instance_attach_object_instance_id( indicator_instance,get_instance_id() ); } } break; case NOTIFICATION_TRANSFORM_CHANGED: { @@ -1067,10 +1067,10 @@ RID PhysicsJoint::_get_visual_instance_rid() const { void PhysicsJoint::_bind_methods() { ClassDB::bind_method(D_METHOD("_get_visual_instance_rid"),&PhysicsJoint::_get_visual_instance_rid); - ClassDB::bind_method(D_METHOD("set_body_A","path"),&PhysicsJoint::set_body_A); - ClassDB::bind_method(D_METHOD("set_body_B"),&PhysicsJoint::set_body_B); - ClassDB::bind_method(D_METHOD("get_body_A","path"),&PhysicsJoint::get_body_A); - ClassDB::bind_method(D_METHOD("get_body_B"),&PhysicsJoint::get_body_B); + ClassDB::bind_method(D_METHOD("set_body_a","path"),&PhysicsJoint::set_body_a); + ClassDB::bind_method(D_METHOD("set_body_b"),&PhysicsJoint::set_body_b); + ClassDB::bind_method(D_METHOD("get_body_a","path"),&PhysicsJoint::get_body_a); + ClassDB::bind_method(D_METHOD("get_body_b"),&PhysicsJoint::get_body_b); ClassDB::bind_method(D_METHOD("set_active","active"),&PhysicsJoint::set_active); ClassDB::bind_method(D_METHOD("is_active"),&PhysicsJoint::is_active); @@ -1085,14 +1085,14 @@ void PhysicsJoint::_bind_methods() { } -void PhysicsJoint::set_body_A(const NodePath& p_path) { +void PhysicsJoint::set_body_a(const NodePath& p_path) { _disconnect(); body_A=p_path; _connect(); _change_notify("body_A"); } -void PhysicsJoint::set_body_B(const NodePath& p_path) { +void PhysicsJoint::set_body_b(const NodePath& p_path) { _disconnect(); body_B=p_path; @@ -1100,11 +1100,11 @@ void PhysicsJoint::set_body_B(const NodePath& p_path) { _change_notify("body_B"); } -NodePath PhysicsJoint::get_body_A() const { +NodePath PhysicsJoint::get_body_a() const { return body_A; } -NodePath PhysicsJoint::get_body_B() const { +NodePath PhysicsJoint::get_body_b() const { return body_B; } diff --git a/scene/3d/physics_joint.h b/scene/3d/physics_joint.h index 2b221e25f2..b834aaf6d2 100644 --- a/scene/3d/physics_joint.h +++ b/scene/3d/physics_joint.h @@ -354,10 +354,10 @@ protected: void _connect(); public: - void set_body_A(const NodePath& p_path); - void set_body_B(const NodePath& p_path); - NodePath get_body_A() const; - NodePath get_body_B() const; + void set_body_a(const NodePath& p_path); + void set_body_b(const NodePath& p_path); + NodePath get_body_a() const; + NodePath get_body_b() const; void set_active(bool p_active); bool is_active() const; diff --git a/scene/3d/remote_transform.cpp b/scene/3d/remote_transform.cpp index 4dcfb5f94e..492930ea9b 100644 --- a/scene/3d/remote_transform.cpp +++ b/scene/3d/remote_transform.cpp @@ -39,7 +39,7 @@ void RemoteTransform::_update_cache() { return; } - cache = node->get_instance_ID(); + cache = node->get_instance_id(); } } diff --git a/scene/3d/skeleton.cpp b/scene/3d/skeleton.cpp index 71af77c027..ea5d21cd4e 100644 --- a/scene/3d/skeleton.cpp +++ b/scene/3d/skeleton.cpp @@ -407,7 +407,7 @@ void Skeleton::bind_child_node_to_bone(int p_bone, Node *p_node) { ERR_FAIL_NULL(p_node); ERR_FAIL_INDEX(p_bone, bones.size()); - uint32_t id = p_node->get_instance_ID(); + uint32_t id = p_node->get_instance_id(); for (List<uint32_t>::Element *E = bones[p_bone].nodes_bound.front(); E; E = E->next()) { @@ -422,7 +422,7 @@ void Skeleton::unbind_child_node_from_bone(int p_bone, Node *p_node) { ERR_FAIL_NULL(p_node); ERR_FAIL_INDEX(p_bone, bones.size()); - uint32_t id = p_node->get_instance_ID(); + uint32_t id = p_node->get_instance_id(); bones[p_bone].nodes_bound.erase(id); } void Skeleton::get_bound_child_nodes_to_bone(int p_bone, List<Node *> *p_bound) const { diff --git a/scene/3d/visual_instance.cpp b/scene/3d/visual_instance.cpp index 6f8c38eddd..1a294d016a 100644 --- a/scene/3d/visual_instance.cpp +++ b/scene/3d/visual_instance.cpp @@ -149,7 +149,7 @@ void VisualInstance::set_base(const RID &p_base) { VisualInstance::VisualInstance() { instance = VisualServer::get_singleton()->instance_create(); - VisualServer::get_singleton()->instance_attach_object_instance_ID(instance, get_instance_ID()); + VisualServer::get_singleton()->instance_attach_object_instance_id(instance, get_instance_id()); layers = 1; set_notify_transform(true); } diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index 85a9ada38a..7173a820b4 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -247,7 +247,7 @@ void AnimationPlayer::_generate_node_caches(AnimationData *p_anim) { ERR_EXPLAIN("On Animation: '" + p_anim->name + "', couldn't resolve track: '" + String(a->track_get_path(i)) + "'"); } ERR_CONTINUE(!child); // couldn't find the child node - uint32_t id = resource.is_valid() ? resource->get_instance_ID() : child->get_instance_ID(); + uint32_t id = resource.is_valid() ? resource->get_instance_id() : child->get_instance_id(); int bone_idx = -1; if (a->track_get_path(i).get_property() && child->cast_to<Skeleton>()) { diff --git a/scene/animation/animation_tree_player.cpp b/scene/animation/animation_tree_player.cpp index 7c2684ba47..6a9c2587d5 100644 --- a/scene/animation/animation_tree_player.cpp +++ b/scene/animation/animation_tree_player.cpp @@ -1481,7 +1481,7 @@ AnimationTreePlayer::Track *AnimationTreePlayer::_find_track(const NodePath &p_p return NULL; } - ObjectID id = child->get_instance_ID(); + ObjectID id = child->get_instance_id(); StringName property; int bone_idx = -1; diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp index ad0b0fbfb2..78d3357bb4 100644 --- a/scene/animation/tween.cpp +++ b/scene/animation/tween.cpp @@ -1024,7 +1024,7 @@ bool Tween::interpolate_property(Object *p_object, String p_property, Variant p_ data.finish = false; data.elapsed = 0; - data.id = p_object->get_instance_ID(); + data.id = p_object->get_instance_id(); data.key = p_property; data.initial_val = p_initial_val; data.final_val = p_final_val; @@ -1066,7 +1066,7 @@ bool Tween::interpolate_method(Object *p_object, String p_method, Variant p_init data.finish = false; data.elapsed = 0; - data.id = p_object->get_instance_ID(); + data.id = p_object->get_instance_id(); data.key = p_method; data.initial_val = p_initial_val; data.final_val = p_final_val; @@ -1103,7 +1103,7 @@ bool Tween::interpolate_callback(Object *p_object, real_t p_duration, String p_c data.call_deferred = false; data.elapsed = 0; - data.id = p_object->get_instance_ID(); + data.id = p_object->get_instance_id(); data.key = p_callback; data.duration = p_duration; data.delay = 0; @@ -1155,7 +1155,7 @@ bool Tween::interpolate_deferred_callback(Object *p_object, real_t p_duration, S data.call_deferred = true; data.elapsed = 0; - data.id = p_object->get_instance_ID(); + data.id = p_object->get_instance_id(); data.key = p_callback; data.duration = p_duration; data.delay = 0; @@ -1222,10 +1222,10 @@ bool Tween::follow_property(Object *p_object, String p_property, Variant p_initi data.finish = false; data.elapsed = 0; - data.id = p_object->get_instance_ID(); + data.id = p_object->get_instance_id(); data.key = p_property; data.initial_val = p_initial_val; - data.target_id = p_target->get_instance_ID(); + data.target_id = p_target->get_instance_id(); data.target_key = p_target_property; data.duration = p_duration; data.trans_type = p_trans_type; @@ -1272,10 +1272,10 @@ bool Tween::follow_method(Object *p_object, String p_method, Variant p_initial_v data.finish = false; data.elapsed = 0; - data.id = p_object->get_instance_ID(); + data.id = p_object->get_instance_id(); data.key = p_method; data.initial_val = p_initial_val; - data.target_id = p_target->get_instance_ID(); + data.target_id = p_target->get_instance_id(); data.target_key = p_target_method; data.duration = p_duration; data.trans_type = p_trans_type; @@ -1321,9 +1321,9 @@ bool Tween::targeting_property(Object *p_object, String p_property, Object *p_in data.finish = false; data.elapsed = 0; - data.id = p_object->get_instance_ID(); + data.id = p_object->get_instance_id(); data.key = p_property; - data.target_id = p_initial->get_instance_ID(); + data.target_id = p_initial->get_instance_id(); data.target_key = p_initial_property; data.initial_val = initial_val; data.final_val = p_final_val; @@ -1375,9 +1375,9 @@ bool Tween::targeting_method(Object *p_object, String p_method, Object *p_initia data.finish = false; data.elapsed = 0; - data.id = p_object->get_instance_ID(); + data.id = p_object->get_instance_id(); data.key = p_method; - data.target_id = p_initial->get_instance_ID(); + data.target_id = p_initial->get_instance_id(); data.target_key = p_initial_method; data.initial_val = initial_val; data.final_val = p_final_val; diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index ca81b72e89..339b4e079e 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -603,7 +603,7 @@ bool Control::has_point(const Point2 &p_point) const { void Control::set_drag_forwarding(Control *p_target) { if (p_target) - data.drag_owner = p_target->get_instance_ID(); + data.drag_owner = p_target->get_instance_id(); else data.drag_owner = 0; } diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp index b842419eab..60874edf38 100644 --- a/scene/gui/option_button.cpp +++ b/scene/gui/option_button.cpp @@ -82,7 +82,7 @@ void OptionButton::_selected(int p_which) { int selid = -1; for (int i = 0; i < popup->get_item_count(); i++) { - bool is_clicked = popup->get_item_ID(i) == p_which; + bool is_clicked = popup->get_item_id(i) == p_which; if (is_clicked) { selid = i; break; @@ -129,9 +129,9 @@ void OptionButton::set_item_icon(int p_idx, const Ref<Texture> &p_icon) { popup->set_item_icon(p_idx, p_icon); } -void OptionButton::set_item_ID(int p_idx, int p_ID) { +void OptionButton::set_item_id(int p_idx, int p_ID) { - popup->set_item_ID(p_idx, p_ID); + popup->set_item_id(p_idx, p_ID); } void OptionButton::set_item_metadata(int p_idx, const Variant &p_metadata) { @@ -154,9 +154,9 @@ Ref<Texture> OptionButton::get_item_icon(int p_idx) const { return popup->get_item_icon(p_idx); } -int OptionButton::get_item_ID(int p_idx) const { +int OptionButton::get_item_id(int p_idx) const { - return popup->get_item_ID(p_idx); + return popup->get_item_id(p_idx); } Variant OptionButton::get_item_metadata(int p_idx) const { @@ -224,12 +224,12 @@ int OptionButton::get_selected() const { return current; } -int OptionButton::get_selected_ID() const { +int OptionButton::get_selected_id() const { int idx = get_selected(); if (idx < 0) return 0; - return get_item_ID(current); + return get_item_id(current); } Variant OptionButton::get_selected_metadata() const { @@ -252,7 +252,7 @@ Array OptionButton::_get_items() const { items.push_back(get_item_text(i)); items.push_back(get_item_icon(i)); items.push_back(is_item_disabled(i)); - items.push_back(get_item_ID(i)); + items.push_back(get_item_id(i)); items.push_back(get_item_metadata(i)); } @@ -293,11 +293,11 @@ void OptionButton::_bind_methods() { ClassDB::bind_method(D_METHOD("set_item_text", "idx", "text"), &OptionButton::set_item_text); ClassDB::bind_method(D_METHOD("set_item_icon", "idx", "texture:Texture"), &OptionButton::set_item_icon); ClassDB::bind_method(D_METHOD("set_item_disabled", "idx", "disabled"), &OptionButton::set_item_disabled); - ClassDB::bind_method(D_METHOD("set_item_ID", "idx", "id"), &OptionButton::set_item_ID); + ClassDB::bind_method(D_METHOD("set_item_id", "idx", "id"), &OptionButton::set_item_id); ClassDB::bind_method(D_METHOD("set_item_metadata", "idx", "metadata"), &OptionButton::set_item_metadata); ClassDB::bind_method(D_METHOD("get_item_text", "idx"), &OptionButton::get_item_text); ClassDB::bind_method(D_METHOD("get_item_icon:Texture", "idx"), &OptionButton::get_item_icon); - ClassDB::bind_method(D_METHOD("get_item_ID", "idx"), &OptionButton::get_item_ID); + ClassDB::bind_method(D_METHOD("get_item_id", "idx"), &OptionButton::get_item_id); ClassDB::bind_method(D_METHOD("get_item_metadata:Variant", "idx"), &OptionButton::get_item_metadata); ClassDB::bind_method(D_METHOD("is_item_disabled", "idx"), &OptionButton::is_item_disabled); ClassDB::bind_method(D_METHOD("get_item_count"), &OptionButton::get_item_count); @@ -305,7 +305,7 @@ void OptionButton::_bind_methods() { ClassDB::bind_method(D_METHOD("clear"), &OptionButton::clear); ClassDB::bind_method(D_METHOD("select", "idx"), &OptionButton::select); ClassDB::bind_method(D_METHOD("get_selected"), &OptionButton::get_selected); - ClassDB::bind_method(D_METHOD("get_selected_ID"), &OptionButton::get_selected_ID); + ClassDB::bind_method(D_METHOD("get_selected_id"), &OptionButton::get_selected_id); ClassDB::bind_method(D_METHOD("get_selected_metadata:Variant"), &OptionButton::get_selected_metadata); ClassDB::bind_method(D_METHOD("remove_item", "idx"), &OptionButton::remove_item); ClassDB::bind_method(D_METHOD("_select_int"), &OptionButton::_select_int); diff --git a/scene/gui/option_button.h b/scene/gui/option_button.h index 887d199c90..db921b8b97 100644 --- a/scene/gui/option_button.h +++ b/scene/gui/option_button.h @@ -62,13 +62,13 @@ public: void set_item_text(int p_idx, const String &p_text); void set_item_icon(int p_idx, const Ref<Texture> &p_icon); - void set_item_ID(int p_idx, int p_ID); + void set_item_id(int p_idx, int p_ID); void set_item_metadata(int p_idx, const Variant &p_metadata); void set_item_disabled(int p_idx, bool p_disabled); String get_item_text(int p_idx) const; Ref<Texture> get_item_icon(int p_idx) const; - int get_item_ID(int p_idx) const; + int get_item_id(int p_idx) const; Variant get_item_metadata(int p_idx) const; bool is_item_disabled(int p_idx) const; @@ -80,7 +80,7 @@ public: void select(int p_idx); int get_selected() const; - int get_selected_ID() const; + int get_selected_id() const; Variant get_selected_metadata() const; void remove_item(int p_idx); diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index b673f9d68a..e3f9a09db3 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -647,7 +647,7 @@ void PopupMenu::set_item_checked(int p_idx, bool p_checked) { update(); } -void PopupMenu::set_item_ID(int p_idx, int p_ID) { +void PopupMenu::set_item_id(int p_idx, int p_ID) { ERR_FAIL_INDEX(p_idx, items.size()); items[p_idx].ID = p_ID; @@ -737,7 +737,7 @@ bool PopupMenu::is_item_checked(int p_idx) const { return items[p_idx].checked; } -int PopupMenu::get_item_ID(int p_idx) const { +int PopupMenu::get_item_id(int p_idx) const { ERR_FAIL_INDEX_V(p_idx, items.size(), 0); return items[p_idx].ID; @@ -956,7 +956,7 @@ Array PopupMenu::_get_items() const { items.push_back(is_item_checked(i)); items.push_back(is_item_disabled(i)); - items.push_back(get_item_ID(i)); + items.push_back(get_item_id(i)); items.push_back(get_item_accelerator(i)); items.push_back(get_item_metadata(i)); items.push_back(get_item_submenu(i)); @@ -1011,7 +1011,7 @@ void PopupMenu::_set_items(const Array &p_items) { set_item_as_checkable(idx, checkable); set_item_checked(idx, checked); set_item_disabled(idx, disabled); - set_item_ID(idx, id); + set_item_id(idx, id); set_item_metadata(idx, meta); set_item_as_separator(idx, sep); set_item_accelerator(idx, accel); @@ -1089,7 +1089,7 @@ void PopupMenu::_bind_methods() { ClassDB::bind_method(D_METHOD("set_item_text", "idx", "text"), &PopupMenu::set_item_text); ClassDB::bind_method(D_METHOD("set_item_icon", "idx", "icon:Texture"), &PopupMenu::set_item_icon); ClassDB::bind_method(D_METHOD("set_item_checked", "idx", "checked"), &PopupMenu::set_item_checked); - ClassDB::bind_method(D_METHOD("set_item_ID", "idx", "id"), &PopupMenu::set_item_ID); + ClassDB::bind_method(D_METHOD("set_item_id", "idx", "id"), &PopupMenu::set_item_id); ClassDB::bind_method(D_METHOD("set_item_accelerator", "idx", "accel"), &PopupMenu::set_item_accelerator); ClassDB::bind_method(D_METHOD("set_item_metadata", "idx", "metadata"), &PopupMenu::set_item_metadata); ClassDB::bind_method(D_METHOD("set_item_disabled", "idx", "disabled"), &PopupMenu::set_item_disabled); @@ -1104,7 +1104,7 @@ void PopupMenu::_bind_methods() { ClassDB::bind_method(D_METHOD("get_item_text", "idx"), &PopupMenu::get_item_text); ClassDB::bind_method(D_METHOD("get_item_icon:Texture", "idx"), &PopupMenu::get_item_icon); ClassDB::bind_method(D_METHOD("is_item_checked", "idx"), &PopupMenu::is_item_checked); - ClassDB::bind_method(D_METHOD("get_item_ID", "idx"), &PopupMenu::get_item_ID); + ClassDB::bind_method(D_METHOD("get_item_id", "idx"), &PopupMenu::get_item_id); ClassDB::bind_method(D_METHOD("get_item_index", "id"), &PopupMenu::get_item_index); ClassDB::bind_method(D_METHOD("get_item_accelerator", "idx"), &PopupMenu::get_item_accelerator); ClassDB::bind_method(D_METHOD("get_item_metadata:Variant", "idx"), &PopupMenu::get_item_metadata); diff --git a/scene/gui/popup_menu.h b/scene/gui/popup_menu.h index 6f1a2db363..cbfe7873e6 100644 --- a/scene/gui/popup_menu.h +++ b/scene/gui/popup_menu.h @@ -118,7 +118,7 @@ public: void set_item_text(int p_idx, const String &p_text); void set_item_icon(int p_idx, const Ref<Texture> &p_icon); void set_item_checked(int p_idx, bool p_checked); - void set_item_ID(int p_idx, int p_ID); + void set_item_id(int p_idx, int p_ID); void set_item_accelerator(int p_idx, uint32_t p_accel); void set_item_metadata(int p_idx, const Variant &p_meta); void set_item_disabled(int p_idx, bool p_disabled); @@ -135,7 +135,7 @@ public: int get_item_idx_from_text(const String &text) const; Ref<Texture> get_item_icon(int p_idx) const; bool is_item_checked(int p_idx) const; - int get_item_ID(int p_idx) const; + int get_item_id(int p_idx) const; int get_item_index(int p_ID) const; uint32_t get_item_accelerator(int p_idx) const; Variant get_item_metadata(int p_idx) const; diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index 9499ba9dcd..0ce29b7472 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -291,7 +291,7 @@ void TreeItem::set_custom_draw(int p_column, Object *p_object, const StringName ERR_FAIL_INDEX(p_column, cells.size()); ERR_FAIL_NULL(p_object); - cells[p_column].custom_draw_obj = p_object->get_instance_ID(); + cells[p_column].custom_draw_obj = p_object->get_instance_id(); cells[p_column].custom_draw_callback = p_callback; } diff --git a/scene/main/canvas_layer.cpp b/scene/main/canvas_layer.cpp index 150aee99ba..0ee57bd794 100644 --- a/scene/main/canvas_layer.cpp +++ b/scene/main/canvas_layer.cpp @@ -204,7 +204,7 @@ void CanvasLayer::set_custom_viewport(Node *p_viewport) { custom_viewport = p_viewport->cast_to<Viewport>(); if (custom_viewport) { - custom_viewport_id = custom_viewport->get_instance_ID(); + custom_viewport_id = custom_viewport->get_instance_id(); } else { custom_viewport_id = 0; } diff --git a/scene/main/node.cpp b/scene/main/node.cpp index c3849f79df..aca15c27bf 100755 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -77,11 +77,11 @@ void Node::_notification(int p_notification) { } if (data.input) - add_to_group("_vp_input" + itos(get_viewport()->get_instance_ID())); + add_to_group("_vp_input" + itos(get_viewport()->get_instance_id())); if (data.unhandled_input) - add_to_group("_vp_unhandled_input" + itos(get_viewport()->get_instance_ID())); + add_to_group("_vp_unhandled_input" + itos(get_viewport()->get_instance_id())); if (data.unhandled_key_input) - add_to_group("_vp_unhandled_key_input" + itos(get_viewport()->get_instance_ID())); + add_to_group("_vp_unhandled_key_input" + itos(get_viewport()->get_instance_id())); get_tree()->node_count++; @@ -90,11 +90,11 @@ void Node::_notification(int p_notification) { get_tree()->node_count--; if (data.input) - remove_from_group("_vp_input" + itos(get_viewport()->get_instance_ID())); + remove_from_group("_vp_input" + itos(get_viewport()->get_instance_id())); if (data.unhandled_input) - remove_from_group("_vp_unhandled_input" + itos(get_viewport()->get_instance_ID())); + remove_from_group("_vp_unhandled_input" + itos(get_viewport()->get_instance_id())); if (data.unhandled_key_input) - remove_from_group("_vp_unhandled_key_input" + itos(get_viewport()->get_instance_ID())); + remove_from_group("_vp_unhandled_key_input" + itos(get_viewport()->get_instance_id())); data.pause_owner = NULL; if (data.path_cache) { @@ -1115,9 +1115,9 @@ void Node::set_process_input(bool p_enable) { return; if (p_enable) - add_to_group("_vp_input" + itos(get_viewport()->get_instance_ID())); + add_to_group("_vp_input" + itos(get_viewport()->get_instance_id())); else - remove_from_group("_vp_input" + itos(get_viewport()->get_instance_ID())); + remove_from_group("_vp_input" + itos(get_viewport()->get_instance_id())); } bool Node::is_processing_input() const { @@ -1133,9 +1133,9 @@ void Node::set_process_unhandled_input(bool p_enable) { return; if (p_enable) - add_to_group("_vp_unhandled_input" + itos(get_viewport()->get_instance_ID())); + add_to_group("_vp_unhandled_input" + itos(get_viewport()->get_instance_id())); else - remove_from_group("_vp_unhandled_input" + itos(get_viewport()->get_instance_ID())); + remove_from_group("_vp_unhandled_input" + itos(get_viewport()->get_instance_id())); } bool Node::is_processing_unhandled_input() const { @@ -1151,9 +1151,9 @@ void Node::set_process_unhandled_key_input(bool p_enable) { return; if (p_enable) - add_to_group("_vp_unhandled_key_input" + itos(get_viewport()->get_instance_ID())); + add_to_group("_vp_unhandled_key_input" + itos(get_viewport()->get_instance_id())); else - remove_from_group("_vp_unhandled_key_input" + itos(get_viewport()->get_instance_ID())); + remove_from_group("_vp_unhandled_key_input" + itos(get_viewport()->get_instance_id())); } bool Node::is_processing_unhandled_key_input() const { @@ -2606,7 +2606,7 @@ static void _Node_debug_sn(Object *p_obj) { path = n->get_name(); else path = String(p->get_name()) + "/" + p->get_path_to(n); - print_line(itos(p_obj->get_instance_ID()) + "- Stray Node: " + path + " (Type: " + n->get_class() + ")"); + print_line(itos(p_obj->get_instance_id()) + "- Stray Node: " + path + " (Type: " + n->get_class() + ")"); } void Node::_print_stray_nodes() { diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index 48e6a44745..6aa2c83941 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -1106,7 +1106,7 @@ static void _fill_array(Node *p_node, Array &array, int p_level) { array.push_back(p_level); array.push_back(p_node->get_name()); array.push_back(p_node->get_class()); - array.push_back(p_node->get_instance_ID()); + array.push_back(p_node->get_instance_id()); for (int i = 0; i < p_node->get_child_count(); i++) { _fill_array(p_node->get_child(i), array, p_level + 1); @@ -1141,7 +1141,7 @@ void SceneTree::queue_delete(Object *p_object) { _THREAD_SAFE_METHOD_ ERR_FAIL_NULL(p_object); p_object->_is_queued_for_deletion = true; - delete_queue.push_back(p_object->get_instance_ID()); + delete_queue.push_back(p_object->get_instance_id()); } int SceneTree::get_node_count() const { diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 76b281ebac..e3c136a33f 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -2303,7 +2303,7 @@ List<Control *>::Element *Viewport::_gui_show_modal(Control *p_control) { gui.modal_stack.push_back(p_control); if (gui.key_focus) - p_control->_modal_set_prev_focus_owner(gui.key_focus->get_instance_ID()); + p_control->_modal_set_prev_focus_owner(gui.key_focus->get_instance_id()); else p_control->_modal_set_prev_focus_owner(0); @@ -2769,7 +2769,7 @@ Viewport::Viewport() { set_shadow_atlas_quadrant_subdiv(2, SHADOW_ATLAS_QUADRANT_SUBDIV_16); set_shadow_atlas_quadrant_subdiv(3, SHADOW_ATLAS_QUADRANT_SUBDIV_64); - String id = itos(get_instance_ID()); + String id = itos(get_instance_id()); input_group = "_vp_input" + id; gui_input_group = "_vp_gui_input" + id; unhandled_input_group = "_vp_unhandled_input" + id; |