Commit: 4706b4fe2d884f9886597332baed1278595f1d68 Author: Martijn Versteegh Date: Wed Nov 9 11:03:22 2022 +0100 Branches: refactor-mesh-uv-map-generic https://developer.blender.org/rB4706b4fe2d884f9886597332baed1278595f1d68
Do not guard setting of the UV-associated bools against the layer not existing. It's better if it just crashes than if it silently fails. =================================================================== M source/blender/python/bmesh/bmesh_py_types_meshdata.c =================================================================== diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.c b/source/blender/python/bmesh/bmesh_py_types_meshdata.c index b3c6d92a210..af66d531d82 100644 --- a/source/blender/python/bmesh/bmesh_py_types_meshdata.c +++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.c @@ -158,15 +158,9 @@ int BPy_BMLoopUV_AssignPyObject(struct BMesh *bm, const int loop_index, PyObject float *luv = BM_ELEM_CD_GET_FLOAT_P(l, offsets.uv); copy_v2_v2(luv, src->uv); - if (offsets.select_vert >=0) { - BM_ELEM_CD_SET_BOOL(l, offsets.select_vert, *src->vertsel); - } - if (offsets.select_edge >=0) { - BM_ELEM_CD_SET_BOOL(l, offsets.select_edge, *src->edgesel); - } - if (offsets.pin >=0) { - BM_ELEM_CD_SET_BOOL(l, offsets.pin, *src->pinned); - } + BM_ELEM_CD_SET_BOOL(l, offsets.select_vert, *src->vertsel); + BM_ELEM_CD_SET_BOOL(l, offsets.select_edge, *src->edgesel); + BM_ELEM_CD_SET_BOOL(l, offsets.pin, *src->pinned); return 0; } _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs