[Bf-blender-cvs] [cbdb2207a44] refactor-mesh-uv-map-generic: Fix some more mistakes found when checking the whole diff.
Martijn Versteegh
noreply at git.blender.org
Sat Nov 12 00:09:12 CET 2022
Commit: cbdb2207a44aae54420d19b583b7b2a354f9ed91
Author: Martijn Versteegh
Date: Sat Nov 12 00:02:10 2022 +0100
Branches: refactor-mesh-uv-map-generic
https://developer.blender.org/rBcbdb2207a44aae54420d19b583b7b2a354f9ed91
Fix some more mistakes found when checking the whole diff.
===================================================================
M source/blender/editors/transform/transform_convert_mesh_uv.c
M source/blender/editors/uvedit/uvedit_ops.c
M source/blender/editors/uvedit/uvedit_unwrap_ops.c
M source/blender/python/bmesh/bmesh_py_types_meshdata.c
===================================================================
diff --git a/source/blender/editors/transform/transform_convert_mesh_uv.c b/source/blender/editors/transform/transform_convert_mesh_uv.c
index 96bcbaa412a..a36aa05f8db 100644
--- a/source/blender/editors/transform/transform_convert_mesh_uv.c
+++ b/source/blender/editors/transform/transform_convert_mesh_uv.c
@@ -375,7 +375,7 @@ static void createTransUVs(bContext *C, TransInfo *t)
}
}
- luv = BM_ELEM_CD_GET_VOID_P(l, offsets.uv);
+ luv = (float (*)[2])BM_ELEM_CD_GET_FLOAT_P(l, offsets.uv);
UVsToTransData(t->aspect, td++, td2d++, *luv, center, prop_distance, selected);
}
}
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index 392a415c701..b05bc011b78 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -1481,7 +1481,7 @@ static int uv_hide_exec(bContext *C, wmOperator *op)
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
- if (UV_VERT_SEL_TEST(l, !swap)) {
+ if (UV_VERT_SEL_TEST(l, !swap) || UV_EDGE_SEL_TEST(l, !swap)) {
hide = 1;
break;
}
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index 1924c4c4e65..1e55d091e1a 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -340,7 +340,7 @@ static void uvedit_prepare_pinned_indices(ParamHandle *handle,
BMIter liter;
BMLoop *l;
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
- bool pin = BM_ELEM_CD_GET_BOOL(l, offsets.pin);
+ bool pin = BM_ELEM_CD_GET_OPT_BOOL(l, offsets.pin);
if (options->pin_unselected && !pin) {
pin = !uvedit_uv_select_test(scene, l, offsets);
}
diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.c b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
index af66d531d82..a090ed30da3 100644
--- a/source/blender/python/bmesh/bmesh_py_types_meshdata.c
+++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
@@ -70,6 +70,7 @@ static PyObject *bpy_bmloopuv_pin_uv_get(BPy_BMLoopUV *self, void *UNUSED(closur
}
static int bpy_bmloopuv_pin_uv_set(BPy_BMLoopUV *self, PyObject *value, void *UNUSED(closure))
{
+ BLI_assert(self->pinned);
if (self->pinned) {
*self->pinned = PyC_Long_AsBool(value);
}
@@ -87,6 +88,7 @@ static PyObject *bpy_bmloopuv_select_get(BPy_BMLoopUV *self, void *UNUSED(closur
}
static int bpy_bmloopuv_select_set(BPy_BMLoopUV *self, PyObject *value, void *UNUSED(closure))
{
+ BLI_assert(self->vertsel);
if (self->vertsel) {
*self->vertsel = PyC_Long_AsBool(value);
}
@@ -99,6 +101,7 @@ static PyObject *bpy_bmloopuv_select_edge_get(BPy_BMLoopUV *self, void *UNUSED(c
}
static int bpy_bmloopuv_select_edge_set(BPy_BMLoopUV *self, PyObject *value, void *UNUSED(closure))
{
+ BLI_assert(self->edgesel);
if (self->edgesel) {
*self->edgesel = PyC_Long_AsBool(value);
}
More information about the Bf-blender-cvs
mailing list