[Bf-blender-cvs] [cf9f4952830] refactor-mesh-corner-normals-lazy: fix some compilation errors

Jacques Lucke noreply at git.blender.org
Thu Dec 1 19:47:24 CET 2022


Commit: cf9f4952830b56266b5a772ca22bc8db0b447457
Author: Jacques Lucke
Date:   Thu Dec 1 19:47:15 2022 +0100
Branches: refactor-mesh-corner-normals-lazy
https://developer.blender.org/rBcf9f4952830b56266b5a772ca22bc8db0b447457

fix some compilation errors

===================================================================

M	source/blender/blenkernel/intern/mesh_normals.cc
M	source/blender/makesrna/intern/rna_mesh.c

===================================================================

diff --git a/source/blender/blenkernel/intern/mesh_normals.cc b/source/blender/blenkernel/intern/mesh_normals.cc
index cb1ba9efafd..9364918ddb3 100644
--- a/source/blender/blenkernel/intern/mesh_normals.cc
+++ b/source/blender/blenkernel/intern/mesh_normals.cc
@@ -525,7 +525,7 @@ const float (*BKE_mesh_poly_normals_ensure(const Mesh *mesh))[3]
 const float (*BKE_mesh_corner_normals_ensure(const Mesh *mesh))[3]
 {
   if (!BKE_mesh_corner_normals_are_dirty(mesh)) {
-    BLI_assert(mesh->runtime->corner_normals != nullptr || mesh->totcorner == 0);
+    BLI_assert(mesh->runtime->corner_normals != nullptr || mesh->totloop == 0);
     return mesh->runtime->corner_normals;
   }
 
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index 8d0460d8578..f30beb5736d 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -2434,6 +2434,7 @@ static void rna_def_mloop(BlenderRNA *brna)
   RNA_def_property_ui_text(prop, "Index", "Index of this loop");
 
   prop = RNA_def_property(srna, "normal", PROP_FLOAT, PROP_DIRECTION);
+  RNA_def_property_clear_flag(prop, PROP_EDITABLE);
   RNA_def_property_array(prop, 3);
   RNA_def_property_range(prop, -1.0f, 1.0f);
   RNA_def_property_float_funcs(prop, "rna_MeshLoop_normal_get", NULL, NULL);



More information about the Bf-blender-cvs mailing list