From eaaee63b629d6999fcc0c84e38886b964f6d051d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 30 Mar 2020 18:22:57 +0200 Subject: doc: Update classref with node renames A few extra renames for classes which were missed in last week's PRs. --- scene/3d/collision_object_3d.cpp | 2 +- scene/3d/collision_polygon_3d.cpp | 4 ++-- scene/3d/collision_shape_3d.cpp | 14 ++++++++------ scene/3d/cpu_particles_3d.cpp | 4 ++-- scene/3d/gpu_particles_3d.cpp | 2 +- scene/3d/light_3d.cpp | 4 ++-- scene/3d/navigation_agent_3d.cpp | 2 +- scene/3d/navigation_obstacle_3d.cpp | 2 +- scene/3d/navigation_region_3d.cpp | 3 ++- scene/3d/path_3d.cpp | 4 ++-- scene/3d/physics_body_3d.cpp | 10 +++++----- scene/3d/physics_body_3d.h | 2 +- scene/3d/soft_body_3d.cpp | 7 ++++--- scene/3d/vehicle_body_3d.cpp | 4 ++-- 14 files changed, 34 insertions(+), 30 deletions(-) (limited to 'scene/3d') diff --git a/scene/3d/collision_object_3d.cpp b/scene/3d/collision_object_3d.cpp index da37ca8ae2..6ee0512546 100644 --- a/scene/3d/collision_object_3d.cpp +++ b/scene/3d/collision_object_3d.cpp @@ -374,7 +374,7 @@ String CollisionObject3D::get_configuration_warning() const { if (!warning.empty()) { warning += "\n\n"; } - warning += TTR("This node has no shape, so it can't collide or interact with other objects.\nConsider adding a CollisionShape or CollisionPolygon as a child to define its shape."); + warning += TTR("This node has no shape, so it can't collide or interact with other objects.\nConsider adding a CollisionShape3D or CollisionPolygon3D as a child to define its shape."); } return warning; diff --git a/scene/3d/collision_polygon_3d.cpp b/scene/3d/collision_polygon_3d.cpp index c8b1b728bc..982205137b 100644 --- a/scene/3d/collision_polygon_3d.cpp +++ b/scene/3d/collision_polygon_3d.cpp @@ -165,11 +165,11 @@ bool CollisionPolygon3D::is_disabled() const { String CollisionPolygon3D::get_configuration_warning() const { if (!Object::cast_to(get_parent())) { - return TTR("CollisionPolygon only serves to provide a collision shape to a CollisionObject derived node. Please only use it as a child of Area, StaticBody, RigidBody, KinematicBody, etc. to give them a shape."); + return TTR("CollisionPolygon3D only serves to provide a collision shape to a CollisionObject3D derived node. Please only use it as a child of Area3D, StaticBody3D, RigidBody3D, KinematicBody3D, etc. to give them a shape."); } if (polygon.empty()) { - return TTR("An empty CollisionPolygon has no effect on collision."); + return TTR("An empty CollisionPolygon3D has no effect on collision."); } return String(); diff --git a/scene/3d/collision_shape_3d.cpp b/scene/3d/collision_shape_3d.cpp index e736f20614..6aecfd08cc 100644 --- a/scene/3d/collision_shape_3d.cpp +++ b/scene/3d/collision_shape_3d.cpp @@ -29,6 +29,10 @@ /*************************************************************************/ #include "collision_shape_3d.h" + +#include "core/math/quick_hull.h" +#include "mesh_instance_3d.h" +#include "physics_body_3d.h" #include "scene/resources/box_shape_3d.h" #include "scene/resources/capsule_shape_3d.h" #include "scene/resources/concave_polygon_shape_3d.h" @@ -37,10 +41,8 @@ #include "scene/resources/sphere_shape_3d.h" #include "scene/resources/world_margin_shape_3d.h" #include "servers/rendering_server.h" + //TODO: Implement CylinderShape and HeightMapShape? -#include "core/math/quick_hull.h" -#include "mesh_instance_3d.h" -#include "physics_body_3d.h" void CollisionShape3D::make_convex_from_brothers() { @@ -116,17 +118,17 @@ void CollisionShape3D::resource_changed(RES res) { String CollisionShape3D::get_configuration_warning() const { if (!Object::cast_to(get_parent())) { - return TTR("CollisionShape only serves to provide a collision shape to a CollisionObject derived node. Please only use it as a child of Area, StaticBody, RigidBody, KinematicBody, etc. to give them a shape."); + return TTR("CollisionShape3D only serves to provide a collision shape to a CollisionObject3D derived node. Please only use it as a child of Area3D, StaticBody3D, RigidBody3D, KinematicBody3D, etc. to give them a shape."); } if (!shape.is_valid()) { - return TTR("A shape must be provided for CollisionShape to function. Please create a shape resource for it."); + return TTR("A shape must be provided for CollisionShape3D to function. Please create a shape resource for it."); } if (Object::cast_to(get_parent())) { if (Object::cast_to(*shape)) { if (Object::cast_to(get_parent())->get_mode() != RigidBody3D::MODE_STATIC) { - return TTR("ConcavePolygonShape doesn't support RigidBody in another mode than static."); + return TTR("ConcavePolygonShape3D doesn't support RigidBody3D in another mode than static."); } } } diff --git a/scene/3d/cpu_particles_3d.cpp b/scene/3d/cpu_particles_3d.cpp index 4350d4da25..2226b0ed83 100644 --- a/scene/3d/cpu_particles_3d.cpp +++ b/scene/3d/cpu_particles_3d.cpp @@ -228,7 +228,7 @@ String CPUParticles3D::get_configuration_warning() const { get_param_curve(PARAM_ANIM_SPEED).is_valid() || get_param_curve(PARAM_ANIM_OFFSET).is_valid())) { if (warnings != String()) warnings += "\n"; - warnings += "- " + TTR("CPUParticles animation requires the usage of a StandardMaterial3D whose Billboard Mode is set to \"Particle Billboard\"."); + warnings += "- " + TTR("CPUParticles3D animation requires the usage of a StandardMaterial3D whose Billboard Mode is set to \"Particle Billboard\"."); } return warnings; @@ -1206,7 +1206,7 @@ void CPUParticles3D::_notification(int p_what) { void CPUParticles3D::convert_from_particles(Node *p_particles) { GPUParticles3D *particles = Object::cast_to(p_particles); - ERR_FAIL_COND_MSG(!particles, "Only Particles nodes can be converted to CPUParticles."); + ERR_FAIL_COND_MSG(!particles, "Only GPUParticles3D nodes can be converted to CPUParticles3D."); set_emitting(particles->is_emitting()); set_amount(particles->get_amount()); diff --git a/scene/3d/gpu_particles_3d.cpp b/scene/3d/gpu_particles_3d.cpp index ad45228ca8..8646d4f290 100644 --- a/scene/3d/gpu_particles_3d.cpp +++ b/scene/3d/gpu_particles_3d.cpp @@ -241,7 +241,7 @@ bool GPUParticles3D::get_fractional_delta() const { String GPUParticles3D::get_configuration_warning() const { if (RenderingServer::get_singleton()->is_low_end()) { - return TTR("GPU-based particles are not supported by the GLES2 video driver.\nUse the CPUParticles node instead. You can use the \"Convert to CPUParticles\" option for this purpose."); + return TTR("GPU-based particles are not supported by the GLES2 video driver.\nUse the CPUParticles3D node instead. You can use the \"Convert to CPUParticles3D\" option for this purpose."); } String warnings; diff --git a/scene/3d/light_3d.cpp b/scene/3d/light_3d.cpp index 7fc7fe2bf5..be3b369724 100644 --- a/scene/3d/light_3d.cpp +++ b/scene/3d/light_3d.cpp @@ -336,7 +336,7 @@ Light3D::Light3D(RenderingServer::LightType p_type) { Light3D::Light3D() { type = RenderingServer::LIGHT_DIRECTIONAL; - ERR_PRINT("Light should not be instanced directly; use the DirectionalLight, OmniLight or SpotLight subtypes instead."); + ERR_PRINT("Light3D should not be instanced directly; use the DirectionalLight3D, OmniLight3D or SpotLight3D subtypes instead."); } Light3D::~Light3D() { @@ -464,7 +464,7 @@ String SpotLight3D::get_configuration_warning() const { warning += "\n\n"; } - warning += TTR("A SpotLight with an angle wider than 90 degrees cannot cast shadows."); + warning += TTR("A SpotLight3D with an angle wider than 90 degrees cannot cast shadows."); } return warning; diff --git a/scene/3d/navigation_agent_3d.cpp b/scene/3d/navigation_agent_3d.cpp index 76f1d4688d..a131684a8a 100644 --- a/scene/3d/navigation_agent_3d.cpp +++ b/scene/3d/navigation_agent_3d.cpp @@ -298,7 +298,7 @@ void NavigationAgent3D::_avoidance_done(Vector3 p_new_velocity) { String NavigationAgent3D::get_configuration_warning() const { if (!Object::cast_to(get_parent())) { - return TTR("The NavigationAgent can be used only under a spatial node."); + return TTR("The NavigationAgent3D can be used only under a spatial node."); } return String(); diff --git a/scene/3d/navigation_obstacle_3d.cpp b/scene/3d/navigation_obstacle_3d.cpp index 63c273b4ca..fa976e5d18 100644 --- a/scene/3d/navigation_obstacle_3d.cpp +++ b/scene/3d/navigation_obstacle_3d.cpp @@ -118,7 +118,7 @@ Node *NavigationObstacle3D::get_navigation_node() const { String NavigationObstacle3D::get_configuration_warning() const { if (!Object::cast_to(get_parent())) { - return TTR("The NavigationObstacle only serves to provide collision avoidance to a spatial object."); + return TTR("The NavigationObstacle3D only serves to provide collision avoidance to a spatial object."); } return String(); diff --git a/scene/3d/navigation_region_3d.cpp b/scene/3d/navigation_region_3d.cpp index 4bb2c72172..08c0fbf4d1 100644 --- a/scene/3d/navigation_region_3d.cpp +++ b/scene/3d/navigation_region_3d.cpp @@ -29,6 +29,7 @@ /*************************************************************************/ #include "navigation_region_3d.h" + #include "core/os/thread.h" #include "mesh_instance_3d.h" #include "navigation_3d.h" @@ -214,7 +215,7 @@ String NavigationRegion3D::get_configuration_warning() const { c = Object::cast_to(c->get_parent()); } - return TTR("NavigationRegion must be a child or grandchild to a Navigation node. It only provides navigation data."); + return TTR("NavigationRegion3D must be a child or grandchild to a Navigation3D node. It only provides navigation data."); } void NavigationRegion3D::_bind_methods() { diff --git a/scene/3d/path_3d.cpp b/scene/3d/path_3d.cpp index 2169f664ea..0f1f9bb8a7 100644 --- a/scene/3d/path_3d.cpp +++ b/scene/3d/path_3d.cpp @@ -262,11 +262,11 @@ String PathFollow3D::get_configuration_warning() const { return String(); if (!Object::cast_to(get_parent())) { - return TTR("PathFollow only works when set as a child of a Path node."); + return TTR("PathFollow3D only works when set as a child of a Path3D node."); } else { Path3D *path = Object::cast_to(get_parent()); if (path->get_curve().is_valid() && !path->get_curve()->is_up_vector_enabled() && rotation_mode == ROTATION_ORIENTED) { - return TTR("PathFollow's ROTATION_ORIENTED requires \"Up Vector\" to be enabled in its parent Path's Curve resource."); + return TTR("PathFollow3D's ROTATION_ORIENTED requires \"Up Vector\" to be enabled in its parent Path3D's Curve resource."); } } diff --git a/scene/3d/physics_body_3d.cpp b/scene/3d/physics_body_3d.cpp index 680d6e8594..37981f914c 100644 --- a/scene/3d/physics_body_3d.cpp +++ b/scene/3d/physics_body_3d.cpp @@ -128,7 +128,7 @@ void PhysicsBody3D::add_collision_exception_with(Node *p_node) { ERR_FAIL_NULL(p_node); CollisionObject3D *collision_object = Object::cast_to(p_node); - ERR_FAIL_COND_MSG(!collision_object, "Collision exception only works between two CollisionObject."); + ERR_FAIL_COND_MSG(!collision_object, "Collision exception only works between two CollisionObject3Ds."); PhysicsServer3D::get_singleton()->body_add_collision_exception(get_rid(), collision_object->get_rid()); } @@ -136,7 +136,7 @@ void PhysicsBody3D::remove_collision_exception_with(Node *p_node) { ERR_FAIL_NULL(p_node); CollisionObject3D *collision_object = Object::cast_to(p_node); - ERR_FAIL_COND_MSG(!collision_object, "Collision exception only works between two CollisionObject."); + ERR_FAIL_COND_MSG(!collision_object, "Collision exception only works between two CollisionObject3Ds."); PhysicsServer3D::get_singleton()->body_remove_collision_exception(get_rid(), collision_object->get_rid()); } @@ -406,7 +406,7 @@ void RigidBody3D::_direct_state_changed(Object *p_state) { _RigidBodyInOut *toadd = (_RigidBodyInOut *)alloca(state->get_contact_count() * sizeof(_RigidBodyInOut)); int toadd_count = 0; //state->get_contact_count(); - RigidBody_RemoveAction *toremove = (RigidBody_RemoveAction *)alloca(rc * sizeof(RigidBody_RemoveAction)); + RigidBody3D_RemoveAction *toremove = (RigidBody3D_RemoveAction *)alloca(rc * sizeof(RigidBody3D_RemoveAction)); int toremove_count = 0; //put the ones to add @@ -794,7 +794,7 @@ String RigidBody3D::get_configuration_warning() const { if (warning != String()) { warning += "\n\n"; } - warning += TTR("Size changes to RigidBody (in character or rigid modes) will be overridden by the physics engine when running.\nChange the size in children collision shapes instead."); + warning += TTR("Size changes to RigidBody3D (in character or rigid modes) will be overridden by the physics engine when running.\nChange the size in children collision shapes instead."); } return warning; @@ -864,7 +864,7 @@ void RigidBody3D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_colliding_bodies"), &RigidBody3D::get_colliding_bodies); - BIND_VMETHOD(MethodInfo("_integrate_forces", PropertyInfo(Variant::OBJECT, "state", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsDirectBodyState"))); + BIND_VMETHOD(MethodInfo("_integrate_forces", PropertyInfo(Variant::OBJECT, "state", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsDirectBodyState3D"))); ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Rigid,Static,Character,Kinematic"), "set_mode", "get_mode"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "mass", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_mass", "get_mass"); diff --git a/scene/3d/physics_body_3d.h b/scene/3d/physics_body_3d.h index ed7cfa8733..bf7854b68d 100644 --- a/scene/3d/physics_body_3d.h +++ b/scene/3d/physics_body_3d.h @@ -156,7 +156,7 @@ protected: tagged = false; } }; - struct RigidBody_RemoveAction { + struct RigidBody3D_RemoveAction { ObjectID body_id; ShapePair pair; diff --git a/scene/3d/soft_body_3d.cpp b/scene/3d/soft_body_3d.cpp index ee9ce1dd71..6d2808cfce 100644 --- a/scene/3d/soft_body_3d.cpp +++ b/scene/3d/soft_body_3d.cpp @@ -29,6 +29,7 @@ /*************************************************************************/ #include "soft_body_3d.h" + #include "core/list.h" #include "core/object.h" #include "core/os/os.h" @@ -402,7 +403,7 @@ String SoftBody3D::get_configuration_warning() const { if (!warning.empty()) warning += "\n\n"; - warning += TTR("Size changes to SoftBody will be overridden by the physics engine when running.\nChange the size in children collision shapes instead."); + warning += TTR("Size changes to SoftBody3D will be overridden by the physics engine when running.\nChange the size in children collision shapes instead."); } return warning; @@ -585,14 +586,14 @@ Array SoftBody3D::get_collision_exceptions() { void SoftBody3D::add_collision_exception_with(Node *p_node) { ERR_FAIL_NULL(p_node); CollisionObject3D *collision_object = Object::cast_to(p_node); - ERR_FAIL_COND_MSG(!collision_object, "Collision exception only works between two CollisionObject."); + ERR_FAIL_COND_MSG(!collision_object, "Collision exception only works between two CollisionObject3Ds."); PhysicsServer3D::get_singleton()->soft_body_add_collision_exception(physics_rid, collision_object->get_rid()); } void SoftBody3D::remove_collision_exception_with(Node *p_node) { ERR_FAIL_NULL(p_node); CollisionObject3D *collision_object = Object::cast_to(p_node); - ERR_FAIL_COND_MSG(!collision_object, "Collision exception only works between two CollisionObject."); + ERR_FAIL_COND_MSG(!collision_object, "Collision exception only works between two CollisionObject3Ds."); PhysicsServer3D::get_singleton()->soft_body_remove_collision_exception(physics_rid, collision_object->get_rid()); } diff --git a/scene/3d/vehicle_body_3d.cpp b/scene/3d/vehicle_body_3d.cpp index 5984b776b2..ac7608a3d5 100644 --- a/scene/3d/vehicle_body_3d.cpp +++ b/scene/3d/vehicle_body_3d.cpp @@ -105,7 +105,7 @@ void VehicleWheel3D::_notification(int p_what) { String VehicleWheel3D::get_configuration_warning() const { if (!Object::cast_to(get_parent())) { - return TTR("VehicleWheel serves to provide a wheel system to a VehicleBody. Please use it as a child of a VehicleBody."); + return TTR("VehicleWheel3D serves to provide a wheel system to a VehicleBody3D. Please use it as a child of a VehicleBody3D."); } return String(); @@ -285,7 +285,7 @@ void VehicleWheel3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "engine_force", PROPERTY_HINT_RANGE, "0.00,1024.0,0.01,or_greater"), "set_engine_force", "get_engine_force"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "brake", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_brake", "get_brake"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "steering", PROPERTY_HINT_RANGE, "-180,180.0,0.01"), "set_steering", "get_steering"); - ADD_GROUP("VehicleBody Motion", ""); + ADD_GROUP("VehicleBody3D Motion", ""); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_as_traction"), "set_use_as_traction", "is_used_as_traction"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_as_steering"), "set_use_as_steering", "is_used_as_steering"); ADD_GROUP("Wheel", "wheel_"); -- cgit v1.2.3