Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartijn Versteegh <blender@aaltjegron.nl>2022-11-12 02:08:48 +0300
committerMartijn Versteegh <blender@aaltjegron.nl>2022-11-12 02:08:48 +0300
commitf14dd870a956b6d357b47600dcffd5bf092a6a5c (patch)
treef3518369e83ff0976d1308307d0f5f2b3ff6f2f1
parent1bbb48a5d10cde6240cb66c69fe38e971d3129de (diff)
Cleanup: clang-format
-rw-r--r--source/blender/blenloader/intern/versioning_defaults.cc3
-rw-r--r--source/blender/bmesh/bmesh_class.h13
-rw-r--r--source/blender/bmesh/intern/bmesh_interp.c3
-rw-r--r--source/blender/draw/engines/overlay/overlay_edit_uv.cc8
-rw-r--r--source/blender/editors/transform/transform_convert_mesh_uv.c2
-rw-r--r--source/blender/editors/uvedit/uvedit_islands.cc1
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_customdata.c5
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_meshdata.c6
8 files changed, 20 insertions, 21 deletions
diff --git a/source/blender/blenloader/intern/versioning_defaults.cc b/source/blender/blenloader/intern/versioning_defaults.cc
index cfc56250bcd..3d924bc9c05 100644
--- a/source/blender/blenloader/intern/versioning_defaults.cc
+++ b/source/blender/blenloader/intern/versioning_defaults.cc
@@ -357,7 +357,8 @@ static void blo_update_defaults_scene(Main *bmain, Scene *scene)
{0.125, 0.50}, {0.375, 0.50}, {0.375, 0.75}, {0.125, 0.75}, {0.375, 0.50}, {0.625, 0.50},
{0.625, 0.75}, {0.375, 0.75}, {0.375, 0.25}, {0.625, 0.25}, {0.625, 0.50}, {0.375, 0.50},
};
- float(*mloopuv)[2] = static_cast<float (*)[2]>(CustomData_get_layer(&me->ldata, CD_PROP_FLOAT2));
+ float(*mloopuv)[2] = static_cast<float(*)[2]>(
+ CustomData_get_layer(&me->ldata, CD_PROP_FLOAT2));
memcpy(mloopuv, uv_values, sizeof(float[2]) * me->totloop);
}
diff --git a/source/blender/bmesh/bmesh_class.h b/source/blender/bmesh/bmesh_class.h
index 5139cbec692..4b56c5a1b78 100644
--- a/source/blender/bmesh/bmesh_class.h
+++ b/source/blender/bmesh/bmesh_class.h
@@ -532,7 +532,6 @@ typedef bool (*BMLoopPairFilterFunc)(const BMLoop *, const BMLoop *, void *user_
#define BM_ELEM_CD_GET_OPT_BOOL(ele, offset) \
(offset == -1 ? false : *((bool *)((char *)(ele)->head.data + (offset))))
-
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
# define BM_ELEM_CD_GET_BOOL_P(ele, offset) \
(BLI_assert(offset != -1), \
@@ -549,17 +548,17 @@ typedef bool (*BMLoopPairFilterFunc)(const BMLoop *, const BMLoop *, void *user_
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
# define BM_ELEM_CD_GET_OPT_BOOL_P(ele, offset) \
((offset != -1) ? \
- _Generic(ele, \
- GENERIC_TYPE_ANY((bool *)POINTER_OFFSET((ele)->head.data, offset), \
- _BM_GENERIC_TYPE_ELEM_NONCONST), \
- GENERIC_TYPE_ANY((const bool *)POINTER_OFFSET((ele)->head.data, offset), \
- _BM_GENERIC_TYPE_ELEM_CONST)) : NULL)
+ _Generic(ele, \
+ GENERIC_TYPE_ANY((bool *)POINTER_OFFSET((ele)->head.data, offset), \
+ _BM_GENERIC_TYPE_ELEM_NONCONST), \
+ GENERIC_TYPE_ANY((const bool *)POINTER_OFFSET((ele)->head.data, offset), \
+ _BM_GENERIC_TYPE_ELEM_CONST)) : \
+ NULL)
#else
# define BM_ELEM_CD_GET_OPT_BOOL_P(ele, offset) \
((offset != -1) ? (bool *)((char *)(ele)->head.data + (offset)) : NULL)
#endif
-
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
# define BM_ELEM_CD_GET_VOID_P(ele, offset) \
(BLI_assert(offset != -1), \
diff --git a/source/blender/bmesh/intern/bmesh_interp.c b/source/blender/bmesh/intern/bmesh_interp.c
index 0198cb6818f..86f86d79fac 100644
--- a/source/blender/bmesh/intern/bmesh_interp.c
+++ b/source/blender/bmesh/intern/bmesh_interp.c
@@ -898,8 +898,7 @@ void BM_uv_map_ensure_edge_selection_attribute(BMesh *bm, const char *uv_map_nam
void BM_uv_map_ensure_pin_attribute(BMesh *bm, const char *uv_map_name)
{
char name[MAX_CUSTOMDATA_LAYER_NAME];
- BM_data_layer_ensure_named(
- bm, &bm->ldata, CD_PROP_BOOL, get_uv_map_pin_name(uv_map_name, name));
+ BM_data_layer_ensure_named(bm, &bm->ldata, CD_PROP_BOOL, get_uv_map_pin_name(uv_map_name, name));
}
void BM_data_layer_free(BMesh *bm, CustomData *data, int type)
diff --git a/source/blender/draw/engines/overlay/overlay_edit_uv.cc b/source/blender/draw/engines/overlay/overlay_edit_uv.cc
index 83aa2aac3e8..9d34e7559dc 100644
--- a/source/blender/draw/engines/overlay/overlay_edit_uv.cc
+++ b/source/blender/draw/engines/overlay/overlay_edit_uv.cc
@@ -116,10 +116,10 @@ void OVERLAY_edit_uv_init(OVERLAY_Data *vedata)
const bool show_modified_uvs = sima->flag & SI_DRAWSHADOW;
const bool is_tiled_image = image && (image->source == IMA_SRC_TILED);
const bool do_edges_only = (ts->uv_flag & UV_SYNC_SELECTION) ?
- /* NOTE: Ignore #SCE_SELECT_EDGE because a single selected edge
- * on the mesh may cause single UV vertices to be selected. */
- false :
- (ts->uv_selectmode == UV_SELECT_EDGE);
+ /* NOTE: Ignore #SCE_SELECT_EDGE because a single selected edge
+ * on the mesh may cause single UV vertices to be selected. */
+ false :
+ (ts->uv_selectmode == UV_SELECT_EDGE);
const bool do_faces = ((sima->flag & SI_NO_DRAWFACES) == 0);
const bool do_face_dots = (ts->uv_flag & UV_SYNC_SELECTION) ?
(ts->selectmode & SCE_SELECT_FACE) != 0 :
diff --git a/source/blender/editors/transform/transform_convert_mesh_uv.c b/source/blender/editors/transform/transform_convert_mesh_uv.c
index a36aa05f8db..ae8a1cbcf35 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 = (float (*)[2])BM_ELEM_CD_GET_FLOAT_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_islands.cc b/source/blender/editors/uvedit/uvedit_islands.cc
index c45fb8a2cbd..fdfdbe92248 100644
--- a/source/blender/editors/uvedit/uvedit_islands.cc
+++ b/source/blender/editors/uvedit/uvedit_islands.cc
@@ -726,7 +726,6 @@ void ED_uvedit_pack_islands_multi(const Scene *scene,
bm_face_array_calc_bounds(
island->faces, island->faces_len, island->offsets.uv, &island->bounds_rect);
-
}
/* Center of bounding box containing all selected UVs. */
diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.c b/source/blender/python/bmesh/bmesh_py_types_customdata.c
index 1f5c2f57e01..10ae6a33435 100644
--- a/source/blender/python/bmesh/bmesh_py_types_customdata.c
+++ b/source/blender/python/bmesh/bmesh_py_types_customdata.c
@@ -462,11 +462,12 @@ static PyObject *bpy_bmlayercollection_verify(BPy_BMLayerCollection *self)
BM_data_layer_add(self->bm, data, self->type);
index = 0;
/* Because addingCustomData 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
+ * 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) {
- const char *active_uv_name = CustomData_get_active_layer_name(&self->bm->ldata, CD_PROP_FLOAT2);
+ 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);
diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.c b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
index a090ed30da3..5d9f9925487 100644
--- a/source/blender/python/bmesh/bmesh_py_types_meshdata.c
+++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
@@ -74,9 +74,9 @@ static int bpy_bmloopuv_pin_uv_set(BPy_BMLoopUV *self, PyObject *value, void *UN
if (self->pinned) {
*self->pinned = PyC_Long_AsBool(value);
}
- /* TODO(martijn) if (!self->pinned) that means the layed does not exist , or at least didn't exist
- * when the PY object was created. We *should* create it here instead of just bailing, but we can't
- * because that would invalidate all existing BPy_BMLoopUV objects' interal pointers.
+ /* TODO(martijn) if (!self->pinned) that means the layed does not exist , or at least didn't
+ * exist when the PY object was created. We *should* create it here instead of just bailing, but
+ * we can't because that would invalidate all existing BPy_BMLoopUV objects' interal pointers.
* the same goes for vertsel and edgesel below.
*/
return 0;