Differential D10805 Diff 35554 source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_ico_sphere.cc
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_ico_sphere.cc
| Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | static Mesh *create_ico_sphere_mesh(const int subdivisions, const float radius) | ||||
| BMO_op_callf(bm, | BMO_op_callf(bm, | ||||
| BMO_FLAG_DEFAULTS, | BMO_FLAG_DEFAULTS, | ||||
| "create_icosphere subdivisions=%i diameter=%f matrix=%m4 calc_uvs=%b", | "create_icosphere subdivisions=%i diameter=%f matrix=%m4 calc_uvs=%b", | ||||
| subdivisions, | subdivisions, | ||||
| std::abs(radius), | std::abs(radius), | ||||
| transform.values, | transform.values, | ||||
| true); | true); | ||||
| BMeshToMeshParams params{}; | |||||
| params.calc_object_remap = false; | |||||
| Mesh *mesh = (Mesh *)BKE_id_new_nomain(ID_ME, nullptr); | Mesh *mesh = (Mesh *)BKE_id_new_nomain(ID_ME, nullptr); | ||||
| BM_mesh_bm_to_me_for_eval(bm, mesh, nullptr); | BM_mesh_bm_to_me(nullptr, bm, mesh, ¶ms); | ||||
| BM_mesh_free(bm); | BM_mesh_free(bm); | ||||
| return mesh; | return mesh; | ||||
| } | } | ||||
| static void geo_node_mesh_primitive_ico_sphere_exec(GeoNodeExecParams params) | static void geo_node_mesh_primitive_ico_sphere_exec(GeoNodeExecParams params) | ||||
| { | { | ||||
| const int subdivisions = std::min(params.extract_input<int>("Subdivisions"), 10); | const int subdivisions = std::min(params.extract_input<int>("Subdivisions"), 10); | ||||
| Show All 19 Lines | |||||