diff options
author | Hans Goudey <h.goudey@me.com> | 2021-03-22 18:58:46 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-03-22 18:58:46 +0300 |
commit | 23d2174d6bc40f4426ece2cb5627fc78ea9cf2fa (patch) | |
tree | 5e4c8879f51e1072b00b4913f5fae67ad6a7a75a /source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_circle.cc | |
parent | 2d1120c1718da183a4178bec9d3d999ef7ac827f (diff) |
Geometry Nodes: Remove location and rotation from mesh primitives
Following some discussion among the geometry nodes team, it was decided
that keeping the primitive nodes simpler and requiring a separate
transform node to move the generated geometry from the origin would
be better.
- It's more consistent with the current general idea of "building
block nodes"
- It makes more sense for the future when it will be possible to
use instancing to control the transforms.
- It reduces UI clutter when the controls are not necessary.
Diffstat (limited to 'source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_circle.cc')
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_circle.cc | 9 |
1 files changed, 1 insertions, 8 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 6d286a9d583..3cf77a76682 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 @@ -27,8 +27,6 @@ static bNodeSocketTemplate geo_node_mesh_primitive_circle_in[] = { {SOCK_INT, N_("Vertices"), 32, 0.0f, 0.0f, 0.0f, 3, 4096}, {SOCK_FLOAT, N_("Radius"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, FLT_MAX, PROP_DISTANCE}, - {SOCK_VECTOR, N_("Location"), 0.0f, 0.0f, 0.0f, 0.0f, -FLT_MAX, FLT_MAX, PROP_TRANSLATION}, - {SOCK_VECTOR, N_("Rotation"), 0.0f, 0.0f, 0.0f, 0.0f, -FLT_MAX, FLT_MAX, PROP_EULER}, {-1, ""}, }; @@ -207,22 +205,17 @@ static void geo_node_mesh_primitive_circle_exec(GeoNodeExecParams params) const GeometryNodeMeshCircleFillType fill_type = (const GeometryNodeMeshCircleFillType) storage.fill_type; + const float radius = params.extract_input<float>("Radius"); const int verts_num = params.extract_input<int>("Vertices"); if (verts_num < 3) { params.set_output("Geometry", GeometrySet()); return; } - const float radius = params.extract_input<float>("Radius"); - const float3 location = params.extract_input<float3>("Location"); - const float3 rotation = params.extract_input<float3>("Rotation"); - Mesh *mesh = create_circle_mesh(radius, verts_num, fill_type); BLI_assert(BKE_mesh_is_valid(mesh)); - transform_mesh(mesh, location, rotation, float3(1)); - params.set_output("Geometry", GeometrySet::create_with_mesh(mesh)); } |