Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc
| Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | static Mesh *create_cube_mesh(const float size) | ||||
| BMO_op_callf(bm, | BMO_op_callf(bm, | ||||
| BMO_FLAG_DEFAULTS, | BMO_FLAG_DEFAULTS, | ||||
| "create_cube matrix=%m4 size=%f calc_uvs=%b", | "create_cube matrix=%m4 size=%f calc_uvs=%b", | ||||
| transform.values, | transform.values, | ||||
| size, | size, | ||||
| 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_cube_exec(GeoNodeExecParams params) | static void geo_node_mesh_primitive_cube_exec(GeoNodeExecParams params) | ||||
| { | { | ||||
| const float size = params.extract_input<float>("Size"); | const float size = params.extract_input<float>("Size"); | ||||
| Show All 17 Lines | |||||