[Bf-blender-cvs] [fc1273ea26b] refactor-mesh-uv-map-generic: Fix comment location and simplify calling ensure() functions

Martijn Versteegh noreply at git.blender.org
Tue Dec 6 12:56:38 CET 2022


Commit: fc1273ea26baac2c03851c843adba7479bd56be6
Author: Martijn Versteegh
Date:   Tue Nov 29 23:08:24 2022 +0100
Branches: refactor-mesh-uv-map-generic
https://developer.blender.org/rBfc1273ea26baac2c03851c843adba7479bd56be6

Fix comment location and simplify calling ensure() functions

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

M	source/blender/python/bmesh/bmesh_py_types_customdata.c

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

diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.c b/source/blender/python/bmesh/bmesh_py_types_customdata.c
index 0639d34e68c..9aea303aca5 100644
--- a/source/blender/python/bmesh/bmesh_py_types_customdata.c
+++ b/source/blender/python/bmesh/bmesh_py_types_customdata.c
@@ -461,17 +461,14 @@ static PyObject *bpy_bmlayercollection_verify(BPy_BMLayerCollection *self)
   if (index == -1) {
     BM_data_layer_add(self->bm, data, self->type);
     index = 0;
-    /* Because adding CustomData layers to a bmesh will invalidate any existing pointers
-     * in Py objects we can't lazily add the associated bool layers. So add them all right
-     * now.
-     */
   }
   if (self->type == CD_PROP_FLOAT2 && self->htype == BM_LOOP) {
+    /* Because adding CustomData layers to a bmesh will invalidate any existing pointers
+     * in Py objects we can't lazily add the associated bool layers. So add them all right
+     * now. */
     const char *active_uv_name = CustomData_get_active_layer_name(&self->bm->ldata,
                                                                   CD_PROP_FLOAT2);
-    BM_uv_map_ensure_vert_selection_attribute(self->bm, active_uv_name);
-    BM_uv_map_ensure_edge_selection_attribute(self->bm, active_uv_name);
-    BM_uv_map_ensure_pin_attribute(self->bm, active_uv_name);
+    BM_uv_map_ensure_selection_pin_attributes(self->bm, active_uv_name);
   }
 
   BLI_assert(index >= 0);



More information about the Bf-blender-cvs mailing list