diff options
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/cpu_particles_2d.cpp | 2 | ||||
-rw-r--r-- | scene/2d/gpu_particles_2d.cpp | 2 | ||||
-rw-r--r-- | scene/2d/physics_body_2d.cpp | 4 | ||||
-rw-r--r-- | scene/3d/audio_stream_player_3d.cpp | 3 | ||||
-rw-r--r-- | scene/3d/collision_object_3d.cpp | 2 | ||||
-rw-r--r-- | scene/3d/collision_polygon_3d.cpp | 4 | ||||
-rw-r--r-- | scene/3d/collision_shape_3d.cpp | 14 | ||||
-rw-r--r-- | scene/3d/cpu_particles_3d.cpp | 4 | ||||
-rw-r--r-- | scene/3d/gpu_particles_3d.cpp | 2 | ||||
-rw-r--r-- | scene/3d/light_3d.cpp | 4 | ||||
-rw-r--r-- | scene/3d/navigation_agent_3d.cpp | 2 | ||||
-rw-r--r-- | scene/3d/navigation_obstacle_3d.cpp | 2 | ||||
-rw-r--r-- | scene/3d/navigation_region_3d.cpp | 3 | ||||
-rw-r--r-- | scene/3d/path_3d.cpp | 4 | ||||
-rw-r--r-- | scene/3d/physics_body_3d.cpp | 10 | ||||
-rw-r--r-- | scene/3d/physics_body_3d.h | 2 | ||||
-rw-r--r-- | scene/3d/soft_body_3d.cpp | 7 | ||||
-rw-r--r-- | scene/3d/vehicle_body_3d.cpp | 4 | ||||
-rw-r--r-- | scene/register_scene_types.cpp | 16 | ||||
-rw-r--r-- | scene/resources/environment.cpp | 36 | ||||
-rw-r--r-- | scene/resources/environment.h | 4 | ||||
-rw-r--r-- | scene/resources/world_3d.cpp | 2 |
22 files changed, 67 insertions, 66 deletions
diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp index ba604c086e..47465f727e 100644 --- a/scene/2d/cpu_particles_2d.cpp +++ b/scene/2d/cpu_particles_2d.cpp @@ -1145,7 +1145,7 @@ void CPUParticles2D::_notification(int p_what) { void CPUParticles2D::convert_from_particles(Node *p_particles) { GPUParticles2D *particles = Object::cast_to<GPUParticles2D>(p_particles); - ERR_FAIL_COND_MSG(!particles, "Only Particles2D nodes can be converted to CPUParticles2D."); + ERR_FAIL_COND_MSG(!particles, "Only GPUParticles2D nodes can be converted to CPUParticles2D."); set_emitting(particles->is_emitting()); set_amount(particles->get_amount()); diff --git a/scene/2d/gpu_particles_2d.cpp b/scene/2d/gpu_particles_2d.cpp index fd9706eb2a..de3f8fa09e 100644 --- a/scene/2d/gpu_particles_2d.cpp +++ b/scene/2d/gpu_particles_2d.cpp @@ -229,7 +229,7 @@ bool GPUParticles2D::get_fractional_delta() const { String GPUParticles2D::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 CPUParticles2D 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 CPUParticles2D node instead. You can use the \"Convert to CPUParticles2D\" option for this purpose."); } String warnings; diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp index 942d2aac24..d866906ca5 100644 --- a/scene/2d/physics_body_2d.cpp +++ b/scene/2d/physics_body_2d.cpp @@ -157,7 +157,7 @@ void PhysicsBody2D::add_collision_exception_with(Node *p_node) { ERR_FAIL_NULL(p_node); PhysicsBody2D *physics_body = Object::cast_to<PhysicsBody2D>(p_node); - ERR_FAIL_COND_MSG(!physics_body, "Collision exception only works between two objects of PhysicsBody type."); + ERR_FAIL_COND_MSG(!physics_body, "Collision exception only works between two objects of PhysicsBody2D type."); PhysicsServer2D::get_singleton()->body_add_collision_exception(get_rid(), physics_body->get_rid()); } @@ -165,7 +165,7 @@ void PhysicsBody2D::remove_collision_exception_with(Node *p_node) { ERR_FAIL_NULL(p_node); PhysicsBody2D *physics_body = Object::cast_to<PhysicsBody2D>(p_node); - ERR_FAIL_COND_MSG(!physics_body, "Collision exception only works between two objects of PhysicsBody type."); + ERR_FAIL_COND_MSG(!physics_body, "Collision exception only works between two objects of PhysicsBody2D type."); PhysicsServer2D::get_singleton()->body_remove_collision_exception(get_rid(), physics_body->get_rid()); } diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp index bddf748be7..9f5170fa98 100644 --- a/scene/3d/audio_stream_player_3d.cpp +++ b/scene/3d/audio_stream_player_3d.cpp @@ -29,6 +29,7 @@ /*************************************************************************/ #include "audio_stream_player_3d.h" + #include "core/engine.h" #include "scene/3d/area_3d.h" #include "scene/3d/camera_3d.h" @@ -96,7 +97,7 @@ static const Vector3 speaker_directions[7] = { }; void AudioStreamPlayer3D::_calc_output_vol(const Vector3 &source_dir, real_t tightness, AudioStreamPlayer3D::Output &output) { - unsigned int speaker_count; // only main speakers (no LFE) + unsigned int speaker_count = 0; // only main speakers (no LFE) switch (AudioServer::get_singleton()->get_speaker_mode()) { case AudioServer::SPEAKER_MODE_STEREO: speaker_count = 2; 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<CollisionObject3D>(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<CollisionObject3D>(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<RigidBody3D>(get_parent())) { if (Object::cast_to<ConcavePolygonShape3D>(*shape)) { if (Object::cast_to<RigidBody3D>(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<GPUParticles3D>(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<Node3D>(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<Node3D>(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<Node3D>(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<Path3D>(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<Path3D>(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<CollisionObject3D>(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<CollisionObject3D>(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<CollisionObject3D>(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<CollisionObject3D>(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<VehicleBody3D>(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_"); diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp index 774d943efe..e73e560656 100644 --- a/scene/register_scene_types.cpp +++ b/scene/register_scene_types.cpp @@ -754,6 +754,8 @@ void register_scene_types() { ClassDB::add_compatibility_class("Area", "Area3D"); ClassDB::add_compatibility_class("BoneAttachment", "BoneAttachment3D"); ClassDB::add_compatibility_class("BoxShape", "BoxShape3D"); + ClassDB::add_compatibility_class("BulletPhysicsDirectBodyState", "BulletPhysicsDirectBodyState3D"); + ClassDB::add_compatibility_class("BulletPhysicsServer", "BulletPhysicsServer3D"); ClassDB::add_compatibility_class("Camera", "Camera3D"); ClassDB::add_compatibility_class("CapsuleShape", "CapsuleShape3D"); ClassDB::add_compatibility_class("ClippedCamera", "ClippedCamera3D"); @@ -764,8 +766,19 @@ void register_scene_types() { ClassDB::add_compatibility_class("ConeTwistJoint", "ConeTwistJoint3D"); ClassDB::add_compatibility_class("ConvexPolygonShape", "ConvexPolygonShape3D"); ClassDB::add_compatibility_class("CPUParticles", "CPUParticles3D"); + ClassDB::add_compatibility_class("CSGBox", "CSGBox3D"); + ClassDB::add_compatibility_class("CSGCombiner", "CSGCombiner3D"); + ClassDB::add_compatibility_class("CSGCylinder", "CSGCylinder3D"); + ClassDB::add_compatibility_class("CSGMesh", "CSGMesh3D"); + ClassDB::add_compatibility_class("CSGPolygon", "CSGPolygon3D"); + ClassDB::add_compatibility_class("CSGPrimitive", "CSGPrimitive3D"); + ClassDB::add_compatibility_class("CSGShape", "CSGShape3D"); + ClassDB::add_compatibility_class("CSGSphere", "CSGSphere3D"); + ClassDB::add_compatibility_class("CSGTorus", "CSGTorus3D"); ClassDB::add_compatibility_class("CylinderShape", "CylinderShape3D"); ClassDB::add_compatibility_class("DirectionalLight", "DirectionalLight3D"); + ClassDB::add_compatibility_class("EditorSpatialGizmo", "EditorNode3DGizmo"); + ClassDB::add_compatibility_class("EditorSpatialGizmoPlugin", "EditorNode3DGizmoPlugin"); ClassDB::add_compatibility_class("Generic6DOFJoint", "Generic6DOFJoint3D"); ClassDB::add_compatibility_class("HeightMapShape", "HeightMapShape3D"); ClassDB::add_compatibility_class("HingeJoint", "HingeJoint3D"); @@ -783,6 +796,8 @@ void register_scene_types() { ClassDB::add_compatibility_class("NavigationObstacle", "NavigationObstacle3D"); ClassDB::add_compatibility_class("NavigationPolygonInstance", "NavigationRegion2D"); ClassDB::add_compatibility_class("NavigationRegion", "NavigationRegion3D"); + ClassDB::add_compatibility_class("Navigation2DServer", "NavigationServer2D"); + ClassDB::add_compatibility_class("NavigationServer", "NavigationServer3D"); ClassDB::add_compatibility_class("OmniLight", "OmniLight3D"); ClassDB::add_compatibility_class("Particles", "GPUParticles3D"); ClassDB::add_compatibility_class("Particles2D", "GPUParticles2D"); @@ -816,6 +831,7 @@ void register_scene_types() { ClassDB::add_compatibility_class("SliderJoint", "SliderJoint3D"); ClassDB::add_compatibility_class("SoftBody", "SoftBody3D"); ClassDB::add_compatibility_class("Spatial", "Node3D"); + ClassDB::add_compatibility_class("SpatialGizmo", "Node3DGizmo"); ClassDB::add_compatibility_class("SpatialMaterial", "StandardMaterial3D"); ClassDB::add_compatibility_class("SpatialVelocityTracker", "VelocityTracker3D"); ClassDB::add_compatibility_class("SphereShape", "SphereShape3D"); diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp index 89937238c1..6fa52e6f05 100644 --- a/scene/resources/environment.cpp +++ b/scene/resources/environment.cpp @@ -546,7 +546,7 @@ float Environment::get_ssao_edge_sharpness() const { void Environment::set_glow_enabled(bool p_enabled) { glow_enabled = p_enabled; - RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap, glow_bicubic_upscale); + RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap); _change_notify(); } @@ -564,7 +564,7 @@ void Environment::set_glow_level(int p_level, bool p_enabled) { else glow_levels &= ~(1 << p_level); - RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap, glow_bicubic_upscale); + RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap); } bool Environment::is_glow_level_enabled(int p_level) const { @@ -577,7 +577,7 @@ void Environment::set_glow_intensity(float p_intensity) { glow_intensity = p_intensity; - RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap, glow_bicubic_upscale); + RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap); } float Environment::get_glow_intensity() const { @@ -587,7 +587,7 @@ float Environment::get_glow_intensity() const { void Environment::set_glow_strength(float p_strength) { glow_strength = p_strength; - RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap, glow_bicubic_upscale); + RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap); } float Environment::get_glow_strength() const { @@ -597,7 +597,7 @@ float Environment::get_glow_strength() const { void Environment::set_glow_mix(float p_mix) { glow_mix = p_mix; - RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap, glow_bicubic_upscale); + RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap); } float Environment::get_glow_mix() const { @@ -608,7 +608,7 @@ void Environment::set_glow_bloom(float p_threshold) { glow_bloom = p_threshold; - RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap, glow_bicubic_upscale); + RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap); } float Environment::get_glow_bloom() const { @@ -619,7 +619,7 @@ void Environment::set_glow_blend_mode(GlowBlendMode p_mode) { glow_blend_mode = p_mode; - RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap, glow_bicubic_upscale); + RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap); _change_notify(); } Environment::GlowBlendMode Environment::get_glow_blend_mode() const { @@ -631,7 +631,7 @@ void Environment::set_glow_hdr_bleed_threshold(float p_threshold) { glow_hdr_bleed_threshold = p_threshold; - RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap, glow_bicubic_upscale); + RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap); } float Environment::get_glow_hdr_bleed_threshold() const { @@ -642,7 +642,7 @@ void Environment::set_glow_hdr_luminance_cap(float p_amount) { glow_hdr_luminance_cap = p_amount; - RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap, glow_bicubic_upscale); + RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap); } float Environment::get_glow_hdr_luminance_cap() const { @@ -653,24 +653,13 @@ void Environment::set_glow_hdr_bleed_scale(float p_scale) { glow_hdr_bleed_scale = p_scale; - RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap, glow_bicubic_upscale); + RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap); } float Environment::get_glow_hdr_bleed_scale() const { return glow_hdr_bleed_scale; } -void Environment::set_glow_bicubic_upscale(bool p_enable) { - - glow_bicubic_upscale = p_enable; - RS::get_singleton()->environment_set_glow(environment, glow_enabled, glow_levels, glow_intensity, glow_strength, glow_mix, glow_bloom, RS::EnvironmentGlowBlendMode(glow_blend_mode), glow_hdr_bleed_threshold, glow_hdr_bleed_threshold, glow_hdr_luminance_cap, glow_bicubic_upscale); -} - -bool Environment::is_glow_bicubic_upscale_enabled() const { - - return glow_bicubic_upscale; -} - void Environment::set_fog_enabled(bool p_enabled) { fog_enabled = p_enabled; @@ -1067,9 +1056,6 @@ void Environment::_bind_methods() { ClassDB::bind_method(D_METHOD("set_glow_hdr_bleed_scale", "scale"), &Environment::set_glow_hdr_bleed_scale); ClassDB::bind_method(D_METHOD("get_glow_hdr_bleed_scale"), &Environment::get_glow_hdr_bleed_scale); - ClassDB::bind_method(D_METHOD("set_glow_bicubic_upscale", "enabled"), &Environment::set_glow_bicubic_upscale); - ClassDB::bind_method(D_METHOD("is_glow_bicubic_upscale_enabled"), &Environment::is_glow_bicubic_upscale_enabled); - ADD_GROUP("Glow", "glow_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "glow_enabled"), "set_glow_enabled", "is_glow_enabled"); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "glow_levels/1"), "set_glow_level", "is_glow_level_enabled", 0); @@ -1088,7 +1074,6 @@ void Environment::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "glow_hdr_threshold", PROPERTY_HINT_RANGE, "0.0,4.0,0.01"), "set_glow_hdr_bleed_threshold", "get_glow_hdr_bleed_threshold"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "glow_hdr_luminance_cap", PROPERTY_HINT_RANGE, "0.0,256.0,0.01"), "set_glow_hdr_luminance_cap", "get_glow_hdr_luminance_cap"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "glow_hdr_scale", PROPERTY_HINT_RANGE, "0.0,4.0,0.01"), "set_glow_hdr_bleed_scale", "get_glow_hdr_bleed_scale"); - ADD_PROPERTY(PropertyInfo(Variant::BOOL, "glow_bicubic_upscale"), "set_glow_bicubic_upscale", "is_glow_bicubic_upscale_enabled"); ClassDB::bind_method(D_METHOD("set_adjustment_enable", "enabled"), &Environment::set_adjustment_enable); ClassDB::bind_method(D_METHOD("is_adjustment_enabled"), &Environment::is_adjustment_enabled); @@ -1209,7 +1194,6 @@ Environment::Environment() : glow_hdr_bleed_threshold = 1.0; glow_hdr_luminance_cap = 12.0; glow_hdr_bleed_scale = 2.0; - glow_bicubic_upscale = false; fog_enabled = false; fog_color = Color(0.5, 0.5, 0.5); diff --git a/scene/resources/environment.h b/scene/resources/environment.h index 657c7190e5..83f9a3f509 100644 --- a/scene/resources/environment.h +++ b/scene/resources/environment.h @@ -146,7 +146,6 @@ private: float glow_hdr_bleed_threshold; float glow_hdr_bleed_scale; float glow_hdr_luminance_cap; - bool glow_bicubic_upscale; bool fog_enabled; Color fog_color; @@ -318,9 +317,6 @@ public: void set_glow_hdr_bleed_scale(float p_scale); float get_glow_hdr_bleed_scale() const; - void set_glow_bicubic_upscale(bool p_enable); - bool is_glow_bicubic_upscale_enabled() const; - void set_fog_enabled(bool p_enabled); bool is_fog_enabled() const; diff --git a/scene/resources/world_3d.cpp b/scene/resources/world_3d.cpp index 8e45b22cbf..a33f850755 100644 --- a/scene/resources/world_3d.cpp +++ b/scene/resources/world_3d.cpp @@ -348,7 +348,7 @@ void World3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "camera_effects", PROPERTY_HINT_RESOURCE_TYPE, "CameraEffects"), "set_camera_effects", "get_camera_effects"); ADD_PROPERTY(PropertyInfo(Variant::_RID, "space", PROPERTY_HINT_NONE, "", 0), "", "get_space"); ADD_PROPERTY(PropertyInfo(Variant::_RID, "scenario", PROPERTY_HINT_NONE, "", 0), "", "get_scenario"); - ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "direct_space_state", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsDirectSpaceState", 0), "", "get_direct_space_state"); + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "direct_space_state", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsDirectSpaceState3D", 0), "", "get_direct_space_state"); } World3D::World3D() { |