diff options
author | Hans Goudey <h.goudey@me.com> | 2022-06-04 17:51:20 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-06-04 17:51:20 +0300 |
commit | 6572ad86208a157c80aa31313a596505b3648215 (patch) | |
tree | e7c47e617afdbc5ea92dfd62e2f0268e58bbfc7a | |
parent | a5190dce9d08a4fdaddf82d592e50083e0713e19 (diff) |
Cleanup: Use const, make format
-rw-r--r-- | source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc | 6 | ||||
-rw-r--r-- | tests/python/modifiers.py | 12 |
2 files changed, 11 insertions, 7 deletions
diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc b/source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc index c2a9e0574eb..3eea20fdb60 100644 --- a/source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc +++ b/source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc @@ -290,7 +290,7 @@ void OBJMesh::store_uv_coords_and_indices() const MLoop *mloop = export_mesh_eval_->mloop; const int totpoly = export_mesh_eval_->totpoly; const int totvert = export_mesh_eval_->totvert; - const MLoopUV *mloopuv = static_cast<MLoopUV *>( + const MLoopUV *mloopuv = static_cast<const MLoopUV *>( CustomData_get_layer(&export_mesh_eval_->ldata, CD_MLOOPUV)); if (!mloopuv) { tot_uv_vertices_ = 0; @@ -382,8 +382,8 @@ void OBJMesh::store_normal_coords_and_indices() normal_to_index.reserve(export_mesh_eval_->totpoly); loop_to_normal_index_.resize(export_mesh_eval_->totloop); loop_to_normal_index_.fill(-1); - const float( - *lnors)[3] = (const float(*)[3])(CustomData_get_layer(&export_mesh_eval_->ldata, CD_NORMAL)); + const float(*lnors)[3] = static_cast<const float(*)[3]>( + CustomData_get_layer(&export_mesh_eval_->ldata, CD_NORMAL)); for (int poly_index = 0; poly_index < export_mesh_eval_->totpoly; ++poly_index) { const MPoly &mpoly = export_mesh_eval_->mpoly[poly_index]; bool need_per_loop_normals = lnors != nullptr || (mpoly.flag & ME_SMOOTH); diff --git a/tests/python/modifiers.py b/tests/python/modifiers.py index 333633a4c4d..11d696c3bed 100644 --- a/tests/python/modifiers.py +++ b/tests/python/modifiers.py @@ -330,12 +330,16 @@ def main(): {"solver": 'FAST', "operation": 'DIFFERENCE', "operand_type": 'OBJECT', "object": bpy.data.objects["test" + boolean_basename + "Operand"]})])) boolean_basename = "CubeBooleanDiffBMeshCollection" - tests.append(SpecMeshTest("BooleandDiffBMeshCollection", "test" + boolean_basename, "expected" + boolean_basename, - [ModifierSpec("boolean", 'BOOLEAN', - {"solver": 'FAST', "operation": 'DIFFERENCE', "operand_type": 'COLLECTION', + tests.append(SpecMeshTest("BooleandDiffBMeshCollection", + "test" + boolean_basename, + "expected" + boolean_basename, + [ModifierSpec("boolean", + 'BOOLEAN', + {"solver": 'FAST', + "operation": 'DIFFERENCE', + "operand_type": 'COLLECTION', "collection": bpy.data.collections["test" + boolean_basename + "Operands"]})])) - modifiers_test = RunTest(tests) command = list(sys.argv) |