diff options
Diffstat (limited to 'scene/3d')
-rw-r--r-- | scene/3d/baked_lightmap.cpp | 2 | ||||
-rw-r--r-- | scene/3d/collision_object_3d.cpp | 4 | ||||
-rw-r--r-- | scene/3d/collision_polygon_3d.cpp | 6 | ||||
-rw-r--r-- | scene/3d/collision_shape_3d.cpp | 8 | ||||
-rw-r--r-- | scene/3d/gi_probe.cpp | 2 | ||||
-rw-r--r-- | scene/3d/light_3d.cpp | 6 | ||||
-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 | 4 | ||||
-rw-r--r-- | scene/3d/path_3d.cpp | 4 | ||||
-rw-r--r-- | scene/3d/physics_body_3d.cpp | 4 | ||||
-rw-r--r-- | scene/3d/physics_joint_3d.cpp | 4 | ||||
-rw-r--r-- | scene/3d/remote_transform_3d.cpp | 2 | ||||
-rw-r--r-- | scene/3d/skeleton_ik_3d.cpp | 6 | ||||
-rw-r--r-- | scene/3d/soft_body_3d.cpp | 4 | ||||
-rw-r--r-- | scene/3d/sprite_3d.cpp | 2 | ||||
-rw-r--r-- | scene/3d/vehicle_body_3d.cpp | 2 | ||||
-rw-r--r-- | scene/3d/voxelizer.cpp | 2 | ||||
-rw-r--r-- | scene/3d/world_environment.cpp | 4 | ||||
-rw-r--r-- | scene/3d/xr_nodes.cpp | 12 |
20 files changed, 41 insertions, 41 deletions
diff --git a/scene/3d/baked_lightmap.cpp b/scene/3d/baked_lightmap.cpp index 38c9e96fbc..09a7d62bb6 100644 --- a/scene/3d/baked_lightmap.cpp +++ b/scene/3d/baked_lightmap.cpp @@ -678,7 +678,7 @@ BakedLightmap::BakeError BakedLightmap::bake(Node *p_from_node, String p_image_d } TypedArray<Image> images = RS::get_singleton()->bake_render_uv2(mf.mesh->get_rid(), overrides, lightmap_size); - ERR_FAIL_COND_V(images.empty(), BAKE_ERROR_CANT_CREATE_IMAGE); + ERR_FAIL_COND_V(images.is_empty(), BAKE_ERROR_CANT_CREATE_IMAGE); Ref<Image> albedo = images[RS::BAKE_CHANNEL_ALBEDO_ALPHA]; Ref<Image> orm = images[RS::BAKE_CHANNEL_ORM]; diff --git a/scene/3d/collision_object_3d.cpp b/scene/3d/collision_object_3d.cpp index 356992e922..8dcf52662b 100644 --- a/scene/3d/collision_object_3d.cpp +++ b/scene/3d/collision_object_3d.cpp @@ -349,8 +349,8 @@ bool CollisionObject3D::get_capture_input_on_drag() const { String CollisionObject3D::get_configuration_warning() const { String warning = Node3D::get_configuration_warning(); - if (shapes.empty()) { - if (!warning.empty()) { + if (shapes.is_empty()) { + if (!warning.is_empty()) { warning += "\n\n"; } 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."); diff --git a/scene/3d/collision_polygon_3d.cpp b/scene/3d/collision_polygon_3d.cpp index b8a4ab74ee..6caf021e8c 100644 --- a/scene/3d/collision_polygon_3d.cpp +++ b/scene/3d/collision_polygon_3d.cpp @@ -159,14 +159,14 @@ String CollisionPolygon3D::get_configuration_warning() const { String warning = Node3D::get_configuration_warning(); if (!Object::cast_to<CollisionObject3D>(get_parent())) { - if (!warning.empty()) { + if (!warning.is_empty()) { warning += "\n\n"; } warning += 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()) { - if (!warning.empty()) { + if (polygon.is_empty()) { + if (!warning.is_empty()) { warning += "\n\n"; } warning += TTR("An empty CollisionPolygon3D has no effect on collision."); diff --git a/scene/3d/collision_shape_3d.cpp b/scene/3d/collision_shape_3d.cpp index e1c691b89a..4d9537f420 100644 --- a/scene/3d/collision_shape_3d.cpp +++ b/scene/3d/collision_shape_3d.cpp @@ -60,7 +60,7 @@ void CollisionShape3D::make_convex_from_siblings() { if (m.is_valid()) { for (int j = 0; j < m->get_surface_count(); j++) { Array a = m->surface_get_arrays(j); - if (!a.empty()) { + if (!a.is_empty()) { Vector<Vector3> v = a[RenderingServer::ARRAY_VERTEX]; for (int k = 0; k < v.size(); k++) { vertices.append(mi->get_transform().xform(v[k])); @@ -127,14 +127,14 @@ String CollisionShape3D::get_configuration_warning() const { String warning = Node3D::get_configuration_warning(); if (!Object::cast_to<CollisionObject3D>(get_parent())) { - if (!warning.empty()) { + if (!warning.is_empty()) { warning += "\n\n"; } warning += 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()) { - if (!warning.empty()) { + if (!warning.is_empty()) { warning += "\n\n"; } warning += TTR("A shape must be provided for CollisionShape3D to function. Please create a shape resource for it."); @@ -144,7 +144,7 @@ String CollisionShape3D::get_configuration_warning() const { Object::cast_to<RigidBody3D>(get_parent()) && Object::cast_to<ConcavePolygonShape3D>(*shape) && Object::cast_to<RigidBody3D>(get_parent())->get_mode() != RigidBody3D::MODE_STATIC) { - if (!warning.empty()) { + if (!warning.is_empty()) { warning += "\n\n"; } warning += TTR("ConcavePolygonShape3D doesn't support RigidBody3D in another mode than static."); diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp index fd592012f8..b3b85989f5 100644 --- a/scene/3d/gi_probe.cpp +++ b/scene/3d/gi_probe.cpp @@ -516,7 +516,7 @@ String GIProbe::get_configuration_warning() const { String warning = VisualInstance3D::get_configuration_warning(); if (RenderingServer::get_singleton()->is_low_end()) { - if (!warning.empty()) { + if (!warning.is_empty()) { warning += "\n\n"; } warning += TTR("GIProbes are not supported by the GLES2 video driver.\nUse a BakedLightmap instead."); diff --git a/scene/3d/light_3d.cpp b/scene/3d/light_3d.cpp index 3f816535f5..56f8e56858 100644 --- a/scene/3d/light_3d.cpp +++ b/scene/3d/light_3d.cpp @@ -462,7 +462,7 @@ String OmniLight3D::get_configuration_warning() const { String warning = Light3D::get_configuration_warning(); if (!has_shadow() && get_projector().is_valid()) { - if (!warning.empty()) { + if (!warning.is_empty()) { warning += "\n\n"; } warning += TTR("Projector texture only works with shadows active."); @@ -496,14 +496,14 @@ String SpotLight3D::get_configuration_warning() const { String warning = Light3D::get_configuration_warning(); if (has_shadow() && get_param(PARAM_SPOT_ANGLE) >= 90.0) { - if (!warning.empty()) { + if (!warning.is_empty()) { warning += "\n\n"; } warning += TTR("A SpotLight3D with an angle wider than 90 degrees cannot cast shadows."); } if (!has_shadow() && get_projector().is_valid()) { - if (!warning.empty()) { + if (!warning.is_empty()) { warning += "\n\n"; } warning += TTR("Projector texture only works with shadows active."); diff --git a/scene/3d/navigation_agent_3d.cpp b/scene/3d/navigation_agent_3d.cpp index f9f8f276a3..fb60f99f28 100644 --- a/scene/3d/navigation_agent_3d.cpp +++ b/scene/3d/navigation_agent_3d.cpp @@ -290,7 +290,7 @@ String NavigationAgent3D::get_configuration_warning() const { String warning = Node::get_configuration_warning(); if (!Object::cast_to<Node3D>(get_parent())) { - if (!warning.empty()) { + if (!warning.is_empty()) { warning += "\n\n"; } warning += TTR("The NavigationAgent3D can be used only under a spatial node."); diff --git a/scene/3d/navigation_obstacle_3d.cpp b/scene/3d/navigation_obstacle_3d.cpp index adbff06ed6..da0467e4a4 100644 --- a/scene/3d/navigation_obstacle_3d.cpp +++ b/scene/3d/navigation_obstacle_3d.cpp @@ -116,7 +116,7 @@ String NavigationObstacle3D::get_configuration_warning() const { String warning = Node::get_configuration_warning(); if (!Object::cast_to<Node3D>(get_parent())) { - if (!warning.empty()) { + if (!warning.is_empty()) { warning += "\n\n"; } warning += TTR("The NavigationObstacle3D only serves to provide collision avoidance to a spatial object."); diff --git a/scene/3d/navigation_region_3d.cpp b/scene/3d/navigation_region_3d.cpp index 2ae01c7ab8..30d6a54e21 100644 --- a/scene/3d/navigation_region_3d.cpp +++ b/scene/3d/navigation_region_3d.cpp @@ -193,7 +193,7 @@ String NavigationRegion3D::get_configuration_warning() const { String warning = Node3D::get_configuration_warning(); if (!navmesh.is_valid()) { - if (!warning.empty()) { + if (!warning.is_empty()) { warning += "\n\n"; } warning += TTR("A NavigationMesh resource must be set or created for this node to work."); @@ -208,7 +208,7 @@ String NavigationRegion3D::get_configuration_warning() const { c = Object::cast_to<Node3D>(c->get_parent()); } - if (!warning.empty()) { + if (!warning.is_empty()) { warning += "\n\n"; } return warning + TTR("NavigationRegion3D must be a child or grandchild to a Navigation3D node. It only provides navigation data."); diff --git a/scene/3d/path_3d.cpp b/scene/3d/path_3d.cpp index 54e6330722..018f6a5bcb 100644 --- a/scene/3d/path_3d.cpp +++ b/scene/3d/path_3d.cpp @@ -249,14 +249,14 @@ String PathFollow3D::get_configuration_warning() const { String warning = Node3D::get_configuration_warning(); if (!Object::cast_to<Path3D>(get_parent())) { - if (!warning.empty()) { + if (!warning.is_empty()) { warning += "\n\n"; } warning += 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) { - if (!warning.empty()) { + if (!warning.is_empty()) { warning += "\n\n"; } warning += 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 d9e19db4bd..47c7627ad1 100644 --- a/scene/3d/physics_body_3d.cpp +++ b/scene/3d/physics_body_3d.cpp @@ -311,7 +311,7 @@ void RigidBody3D::_body_inout(int p_status, ObjectID p_instance, int p_body_shap bool in_tree = E->get().in_tree; - if (E->get().shapes.empty()) { + if (E->get().shapes.is_empty()) { if (node) { node->disconnect(SceneStringNames::get_singleton()->tree_entered, callable_mp(this, &RigidBody3D::_body_enter_tree)); node->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &RigidBody3D::_body_exit_tree)); @@ -714,7 +714,7 @@ String RigidBody3D::get_configuration_warning() const { String warning = CollisionObject3D::get_configuration_warning(); if ((get_mode() == MODE_RIGID || get_mode() == MODE_CHARACTER) && (ABS(t.basis.get_axis(0).length() - 1.0) > 0.05 || ABS(t.basis.get_axis(1).length() - 1.0) > 0.05 || ABS(t.basis.get_axis(2).length() - 1.0) > 0.05)) { - if (!warning.empty()) { + if (!warning.is_empty()) { warning += "\n\n"; } 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."); diff --git a/scene/3d/physics_joint_3d.cpp b/scene/3d/physics_joint_3d.cpp index 06de5ad0ae..b43ec78e2e 100644 --- a/scene/3d/physics_joint_3d.cpp +++ b/scene/3d/physics_joint_3d.cpp @@ -168,8 +168,8 @@ bool Joint3D::get_exclude_nodes_from_collision() const { String Joint3D::get_configuration_warning() const { String node_warning = Node3D::get_configuration_warning(); - if (!warning.empty()) { - if (!node_warning.empty()) { + if (!warning.is_empty()) { + if (!node_warning.is_empty()) { node_warning += "\n\n"; } node_warning += warning; diff --git a/scene/3d/remote_transform_3d.cpp b/scene/3d/remote_transform_3d.cpp index 358f9346f8..9c7b935090 100644 --- a/scene/3d/remote_transform_3d.cpp +++ b/scene/3d/remote_transform_3d.cpp @@ -183,7 +183,7 @@ String RemoteTransform3D::get_configuration_warning() const { String warning = Node3D::get_configuration_warning(); if (!has_node(remote_node) || !Object::cast_to<Node3D>(get_node(remote_node))) { - if (!warning.empty()) { + if (!warning.is_empty()) { warning += "\n\n"; } warning += TTR("The \"Remote Path\" property must point to a valid Node3D or Node3D-derived node to work."); diff --git a/scene/3d/skeleton_ik_3d.cpp b/scene/3d/skeleton_ik_3d.cpp index 32d7afd5df..14af6b066a 100644 --- a/scene/3d/skeleton_ik_3d.cpp +++ b/scene/3d/skeleton_ik_3d.cpp @@ -204,7 +204,7 @@ void FabrikInverseKinematic::solve_simple_forwards(Chain &r_chain, bool p_solve_ while (sub_chain_root) { // Reach the tip sub_chain_root->current_pos = origin; - if (!sub_chain_root->children.empty()) { + if (!sub_chain_root->children.is_empty()) { ChainItem &child(sub_chain_root->children.write[0]); // Is not tip @@ -301,7 +301,7 @@ void FabrikInverseKinematic::solve(Task *p_task, real_t blending_delta, bool ove Transform new_bone_pose(ci->initial_transform); new_bone_pose.origin = ci->current_pos; - if (!ci->children.empty()) { + if (!ci->children.is_empty()) { /// Rotate basis const Vector3 initial_ori((ci->children[0].initial_transform.origin - ci->initial_transform.origin).normalized()); const Vector3 rot_axis(initial_ori.cross(ci->current_ori).normalized()); @@ -321,7 +321,7 @@ void FabrikInverseKinematic::solve(Task *p_task, real_t blending_delta, bool ove p_task->skeleton->set_bone_global_pose_override(ci->bone, new_bone_pose, 1.0, true); - if (!ci->children.empty()) { + if (!ci->children.is_empty()) { ci = &ci->children.write[0]; } else { ci = nullptr; diff --git a/scene/3d/soft_body_3d.cpp b/scene/3d/soft_body_3d.cpp index d811b2e852..51ade358b7 100644 --- a/scene/3d/soft_body_3d.cpp +++ b/scene/3d/soft_body_3d.cpp @@ -380,7 +380,7 @@ String SoftBody3D::get_configuration_warning() const { String warning = MeshInstance3D::get_configuration_warning(); if (get_mesh().is_null()) { - if (!warning.empty()) { + if (!warning.is_empty()) { warning += "\n\n"; } @@ -389,7 +389,7 @@ String SoftBody3D::get_configuration_warning() const { Transform t = get_transform(); if ((ABS(t.basis.get_axis(0).length() - 1.0) > 0.05 || ABS(t.basis.get_axis(1).length() - 1.0) > 0.05 || ABS(t.basis.get_axis(2).length() - 1.0) > 0.05)) { - if (!warning.empty()) { + if (!warning.is_empty()) { warning += "\n\n"; } diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp index 1d20a9cd3b..27a932e660 100644 --- a/scene/3d/sprite_3d.cpp +++ b/scene/3d/sprite_3d.cpp @@ -1074,7 +1074,7 @@ String AnimatedSprite3D::get_configuration_warning() const { String warning = SpriteBase3D::get_configuration_warning(); if (frames.is_null()) { - if (!warning.empty()) { + if (!warning.is_empty()) { warning += "\n\n"; } warning += TTR("A SpriteFrames resource must be created or set in the \"Frames\" property in order for AnimatedSprite3D to display frames."); diff --git a/scene/3d/vehicle_body_3d.cpp b/scene/3d/vehicle_body_3d.cpp index e27307e75f..63e791a556 100644 --- a/scene/3d/vehicle_body_3d.cpp +++ b/scene/3d/vehicle_body_3d.cpp @@ -106,7 +106,7 @@ String VehicleWheel3D::get_configuration_warning() const { String warning = Node3D::get_configuration_warning(); if (!Object::cast_to<VehicleBody3D>(get_parent())) { - if (!warning.empty()) { + if (!warning.is_empty()) { warning += "\n\n"; } warning += TTR("VehicleWheel3D serves to provide a wheel system to a VehicleBody3D. Please use it as a child of a VehicleBody3D."); diff --git a/scene/3d/voxelizer.cpp b/scene/3d/voxelizer.cpp index c570fc7b7c..4ae91ae876 100644 --- a/scene/3d/voxelizer.cpp +++ b/scene/3d/voxelizer.cpp @@ -294,7 +294,7 @@ void Voxelizer::_plot_face(int p_idx, int p_level, int p_x, int p_y, int p_z, co Vector<Color> Voxelizer::_get_bake_texture(Ref<Image> p_image, const Color &p_color_mul, const Color &p_color_add) { Vector<Color> ret; - if (p_image.is_null() || p_image->empty()) { + if (p_image.is_null() || p_image->is_empty()) { ret.resize(bake_texture_size * bake_texture_size); for (int i = 0; i < bake_texture_size * bake_texture_size; i++) { ret.write[i] = p_color_add; diff --git a/scene/3d/world_environment.cpp b/scene/3d/world_environment.cpp index 3c12d4991e..05fd45e6b6 100644 --- a/scene/3d/world_environment.cpp +++ b/scene/3d/world_environment.cpp @@ -113,7 +113,7 @@ String WorldEnvironment::get_configuration_warning() const { String warning = Node::get_configuration_warning(); if (!environment.is_valid()) { - if (!warning.empty()) { + if (!warning.is_empty()) { warning += "\n\n"; } warning += TTR("WorldEnvironment requires its \"Environment\" property to contain an Environment to have a visible effect."); @@ -127,7 +127,7 @@ String WorldEnvironment::get_configuration_warning() const { get_tree()->get_nodes_in_group("_world_environment_" + itos(get_viewport()->find_world_3d()->get_scenario().get_id()), &nodes); if (nodes.size() > 1) { - if (!warning.empty()) { + if (!warning.is_empty()) { warning += "\n\n"; } warning += TTR("Only one WorldEnvironment is allowed per scene (or set of instanced scenes)."); diff --git a/scene/3d/xr_nodes.cpp b/scene/3d/xr_nodes.cpp index 5d48795dc1..abcec289ca 100644 --- a/scene/3d/xr_nodes.cpp +++ b/scene/3d/xr_nodes.cpp @@ -65,7 +65,7 @@ String XRCamera3D::get_configuration_warning() const { // must be child node of XROrigin3D! XROrigin3D *origin = Object::cast_to<XROrigin3D>(get_parent()); if (origin == nullptr) { - if (!warning.empty()) { + if (!warning.is_empty()) { warning += "\n\n"; } warning += TTR("XRCamera3D must have an XROrigin3D node as its parent."); @@ -372,14 +372,14 @@ String XRController3D::get_configuration_warning() const { // must be child node of XROrigin! XROrigin3D *origin = Object::cast_to<XROrigin3D>(get_parent()); if (origin == nullptr) { - if (!warning.empty()) { + if (!warning.is_empty()) { warning += "\n\n"; } warning += TTR("XRController3D must have an XROrigin3D node as its parent."); }; if (controller_id == 0) { - if (!warning.empty()) { + if (!warning.is_empty()) { warning += "\n\n"; } warning += TTR("The controller ID must not be 0 or this controller won't be bound to an actual controller."); @@ -497,14 +497,14 @@ String XRAnchor3D::get_configuration_warning() const { // must be child node of XROrigin3D! XROrigin3D *origin = Object::cast_to<XROrigin3D>(get_parent()); if (origin == nullptr) { - if (!warning.empty()) { + if (!warning.is_empty()) { warning += "\n\n"; } warning += TTR("XRAnchor3D must have an XROrigin3D node as its parent."); }; if (anchor_id == 0) { - if (!warning.empty()) { + if (!warning.is_empty()) { warning += "\n\n"; } warning += TTR("The anchor ID must not be 0 or this anchor won't be bound to an actual anchor."); @@ -536,7 +536,7 @@ String XROrigin3D::get_configuration_warning() const { String warning = Node3D::get_configuration_warning(); if (tracked_camera == nullptr) { - if (!warning.empty()) { + if (!warning.is_empty()) { warning += "\n\n"; } warning += TTR("XROrigin3D requires an XRCamera3D child node."); |