[Bf-blender-cvs] [a9e9ad53965] refactor-mesh-uv-map-generic: Use element index instead of layer index for creation of python MLoopUV.

Martijn Versteegh noreply at git.blender.org
Sun Nov 13 23:39:00 CET 2022


Commit: a9e9ad539658d598c5b0c218deda7f29ec368444
Author: Martijn Versteegh
Date:   Sun Nov 13 23:37:24 2022 +0100
Branches: refactor-mesh-uv-map-generic
https://developer.blender.org/rBa9e9ad539658d598c5b0c218deda7f29ec368444

Use element index instead of layer index for creation of python MLoopUV.

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

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 f6e9a6864d8..a3fad5c9ccf 100644
--- a/source/blender/python/bmesh/bmesh_py_types_customdata.c
+++ b/source/blender/python/bmesh/bmesh_py_types_customdata.c
@@ -1147,7 +1147,7 @@ PyObject *BPy_BMLayerItem_GetItem(BPy_BMElem *py_ele, BPy_BMLayerItem *py_layer)
         PyErr_SetString(PyExc_ValueError, "BMElem[layer]: layer is from another mesh");
         return NULL;
       }
-      ret = BPy_BMLoopUV_CreatePyObject(py_ele->bm, py_layer->index);
+      ret = BPy_BMLoopUV_CreatePyObject(py_ele->bm, py_ele->ele->head.index);
       break;
     }
     case CD_PROP_BYTE_COLOR: {
@@ -1254,7 +1254,7 @@ int BPy_BMLayerItem_SetItem(BPy_BMElem *py_ele, BPy_BMLayerItem *py_layer, PyObj
         ret = -1;
       }
       else {
-        ret = BPy_BMLoopUV_AssignPyObject(py_ele->bm, py_layer->index, py_value);
+        ret = BPy_BMLoopUV_AssignPyObject(py_ele->bm, py_ele->ele->head.index, py_value);
       }
       break;
     }



More information about the Bf-blender-cvs mailing list