diff options
author | Hans Goudey <h.goudey@me.com> | 2021-03-15 05:15:59 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-03-15 05:15:59 +0300 |
commit | f65cca02b0b4f77f20b9587c57c0e4d50a2ce116 (patch) | |
tree | e82a541bbcedf645d44858c17253f938eed0aea0 | |
parent | 3a45f35d7e8defd9b294056d4456b9aeca6e9208 (diff) |
Remove unecessary checks for zero
3 files changed, 3 insertions, 9 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_circle.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_circle.cc index a474739277f..3aa73d52c89 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_circle.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_circle.cc @@ -221,9 +221,7 @@ static void geo_node_mesh_primitive_circle_exec(GeoNodeExecParams params) BLI_assert(BKE_mesh_is_valid(mesh)); - if (!location.is_zero() || !rotation.is_zero()) { - transform_mesh(mesh, location, rotation, float3(1)); - } + transform_mesh(mesh, location, rotation, float3(1)); params.set_output("Geometry", GeometrySet::create_with_mesh(mesh)); } diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cylinder.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cylinder.cc index 994623ad40d..21fa6745d61 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cylinder.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cylinder.cc @@ -81,9 +81,7 @@ static void geo_node_mesh_primitive_cylinder_exec(GeoNodeExecParams params) /* The cylinder is a special case of the cone mesh where the top and bottom radius are equal. */ Mesh *mesh = create_cylinder_or_cone_mesh(radius, radius, depth, verts_num, fill_type); - if (!location.is_zero() || !rotation.is_zero()) { - transform_mesh(mesh, location, rotation, float3(1)); - } + transform_mesh(mesh, location, rotation, float3(1)); BLI_assert(BKE_mesh_is_valid(mesh)); diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc index ac0ee0db7d4..5f12d28b6ce 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc @@ -256,9 +256,7 @@ static void geo_node_mesh_primitive_uv_sphere_exec(GeoNodeExecParams params) Mesh *mesh = create_uv_sphere_mesh(radius, segments_num, rings_num); BLI_assert(BKE_mesh_is_valid(mesh)); - if (!location.is_zero() || !rotation.is_zero()) { - transform_mesh(mesh, location, rotation, float3(1)); - } + transform_mesh(mesh, location, rotation, float3(1)); params.set_output("Geometry", GeometrySet::create_with_mesh(mesh)); } |