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:
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/animation/anim_filter.c57
-rw-r--r--source/blender/editors/armature/armature_add.c3
-rw-r--r--source/blender/editors/armature/armature_edit.c3
-rw-r--r--source/blender/editors/armature/pose_edit.c12
-rw-r--r--source/blender/editors/armature/pose_select.c15
-rw-r--r--source/blender/editors/armature/pose_utils.c6
-rw-r--r--source/blender/editors/mesh/editmesh_utils.c6
-rw-r--r--source/blender/editors/mesh/mesh_data.c3
-rw-r--r--source/blender/editors/object/object_collection.c9
-rw-r--r--source/blender/editors/object/object_constraint.c9
-rw-r--r--source/blender/editors/space_outliner/outliner_edit.c6
-rw-r--r--source/blender/editors/transform/transform.c147
-rw-r--r--source/blender/editors/transform/transform_constraints.c3
-rw-r--r--source/blender/editors/transform/transform_conversions.c90
-rw-r--r--source/blender/editors/transform/transform_generics.c57
-rw-r--r--source/blender/editors/transform/transform_snap.c15
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c12
-rw-r--r--source/blender/editors/uvedit/uvedit_smart_stitch.c9
-rw-r--r--source/blender/editors/uvedit/uvedit_unwrap_ops.c6
19 files changed, 156 insertions, 312 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index b5891a03f0a..bb0db9cf8a1 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -1310,8 +1310,7 @@ static size_t animfilter_act_group(bAnimContext *ac,
}
/* add grouped F-Curves */
- BEGIN_ANIMFILTER_SUBCHANNELS(EXPANDED_AGRP(ac, agrp))
- {
+ BEGIN_ANIMFILTER_SUBCHANNELS (EXPANDED_AGRP(ac, agrp)) {
/* special filter so that we can get just the F-Curves within the active group */
if (!(filter_mode & ANIMFILTER_ACTGROUPED) || (agrp->flag & AGRP_ACTIVE)) {
/* for the Graph Editor, curves may be set to not be visible in the view to lessen
@@ -1510,8 +1509,7 @@ static size_t animfilter_nla_controls(
/* add control curves from each NLA strip... */
/* NOTE: ANIMTYPE_FCURVES are created here, to avoid duplicating the code needed */
- BEGIN_ANIMFILTER_SUBCHANNELS(((adt->flag & ADT_NLA_SKEYS_COLLAPSED) == 0))
- {
+ BEGIN_ANIMFILTER_SUBCHANNELS (((adt->flag & ADT_NLA_SKEYS_COLLAPSED) == 0)) {
NlaTrack *nlt;
NlaStrip *strip;
@@ -1697,8 +1695,7 @@ static size_t animdata_filter_gpencil_data(ListBase *anim_data,
size_t tmp_items = 0;
/* add gpencil animation channels */
- BEGIN_ANIMFILTER_SUBCHANNELS(EXPANDED_GPD(gpd))
- {
+ BEGIN_ANIMFILTER_SUBCHANNELS (EXPANDED_GPD(gpd)) {
tmp_items += animdata_filter_gpencil_layers_data(&tmp_data, ads, gpd, filter_mode);
}
END_ANIMFILTER_SUBCHANNELS;
@@ -1817,8 +1814,7 @@ static size_t animdata_filter_ds_gpencil(
size_t items = 0;
/* add relevant animation channels for Grease Pencil */
- BEGIN_ANIMFILTER_SUBCHANNELS(EXPANDED_GPD(gpd))
- {
+ BEGIN_ANIMFILTER_SUBCHANNELS (EXPANDED_GPD(gpd)) {
/* add animation channels */
tmp_items += animfilter_block_data(ac, &tmp_data, ads, &gpd->id, filter_mode);
@@ -1858,8 +1854,7 @@ static size_t animdata_filter_ds_cachefile(
size_t items = 0;
/* add relevant animation channels for Cache File */
- BEGIN_ANIMFILTER_SUBCHANNELS(FILTER_CACHEFILE_OBJD(cache_file))
- {
+ BEGIN_ANIMFILTER_SUBCHANNELS (FILTER_CACHEFILE_OBJD(cache_file)) {
/* add animation channels */
tmp_items += animfilter_block_data(ac, &tmp_data, ads, &cache_file->id, filter_mode);
}
@@ -1931,8 +1926,7 @@ static size_t animdata_filter_mask(Main *bmain,
continue;
/* add mask animation channels */
- BEGIN_ANIMFILTER_SUBCHANNELS(EXPANDED_MASK(mask))
- {
+ BEGIN_ANIMFILTER_SUBCHANNELS (EXPANDED_MASK(mask)) {
tmp_items += animdata_filter_mask_data(&tmp_data, mask, filter_mode);
}
END_ANIMFILTER_SUBCHANNELS;
@@ -1969,8 +1963,7 @@ static size_t animdata_filter_ds_nodetree_group(bAnimContext *ac,
size_t items = 0;
/* add nodetree animation channels */
- BEGIN_ANIMFILTER_SUBCHANNELS(FILTER_NTREE_DATA(ntree))
- {
+ BEGIN_ANIMFILTER_SUBCHANNELS (FILTER_NTREE_DATA(ntree)) {
/* animation data filtering */
tmp_items += animfilter_block_data(ac, &tmp_data, ads, (ID *)ntree, filter_mode);
}
@@ -2061,8 +2054,7 @@ static size_t animdata_filter_ds_linestyle(
linestyle->id.tag &= ~LIB_TAG_DOIT;
/* add scene-level animation channels */
- BEGIN_ANIMFILTER_SUBCHANNELS(FILTER_LS_SCED(linestyle))
- {
+ BEGIN_ANIMFILTER_SUBCHANNELS (FILTER_LS_SCED(linestyle)) {
/* animation data filtering */
tmp_items += animfilter_block_data(ac, &tmp_data, ads, (ID *)linestyle, filter_mode);
}
@@ -2102,8 +2094,7 @@ static size_t animdata_filter_ds_texture(bAnimContext *ac,
size_t items = 0;
/* add texture's animation data to temp collection */
- BEGIN_ANIMFILTER_SUBCHANNELS(FILTER_TEX_DATA(tex))
- {
+ BEGIN_ANIMFILTER_SUBCHANNELS (FILTER_TEX_DATA(tex)) {
/* texture animdata */
tmp_items += animfilter_block_data(ac, &tmp_data, ads, (ID *)tex, filter_mode);
@@ -2191,8 +2182,7 @@ static size_t animdata_filter_ds_material(
size_t items = 0;
/* add material's animation data to temp collection */
- BEGIN_ANIMFILTER_SUBCHANNELS(FILTER_MAT_OBJD(ma))
- {
+ BEGIN_ANIMFILTER_SUBCHANNELS (FILTER_MAT_OBJD(ma)) {
/* material's animation data */
tmp_items += animfilter_block_data(ac, &tmp_data, ads, (ID *)ma, filter_mode);
@@ -2370,8 +2360,7 @@ static size_t animdata_filter_ds_particles(
continue;
/* add particle-system's animation data to temp collection */
- BEGIN_ANIMFILTER_SUBCHANNELS(FILTER_PART_OBJD(psys->part))
- {
+ BEGIN_ANIMFILTER_SUBCHANNELS (FILTER_PART_OBJD(psys->part)) {
/* particle system's animation data */
tmp_items += animfilter_block_data(ac, &tmp_data, ads, (ID *)psys->part, filter_mode);
@@ -2505,8 +2494,7 @@ static size_t animdata_filter_ds_obdata(
}
/* add object data animation channels */
- BEGIN_ANIMFILTER_SUBCHANNELS(expanded)
- {
+ BEGIN_ANIMFILTER_SUBCHANNELS (expanded) {
/* animation data filtering */
tmp_items += animfilter_block_data(ac, &tmp_data, ads, (ID *)iat, filter_mode);
@@ -2556,8 +2544,7 @@ static size_t animdata_filter_ds_keyanim(
size_t items = 0;
/* add shapekey-level animation channels */
- BEGIN_ANIMFILTER_SUBCHANNELS(FILTER_SKE_OBJD(key))
- {
+ BEGIN_ANIMFILTER_SUBCHANNELS (FILTER_SKE_OBJD(key)) {
/* animation data filtering */
tmp_items += animfilter_block_data(ac, &tmp_data, ads, (ID *)key, filter_mode);
}
@@ -2613,8 +2600,7 @@ static size_t animdata_filter_ds_obanim(
});
/* add object-level animation channels */
- BEGIN_ANIMFILTER_SUBCHANNELS(expanded)
- {
+ BEGIN_ANIMFILTER_SUBCHANNELS (expanded) {
/* animation data filtering */
tmp_items += animfilter_block_data(ac, &tmp_data, ads, (ID *)ob, filter_mode);
}
@@ -2650,8 +2636,7 @@ static size_t animdata_filter_dopesheet_ob(
size_t items = 0;
/* filter data contained under object first */
- BEGIN_ANIMFILTER_SUBCHANNELS(EXPANDED_OBJC(ob))
- {
+ BEGIN_ANIMFILTER_SUBCHANNELS (EXPANDED_OBJC(ob)) {
Key *key = BKE_key_from_object(ob);
/* object-level animation */
@@ -2723,8 +2708,7 @@ static size_t animdata_filter_ds_world(
size_t items = 0;
/* add world animation channels */
- BEGIN_ANIMFILTER_SUBCHANNELS(FILTER_WOR_SCED(wo))
- {
+ BEGIN_ANIMFILTER_SUBCHANNELS (FILTER_WOR_SCED(wo)) {
/* animation data filtering */
tmp_items += animfilter_block_data(ac, &tmp_data, ads, (ID *)wo, filter_mode);
@@ -2785,8 +2769,7 @@ static size_t animdata_filter_ds_scene(
});
/* add scene-level animation channels */
- BEGIN_ANIMFILTER_SUBCHANNELS(expanded)
- {
+ BEGIN_ANIMFILTER_SUBCHANNELS (expanded) {
/* animation data filtering */
tmp_items += animfilter_block_data(ac, &tmp_data, ads, (ID *)sce, filter_mode);
}
@@ -2820,8 +2803,7 @@ static size_t animdata_filter_dopesheet_scene(
size_t items = 0;
/* filter data contained under object first */
- BEGIN_ANIMFILTER_SUBCHANNELS(EXPANDED_SCEC(sce))
- {
+ BEGIN_ANIMFILTER_SUBCHANNELS (EXPANDED_SCEC(sce)) {
bNodeTree *ntree = sce->nodetree;
bGPdata *gpd = sce->gpd;
World *wo = sce->world;
@@ -2883,8 +2865,7 @@ static size_t animdata_filter_ds_movieclip(
size_t tmp_items = 0;
size_t items = 0;
/* add world animation channels */
- BEGIN_ANIMFILTER_SUBCHANNELS(EXPANDED_MCLIP(clip))
- {
+ BEGIN_ANIMFILTER_SUBCHANNELS (EXPANDED_MCLIP(clip)) {
/* animation data filtering */
tmp_items += animfilter_block_data(ac, &tmp_data, ads, (ID *)clip, filter_mode);
}
diff --git a/source/blender/editors/armature/armature_add.c b/source/blender/editors/armature/armature_add.c
index 6943d6bdc54..b5d7975a0c5 100644
--- a/source/blender/editors/armature/armature_add.c
+++ b/source/blender/editors/armature/armature_add.c
@@ -1136,8 +1136,7 @@ static int armature_subdivide_exec(bContext *C, wmOperator *op)
/* loop over all editable bones */
// XXX the old code did this in reverse order though!
- CTX_DATA_BEGIN_WITH_ID(C, EditBone *, ebone, selected_editable_bones, bArmature *, arm)
- {
+ CTX_DATA_BEGIN_WITH_ID (C, EditBone *, ebone, selected_editable_bones, bArmature *, arm) {
for (i = cuts + 1; i > 1; i--) {
/* compute cut ratio first */
float cutratio = 1.0f / (float)i;
diff --git a/source/blender/editors/armature/armature_edit.c b/source/blender/editors/armature/armature_edit.c
index dfcd0bf69f7..0e6a3eb5695 100644
--- a/source/blender/editors/armature/armature_edit.c
+++ b/source/blender/editors/armature/armature_edit.c
@@ -688,8 +688,7 @@ static int armature_fill_bones_exec(bContext *C, wmOperator *op)
/* loop over all bones, and only consider if visible */
bArmature *arm = NULL;
- CTX_DATA_BEGIN_WITH_ID(C, EditBone *, ebone, visible_bones, bArmature *, arm_iter)
- {
+ CTX_DATA_BEGIN_WITH_ID (C, EditBone *, ebone, visible_bones, bArmature *, arm_iter) {
bool check = false;
if (!(ebone->flag & BONE_CONNECTED) && (ebone->flag & BONE_ROOTSEL)) {
fill_add_joint(ebone, 0, &points);
diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c
index 599823a6401..9c31b66a3d1 100644
--- a/source/blender/editors/armature/pose_edit.c
+++ b/source/blender/editors/armature/pose_edit.c
@@ -601,8 +601,7 @@ static int pose_autoside_names_exec(bContext *C, wmOperator *op)
Object *ob_prev = NULL;
/* loop through selected bones, auto-naming them */
- CTX_DATA_BEGIN_WITH_ID(C, bPoseChannel *, pchan, selected_pose_bones, Object *, ob)
- {
+ CTX_DATA_BEGIN_WITH_ID (C, bPoseChannel *, pchan, selected_pose_bones, Object *, ob) {
bArmature *arm = ob->data;
BLI_strncpy(newname, pchan->name, sizeof(newname));
if (bone_autoside_name(newname, 1, axis, pchan->bone->head[axis], pchan->bone->tail[axis])) {
@@ -659,8 +658,7 @@ static int pose_bone_rotmode_exec(bContext *C, wmOperator *op)
Object *prev_ob = NULL;
/* set rotation mode of selected bones */
- CTX_DATA_BEGIN_WITH_ID(C, bPoseChannel *, pchan, selected_pose_bones, Object *, ob)
- {
+ CTX_DATA_BEGIN_WITH_ID (C, bPoseChannel *, pchan, selected_pose_bones, Object *, ob) {
pchan->rotmode = mode;
if (prev_ob != ob) {
@@ -887,8 +885,7 @@ static int pose_bone_layers_exec(bContext *C, wmOperator *op)
Object *prev_ob = NULL;
/* set layers of pchans based on the values set in the operator props */
- CTX_DATA_BEGIN_WITH_ID(C, bPoseChannel *, pchan, selected_pose_bones, Object *, ob)
- {
+ CTX_DATA_BEGIN_WITH_ID (C, bPoseChannel *, pchan, selected_pose_bones, Object *, ob) {
/* get pointer for pchan, and write flags this way */
RNA_pointer_create((ID *)ob->data, &RNA_Bone, pchan->bone, &ptr);
RNA_boolean_set_array(&ptr, "layers", layers);
@@ -964,8 +961,7 @@ static int armature_bone_layers_exec(bContext *C, wmOperator *op)
RNA_boolean_get_array(op->ptr, "layers", layers);
/* set layers of pchans based on the values set in the operator props */
- CTX_DATA_BEGIN_WITH_ID(C, EditBone *, ebone, selected_editable_bones, bArmature *, arm)
- {
+ CTX_DATA_BEGIN_WITH_ID (C, EditBone *, ebone, selected_editable_bones, bArmature *, arm) {
/* get pointer for pchan, and write flags this way */
RNA_pointer_create((ID *)arm, &RNA_EditBone, ebone, &ptr);
RNA_boolean_set_array(&ptr, "layers", layers);
diff --git a/source/blender/editors/armature/pose_select.c b/source/blender/editors/armature/pose_select.c
index b825d821fe8..d26eb7e904d 100644
--- a/source/blender/editors/armature/pose_select.c
+++ b/source/blender/editors/armature/pose_select.c
@@ -444,8 +444,7 @@ static int pose_de_select_all_exec(bContext *C, wmOperator *op)
Object *ob_prev = NULL;
/* Set the flags */
- CTX_DATA_BEGIN_WITH_ID(C, bPoseChannel *, pchan, visible_pose_bones, Object *, ob)
- {
+ CTX_DATA_BEGIN_WITH_ID (C, bPoseChannel *, pchan, visible_pose_bones, Object *, ob) {
bArmature *arm = ob->data;
pose_do_bone_select(pchan, action);
@@ -741,8 +740,7 @@ static bool pose_select_same_group(bContext *C, bool extend)
group_flags = NULL;
ob_index = -1;
ob_prev = NULL;
- CTX_DATA_BEGIN_WITH_ID(C, bPoseChannel *, pchan, visible_pose_bones, Object, *ob)
- {
+ CTX_DATA_BEGIN_WITH_ID (C, bPoseChannel *, pchan, visible_pose_bones, Object, *ob) {
if (ob != ob_prev) {
ob_index++;
group_flags = group_flags_array + (ob_index * groups_len);
@@ -768,8 +766,7 @@ static bool pose_select_same_group(bContext *C, bool extend)
ob_index = -1;
ob_prev = NULL;
/* only if group matches (and is not selected or current bone) */
- CTX_DATA_BEGIN_WITH_ID(C, bPoseChannel *, pchan, visible_pose_bones, Object *, ob)
- {
+ CTX_DATA_BEGIN_WITH_ID (C, bPoseChannel *, pchan, visible_pose_bones, Object *, ob) {
if (ob != ob_prev) {
ob_index++;
group_flags = group_flags_array + (ob_index * groups_len);
@@ -824,8 +821,7 @@ static bool pose_select_same_layer(bContext *C, bool extend)
layers = NULL;
ob_prev = NULL;
ob_index = -1;
- CTX_DATA_BEGIN_WITH_ID(C, bPoseChannel *, pchan, visible_pose_bones, Object *, ob)
- {
+ CTX_DATA_BEGIN_WITH_ID (C, bPoseChannel *, pchan, visible_pose_bones, Object *, ob) {
if (ob != ob_prev) {
layers = &layers_array[++ob_index];
ob_prev = ob;
@@ -856,8 +852,7 @@ static bool pose_select_same_layer(bContext *C, bool extend)
/* Select bones that are on same layers as layers flag. */
ob_prev = NULL;
ob_index = -1;
- CTX_DATA_BEGIN_WITH_ID(C, bPoseChannel *, pchan, visible_pose_bones, Object *, ob)
- {
+ CTX_DATA_BEGIN_WITH_ID (C, bPoseChannel *, pchan, visible_pose_bones, Object *, ob) {
if (ob != ob_prev) {
layers = &layers_array[++ob_index];
ob_prev = ob;
diff --git a/source/blender/editors/armature/pose_utils.c b/source/blender/editors/armature/pose_utils.c
index d8793bc2a1e..844fce49d28 100644
--- a/source/blender/editors/armature/pose_utils.c
+++ b/source/blender/editors/armature/pose_utils.c
@@ -148,8 +148,7 @@ void poseAnim_mapping_get(bContext *C, ListBase *pfLinks)
prev_ob = NULL;
ob_pose_armature = NULL;
- CTX_DATA_BEGIN_WITH_ID(C, bPoseChannel *, pchan, selected_pose_bones, Object *, ob)
- {
+ CTX_DATA_BEGIN_WITH_ID (C, bPoseChannel *, pchan, selected_pose_bones, Object *, ob) {
if (ob != prev_ob) {
prev_ob = ob;
ob_pose_armature = poseAnim_object_get(ob);
@@ -169,8 +168,7 @@ void poseAnim_mapping_get(bContext *C, ListBase *pfLinks)
if (BLI_listbase_is_empty(pfLinks)) {
prev_ob = NULL;
ob_pose_armature = NULL;
- CTX_DATA_BEGIN_WITH_ID(C, bPoseChannel *, pchan, visible_pose_bones, Object *, ob)
- {
+ CTX_DATA_BEGIN_WITH_ID (C, bPoseChannel *, pchan, visible_pose_bones, Object *, ob) {
if (ob != prev_ob) {
prev_ob = ob;
ob_pose_armature = poseAnim_object_get(ob);
diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c
index 7d318fb16e1..7aa7c2e6114 100644
--- a/source/blender/editors/mesh/editmesh_utils.c
+++ b/source/blender/editors/mesh/editmesh_utils.c
@@ -573,8 +573,7 @@ UvVertMap *BM_uv_vert_map_create(BMesh *bm,
tf_uv = (float(*)[2])BLI_buffer_reinit_data(&tf_uv_buf, vec2f, efa->len);
}
- BM_ITER_ELEM_INDEX(l, &liter, efa, BM_LOOPS_OF_FACE, i)
- {
+ BM_ITER_ELEM_INDEX (l, &liter, efa, BM_LOOPS_OF_FACE, i) {
buf->loop_of_poly_index = i;
buf->poly_index = a;
buf->separate = 0;
@@ -723,8 +722,7 @@ UvElementMap *BM_uv_element_map_create(BMesh *bm,
tf_uv = (float(*)[2])BLI_buffer_reinit_data(&tf_uv_buf, vec2f, efa->len);
}
- BM_ITER_ELEM_INDEX(l, &liter, efa, BM_LOOPS_OF_FACE, i)
- {
+ BM_ITER_ELEM_INDEX (l, &liter, efa, BM_LOOPS_OF_FACE, i) {
buf->l = l;
buf->separate = 0;
buf->island = INVALID_ISLAND;
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c
index 2f4fbcab9bc..580221496ca 100644
--- a/source/blender/editors/mesh/mesh_data.c
+++ b/source/blender/editors/mesh/mesh_data.c
@@ -183,8 +183,7 @@ static void mesh_uv_reset_bmface(BMFace *f, const int cd_loop_uv_offset)
BMLoop *l;
int i;
- BM_ITER_ELEM_INDEX(l, &liter, f, BM_LOOPS_OF_FACE, i)
- {
+ BM_ITER_ELEM_INDEX (l, &liter, f, BM_LOOPS_OF_FACE, i) {
fuv[i] = ((MLoopUV *)BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset))->uv;
}
diff --git a/source/blender/editors/object/object_collection.c b/source/blender/editors/object/object_collection.c
index 0b22dec99c7..e0de4b8faef 100644
--- a/source/blender/editors/object/object_collection.c
+++ b/source/blender/editors/object/object_collection.c
@@ -139,8 +139,7 @@ static int objects_add_active_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* now add all selected objects to the collection(s) */
- FOREACH_COLLECTION_BEGIN(bmain, scene, Collection *, collection)
- {
+ FOREACH_COLLECTION_BEGIN (bmain, scene, Collection *, collection) {
if (single_collection && collection != single_collection)
continue;
if (!BKE_collection_has_object(collection, ob))
@@ -220,8 +219,7 @@ static int objects_remove_active_exec(bContext *C, wmOperator *op)
/* Linking to same collection requires its own loop so we can avoid
* looking up the active objects collections each time. */
- FOREACH_COLLECTION_BEGIN(bmain, scene, Collection *, collection)
- {
+ FOREACH_COLLECTION_BEGIN (bmain, scene, Collection *, collection) {
if (single_collection && collection != single_collection)
continue;
@@ -319,8 +317,7 @@ static int collection_objects_remove_exec(bContext *C, wmOperator *op)
if (ob == NULL)
return OPERATOR_CANCELLED;
- FOREACH_COLLECTION_BEGIN(bmain, scene, Collection *, collection)
- {
+ FOREACH_COLLECTION_BEGIN (bmain, scene, Collection *, collection) {
if (single_collection && collection != single_collection)
continue;
if (!BKE_collection_has_object(collection, ob))
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index c571fc6821e..39eb4b9333c 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -1479,8 +1479,7 @@ static int pose_constraints_clear_exec(bContext *C, wmOperator *UNUSED(op))
Object *prev_ob = NULL;
/* free constraints for all selected bones */
- CTX_DATA_BEGIN_WITH_ID(C, bPoseChannel *, pchan, selected_pose_bones, Object *, ob)
- {
+ CTX_DATA_BEGIN_WITH_ID (C, bPoseChannel *, pchan, selected_pose_bones, Object *, ob) {
BKE_constraints_free(&pchan->constraints);
pchan->constflag &= ~(PCHAN_HAS_IK | PCHAN_HAS_SPLINEIK | PCHAN_HAS_CONST);
@@ -1561,8 +1560,7 @@ static int pose_constraint_copy_exec(bContext *C, wmOperator *op)
Object *prev_ob = NULL;
/* copy all constraints from active posebone to all selected posebones */
- CTX_DATA_BEGIN_WITH_ID(C, bPoseChannel *, chan, selected_pose_bones, Object *, ob)
- {
+ CTX_DATA_BEGIN_WITH_ID (C, bPoseChannel *, chan, selected_pose_bones, Object *, ob) {
/* if we're not handling the object we're copying from, copy all constraints over */
if (pchan != chan) {
BKE_constraints_copy(&chan->constraints, &pchan->constraints, true);
@@ -2129,8 +2127,7 @@ static int pose_ik_clear_exec(bContext *C, wmOperator *UNUSED(op))
Object *prev_ob = NULL;
/* only remove IK Constraints */
- CTX_DATA_BEGIN_WITH_ID(C, bPoseChannel *, pchan, selected_pose_bones, Object *, ob)
- {
+ CTX_DATA_BEGIN_WITH_ID (C, bPoseChannel *, pchan, selected_pose_bones, Object *, ob) {
bConstraint *con, *next;
/* TODO: should we be checking if these constraints were local before we try and remove them? */
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c
index 6cfb5ce8202..72c420f00cb 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -2101,8 +2101,7 @@ static int outliner_orphans_purge_invoke(bContext *C, wmOperator *op, const wmEv
/* Tag all IDs having zero users. */
ID *id;
- FOREACH_MAIN_ID_BEGIN(bmain, id)
- {
+ FOREACH_MAIN_ID_BEGIN (bmain, id) {
outliner_orphans_purge_tag(id, num_tagged);
}
FOREACH_MAIN_ID_END;
@@ -2149,8 +2148,7 @@ static int outliner_orphans_purge_exec(bContext *C, wmOperator *op)
if ((num_tagged[INDEX_ID_NULL] = RNA_int_get(op->ptr, "num_deleted")) == 0) {
/* Tag all IDs having zero users. */
ID *id;
- FOREACH_MAIN_ID_BEGIN(bmain, id)
- {
+ FOREACH_MAIN_ID_BEGIN (bmain, id) {
outliner_orphans_purge_tag(id, num_tagged);
}
FOREACH_MAIN_ID_END;
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index d4837084a5f..499971b9a50 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -2686,8 +2686,7 @@ bool initTransform(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
if ((prop = RNA_struct_find_property(op->ptr, "preserve_clnor"))) {
if ((t->flag & T_EDIT) && t->obedit_type == OB_MESH) {
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
if ((((Mesh *)(tc->obedit->data))->flag & ME_AUTOSMOOTH)) {
BMEditMesh *em = NULL; // BKE_editmesh_from_object(t->obedit);
bool do_skip = false;
@@ -2780,8 +2779,7 @@ int transformEnd(bContext *C, TransInfo *t)
}
else {
if (t->flag & T_CLNOR_REBUILD) {
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
BMEditMesh *em = BKE_editmesh_from_object(tc->obedit);
BM_lnorspace_rebuild(em->bm, true);
}
@@ -3364,8 +3362,7 @@ static void Bend(TransInfo *t, const int UNUSED(mval[2]))
}
/* TODO(campbell): xform, compensate object center. */
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
float warp_sta_local[3];
@@ -3591,8 +3588,7 @@ static void applyShear(TransInfo *t, const int UNUSED(mval[2]))
mul_m3_series(totmat, axismat_inv, smat, axismat);
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++) {
const float *center, *co;
@@ -3947,8 +3943,7 @@ static void applyResize(TransInfo *t, const int UNUSED(mval[2]))
copy_m3_m3(t->mat, mat); // used in gizmo
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++) {
if (td->flag & TD_NOACTION)
@@ -3969,8 +3964,7 @@ static void applyResize(TransInfo *t, const int UNUSED(mval[2]))
t->con.applySize(t, NULL, NULL, mat);
}
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++)
ElementResize(t, tc, td, mat);
@@ -4057,8 +4051,7 @@ static void applySkinResize(TransInfo *t, const int UNUSED(mval[2]))
headerResize(t, size, str);
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++) {
float tmat[3][3], smat[3][3];
@@ -4123,8 +4116,7 @@ static void initToSphere(TransInfo *t)
t->flag |= T_NO_CONSTRAINT;
// Calculate average radius
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++) {
t->val += len_v3v3(tc->center_local, td->iloc);
@@ -4164,8 +4156,7 @@ static void applyToSphere(TransInfo *t, const int UNUSED(mval[2]))
BLI_snprintf(str, sizeof(str), IFACE_("To Sphere: %.4f %s"), ratio, t->proptext);
}
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++) {
float tratio;
@@ -4519,8 +4510,7 @@ static void applyRotationValue(TransInfo *t, float angle, float axis[3])
axis_angle_normalized_to_mat3(mat, axis, angle);
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++) {
@@ -4621,8 +4611,7 @@ static void applyTrackballValue(TransInfo *t,
angle = normalize_v3(axis);
axis_angle_normalized_to_mat3(mat, axis, angle);
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++) {
if (td->flag & TD_NOACTION)
@@ -4763,8 +4752,7 @@ static void initNormalRotation(TransInfo *t)
t->num.unit_use_radians = (t->scene->unit.system_rotation == USER_UNIT_ROT_RADIANS);
t->num.unit_type[0] = B_UNIT_ROTATION;
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
BMEditMesh *em = BKE_editmesh_from_object(tc->obedit);
BMesh *bm = em->bm;
@@ -4786,8 +4774,7 @@ static void applyNormalRotation(TransInfo *t, const int UNUSED(mval[2]))
t->con.applyRot(t, NULL, NULL, axis_final, NULL);
}
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
BMEditMesh *em = BKE_editmesh_from_object(tc->obedit);
BMesh *bm = em->bm;
@@ -5074,8 +5061,7 @@ static void applyTranslationValue(TransInfo *t, const float vec[3])
/* The ideal would be "apply_snap_align_rotation" only when a snap point is found
* so, maybe inside this function is not the best place to apply this rotation.
* but you need "handle snapping rotation before doing the translation" (really?) */
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
float pivot[3];
if (apply_snap_align_rotation) {
@@ -5295,8 +5281,7 @@ static void applyShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
WM_bool_as_string((t->flag & T_ALT_TRANSFORM) != 0));
/* done with header string */
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++) {
float tdistance; /* temp dist */
@@ -5378,8 +5363,7 @@ static void applyTilt(TransInfo *t, const int UNUSED(mval[2]))
BLI_snprintf(str, sizeof(str), IFACE_("Tilt: %.2f° %s"), RAD2DEGF(final), t->proptext);
}
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++) {
if (td->flag & TD_NOACTION)
@@ -5456,8 +5440,7 @@ static void applyCurveShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
BLI_snprintf(str, sizeof(str), IFACE_("Shrink/Fatten: %3f"), ratio);
}
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++) {
if (td->flag & TD_NOACTION)
@@ -5543,8 +5526,7 @@ static void applyMaskShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
if (ratio > 1.0f) {
initial_feather = true;
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++) {
if (td->flag & TD_NOACTION)
@@ -5560,8 +5542,7 @@ static void applyMaskShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
}
/* apply shrink/fatten */
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (td = tc->data, i = 0; i < tc->data_len; i++, td++) {
if (td->flag & TD_NOACTION)
@@ -5646,8 +5627,7 @@ static void applyGPShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
BLI_snprintf(str, sizeof(str), IFACE_("Shrink/Fatten: %3f"), ratio);
}
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++) {
if (td->flag & TD_NOACTION)
@@ -5726,8 +5706,7 @@ static void applyGPOpacity(TransInfo *t, const int UNUSED(mval[2]))
BLI_snprintf(str, sizeof(str), IFACE_("Opacity: %3f"), ratio);
}
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++) {
if (td->flag & TD_NOACTION)
@@ -5806,8 +5785,7 @@ static void applyPushPull(TransInfo *t, const int UNUSED(mval[2]))
t->con.applyRot(t, NULL, NULL, axis_global, NULL);
}
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++) {
if (td->flag & TD_NOACTION)
@@ -5905,8 +5883,7 @@ static void applyBevelWeight(TransInfo *t, const int UNUSED(mval[2]))
BLI_snprintf(str, sizeof(str), IFACE_("Bevel Weight: %.3f %s"), weight, t->proptext);
}
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++) {
if (td->flag & TD_NOACTION)
@@ -5989,8 +5966,7 @@ static void applyCrease(TransInfo *t, const int UNUSED(mval[2]))
BLI_snprintf(str, sizeof(str), IFACE_("Crease: %.3f %s"), crease, t->proptext);
}
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++) {
if (td->flag & TD_NOACTION)
@@ -6131,8 +6107,7 @@ static void applyBoneSize(TransInfo *t, const int UNUSED(mval[2]))
headerBoneSize(t, size, str);
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++) {
if (td->flag & TD_NOACTION)
@@ -6202,8 +6177,7 @@ static void applyBoneEnvelope(TransInfo *t, const int UNUSED(mval[2]))
BLI_snprintf(str, sizeof(str), IFACE_("Envelope: %3f"), ratio);
}
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++) {
if (td->flag & TD_NOACTION)
@@ -6500,13 +6474,11 @@ static void slide_origdata_interp_data_vert(SlideOrigData *sod,
float(*faces_center)[3] = BLI_array_alloca(faces_center, l_num);
BMLoop *l;
- BM_ITER_ELEM_INDEX(l, &liter, sv->v, BM_LOOPS_OF_VERT, j)
- {
+ BM_ITER_ELEM_INDEX (l, &liter, sv->v, BM_LOOPS_OF_VERT, j) {
BM_face_calc_center_median(l->f, faces_center[j]);
}
- BM_ITER_ELEM_INDEX(l, &liter, sv->v, BM_LOOPS_OF_VERT, j)
- {
+ BM_ITER_ELEM_INDEX (l, &liter, sv->v, BM_LOOPS_OF_VERT, j) {
BMFace *f_copy = BLI_ghash_lookup(sod->origfaces, l->f);
float f_copy_center[3];
BMIter liter_other;
@@ -6515,8 +6487,7 @@ static void slide_origdata_interp_data_vert(SlideOrigData *sod,
BM_face_calc_center_median(f_copy, f_copy_center);
- BM_ITER_ELEM_INDEX(l_other, &liter_other, sv->v, BM_LOOPS_OF_VERT, j_other)
- {
+ BM_ITER_ELEM_INDEX (l_other, &liter_other, sv->v, BM_LOOPS_OF_VERT, j_other) {
BM_face_interp_multires_ex(bm,
l_other->f,
f_copy,
@@ -7563,8 +7534,7 @@ static bool createEdgeSlideVerts_single_side(TransInfo *t, TransDataContainer *t
void projectEdgeSlideData(TransInfo *t, bool is_final)
{
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
EdgeSlideData *sld = tc->custom.mode.data;
SlideOrigData *sod = &sld->orig_data;
@@ -7634,14 +7604,12 @@ static void initEdgeSlide_ex(
}
if (use_double_side) {
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
ok |= createEdgeSlideVerts_double_side(t, tc);
}
}
else {
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
ok |= createEdgeSlideVerts_single_side(t, tc);
}
}
@@ -7651,8 +7619,7 @@ static void initEdgeSlide_ex(
return;
}
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
sld = tc->custom.mode.data;
if (!sld) {
continue;
@@ -7864,8 +7831,7 @@ static void doEdgeSlide(TransInfo *t, float perc)
if (is_clamp) {
const int side_index = (perc < 0.0f);
const float perc_final = fabsf(perc);
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
EdgeSlideData *sld = tc->custom.mode.data;
TransDataEdgeSlideVert *sv = sld->sv;
for (int i = 0; i < sld->totsv; i++, sv++) {
@@ -7878,8 +7844,7 @@ static void doEdgeSlide(TransInfo *t, float perc)
const float perc_init = fabsf(perc) *
((sld_active->curr_side_unclamp == (perc < 0.0f)) ? 1 : -1);
const int side_index = sld_active->curr_side_unclamp;
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
EdgeSlideData *sld = tc->custom.mode.data;
TransDataEdgeSlideVert *sv = sld->sv;
for (int i = 0; i < sld->totsv; i++, sv++) {
@@ -7915,8 +7880,7 @@ static void doEdgeSlide(TransInfo *t, float perc)
float co_a[3];
float co_b[3];
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
EdgeSlideData *sld = tc->custom.mode.data;
TransDataEdgeSlideVert *sv = sld->sv;
for (int i = 0; i < sld->totsv; i++, sv++) {
@@ -8220,8 +8184,7 @@ static bool createVertSlideVerts(TransInfo *t, TransDataContainer *tc)
void projectVertSlideData(TransInfo *t, bool is_final)
{
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
VertSlideData *sld = tc->custom.mode.data;
SlideOrigData *sod = &sld->orig_data;
if (sod->use_origfaces == true) {
@@ -8289,8 +8252,7 @@ static void initVertSlide_ex(TransInfo *t, bool use_even, bool flipped, bool use
}
bool ok = false;
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
ok |= createVertSlideVerts(t, tc);
VertSlideData *sld = tc->custom.mode.data;
if (sld) {
@@ -8509,8 +8471,7 @@ static void doVertSlide(TransInfo *t, float perc)
slp->perc = perc;
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
VertSlideData *sld = tc->custom.mode.data;
TransDataVertSlideVert *svlist = sld->sv, *sv;
int i;
@@ -8658,8 +8619,7 @@ static void applyBoneRoll(TransInfo *t, const int UNUSED(mval[2]))
}
/* set roll values */
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++) {
if (td->flag & TD_NOACTION)
@@ -8745,8 +8705,7 @@ static void applyBakeTime(TransInfo *t, const int mval[2])
BLI_snprintf(str, sizeof(str), IFACE_("Time: %.3f %s"), time, t->proptext);
}
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++) {
if (td->flag & TD_NOACTION)
@@ -8812,8 +8771,7 @@ static void applyMirror(TransInfo *t, const int UNUSED(mval[2]))
BLI_snprintf(str, sizeof(str), IFACE_("Mirror%s"), t->con.text);
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++) {
if (td->flag & TD_NOACTION)
@@ -8835,8 +8793,7 @@ static void applyMirror(TransInfo *t, const int UNUSED(mval[2]))
size_to_mat3(mat, size);
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++) {
if (td->flag & TD_NOACTION)
@@ -8879,8 +8836,7 @@ static void applyAlign(TransInfo *t, const int UNUSED(mval[2]))
float center[3];
int i;
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
/* saving original center */
copy_v3_v3(center, tc->center_local);
TransData *td = tc->data;
@@ -8978,8 +8934,7 @@ static void applySeqSlideValue(TransInfo *t, const float val[2])
{
int i;
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++) {
if (td->flag & TD_NOACTION)
@@ -9231,8 +9186,7 @@ static void applyTimeTranslateValue(TransInfo *t)
float deltax, val /* , valprev */;
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
TransData2D *td2d = tc->data_2d;
/* It doesn't matter whether we apply to t->data or
@@ -9341,8 +9295,7 @@ static void initTimeSlide(TransInfo *t)
float min = 999999999.0f, max = -999999999.0f;
int i;
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++) {
AnimData *adt = (t->spacetype != SPACE_NLA) ? td->extra : NULL;
@@ -9424,8 +9377,7 @@ static void applyTimeSlideValue(TransInfo *t, float sval)
/* It doesn't matter whether we apply to t->data or
* t->data2d, but t->data2d is more convenient. */
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++) {
/* it is assumed that td->extra is a pointer to the AnimData,
@@ -9572,8 +9524,7 @@ static void applyTimeScaleValue(TransInfo *t)
const short autosnap = getAnimEdit_SnapMode(t);
const double secf = FPS;
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
TransData2D *td2d = tc->data_2d;
for (i = 0; i < tc->data_len; i++, td++, td2d++) {
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c
index 3e58cecd42b..9414d5862b6 100644
--- a/source/blender/editors/transform/transform_constraints.c
+++ b/source/blender/editors/transform/transform_constraints.c
@@ -874,8 +874,7 @@ static void drawObjectConstraint(TransInfo *t)
int i;
float tmp_axismtx[3][3];
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++) {
float co[3];
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 4f288f56f8f..49817db35a8 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -187,8 +187,7 @@ static void sort_trans_data_dist_container(const TransInfo *t, TransDataContaine
}
void sort_trans_data_dist(TransInfo *t)
{
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
sort_trans_data_dist_container(t, tc);
}
}
@@ -222,8 +221,7 @@ static void sort_trans_data_container(TransDataContainer *tc)
}
static void sort_trans_data(TransInfo *t)
{
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
sort_trans_data_container(tc);
}
}
@@ -248,8 +246,7 @@ static void set_prop_dist(TransInfo *t, const bool with_dist)
}
}
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *tob = tc->data;
for (a = 0; a < tc->data_len; a++, tob++) {
@@ -453,8 +450,7 @@ static void createTransCursor_view3d(TransInfo *t)
static void createTransEdge(TransInfo *t)
{
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
BMEditMesh *em = BKE_editmesh_from_object(tc->obedit);
TransData *td = NULL;
@@ -947,8 +943,7 @@ void transform_autoik_update(TransInfo *t, short mode)
/* apply to all pose-channels */
bool changed = false;
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
/* sanity checks (don't assume t->poseobj is set, or that it is an armature) */
if (ELEM(NULL, tc->poseobj, tc->poseobj->pose)) {
@@ -1193,8 +1188,7 @@ static void createTransPose(TransInfo *t)
bool has_translate_rotate_buf[2] = {false, false};
bool *has_translate_rotate = (t->mode == TFM_TRANSLATION) ? has_translate_rotate_buf : NULL;
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
Object *ob = tc->poseobj;
bArmature *arm;
@@ -1240,8 +1234,7 @@ static void createTransPose(TransInfo *t)
}
}
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
if (tc->data_len == 0) {
continue;
}
@@ -1331,8 +1324,7 @@ static void createTransArmatureVerts(TransInfo *t)
{
t->data_len_all = 0;
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
EditBone *ebo, *eboflip;
bArmature *arm = tc->obedit->data;
ListBase *edbo = arm->edbo;
@@ -1385,8 +1377,7 @@ static void createTransArmatureVerts(TransInfo *t)
transform_around_single_fallback(t);
t->data_len_all = -1;
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
if (!tc->data_len) {
continue;
}
@@ -1579,8 +1570,7 @@ static void createTransArmatureVerts(TransInfo *t)
static void createTransMBallVerts(TransInfo *t)
{
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
MetaBall *mb = (MetaBall *)tc->obedit->data;
MetaElem *ml;
TransData *td;
@@ -1766,8 +1756,7 @@ static void createTransCurveVerts(TransInfo *t)
t->data_len_all = 0;
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
Curve *cu = tc->obedit->data;
BLI_assert(cu->editnurb != NULL);
BezTriple *bezt;
@@ -1830,8 +1819,7 @@ static void createTransCurveVerts(TransInfo *t)
transform_around_single_fallback(t);
t->data_len_all = -1;
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
if (tc->data_len == 0) {
continue;
}
@@ -2087,8 +2075,7 @@ static void createTransCurveVerts(TransInfo *t)
static void createTransLatticeVerts(TransInfo *t)
{
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
Lattice *latt = ((Lattice *)tc->obedit->data)->editlatt->latt;
TransData *td = NULL;
@@ -2155,8 +2142,7 @@ static void createTransLatticeVerts(TransInfo *t)
/* ******************* particle edit **************** */
static void createTransParticleVerts(bContext *C, TransInfo *t)
{
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = NULL;
TransDataExtension *tx;
@@ -2284,8 +2270,7 @@ static void createTransParticleVerts(bContext *C, TransInfo *t)
void flushTransParticles(TransInfo *t)
{
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
Scene *scene = t->scene;
ViewLayer *view_layer = t->view_layer;
Object *ob = OBACT(view_layer);
@@ -2739,8 +2724,7 @@ static void VertsToTransData(TransInfo *t,
static void createTransEditVerts(TransInfo *t)
{
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *tob = NULL;
TransDataExtension *tx = NULL;
BMEditMesh *em = BKE_editmesh_from_object(tc->obedit);
@@ -3011,8 +2995,7 @@ void flushTransNodes(TransInfo *t)
{
const float dpi_fac = UI_DPI_FAC;
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
int a;
TransData *td;
TransData2D *td2d;
@@ -3260,8 +3243,7 @@ static void createTransUVs(bContext *C, TransInfo *t)
const bool is_prop_connected = (t->flag & T_PROP_CONNECTED) != 0;
const bool is_island_center = (t->around == V3D_AROUND_LOCAL_ORIGINS);
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = NULL;
TransData2D *td2d = NULL;
@@ -3426,8 +3408,7 @@ void flushTransUVs(TransInfo *t)
const bool use_pixel_snap = ((sima->pixel_snap_mode != SI_PIXEL_SNAP_DISABLED) &&
(t->state != TRANS_CANCEL));
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData2D *td;
int a;
float aspect_inv[2], size[2];
@@ -3478,8 +3459,7 @@ bool clipUVTransform(TransInfo *t, float vec[2], const bool resize)
max[0] = t->aspect[0];
max[1] = t->aspect[1];
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td;
int a;
@@ -3525,8 +3505,7 @@ bool clipUVTransform(TransInfo *t, float vec[2], const bool resize)
void clipUVData(TransInfo *t)
{
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (int a = 0; a < tc->data_len; a++, td++) {
if (td->flag & TD_NOACTION)
@@ -6687,8 +6666,7 @@ static void special_aftertrans_update__mesh(bContext *UNUSED(C), TransInfo *t)
{
/* so automerge supports mirror */
if ((t->scene->toolsettings->automerge) && ((t->flag & T_EDIT) && t->obedit_type == OB_MESH)) {
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
BMEditMesh *em = BKE_editmesh_from_object(tc->obedit);
BMesh *bm = em->bm;
@@ -6760,8 +6738,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
* really slow -joeedh */
projectEdgeSlideData(t, true);
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
EdgeSlideData *sld = tc->custom.mode.data;
/* Free temporary faces to avoid auto-merging and deleting
@@ -6772,8 +6749,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
else if (t->mode == TFM_VERT_SLIDE) {
/* as above */
projectVertSlideData(t, true);
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
VertSlideData *sld = tc->custom.mode.data;
freeVertSlideTempFaces(sld);
}
@@ -7073,8 +7049,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
}
else if (t->flag & T_EDIT) {
if (t->obedit_type == OB_MESH) {
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
BMEditMesh *em = BKE_editmesh_from_object(tc->obedit);
/* table needs to be created for each edit command, since vertices can move etc */
ED_mesh_mirror_spatial_table(tc->obedit, em, NULL, NULL, 'e');
@@ -7087,8 +7062,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
/* Handle the exception where for TFM_BONESIZE in edit mode we pretend to be
* in pose mode (to use bone orientation matrix),
* in that case we don't do operations like autokeyframing. */
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
ob = tc->poseobj;
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
}
@@ -7096,8 +7070,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
else if (t->flag & T_POSE) {
GSet *motionpath_updates = BLI_gset_ptr_new("motionpath updates");
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
bArmature *arm;
bPoseChannel *pchan;
@@ -9008,8 +8981,7 @@ void createTransData(bContext *C, TransInfo *t)
else if (t->options & CTX_EDGE) {
/* Multi object editing. */
initTransDataContainers_FromObjectData(t, ob, NULL, 0);
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
tc->data_ext = NULL;
}
t->flag |= T_EDIT;
@@ -9164,8 +9136,7 @@ void createTransData(bContext *C, TransInfo *t)
/* Multi object editing. */
initTransDataContainers_FromObjectData(t, ob, NULL, 0);
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
tc->data_ext = NULL;
}
if (t->obedit_type == OB_MESH) {
@@ -9216,8 +9187,7 @@ void createTransData(bContext *C, TransInfo *t)
t->flag |= T_POSE;
t->obedit_type = -1;
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
tc->poseobj = tc->obedit;
tc->obedit = NULL;
}
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index eebb6382ccd..09593a44a54 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -126,8 +126,7 @@ void getViewVector(const TransInfo *t, const float coord[3], float vec[3])
static void clipMirrorModifier(TransInfo *t)
{
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
Object *ob = tc->obedit;
ModifierData *md = ob->modifiers.first;
float tolerance[3] = {0.0f, 0.0f, 0.0f};
@@ -221,8 +220,7 @@ static void clipMirrorModifier(TransInfo *t)
/* assumes obedit set to mesh object */
static void editbmesh_apply_to_mirror(TransInfo *t)
{
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
if (tc->mirror.axis_flag) {
TransData *td = tc->data;
BMVert *eve;
@@ -702,8 +700,7 @@ static void recalcData_image(TransInfo *t)
if (sima->flag & SI_LIVE_UNWRAP)
ED_uvedit_live_unwrap_re_solve();
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
if (tc->data_len) {
DEG_id_tag_update(tc->obedit->data, 0);
}
@@ -770,8 +767,7 @@ static void recalcData_objects(TransInfo *t)
applyProject(t);
}
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
Curve *cu = tc->obedit->data;
ListBase *nurbs = BKE_curve_editNurbs_get(cu);
Nurb *nu = nurbs->first;
@@ -801,8 +797,7 @@ static void recalcData_objects(TransInfo *t)
applyProject(t);
}
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
Lattice *la = tc->obedit->data;
DEG_id_tag_update(tc->obedit->data, 0); /* sets recalc flags */
if (la->editlatt->latt->flag & LT_OUTSIDE) {
@@ -828,8 +823,7 @@ static void recalcData_objects(TransInfo *t)
projectVertSlideData(t, false);
}
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
DEG_id_tag_update(tc->obedit->data, 0); /* sets recalc flags */
BMEditMesh *em = BKE_editmesh_from_object(tc->obedit);
EDBM_mesh_normals_update(em);
@@ -842,8 +836,7 @@ static void recalcData_objects(TransInfo *t)
applyProject(t);
}
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
bArmature *arm = tc->obedit->data;
ListBase *edbo = arm->edbo;
EditBone *ebo, *ebo_parent;
@@ -938,8 +931,7 @@ static void recalcData_objects(TransInfo *t)
if (t->state != TRANS_CANCEL) {
applyProject(t);
}
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
if (tc->data_len) {
DEG_id_tag_update(tc->obedit->data, 0); /* sets recalc flags */
}
@@ -949,8 +941,7 @@ static void recalcData_objects(TransInfo *t)
else if (t->flag & T_POSE) {
GSet *motionpath_updates = BLI_gset_ptr_new("motionpath updates");
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
Object *ob = tc->poseobj;
bArmature *arm = ob->data;
@@ -1008,8 +999,7 @@ static void recalcData_objects(TransInfo *t)
applyProject(t);
}
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (int i = 0; i < tc->data_len; i++, td++) {
@@ -1726,8 +1716,7 @@ static void freeTransCustomDataContainer(TransInfo *t,
void freeTransCustomDataForMode(TransInfo *t)
{
freeTransCustomData(t, NULL, &t->custom.mode);
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
freeTransCustomData(t, tc, &tc->custom.mode);
}
}
@@ -1750,15 +1739,13 @@ void postTrans(bContext *C, TransInfo *t)
/* Free all custom-data */
freeTransCustomDataContainer(t, NULL, &t->custom);
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
freeTransCustomDataContainer(t, tc, &tc->custom);
}
/* postTrans can be called when nothing is selected, so data is NULL already */
if (t->data_len_all != 0) {
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
/* free data malloced per trans-data */
if (ELEM(t->obedit_type, OB_CURVE, OB_SURF) || (t->spacetype == SPACE_GRAPH)) {
TransData *td = tc->data;
@@ -1864,8 +1851,7 @@ static void restoreElement(TransData *td)
void restoreTransObjects(TransInfo *t)
{
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td;
TransData2D *td2d;
@@ -1901,8 +1887,7 @@ void calculateCenterLocal(TransInfo *t, const float center_global[3])
{
/* setting constraint center */
/* note, init functions may over-ride t->center */
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
if (tc->use_local_mat) {
mul_v3_m4v3(tc->center_local, tc->imat, center_global);
}
@@ -1994,8 +1979,7 @@ void calculateCenterMedian(TransInfo *t, float r_center[3])
float partial[3] = {0.0f, 0.0f, 0.0f};
int total = 0;
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
for (int i = 0; i < tc->data_len; i++) {
if (tc->data[i].flag & TD_SELECTED) {
if (!(tc->data[i].flag & TD_NOCENTER)) {
@@ -2023,8 +2007,7 @@ void calculateCenterBound(TransInfo *t, float r_center[3])
float max[3], min[3];
bool changed = false;
INIT_MINMAX(min, max);
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
for (int i = 0; i < tc->data_len; i++) {
if (tc->data[i].flag & TD_SELECTED) {
if (!(tc->data[i].flag & TD_NOCENTER)) {
@@ -2213,8 +2196,7 @@ void calculatePropRatio(TransInfo *t)
if (t->flag & T_PROP_EDIT) {
const char *pet_id = NULL;
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++) {
if (td->flag & TD_SELECTED) {
@@ -2325,8 +2307,7 @@ void calculatePropRatio(TransInfo *t)
}
}
else {
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++) {
td->factor = 1.0;
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index d8e80265bec..da32908363a 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -289,8 +289,7 @@ void applyProject(TransInfo *t)
float tvec[3];
int i;
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++) {
float iloc[3], loc[3], no[3];
@@ -391,8 +390,7 @@ void applyGridAbsolute(TransInfo *t)
if (grid_size == 0.0f)
return;
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td;
for (i = 0, td = tc->data; i < tc->data_len; i++, td++) {
@@ -1124,8 +1122,7 @@ static void TargetSnapMedian(TransInfo *t)
t->tsnap.snapTarget[1] = 0;
t->tsnap.snapTarget[2] = 0;
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
int i;
float v[3];
@@ -1161,8 +1158,7 @@ static void TargetSnapClosest(TransInfo *t)
/* Object mode */
if (t->flag & T_OBJECT) {
int i;
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (td = tc->data, i = 0; i < tc->data_len && td->flag & TD_SELECTED; i++, td++) {
struct BoundBox *bb = BKE_object_boundbox_get(td->ob);
@@ -1207,8 +1203,7 @@ static void TargetSnapClosest(TransInfo *t)
}
}
else {
- FOREACH_TRANS_DATA_CONTAINER(t, tc)
- {
+ FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
int i;
for (i = 0; i < tc->data_len && td->flag & TD_SELECTED; i++, td++) {
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index d1e63ad2986..f6182fa4318 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -756,8 +756,7 @@ bool uv_find_nearest_edge(
if (!uvedit_face_visible_test(scene, obedit, ima, efa)) {
continue;
}
- BM_ITER_ELEM_INDEX(l, &liter, efa, BM_LOOPS_OF_FACE, i)
- {
+ BM_ITER_ELEM_INDEX (l, &liter, efa, BM_LOOPS_OF_FACE, i) {
luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset);
luv_next = BM_ELEM_CD_GET_VOID_P(l->next, cd_loop_uv_offset);
@@ -901,8 +900,7 @@ bool uv_find_nearest_vert(Scene *scene,
BMIter liter;
BMLoop *l;
int i;
- BM_ITER_ELEM_INDEX(l, &liter, efa, BM_LOOPS_OF_FACE, i)
- {
+ BM_ITER_ELEM_INDEX (l, &liter, efa, BM_LOOPS_OF_FACE, i) {
float dist_test_sq;
MLoopUV *luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset);
if (penalty_dist != 0.0f && uvedit_uv_select_test(scene, l, cd_loop_uv_offset)) {
@@ -1306,8 +1304,7 @@ static void uv_select_linked_multi(Scene *scene,
efa = BM_face_at_index(em->bm, a);
- BM_ITER_ELEM_INDEX(l, &liter, efa, BM_LOOPS_OF_FACE, i)
- {
+ BM_ITER_ELEM_INDEX (l, &liter, efa, BM_LOOPS_OF_FACE, i) {
/* make_uv_vert_map_EM sets verts tmp.l to the indices */
vlist = BM_uv_vert_map_at_index(vmap, BM_elem_index_get(l->v));
@@ -2513,8 +2510,7 @@ static int uv_mouse_select_multi(
hitv = BLI_array_alloca(hitv, hit.efa->len);
hituv = BLI_array_alloca(hituv, hit.efa->len);
- BM_ITER_ELEM_INDEX(l, &liter, hit.efa, BM_LOOPS_OF_FACE, i)
- {
+ BM_ITER_ELEM_INDEX (l, &liter, hit.efa, BM_LOOPS_OF_FACE, i) {
luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset);
hituv[i] = luv->uv;
hitv[i] = BM_elem_index_get(l->v);
diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c
index 71a3fdf055e..54fe4188470 100644
--- a/source/blender/editors/uvedit/uvedit_smart_stitch.c
+++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c
@@ -1248,8 +1248,7 @@ static int stitch_process_data(StitchStateContainer *ssc,
int face_preview_pos = preview_position[index].data_position;
if (face_preview_pos != STITCH_NO_PREVIEW) {
preview->uvs_per_polygon[preview_position[index].polycount_position] = efa->len;
- BM_ITER_ELEM_INDEX(l, &liter, efa, BM_LOOPS_OF_FACE, i)
- {
+ BM_ITER_ELEM_INDEX (l, &liter, efa, BM_LOOPS_OF_FACE, i) {
luv = CustomData_bmesh_get(&bm->ldata, l->head.data, CD_MLOOPUV);
copy_v2_v2(preview->preview_polys + face_preview_pos + i * 2, luv->uv);
}
@@ -1260,8 +1259,7 @@ static int stitch_process_data(StitchStateContainer *ssc,
BMLoop *fl = BM_FACE_FIRST_LOOP(efa);
MLoopUV *fuv = CustomData_bmesh_get(&bm->ldata, fl->head.data, CD_MLOOPUV);
- BM_ITER_ELEM_INDEX(l, &liter, efa, BM_LOOPS_OF_FACE, i)
- {
+ BM_ITER_ELEM_INDEX (l, &liter, efa, BM_LOOPS_OF_FACE, i) {
if (i < numoftris) {
/* using next since the first uv is already accounted for */
BMLoop *lnext = l->next;
@@ -2143,8 +2141,7 @@ static StitchState *stitch_init(bContext *C,
"uv_stitch_selection_stack");
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
- BM_ITER_ELEM_INDEX(l, &liter, efa, BM_LOOPS_OF_FACE, i)
- {
+ BM_ITER_ELEM_INDEX (l, &liter, efa, BM_LOOPS_OF_FACE, i) {
if (uvedit_uv_select_test(scene, l, cd_loop_uv_offset)) {
UvElement *element = BM_uv_element_get(state->element_map, efa, l);
if (element) {
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index 0caa478ffa9..cf0a6adbfc5 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -251,8 +251,7 @@ static void construct_param_handle_face_add(
/* let parametrizer split the ngon, it can make better decisions
* about which split is best for unwrapping than scanfill */
- BM_ITER_ELEM_INDEX(l, &liter, efa, BM_LOOPS_OF_FACE, i)
- {
+ BM_ITER_ELEM_INDEX (l, &liter, efa, BM_LOOPS_OF_FACE, i) {
MLoopUV *luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset);
vkeys[i] = (ParamKey)BM_elem_index_get(l->v);
@@ -1992,8 +1991,7 @@ static void uv_map_mirror(BMEditMesh *em, BMFace *efa)
const int cd_loop_uv_offset = CustomData_get_offset(&em->bm->ldata, CD_MLOOPUV);
- BM_ITER_ELEM_INDEX(l, &liter, efa, BM_LOOPS_OF_FACE, i)
- {
+ BM_ITER_ELEM_INDEX (l, &liter, efa, BM_LOOPS_OF_FACE, i) {
luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset);
uvs[i] = luv->uv;
}