[Bf-blender-cvs] [6572ad86208] master: Cleanup: Use const, make format
Hans Goudey
noreply at git.blender.org
Sat Jun 4 16:51:32 CEST 2022
Commit: 6572ad86208a157c80aa31313a596505b3648215
Author: Hans Goudey
Date: Sat Jun 4 16:51:20 2022 +0200
Branches: master
https://developer.blender.org/rB6572ad86208a157c80aa31313a596505b3648215
Cleanup: Use const, make format
===================================================================
M source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc
M tests/python/modifiers.py
===================================================================
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)
More information about the Bf-blender-cvs
mailing list