[Bf-blender-cvs] [6a3a1512f44] refactor-mesh-uv-map-generic: Return -1 from failed setter function to indicate an error to python
Martijn Versteegh
noreply at git.blender.org
Fri Jan 6 15:58:59 CET 2023
Commit: 6a3a1512f44218bab69e61f0c43de3712223e158
Author: Martijn Versteegh
Date: Fri Jan 6 15:55:35 2023 +0100
Branches: refactor-mesh-uv-map-generic
https://developer.blender.org/rB6a3a1512f44218bab69e61f0c43de3712223e158
Return -1 from failed setter function to indicate an error to python
===================================================================
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 01bc5be1dff..4228d4054e7 100644
--- a/source/blender/python/bmesh/bmesh_py_types_meshdata.c
+++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
@@ -97,7 +97,8 @@ static int bpy_bmloopuv_pin_uv_set(BPy_BMLoopUV *self, PyObject *value, void *UN
}
else {
PyErr_SetString(PyExc_RuntimeError,
- "active uv layer has no associated pin layer. This is a bug!");
+ "active uv layer has no associated pin layer. This is a bug!");
+ return -1;
}
return 0;
}
@@ -116,7 +117,8 @@ static int bpy_bmloopuv_select_set(BPy_BMLoopUV *self, PyObject *value, void *UN
}
else {
PyErr_SetString(PyExc_RuntimeError,
- "active uv layer has no associated vertex selection layer. This is a bug!");
+ "active uv layer has no associated vertex selection layer. This is a bug!");
+ return -1;
}
return 0;
}
@@ -135,7 +137,8 @@ static int bpy_bmloopuv_select_edge_set(BPy_BMLoopUV *self, PyObject *value, voi
}
else {
PyErr_SetString(PyExc_RuntimeError,
- "active uv layer has no associated edge selection layer. This is a bug!");
+ "active uv layer has no associated edge selection layer. This is a bug!");
+ return -1;
}
return 0;
}
More information about the Bf-blender-cvs
mailing list