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:
authorCampbell Barton <ideasman42@gmail.com>2012-04-28 19:14:16 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-04-28 19:14:16 +0400
commitef054e165cad35715a5b2388aac3db68a65ea275 (patch)
tree0726e9c5a28962839a8d36ba4647f0b76fff7ad2 /source/blender/editors
parent887d1533f81b0ee89975efd8162a011b99c976af (diff)
style cleanup: format 'for' loop macros the same as for loops, some renaming to BLI_array macros.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/animation/keyframing.c3
-rw-r--r--source/blender/editors/armature/editarmature.c36
-rw-r--r--source/blender/editors/armature/editarmature_retarget.c2
-rw-r--r--source/blender/editors/armature/poseUtils.c6
-rw-r--r--source/blender/editors/armature/poseobject.c57
-rw-r--r--source/blender/editors/curve/editcurve.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c2
-rw-r--r--source/blender/editors/interface/interface_handlers.c2
-rw-r--r--source/blender/editors/interface/interface_layout.c4
-rw-r--r--source/blender/editors/interface/interface_templates.c8
-rw-r--r--source/blender/editors/interface/interface_utils.c2
-rw-r--r--source/blender/editors/mesh/editmesh_loopcut.c4
-rw-r--r--source/blender/editors/mesh/editmesh_rip.c4
-rw-r--r--source/blender/editors/mesh/editmesh_select.c4
-rw-r--r--source/blender/editors/mesh/editmesh_slide.c2
-rw-r--r--source/blender/editors/mesh/mesh_navmesh.c2
-rw-r--r--source/blender/editors/mesh/meshtools.c13
-rw-r--r--source/blender/editors/object/object_add.c12
-rw-r--r--source/blender/editors/object/object_bake.c8
-rw-r--r--source/blender/editors/object/object_constraint.c21
-rw-r--r--source/blender/editors/object/object_edit.c25
-rw-r--r--source/blender/editors/object/object_group.c8
-rw-r--r--source/blender/editors/object/object_hook.c3
-rw-r--r--source/blender/editors/object/object_modifier.c2
-rw-r--r--source/blender/editors/object/object_relations.c41
-rw-r--r--source/blender/editors/object/object_select.c45
-rw-r--r--source/blender/editors/object/object_transform.c27
-rw-r--r--source/blender/editors/object/object_vgroup.c3
-rw-r--r--source/blender/editors/physics/particle_edit.c2
-rw-r--r--source/blender/editors/render/render_shading.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c2
-rw-r--r--source/blender/editors/sound/sound_ops.c2
-rw-r--r--source/blender/editors/space_logic/logic_buttons.c2
-rw-r--r--source/blender/editors/space_node/node_edit.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_add.c7
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c20
-rw-r--r--source/blender/editors/space_sequencer/sequencer_select.c24
-rw-r--r--source/blender/editors/space_time/space_time.c3
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c10
-rw-r--r--source/blender/editors/space_view3d/view3d_snap.c6
-rw-r--r--source/blender/editors/transform/transform_conversions.c5
-rw-r--r--source/blender/editors/uvedit/uvedit_draw.c20
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c12
-rw-r--r--source/blender/editors/uvedit/uvedit_smart_stitch.c2
45 files changed, 209 insertions, 262 deletions
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index 47972ca2c6f..dcaa4073bae 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -1353,8 +1353,7 @@ static int delete_key_v3d_exec (bContext *C, wmOperator *op)
float cfra= (float)CFRA; // XXX for now, don't bother about all the yucky offset crap
// XXX more comprehensive tests will be needed
- CTX_DATA_BEGIN(C, Object*, ob, selected_objects)
- {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_objects) {
ID *id= (ID *)ob;
FCurve *fcu, *fcn;
short success= 0;
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index c529ad66d73..cd698bbf09f 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -755,8 +755,7 @@ static int pose_visual_transform_apply_exec (bContext *C, wmOperator *UNUSED(op)
*
* TODO, loop over children before parents if multiple bones
* at once are to be predictable*/
- CTX_DATA_BEGIN(C, bPoseChannel *, pchan, selected_pose_bones)
- {
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones) {
float delta_mat[4][4];
/* chan_mat already contains the delta transform from rest pose to pose-mode pose
@@ -922,7 +921,7 @@ int join_armature_exec(bContext *C, wmOperator *UNUSED(op))
pose= ob->pose;
ob->mode &= ~OB_MODE_POSE;
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, selected_editable_bases) {
if ((base->object->type==OB_ARMATURE) && (base->object!=ob)) {
bArmature *curarm= base->object->data;
@@ -1193,7 +1192,7 @@ static int separate_armature_exec (bContext *C, wmOperator *UNUSED(op))
/* 1) only edit-base selected */
// TODO: use context iterators for this?
- CTX_DATA_BEGIN(C, Base *, base, visible_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, visible_bases) {
if (base->object==obedit) base->flag |= 1;
else base->flag &= ~1;
}
@@ -2816,8 +2815,7 @@ static int armature_fill_bones_exec (bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* loop over all bones, and only consider if visible */
- CTX_DATA_BEGIN(C, EditBone *, ebone, visible_bones)
- {
+ CTX_DATA_BEGIN (C, EditBone *, ebone, visible_bones) {
if (!(ebone->flag & BONE_CONNECTED) && (ebone->flag & BONE_ROOTSEL))
fill_add_joint(ebone, 0, &points);
if (ebone->flag & BONE_TIPSEL)
@@ -3530,8 +3528,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(C, EditBone *, ebone, selected_editable_bones)
- {
+ CTX_DATA_BEGIN (C, EditBone *, ebone, selected_editable_bones) {
for (i=numcuts+1; i>1; i--) {
/* compute cut ratio first */
float cutratio= 1.0f / (float)i;
@@ -3819,7 +3816,7 @@ static int armature_parent_set_exec(bContext *C, wmOperator *op)
*/
/* parent selected bones to the active one */
- CTX_DATA_BEGIN(C, EditBone *, ebone, selected_editable_bones) {
+ CTX_DATA_BEGIN (C, EditBone *, ebone, selected_editable_bones) {
if (ELEM(ebone, actbone, actmirb) == 0) {
if (ebone->flag & BONE_SELECTED)
bone_connect_to_new_parent(arm->edbo, ebone, actbone, val);
@@ -3844,7 +3841,7 @@ static int armature_parent_set_invoke(bContext *C, wmOperator *UNUSED(op), wmEve
uiLayout *layout= uiPupMenuLayout(pup);
int allchildbones = 0;
- CTX_DATA_BEGIN(C, EditBone *, ebone, selected_editable_bones) {
+ CTX_DATA_BEGIN (C, EditBone *, ebone, selected_editable_bones) {
if (ebone != actbone) {
if (ebone->parent != actbone) allchildbones= 1;
}
@@ -3903,7 +3900,7 @@ static int armature_parent_clear_exec(bContext *C, wmOperator *op)
bArmature *arm= (bArmature *)ob->data;
int val = RNA_enum_get(op->ptr, "type");
- CTX_DATA_BEGIN(C, EditBone *, ebone, selected_editable_bones) {
+ CTX_DATA_BEGIN (C, EditBone *, ebone, selected_editable_bones) {
editbone_clear_parent(ebone, val);
}
CTX_DATA_END;
@@ -3939,7 +3936,7 @@ void ARMATURE_OT_parent_clear(wmOperatorType *ot)
static int armature_select_inverse_exec(bContext *C, wmOperator *UNUSED(op))
{
/* Set the flags */
- CTX_DATA_BEGIN(C, EditBone *, ebone, visible_bones) {
+ CTX_DATA_BEGIN (C, EditBone *, ebone, visible_bones) {
/* ignore bone if selection can't change */
if ((ebone->flag & BONE_UNSELECTABLE) == 0) {
/* select bone */
@@ -3981,7 +3978,7 @@ static int armature_de_select_all_exec(bContext *C, wmOperator *op)
}
/* Set the flags */
- CTX_DATA_BEGIN(C, EditBone *, ebone, visible_bones) {
+ CTX_DATA_BEGIN (C, EditBone *, ebone, visible_bones) {
/* ignore bone if selection can't change */
if ((ebone->flag & BONE_UNSELECTABLE) == 0) {
switch (action) {
@@ -4215,7 +4212,7 @@ static int armature_align_bones_exec(bContext *C, wmOperator *op)
*/
/* align selected bones to the active one */
- CTX_DATA_BEGIN(C, EditBone *, ebone, selected_editable_bones) {
+ CTX_DATA_BEGIN (C, EditBone *, ebone, selected_editable_bones) {
if (ELEM(ebone, actbone, actmirb) == 0) {
if (ebone->flag & BONE_SELECTED)
bone_align_to_bone(arm->edbo, ebone, actbone);
@@ -4904,8 +4901,7 @@ static int pose_clear_transform_generic_exec(bContext *C, wmOperator *op,
}
/* only clear relevant transforms for selected bones */
- CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
- {
+ CTX_DATA_BEGIN (C, bPoseChannel*, pchan, selected_pose_bones) {
/* run provided clearing function */
clear_func(pchan);
@@ -5046,7 +5042,7 @@ static int pose_de_select_all_exec(bContext *C, wmOperator *op)
}
/* Set the flags */
- CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pose_bones) {
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, visible_pose_bones) {
/* select pchan only if selectable, but deselect works always */
switch (action) {
case SEL_SELECT:
@@ -5435,8 +5431,7 @@ static int armature_flip_names_exec (bContext *C, wmOperator *UNUSED(op))
arm= ob->data;
/* loop through selected bones, auto-naming them */
- CTX_DATA_BEGIN(C, EditBone *, ebone, selected_editable_bones)
- {
+ CTX_DATA_BEGIN (C, EditBone *, ebone, selected_editable_bones) {
flip_side_name(newname, ebone->name, TRUE); // 1 = do strip off number extensions
ED_armature_bone_rename(arm, ebone->name, newname);
}
@@ -5480,8 +5475,7 @@ static int armature_autoside_names_exec (bContext *C, wmOperator *op)
arm= ob->data;
/* loop through selected bones, auto-naming them */
- CTX_DATA_BEGIN(C, EditBone *, ebone, selected_editable_bones)
- {
+ CTX_DATA_BEGIN (C, EditBone *, ebone, selected_editable_bones) {
BLI_strncpy(newname, ebone->name, sizeof(newname));
if (bone_autoside_name(newname, 1, axis, ebone->head[axis], ebone->tail[axis]))
ED_armature_bone_rename(arm, ebone->name, newname);
diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c
index 7e4d76cb794..77b035024a9 100644
--- a/source/blender/editors/armature/editarmature_retarget.c
+++ b/source/blender/editors/armature/editarmature_retarget.c
@@ -2555,7 +2555,7 @@ void BIF_retargetArmature(bContext *C)
printf("Reeb Graph created\n");
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, selected_editable_bases) {
Object *ob = base->object;
if (ob->type==OB_ARMATURE) {
diff --git a/source/blender/editors/armature/poseUtils.c b/source/blender/editors/armature/poseUtils.c
index 1a9ff73e5dc..88d219137f7 100644
--- a/source/blender/editors/armature/poseUtils.c
+++ b/source/blender/editors/armature/poseUtils.c
@@ -131,8 +131,7 @@ void poseAnim_mapping_get (bContext *C, ListBase *pfLinks, Object *ob, bAction *
/* for each Pose-Channel which gets affected, get the F-Curves for that channel
* and set the relevant transform flags...
*/
- CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
- {
+ CTX_DATA_BEGIN (C, bPoseChannel*, pchan, selected_pose_bones) {
fcurves_to_pchan_links_get(pfLinks, ob, act, pchan);
}
CTX_DATA_END;
@@ -141,8 +140,7 @@ void poseAnim_mapping_get (bContext *C, ListBase *pfLinks, Object *ob, bAction *
* i.e. if nothing selected, do whole pose
*/
if (pfLinks->first == NULL) {
- CTX_DATA_BEGIN(C, bPoseChannel*, pchan, visible_pose_bones)
- {
+ CTX_DATA_BEGIN (C, bPoseChannel*, pchan, visible_pose_bones) {
fcurves_to_pchan_links_get(pfLinks, ob, act, pchan);
}
CTX_DATA_END;
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index 043383d79a3..f54cdb330e3 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -216,8 +216,7 @@ static int pose_calculate_paths_exec (bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* set up path data for bones being calculated */
- CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
- {
+ CTX_DATA_BEGIN (C, bPoseChannel*, pchan, selected_pose_bones) {
/* verify makes sure that the selected bone has a bone with the appropriate settings */
animviz_verify_motionpaths(op->reports, scene, ob, pchan);
}
@@ -324,8 +323,7 @@ static int pose_select_constraint_target_exec(bContext *C, wmOperator *UNUSED(op
bConstraint *con;
int found= 0;
- CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pose_bones)
- {
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, visible_pose_bones) {
if (pchan->bone->flag & BONE_SELECTED) {
for (con= pchan->constraints.first; con; con= con->next) {
bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
@@ -387,8 +385,7 @@ static int pose_select_hierarchy_exec(bContext *C, wmOperator *op)
int add_to_sel = RNA_boolean_get(op->ptr, "extend");
int found= 0;
- CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pose_bones)
- {
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, visible_pose_bones) {
curbone= pchan->bone;
if ((curbone->flag & BONE_UNSELECTABLE)==0) {
@@ -505,8 +502,7 @@ static short pose_select_same_group (bContext *C, Object *ob, short extend)
*/
group_flags= MEM_callocN(numGroups+1, "pose_select_same_group");
- CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pose_bones)
- {
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, visible_pose_bones) {
/* keep track of group as group to use later? */
if (pchan->bone->flag & BONE_SELECTED) {
group_flags[pchan->agrp_index] = 1;
@@ -522,8 +518,7 @@ static short pose_select_same_group (bContext *C, Object *ob, short extend)
/* small optimization: only loop through bones a second time if there are any groups tagged */
if (tagged) {
/* only if group matches (and is not selected or current bone) */
- CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pose_bones)
- {
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, visible_pose_bones) {
if ((pchan->bone->flag & BONE_UNSELECTABLE)==0) {
/* check if the group used by this bone is counted */
if (group_flags[pchan->agrp_index]) {
@@ -552,8 +547,7 @@ static short pose_select_same_layer (bContext *C, Object *ob, short extend)
return 0;
/* figure out what bones are selected */
- CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pose_bones)
- {
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, visible_pose_bones) {
/* keep track of layers to use later? */
if (pchan->bone->flag & BONE_SELECTED)
layers |= pchan->bone->layer;
@@ -567,8 +561,7 @@ static short pose_select_same_layer (bContext *C, Object *ob, short extend)
return 0;
/* select bones that are on same layers as layers flag */
- CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pose_bones)
- {
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, visible_pose_bones) {
/* if bone is on a suitable layer, and the bone can have its selection changed, select it */
if ((layers & pchan->bone->layer) && (pchan->bone->flag & BONE_UNSELECTABLE)==0) {
pchan->bone->flag |= BONE_SELECTED;
@@ -598,8 +591,7 @@ static int pose_select_same_keyingset(bContext *C, Object *ob, short extend)
/* if not extending selection, deselect all selected first */
if (extend == 0) {
- CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pose_bones)
- {
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, visible_pose_bones) {
if ((pchan->bone->flag & BONE_UNSELECTABLE)==0)
pchan->bone->flag &= ~BONE_SELECTED;
}
@@ -1403,8 +1395,7 @@ static int pose_group_assign_exec (bContext *C, wmOperator *op)
pose_add_group(ob);
/* add selected bones to group then */
- CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
- {
+ CTX_DATA_BEGIN (C, bPoseChannel*, pchan, selected_pose_bones) {
pchan->agrp_index= pose->active_group;
done= 1;
}
@@ -1457,8 +1448,7 @@ static int pose_group_unassign_exec (bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
/* find selected bones to remove from all bone groups */
- CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
- {
+ CTX_DATA_BEGIN (C, bPoseChannel*, pchan, selected_pose_bones) {
if (pchan->agrp_index) {
pchan->agrp_index= 0;
done= 1;
@@ -1660,8 +1650,7 @@ static void pose_group_select(bContext *C, Object *ob, int select)
{
bPose *pose= ob->pose;
- CTX_DATA_BEGIN(C, bPoseChannel*, pchan, visible_pose_bones)
- {
+ CTX_DATA_BEGIN (C, bPoseChannel*, pchan, visible_pose_bones) {
if ((pchan->bone->flag & BONE_UNSELECTABLE)==0) {
if (select) {
if (pchan->agrp_index == pose->active_group)
@@ -1765,8 +1754,7 @@ static int pose_flip_names_exec (bContext *C, wmOperator *UNUSED(op))
arm= ob->data;
/* loop through selected bones, auto-naming them */
- CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
- {
+ CTX_DATA_BEGIN (C, bPoseChannel*, pchan, selected_pose_bones) {
char newname[MAXBONENAME];
flip_side_name(newname, pchan->name, TRUE);
ED_armature_bone_rename(arm, pchan->name, newname);
@@ -1812,8 +1800,7 @@ static int pose_autoside_names_exec (bContext *C, wmOperator *op)
arm= ob->data;
/* loop through selected bones, auto-naming them */
- CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
- {
+ CTX_DATA_BEGIN (C, bPoseChannel*, pchan, selected_pose_bones) {
BLI_strncpy(newname, pchan->name, sizeof(newname));
if (bone_autoside_name(newname, 1, axis, pchan->bone->head[axis], pchan->bone->tail[axis]))
ED_armature_bone_rename(arm, pchan->name, newname);
@@ -1862,8 +1849,7 @@ static int pose_bone_rotmode_exec (bContext *C, wmOperator *op)
int mode = RNA_enum_get(op->ptr, "type");
/* set rotation mode of selected bones */
- CTX_DATA_BEGIN(C, bPoseChannel *, pchan, selected_pose_bones)
- {
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones) {
pchan->rotmode = mode;
}
CTX_DATA_END;
@@ -2046,8 +2032,7 @@ static int pose_bone_layers_invoke (bContext *C, wmOperator *op, wmEvent *evt)
int layers[32]= {0}; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
/* get layers that are active already */
- CTX_DATA_BEGIN(C, bPoseChannel *, pchan, selected_pose_bones)
- {
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones) {
short bit;
/* loop over the bits for this pchan's layers, adding layers where they're needed */
@@ -2080,8 +2065,7 @@ static int pose_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(C, bPoseChannel *, pchan, selected_pose_bones)
- {
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones) {
/* 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);
@@ -2121,8 +2105,7 @@ static int armature_bone_layers_invoke (bContext *C, wmOperator *op, wmEvent *ev
int layers[32]= {0}; /* hardcoded for now - we can only have 32 armature layers, so this should be fine... */
/* get layers that are active already */
- CTX_DATA_BEGIN(C, EditBone *, ebone, selected_editable_bones)
- {
+ CTX_DATA_BEGIN (C, EditBone *, ebone, selected_editable_bones) {
short bit;
/* loop over the bits for this pchan's layers, adding layers where they're needed */
@@ -2152,8 +2135,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(C, EditBone *, ebone, selected_editable_bones)
- {
+ CTX_DATA_BEGIN (C, EditBone *, ebone, selected_editable_bones) {
/* 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);
@@ -2195,8 +2177,7 @@ static int pose_flip_quats_exec (bContext *C, wmOperator *UNUSED(op))
KeyingSet *ks = ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_LOC_ROT_SCALE_ID);
/* loop through all selected pchans, flipping and keying (as needed) */
- CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
- {
+ CTX_DATA_BEGIN (C, bPoseChannel*, pchan, selected_pose_bones) {
/* only if bone is using quaternion rotation */
if (pchan->rotmode == ROT_MODE_QUAT) {
/* quaternions have 720 degree range */
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 0b21e514f0e..d339af39b22 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -6071,7 +6071,7 @@ int join_curve_exec(bContext *C, wmOperator *UNUSED(op))
/* trasnform all selected curves inverse in obact */
invert_m4_m4(imat, ob->obmat);
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, selected_editable_bases) {
if (base->object->type==ob->type) {
if (base->object != ob) {
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index c366de6fa43..303ca89b168 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -1611,7 +1611,7 @@ static int gpencil_draw_exec (bContext *C, wmOperator *op)
/* loop over the stroke RNA elements recorded (i.e. progress of mouse movement),
* setting the relevant values in context at each step, then applying
*/
- RNA_BEGIN(op->ptr, itemptr, "stroke") {
+ RNA_BEGIN (op->ptr, itemptr, "stroke") {
float mousef[2];
//printf("\t\tGP - stroke elem\n");
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index e64446be84b..42005c0888c 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -781,7 +781,7 @@ static void ui_add_smart_controller(bContext *C, uiBut *from, uiBut *to)
act_to = (bActuator *)(to->poin);
/* (1) get the object */
- CTX_DATA_BEGIN(C, Object *, ob_iter, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object *, ob_iter, selected_editable_objects) {
for (sens_iter = ob_iter->sensors.first; sens_iter; sens_iter = sens_iter->next) {
if (&(sens_iter->links) == sens_from_links) {
ob = ob_iter;
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 67e295503c2..31bc9497ab5 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -1265,7 +1265,7 @@ static void rna_search_cb(const struct bContext *C, void *arg_but, const char *s
const int skip_filter = !but->changed;
/* build a temporary list of relevant items first */
- RNA_PROP_BEGIN(&but->rnasearchpoin, itemptr, but->rnasearchprop) {
+ RNA_PROP_BEGIN (&but->rnasearchpoin, itemptr, but->rnasearchprop) {
if (flag & PROP_ID_SELF_CHECK)
if (itemptr.data == but->rnapoin.id.data)
continue;
@@ -1333,7 +1333,7 @@ static void search_id_collection(StructRNA *ptype, PointerRNA *ptr, PropertyRNA
*prop = NULL;
- RNA_STRUCT_BEGIN(ptr, iprop) {
+ RNA_STRUCT_BEGIN (ptr, iprop) {
/* if it's a collection and has same pointer type, we've got it */
if (RNA_property_type(iprop) == PROP_COLLECTION) {
srna = RNA_property_pointer_type(ptr, iprop);
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index d0f760d16fb..bafd85e9451 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -2362,7 +2362,7 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *
if (ptr->data && prop) {
/* create list items */
- RNA_PROP_BEGIN(ptr, itemptr, prop) {
+ RNA_PROP_BEGIN (ptr, itemptr, prop) {
/* create button */
if (!(i % 9))
row = uiLayoutRow(col, 0);
@@ -2384,7 +2384,7 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *
if (ptr->data && prop) {
/* create list items */
- RNA_PROP_BEGIN(ptr, itemptr, prop) {
+ RNA_PROP_BEGIN (ptr, itemptr, prop) {
found = (activei == i);
if (found) {
@@ -2446,7 +2446,7 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *
if (ptr->data && prop) {
/* create list items */
- RNA_PROP_BEGIN(ptr, itemptr, prop) {
+ RNA_PROP_BEGIN (ptr, itemptr, prop) {
if (i >= pa->list_scroll && i < pa->list_scroll + items)
list_item_row(C, col, ptr, &itemptr, i, rnaicon, activeptr, activeprop, prop_list);
@@ -2703,7 +2703,7 @@ static void template_keymap_item_properties(uiLayout *layout, const char *title,
flow = uiLayoutColumnFlow(layout, 2, 0);
- RNA_STRUCT_BEGIN(ptr, prop) {
+ RNA_STRUCT_BEGIN (ptr, prop) {
int flag = RNA_property_flag(prop);
if (flag & PROP_HIDDEN)
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c
index c903040a6b9..9220491a60c 100644
--- a/source/blender/editors/interface/interface_utils.c
+++ b/source/blender/editors/interface/interface_utils.c
@@ -139,7 +139,7 @@ int uiDefAutoButsRNA(uiLayout *layout, PointerRNA *ptr, int (*check_prop)(Pointe
assert(ELEM3(label_align, '\0', 'H', 'V'));
- RNA_STRUCT_BEGIN(ptr, prop) {
+ RNA_STRUCT_BEGIN (ptr, prop) {
flag = RNA_property_flag(prop);
if (flag & PROP_HIDDEN || (check_prop && check_prop(ptr, prop) == FALSE))
continue;
diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c
index 12174d5b9fa..beb5345ca9b 100644
--- a/source/blender/editors/mesh/editmesh_loopcut.c
+++ b/source/blender/editors/mesh/editmesh_loopcut.c
@@ -240,7 +240,7 @@ static void edgering_sel(tringselOpData *lcd, int previewlines, int select)
edgering_find_order(lasteed, eed, lastv1, v);
lastv1 = v[0][0];
- BLI_array_growitems(edges, previewlines);
+ BLI_array_grow_items(edges, previewlines);
for (i = 1; i <= previewlines; i++) {
co[0][0] = (v[0][1]->co[0] - v[0][0]->co[0]) * (i / ((float)previewlines + 1)) + v[0][0]->co[0];
@@ -265,7 +265,7 @@ static void edgering_sel(tringselOpData *lcd, int previewlines, int select)
edgering_find_order(lasteed, startedge, lastv1, v);
- BLI_array_growitems(edges, previewlines);
+ BLI_array_grow_items(edges, previewlines);
for (i = 1; i <= previewlines; i++) {
if (!v[0][0] || !v[0][1] || !v[1][0] || !v[1][1])
diff --git a/source/blender/editors/mesh/editmesh_rip.c b/source/blender/editors/mesh/editmesh_rip.c
index b5f486947b4..b490dbe49c8 100644
--- a/source/blender/editors/mesh/editmesh_rip.c
+++ b/source/blender/editors/mesh/editmesh_rip.c
@@ -263,7 +263,7 @@ static EdgeLoopPair *edbm_ripsel_looptag_helper(BMesh *bm)
uid_start = uid;
uid = uid_end + bm->totedge;
- BLI_array_growone(eloop_pairs);
+ BLI_array_grow_one(eloop_pairs);
lp = &eloop_pairs[BLI_array_count(eloop_pairs) - 1];
BM_edge_loop_pair(e_last, &lp->l_a, &lp->l_b); /* no need to check, we know this will be true */
@@ -277,7 +277,7 @@ static EdgeLoopPair *edbm_ripsel_looptag_helper(BMesh *bm)
}
/* null terminate */
- BLI_array_growone(eloop_pairs);
+ BLI_array_grow_one(eloop_pairs);
lp = &eloop_pairs[BLI_array_count(eloop_pairs) - 1];
lp->l_a = lp->l_b = NULL;
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c
index 05352938aba..0a0eb7964f6 100644
--- a/source/blender/editors/mesh/editmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -2307,7 +2307,7 @@ static int edbm_select_linked_flat_faces_exec(bContext *C, wmOperator *op)
BLI_array_empty(stack);
i = 1;
- BLI_array_growone(stack);
+ BLI_array_grow_one(stack);
stack[i - 1] = f;
while (i) {
@@ -2330,7 +2330,7 @@ static int edbm_select_linked_flat_faces_exec(bContext *C, wmOperator *op)
/* invalidate: edge too sharp */
if (angle < sharp) {
- BLI_array_growone(stack);
+ BLI_array_grow_one(stack);
stack[i] = l2->f;
i++;
}
diff --git a/source/blender/editors/mesh/editmesh_slide.c b/source/blender/editors/mesh/editmesh_slide.c
index 3cbb099a0a9..6c3af98dee9 100644
--- a/source/blender/editors/mesh/editmesh_slide.c
+++ b/source/blender/editors/mesh/editmesh_slide.c
@@ -505,7 +505,7 @@ static int vtx_slide_set_frame(VertexSlideOp *vso)
BM_ITER_ELEM_INDEX (edge, &iter, sel_vtx, BM_EDGES_OF_VERT, idx) {
curr_vert = BM_edge_other_vert(edge, sel_vtx);
if (curr_vert) {
- BLI_array_growone(vtx_frame);
+ BLI_array_grow_one(vtx_frame);
copy_v3_v3(vtx_frame[idx], curr_vert->co);
diff --git a/source/blender/editors/mesh/mesh_navmesh.c b/source/blender/editors/mesh/mesh_navmesh.c
index 71aaacb7e49..d9f35aaeedd 100644
--- a/source/blender/editors/mesh/mesh_navmesh.c
+++ b/source/blender/editors/mesh/mesh_navmesh.c
@@ -430,7 +430,7 @@ static int navmesh_create_exec(bContext *C, wmOperator *op)
LinkNode *obs = NULL;
Base *navmeshBase = NULL;
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, selected_editable_bases) {
if (base->object->type == OB_MESH) {
if (base->object->body_type == OB_BODY_TYPE_NAVMESH) {
if (!navmeshBase || base == scene->basact) {
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index b3ac3069cd9..d8e9dea598c 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -122,7 +122,7 @@ int join_mesh_exec(bContext *C, wmOperator *op)
}
/* count & check */
- CTX_DATA_BEGIN(C, Base *, base, selected_editable_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases) {
if (base->object->type == OB_MESH) {
me = base->object->data;
@@ -198,8 +198,7 @@ int join_mesh_exec(bContext *C, wmOperator *op)
}
/* first pass over objects - copying materials and vertexgroups across */
- CTX_DATA_BEGIN(C, Base *, base, selected_editable_bases)
- {
+ CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases) {
/* only act if a mesh, and not the one we're joining to */
if ((ob != base->object) && (base->object->type == OB_MESH)) {
me = base->object->data;
@@ -299,8 +298,7 @@ int join_mesh_exec(bContext *C, wmOperator *op)
/* inverse transform for all selected meshes in this object */
invert_m4_m4(imat, ob->obmat);
- CTX_DATA_BEGIN(C, Base *, base, selected_editable_bases)
- {
+ CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases) {
/* only join if this is a mesh */
if (base->object->type == OB_MESH) {
me = base->object->data;
@@ -569,7 +567,7 @@ int join_mesh_shapes_exec(bContext *C, wmOperator *op)
KeyBlock *kb;
int ok = 0, nonequal_verts = 0;
- CTX_DATA_BEGIN(C, Base *, base, selected_editable_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases) {
if (base->object == ob) continue;
if (base->object->type == OB_MESH) {
@@ -601,8 +599,7 @@ int join_mesh_shapes_exec(bContext *C, wmOperator *op)
}
/* now ready to add new keys from selected meshes */
- CTX_DATA_BEGIN(C, Base *, base, selected_editable_bases)
- {
+ CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases) {
if (base->object == ob) continue;
if (base->object->type == OB_MESH) {
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index ba527e6fa6a..082b6f6dc93 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -906,7 +906,7 @@ static int object_delete_exec(bContext *C, wmOperator *op)
if (CTX_data_edit_object(C))
return OPERATOR_CANCELLED;
- CTX_DATA_BEGIN(C, Base*, base, selected_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, selected_bases) {
/* if (base->object->type==OB_LAMP) islamp= 1; */
@@ -972,7 +972,7 @@ static void copy_object_set_idnew(bContext *C, int dupflag)
int a;
/* XXX check object pointers */
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_editable_objects) {
object_relink(ob);
}
CTX_DATA_END;
@@ -1189,7 +1189,7 @@ static int object_duplicates_make_real_exec(bContext *C, wmOperator *op)
clear_id_newpoins();
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, selected_editable_bases) {
make_object_duplilist_real(C, scene, base, use_base_parent, use_hierarchy);
/* dependencies were changed */
@@ -1294,7 +1294,7 @@ static int convert_exec(bContext *C, wmOperator *op)
/* don't forget multiple users! */
/* reset flags */
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, selected_editable_bases) {
ob= base->object;
ob->flag &= ~OB_DONE;
@@ -1305,7 +1305,7 @@ static int convert_exec(bContext *C, wmOperator *op)
}
CTX_DATA_END;
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, selected_editable_bases) {
ob= base->object;
if (ob->flag & OB_DONE || !IS_TAGGED(ob->data)) {
@@ -1879,7 +1879,7 @@ static int duplicate_exec(bContext *C, wmOperator *op)
clear_id_newpoins();
clear_sca_new_poins(); /* sensor/contr/act */
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, selected_editable_bases) {
Base *basen= object_add_duplicate_internal(bmain, scene, base, dupflag);
/* note that this is safe to do with this context iterator,
diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c
index 8b22b4613b8..dffcaad42fd 100644
--- a/source/blender/editors/object/object_bake.c
+++ b/source/blender/editors/object/object_bake.c
@@ -922,7 +922,7 @@ static int multiresbake_check(bContext *C, wmOperator *op)
MultiresModifierData *mmd;
int ok= 1, a;
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, selected_editable_bases) {
ob= base->object;
if (ob->type != OB_MESH) {
@@ -1079,7 +1079,7 @@ static int multiresbake_image_exec_locked(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
if (scene->r.bake_flag&R_BAKE_CLEAR) { /* clear images */
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, selected_editable_bases) {
Mesh *me;
ob= base->object;
@@ -1090,7 +1090,7 @@ static int multiresbake_image_exec_locked(bContext *C, wmOperator *op)
CTX_DATA_END;
}
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, selected_editable_bases) {
MultiresBakeRender bkr= {0};
ob= base->object;
@@ -1139,7 +1139,7 @@ static void init_multiresbake_job(bContext *C, MultiresBakeJob *bkj)
bkj->use_lores_mesh= scene->r.bake_flag&R_BAKE_LORES_MESH;
bkj->bake_clear= scene->r.bake_flag&R_BAKE_CLEAR;
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, selected_editable_bases) {
MultiresBakerJobData *data;
DerivedMesh *lores_dm;
int lvl;
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index ec3567454df..158d323b802 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -1150,8 +1150,7 @@ static int pose_constraints_clear_exec(bContext *C, wmOperator *UNUSED(op))
Object *ob= object_pose_armature_get(CTX_data_active_object(C));
/* free constraints for all selected bones */
- CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
- {
+ CTX_DATA_BEGIN (C, bPoseChannel*, pchan, selected_pose_bones) {
free_constraints(&pchan->constraints);
pchan->constflag &= ~(PCHAN_HAS_IK|PCHAN_HAS_SPLINEIK|PCHAN_HAS_CONST);
}
@@ -1188,8 +1187,7 @@ static int object_constraints_clear_exec(bContext *C, wmOperator *UNUSED(op))
Scene *scene= CTX_data_scene(C);
/* do freeing */
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects)
- {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_editable_objects) {
free_constraints(&ob->constraints);
DAG_id_tag_update(&ob->id, OB_RECALC_OB);
}
@@ -1231,8 +1229,7 @@ static int pose_constraint_copy_exec(bContext *C, wmOperator *op)
}
/* copy all constraints from active posebone to all selected posebones */
- CTX_DATA_BEGIN(C, bPoseChannel*, chan, selected_pose_bones)
- {
+ CTX_DATA_BEGIN (C, bPoseChannel*, chan, selected_pose_bones) {
/* if we're not handling the object we're copying from, copy all constraints over */
if (pchan != chan) {
copy_constraints(&chan->constraints, &pchan->constraints, TRUE);
@@ -1272,8 +1269,7 @@ static int object_constraint_copy_exec(bContext *C, wmOperator *UNUSED(op))
Object *obact = ED_object_active_context(C);
/* copy all constraints from active object to all selected objects */
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects)
- {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_editable_objects) {
/* if we're not handling the object we're copying from, copy all constraints over */
if (obact != ob) {
copy_constraints(&ob->constraints, &obact->constraints, TRUE);
@@ -1363,8 +1359,7 @@ static short get_new_constraint_target(bContext *C, int con_type, Object **tar_o
/* if the active Object is Armature, and we can search for bones, do so... */
if ((obact->type == OB_ARMATURE) && (only_ob == 0)) {
/* search in list of selected Pose-Channels for target */
- CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
- {
+ CTX_DATA_BEGIN (C, bPoseChannel*, pchan, selected_pose_bones) {
/* just use the first one that we encounter, as long as it is not the active one */
if (pchan != pchanact) {
*tar_ob= obact;
@@ -1380,8 +1375,7 @@ static short get_new_constraint_target(bContext *C, int con_type, Object **tar_o
/* if not yet found, try selected Objects... */
if (found == 0) {
/* search in selected objects context */
- CTX_DATA_BEGIN(C, Object*, ob, selected_objects)
- {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_objects) {
/* just use the first object we encounter (that isn't the active object)
* and which fulfills the criteria for the object-target that we've got
*/
@@ -1776,8 +1770,7 @@ static int pose_ik_clear_exec(bContext *C, wmOperator *UNUSED(op))
Object *ob= object_pose_armature_get(CTX_data_active_object(C));
/* only remove IK Constraints */
- CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
- {
+ CTX_DATA_BEGIN (C, bPoseChannel*, pchan, selected_pose_bones) {
bConstraint *con, *next;
// TODO: should we be checking if these contraints were local before we try and remove them?
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 69ced0c0f8a..3043900bce4 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -180,7 +180,7 @@ static int object_hide_view_set_exec(bContext *C, wmOperator *op)
short changed = 0;
const int unselected= RNA_boolean_get(op->ptr, "unselected");
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, visible_bases) {
if (!unselected) {
if (base->flag & SELECT) {
base->flag &= ~SELECT;
@@ -236,7 +236,7 @@ static int object_hide_render_clear_exec(bContext *C, wmOperator *UNUSED(op))
short changed= 0;
/* XXX need a context loop to handle such cases */
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_editable_objects) {
if (ob->restrictflag & OB_RESTRICT_RENDER) {
ob->restrictflag &= ~OB_RESTRICT_RENDER;
changed= 1;
@@ -270,7 +270,7 @@ static int object_hide_render_set_exec(bContext *C, wmOperator *op)
{
const int unselected= RNA_boolean_get(op->ptr, "unselected");
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, visible_bases) {
if (!unselected) {
if (base->flag & SELECT) {
base->object->restrictflag |= OB_RESTRICT_RENDER;
@@ -1108,8 +1108,7 @@ void ED_objects_recalculate_paths(bContext *C, Scene *scene)
ListBase targets = {NULL, NULL};
/* loop over objects in scene */
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects)
- {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_editable_objects) {
/* set flag to force recalc, then grab the relevant bones to target */
ob->avs.recalc |= ANIMVIZ_RECALC_PATHS;
animviz_get_object_motionpaths(ob, &targets);
@@ -1129,7 +1128,7 @@ static int object_calculate_paths_exec (bContext *C, wmOperator *op)
Scene *scene= CTX_data_scene(C);
/* set up path data for bones being calculated */
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects)
+ CTX_DATA_BEGIN (C, Object*, ob, selected_editable_objects)
{
/* verify makes sure that the selected bone has a bone with the appropriate settings */
animviz_verify_motionpaths(op->reports, scene, ob, NULL);
@@ -1167,7 +1166,7 @@ void OBJECT_OT_paths_calculate (wmOperatorType *ot)
void ED_objects_clear_paths(bContext *C)
{
/* loop over objects in scene */
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects)
+ CTX_DATA_BEGIN (C, Object*, ob, selected_editable_objects)
{
if (ob->mpath) {
animviz_free_motionpath(ob->mpath);
@@ -1215,7 +1214,7 @@ static int shade_smooth_exec(bContext *C, wmOperator *op)
int clear= (strcmp(op->idname, "OBJECT_OT_shade_flat") == 0);
int done= 0;
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_editable_objects) {
if (ob->type==OB_MESH) {
mesh_set_smooth_flag(ob, !clear);
@@ -1632,7 +1631,7 @@ static int game_property_copy_exec(bContext *C, wmOperator *op)
prop = BLI_findlink(&ob->prop, propid-1);
if (prop) {
- CTX_DATA_BEGIN(C, Object*, ob_iter, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object*, ob_iter, selected_editable_objects) {
if (ob != ob_iter)
set_ob_property(ob_iter, prop);
} CTX_DATA_END;
@@ -1640,7 +1639,7 @@ static int game_property_copy_exec(bContext *C, wmOperator *op)
}
else {
- CTX_DATA_BEGIN(C, Object*, ob_iter, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object*, ob_iter, selected_editable_objects) {
if (ob != ob_iter) {
if (type == COPY_PROPERTIES_REPLACE)
copy_properties(&ob_iter->prop, &ob->prop);
@@ -1679,7 +1678,7 @@ void OBJECT_OT_game_property_copy(wmOperatorType *ot)
static int game_property_clear_exec(bContext *C, wmOperator *UNUSED(op))
{
- CTX_DATA_BEGIN(C, Object*, ob_iter, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object*, ob_iter, selected_editable_objects) {
free_properties(&ob_iter->prop);
}
CTX_DATA_END;
@@ -1707,7 +1706,7 @@ static int logicbricks_copy_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob=ED_object_active_context(C);
- CTX_DATA_BEGIN(C, Object*, ob_iter, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object*, ob_iter, selected_editable_objects) {
if (ob != ob_iter) {
/* first: free all logic */
free_sensors(&ob_iter->sensors);
@@ -1763,7 +1762,7 @@ static int game_physics_copy_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob=ED_object_active_context(C);
- CTX_DATA_BEGIN(C, Object*, ob_iter, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object*, ob_iter, selected_editable_objects) {
if (ob != ob_iter) {
ob_iter->gameflag = ob->gameflag;
ob_iter->gameflag2 = ob->gameflag2;
diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/object_group.c
index 3867b1e34cb..97367b2e340 100644
--- a/source/blender/editors/object/object_group.c
+++ b/source/blender/editors/object/object_group.c
@@ -75,7 +75,7 @@ static int objects_add_active_exec(bContext *C, wmOperator *op)
for (group= bmain->group.first; group; group=group->id.next) {
if (object_in_group(ob, group)) {
/* Assign groups to selected objects */
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, selected_editable_bases) {
if (base->object->dup_group != group)
add_to_group(group, base->object, scene, base);
else
@@ -127,7 +127,7 @@ static int objects_remove_active_exec(bContext *C, wmOperator *op)
for (group= bmain->group.first; group; group=group->id.next) {
if (object_in_group(ob, group)) {
/* Assign groups to selected objects */
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, selected_editable_bases) {
rem_from_group(group, base->object, scene, base);
ok = 1;
}
@@ -164,7 +164,7 @@ static int group_objects_remove_exec(bContext *C, wmOperator *UNUSED(op))
Scene *scene= CTX_data_scene(C);
Group *group= NULL;
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, selected_editable_bases) {
group = NULL;
while ((group = find_group(base->object, group)))
rem_from_group(group, base->object, scene, base);
@@ -203,7 +203,7 @@ static int group_create_exec(bContext *C, wmOperator *op)
group= add_group(name);
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, selected_editable_bases) {
add_to_group(group, base->object, scene, base);
}
CTX_DATA_END;
diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c
index f4d8cd5ae11..495f0b40802 100644
--- a/source/blender/editors/object/object_hook.c
+++ b/source/blender/editors/object/object_hook.c
@@ -483,8 +483,7 @@ static int object_add_hook_selob_exec(bContext *C, wmOperator *op)
Object *obedit = CTX_data_edit_object(C);
Object *obsel=NULL;
- CTX_DATA_BEGIN(C, Object*, ob, selected_objects)
- {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_objects) {
if (ob != obedit) {
obsel = ob;
break;
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index 445047ac321..6eb1ad3a13d 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -1119,7 +1119,7 @@ static int multires_reshape_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- CTX_DATA_BEGIN(C, Object*, selob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object*, selob, selected_editable_objects) {
if (selob->type == OB_MESH && selob != ob) {
secondob= selob;
break;
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 40e852ebf7c..624d6e52926 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -211,7 +211,7 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_editable_objects) {
if (ob != obedit) {
ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
par= obedit->parent;
@@ -428,8 +428,7 @@ void ED_object_parent_clear(bContext *C, int type)
Main *bmain= CTX_data_main(C);
Scene *scene= CTX_data_scene(C);
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects)
- {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_editable_objects) {
if (ob->parent == NULL)
continue;
@@ -674,8 +673,7 @@ static int parent_set_exec(bContext *C, wmOperator *op)
int partype= RNA_enum_get(op->ptr, "type");
int ok = 1;
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects)
- {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_editable_objects) {
if (!ED_object_parent_set(op->reports, bmain, scene, ob, par, partype)) {
ok = 0;
break;
@@ -756,7 +754,7 @@ static int parent_noinv_set_exec(bContext *C, wmOperator *op)
par->recalc |= OB_RECALC_OB;
/* context iterator */
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_editable_objects) {
if (ob != par) {
if (BKE_object_parent_loop_check(par, ob)) {
BKE_report(op->reports, RPT_ERROR, "Loop in parents");
@@ -807,7 +805,7 @@ static int object_slow_parent_clear_exec(bContext *C, wmOperator *UNUSED(op))
Main *bmain= CTX_data_main(C);
Scene *scene= CTX_data_scene(C);
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_editable_objects) {
if (ob->parent) {
if (ob->partype & PARSLOW) {
ob->partype -= PARSLOW;
@@ -849,7 +847,7 @@ static int object_slow_parent_set_exec(bContext *C, wmOperator *UNUSED(op))
Main *bmain= CTX_data_main(C);
Scene *scene= CTX_data_scene(C);
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_editable_objects) {
if (ob->parent)
ob->partype |= PARSLOW;
@@ -900,7 +898,7 @@ static int object_track_clear_exec(bContext *C, wmOperator *op)
BKE_report(op->reports, RPT_ERROR, "Operation cannot be performed in EditMode");
return OPERATOR_CANCELLED;
}
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_editable_objects) {
bConstraint *con, *pcon;
/* remove track-object for old track */
@@ -966,7 +964,7 @@ static int track_set_exec(bContext *C, wmOperator *op)
bConstraint *con;
bDampTrackConstraint *data;
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_editable_objects) {
if (ob!=obact) {
con = add_ob_constraint(ob, "AutoTrack", CONSTRAINT_TYPE_DAMPTRACK);
@@ -985,7 +983,7 @@ static int track_set_exec(bContext *C, wmOperator *op)
bConstraint *con;
bTrackToConstraint *data;
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_editable_objects) {
if (ob!=obact) {
con = add_ob_constraint(ob, "AutoTrack", CONSTRAINT_TYPE_TRACKTO);
@@ -1006,7 +1004,7 @@ static int track_set_exec(bContext *C, wmOperator *op)
bConstraint *con;
bLockTrackConstraint *data;
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_editable_objects) {
if (ob!=obact) {
con = add_ob_constraint(ob, "AutoTrack", CONSTRAINT_TYPE_LOCKTRACK);
@@ -1060,7 +1058,7 @@ static unsigned int move_to_layer_init(bContext *C, wmOperator *op)
if (!RNA_struct_property_is_set(op->ptr, "layers")) {
/* note: layers are set in bases, library objects work for this */
- CTX_DATA_BEGIN(C, Base*, base, selected_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, selected_bases) {
lay |= base->lay;
}
CTX_DATA_END;
@@ -1109,7 +1107,7 @@ static int move_to_layer_exec(bContext *C, wmOperator *op)
if (v3d && v3d->localvd) {
/* now we can move out of localview. */
/* note: layers are set in bases, library objects work for this */
- CTX_DATA_BEGIN(C, Base*, base, selected_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, selected_bases) {
lay= base->lay & ~v3d->lay;
base->lay= lay;
base->object->lay= lay;
@@ -1122,7 +1120,7 @@ static int move_to_layer_exec(bContext *C, wmOperator *op)
else {
/* normal non localview operation */
/* note: layers are set in bases, library objects work for this */
- CTX_DATA_BEGIN(C, Base*, base, selected_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, selected_bases) {
/* upper byte is used for local view */
local= base->lay & 0xFF000000;
base->lay= lay + local;
@@ -1204,8 +1202,7 @@ static int make_links_scene_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- CTX_DATA_BEGIN(C, Base*, base, selected_bases)
- {
+ CTX_DATA_BEGIN (C, Base*, base, selected_bases) {
if (!object_in_scene(base->object, scene_to)) {
Base *nbase= MEM_mallocN( sizeof(Base), "newbase");
*nbase= *base;
@@ -1265,7 +1262,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op)
ob= ED_object_active_context(C);
- CTX_DATA_BEGIN(C, Object*, obt, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object*, obt, selected_editable_objects) {
if (ob != obt) {
if (allow_make_links_data(event, ob, obt)) {
switch (event) {
@@ -1728,21 +1725,21 @@ static int make_local_exec(bContext *C, wmOperator *op)
clear_id_newpoins();
- CTX_DATA_BEGIN(C, Object*, ob, selected_objects) {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_objects) {
if (ob->id.lib)
id_make_local(&ob->id, 0);
}
CTX_DATA_END;
/* maybe object pointers */
- CTX_DATA_BEGIN(C, Object*, ob, selected_objects) {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_objects) {
if (ob->id.lib==NULL) {
ID_NEW(ob->parent);
}
}
CTX_DATA_END;
- CTX_DATA_BEGIN(C, Object*, ob, selected_objects) {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_objects) {
id= ob->data;
if (id && mode>1) {
@@ -1770,7 +1767,7 @@ static int make_local_exec(bContext *C, wmOperator *op)
CTX_DATA_END;
if (mode>1) {
- CTX_DATA_BEGIN(C, Object*, ob, selected_objects) {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_objects) {
if (ob->type==OB_LAMP) {
la= ob->data;
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index 388766f5fa3..386541c5262 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -144,13 +144,13 @@ static int object_select_by_type_exec(bContext *C, wmOperator *op)
extend= RNA_boolean_get(op->ptr, "extend");
if (extend == 0) {
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, visible_bases) {
ED_base_object_select(base, BA_DESELECT);
}
CTX_DATA_END;
}
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, visible_bases) {
if (base->object->type==obtype) {
ED_base_object_select(base, BA_SELECT);
}
@@ -218,7 +218,7 @@ static int object_select_linked_exec(bContext *C, wmOperator *op)
extend= RNA_boolean_get(op->ptr, "extend");
if (extend == 0) {
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, visible_bases) {
ED_base_object_select(base, BA_DESELECT);
}
CTX_DATA_END;
@@ -263,7 +263,7 @@ static int object_select_linked_exec(bContext *C, wmOperator *op)
else
return OPERATOR_CANCELLED;
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, visible_bases) {
if (nr==1) {
// XXX old animation system
//if (base->object->ipo==ipo) base->flag |= SELECT;
@@ -386,7 +386,7 @@ static short select_grouped_children(bContext *C, Object *ob, int recursive)
{
short changed = 0;
- CTX_DATA_BEGIN(C, Base*, base, selectable_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, selectable_bases) {
if (ob == base->object->parent) {
if (!(base->flag & SELECT)) {
ED_base_object_select(base, BA_SELECT);
@@ -444,7 +444,7 @@ static short select_grouped_group(bContext *C, Object *ob) /* Select objects in
return 0;
else if (group_count == 1) {
group = ob_groups[0];
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, visible_bases) {
if (!(base->flag & SELECT) && object_in_group(base->object, group)) {
ED_base_object_select(base, BA_SELECT);
changed = 1;
@@ -498,7 +498,7 @@ static short select_grouped_siblings(bContext *C, Object *ob)
{
short changed = 0;
- CTX_DATA_BEGIN(C, Base*, base, selectable_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, selectable_bases) {
if ((base->object->parent==ob->parent) && !(base->flag & SELECT)) {
ED_base_object_select(base, BA_SELECT);
changed = 1;
@@ -512,7 +512,7 @@ static short select_grouped_type(bContext *C, Object *ob)
{
short changed = 0;
- CTX_DATA_BEGIN(C, Base*, base, selectable_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, selectable_bases) {
if ((base->object->type == ob->type) && !(base->flag & SELECT)) {
ED_base_object_select(base, BA_SELECT);
changed = 1;
@@ -526,7 +526,7 @@ static short select_grouped_layer(bContext *C, Object *ob)
{
char changed = 0;
- CTX_DATA_BEGIN(C, Base*, base, selectable_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, selectable_bases) {
if ((base->lay & ob->lay) && !(base->flag & SELECT)) {
ED_base_object_select(base, BA_SELECT);
changed = 1;
@@ -540,7 +540,7 @@ static short select_grouped_index_object(bContext *C, Object *ob)
{
char changed = 0;
- CTX_DATA_BEGIN(C, Base*, base, selectable_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, selectable_bases) {
if ((base->object->index == ob->index) && !(base->flag & SELECT)) {
ED_base_object_select(base, BA_SELECT);
changed = 1;
@@ -554,7 +554,7 @@ static short select_grouped_color(bContext *C, Object *ob)
{
char changed = 0;
- CTX_DATA_BEGIN(C, Base*, base, selectable_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, selectable_bases) {
if (!(base->flag & SELECT) && (compare_v3v3(base->object->col, ob->col, 0.005f))) {
ED_base_object_select(base, BA_SELECT);
changed = 1;
@@ -580,7 +580,7 @@ static short select_grouped_gameprops(bContext *C, Object *ob)
{
char changed = 0;
- CTX_DATA_BEGIN(C, Base*, base, selectable_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, selectable_bases) {
if (!(base->flag & SELECT) && (objects_share_gameprop(base->object, ob))) {
ED_base_object_select(base, BA_SELECT);
changed = 1;
@@ -602,8 +602,7 @@ static short select_grouped_keyingset(bContext *C, Object *UNUSED(ob))
/* select each object that Keying Set refers to */
// TODO: perhaps to be more in line with the rest of these, we should only take objects
// if the passed in object is included in this too
- CTX_DATA_BEGIN(C, Base*, base, selectable_bases)
- {
+ CTX_DATA_BEGIN (C, Base*, base, selectable_bases) {
/* only check for this object if it isn't selected already, to limit time wasted */
if ((base->flag & SELECT) == 0) {
KS_Path *ksp;
@@ -636,7 +635,7 @@ static int object_select_grouped_exec(bContext *C, wmOperator *op)
extend= RNA_boolean_get(op->ptr, "extend");
if (extend == 0) {
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, visible_bases) {
ED_base_object_select(base, BA_DESELECT);
changed = 1;
}
@@ -701,13 +700,13 @@ static int object_select_by_layer_exec(bContext *C, wmOperator *op)
layernum = RNA_int_get(op->ptr, "layers");
if (extend == 0) {
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, visible_bases) {
ED_base_object_select(base, BA_DESELECT);
}
CTX_DATA_END;
}
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, visible_bases) {
if (base->lay == (1<< (layernum -1)))
ED_base_object_select(base, BA_SELECT);
}
@@ -750,7 +749,7 @@ static int object_select_all_exec(bContext *C, wmOperator *op)
if (action == SEL_TOGGLE) {
action = SEL_SELECT;
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, visible_bases) {
if (base->flag & SELECT) {
action = SEL_DESELECT;
break;
@@ -759,7 +758,7 @@ static int object_select_all_exec(bContext *C, wmOperator *op)
CTX_DATA_END;
}
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, visible_bases) {
switch (action) {
case SEL_SELECT:
ED_base_object_select(base, BA_SELECT);
@@ -822,7 +821,7 @@ static int object_select_same_group_exec(bContext *C, wmOperator *op)
if (!group)
return OPERATOR_PASS_THROUGH;
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, visible_bases) {
if (!(base->flag & SELECT) && object_in_group(base->object, group))
ED_base_object_select(base, BA_SELECT);
}
@@ -859,7 +858,7 @@ static int object_select_mirror_exec(bContext *C, wmOperator *op)
extend= RNA_boolean_get(op->ptr, "extend");
- CTX_DATA_BEGIN(C, Base*, primbase, selected_bases) {
+ CTX_DATA_BEGIN (C, Base*, primbase, selected_bases) {
char tmpname[MAXBONENAME];
flip_side_name(tmpname, primbase->object->id.name+2, TRUE);
@@ -915,14 +914,14 @@ static int object_select_random_exec(bContext *C, wmOperator *op)
extend= RNA_boolean_get(op->ptr, "extend");
if (extend == 0) {
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, visible_bases) {
ED_base_object_select(base, BA_DESELECT);
}
CTX_DATA_END;
}
percent = RNA_float_get(op->ptr, "percent")/100.0f;
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ CTX_DATA_BEGIN (C, Base*, base, visible_bases) {
if (BLI_frand() < percent) {
ED_base_object_select(base, BA_SELECT);
}
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 55954790687..d0fc4f79817 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -227,8 +227,7 @@ static int object_clear_transform_generic_exec(bContext *C, wmOperator *op,
/* operate on selected objects only if they aren't in weight-paint mode
* (so that object-transform clearing won't be applied at same time as bone-clearing)
*/
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects)
- {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_editable_objects) {
if (!(ob->mode & OB_MODE_WEIGHT_PAINT)) {
/* run provided clearing function */
clear_func(ob);
@@ -320,8 +319,7 @@ static int object_origin_clear_exec(bContext *C, wmOperator *UNUSED(op))
float *v1, *v3;
float mat[3][3];
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects)
- {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_editable_objects) {
if (ob->parent) {
/* vectors pointed to by v1 and v3 will get modified */
v1= ob->loc;
@@ -385,7 +383,7 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
int a, change = 0;
/* first check if we can execute */
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_editable_objects) {
if (ob->type==OB_MESH) {
if (ID_REAL_USERS(ob->data) > 1) {
@@ -428,7 +426,7 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
CTX_DATA_END;
/* now execute */
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_editable_objects) {
/* calculate rotation/scale matrix */
if (apply_scale && apply_rot)
@@ -569,7 +567,7 @@ static int visual_transform_apply_exec(bContext *C, wmOperator *UNUSED(op))
Scene *scene= CTX_data_scene(C);
int change = 0;
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_editable_objects) {
where_is_object(scene, ob);
object_apply_mat4(ob, ob->obmat, TRUE, TRUE);
where_is_object(scene, ob);
@@ -711,7 +709,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
}
/* reset flags */
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_editable_objects) {
ob->flag &= ~OB_DONE;
}
CTX_DATA_END;
@@ -723,7 +721,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
((ID *)tob->dup_group)->flag &= ~LIB_DOIT;
}
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_editable_objects) {
if ((ob->flag & OB_DONE)==0) {
int do_inverse_offset = FALSE;
ob->flag |= OB_DONE;
@@ -896,11 +894,12 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
ignore_parent_tx(bmain, scene, ob);
/* other users? */
- CTX_DATA_BEGIN(C, Object*, ob_other, selected_editable_objects) {
- if ( (ob_other->flag & OB_DONE)==0 &&
- ( (ob->data && (ob->data == ob_other->data)) ||
- (ob->dup_group==ob_other->dup_group && (ob->transflag|ob_other->transflag) & OB_DUPLIGROUP) )
- ) {
+ CTX_DATA_BEGIN (C, Object*, ob_other, selected_editable_objects) {
+ if ((ob_other->flag & OB_DONE) == 0 &&
+ ((ob->data && (ob->data == ob_other->data)) ||
+ (ob->dup_group == ob_other->dup_group &&
+ (ob->transflag | ob_other->transflag) & OB_DUPLIGROUP)))
+ {
ob_other->flag |= OB_DONE;
DAG_id_tag_update(&ob_other->id, OB_RECALC_OB|OB_RECALC_DATA);
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index e74819f10bf..1ddbc86a73f 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -2713,8 +2713,7 @@ static int vertex_group_copy_to_selected_exec(bContext *C, wmOperator *op)
int change= 0;
int fail= 0;
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects)
- {
+ CTX_DATA_BEGIN (C, Object*, ob, selected_editable_objects) {
if (obact != ob) {
if (ED_vgroup_copy_array(ob, obact)) change++;
else fail++;
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index 4f8f2ea3642..131034848de 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -3671,7 +3671,7 @@ static int brush_edit_exec(bContext *C, wmOperator *op)
if (!brush_edit_init(C, op))
return OPERATOR_CANCELLED;
- RNA_BEGIN(op->ptr, itemptr, "stroke") {
+ RNA_BEGIN (op->ptr, itemptr, "stroke") {
brush_edit_apply(C, op, &itemptr);
}
RNA_END;
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index 6722ac5e686..bced6f07564 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -329,7 +329,7 @@ static int material_slot_copy_exec(bContext *C, wmOperator *UNUSED(op))
if (!ob || !(matar = give_matarar(ob)))
return OPERATOR_CANCELLED;
- CTX_DATA_BEGIN(C, Object *, ob_iter, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object *, ob_iter, selected_editable_objects) {
if (ob != ob_iter && give_matarar(ob_iter)) {
if (ob->data != ob_iter->data)
assign_matarar(ob_iter, matar, ob->totcol);
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 55cf827fea6..ac327b56fb9 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -5038,7 +5038,7 @@ static int paint_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- RNA_BEGIN(op->ptr, itemptr, "stroke") {
+ RNA_BEGIN (op->ptr, itemptr, "stroke") {
paint_apply(C, op, &itemptr);
}
RNA_END;
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index fb640346a99..9fe941253f6 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -377,7 +377,7 @@ int paint_stroke_exec(bContext *C, wmOperator *op)
stroke->stroke_started = 1;
}
- RNA_BEGIN(op->ptr, itemptr, "stroke") {
+ RNA_BEGIN (op->ptr, itemptr, "stroke") {
stroke->update_step(C, stroke, &itemptr);
}
RNA_END;
diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c
index 1bae6406c03..73dfde8fd6f 100644
--- a/source/blender/editors/sound/sound_ops.c
+++ b/source/blender/editors/sound/sound_ops.c
@@ -221,7 +221,7 @@ static int sound_update_animation_flags_exec(bContext *C, wmOperator *UNUSED(op)
struct FCurve* fcu;
char driven;
- SEQ_BEGIN(scene->ed, seq) {
+ SEQ_BEGIN (scene->ed, seq) {
fcu = id_data_find_fcurve(&scene->id, seq, &RNA_Sequence, "volume", 0, &driven);
if (fcu || driven)
seq->flag |= SEQ_AUDIO_VOLUME_ANIMATED;
diff --git a/source/blender/editors/space_logic/logic_buttons.c b/source/blender/editors/space_logic/logic_buttons.c
index 16fe48f314a..22df7432ecb 100644
--- a/source/blender/editors/space_logic/logic_buttons.c
+++ b/source/blender/editors/space_logic/logic_buttons.c
@@ -104,7 +104,7 @@ static int cut_links_exec(bContext *C, wmOperator *op)
float mcoords[256][2];
int i= 0;
- RNA_BEGIN(op->ptr, itemptr, "path") {
+ RNA_BEGIN (op->ptr, itemptr, "path") {
float loc[2];
RNA_float_get_array(&itemptr, "loc", loc);
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 247dd0c1fa7..f38e3e0d272 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -2651,7 +2651,7 @@ static int cut_links_exec(bContext *C, wmOperator *op)
float mcoords[256][2];
int i= 0;
- RNA_BEGIN(op->ptr, itemptr, "path") {
+ RNA_BEGIN (op->ptr, itemptr, "path") {
float loc[2];
RNA_float_get_array(&itemptr, "loc", loc);
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c
index dfa733deac6..09d974fe4b8 100644
--- a/source/blender/editors/space_sequencer/sequencer_add.c
+++ b/source/blender/editors/space_sequencer/sequencer_add.c
@@ -188,7 +188,7 @@ static void seq_load_operator_info(SeqLoadInfo *seq_load, wmOperator *op)
else if (RNA_struct_find_property(op->ptr, "files")) {
/* used for image strip */
/* best guess, first images name */
- RNA_BEGIN(op->ptr, itemptr, "files") {
+ RNA_BEGIN (op->ptr, itemptr, "files") {
char *name = RNA_string_get_alloc(&itemptr, "name", NULL, 0);
BLI_strncpy(seq_load->name, name, sizeof(seq_load->name));
MEM_freeN(name);
@@ -420,8 +420,7 @@ static int sequencer_add_generic_strip_exec(bContext *C, wmOperator *op, SeqLoad
BLI_split_dir_part(seq_load.path, dir_only, sizeof(dir_only));
- RNA_BEGIN(op->ptr, itemptr, "files")
- {
+ RNA_BEGIN (op->ptr, itemptr, "files") {
RNA_string_get(&itemptr, "name", file_only);
BLI_join_dirfile(seq_load.path, sizeof(seq_load.path), dir_only, file_only);
@@ -595,7 +594,7 @@ static int sequencer_add_image_strip_exec(bContext *C, wmOperator *op)
strip = seq->strip;
se = strip->stripdata;
- RNA_BEGIN(op->ptr, itemptr, "files") {
+ RNA_BEGIN (op->ptr, itemptr, "files") {
char *filename = RNA_string_get_alloc(&itemptr, "name", NULL, 0);
BLI_strncpy(se->name, filename, sizeof(se->name));
MEM_freeN(filename);
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index 5bd1ba4dcf2..d2b1cccfefc 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -201,7 +201,7 @@ static void seq_proxy_build_job(const bContext *C)
WM_jobs_callbacks(steve, proxy_startjob, NULL, NULL, proxy_endjob);
}
- SEQP_BEGIN(ed, seq) {
+ SEQP_BEGIN (ed, seq) {
if ((seq->flag & SELECT)) {
context = seq_proxy_rebuild_context(pj->main, pj->scene, seq);
link = BLI_genericNodeN(context);
@@ -461,8 +461,7 @@ void deselect_all_seq(Scene *scene)
if (ed == NULL) return;
- SEQP_BEGIN(ed, seq)
- {
+ SEQP_BEGIN (ed, seq) {
seq->flag &= ~SEQ_ALLSEL;
}
SEQ_END
@@ -845,7 +844,7 @@ static int insert_gap(Scene *scene, int gap, int cfra)
if (ed == NULL) return 0;
- SEQP_BEGIN(ed, seq) {
+ SEQP_BEGIN (ed, seq) {
if (seq->startdisp >= cfra) {
seq->start += gap;
calc_sequence(scene, seq);
@@ -871,8 +870,7 @@ static void UNUSED_FUNCTION(touch_seq_files) (Scene * scene)
WM_cursor_wait(1);
- SEQP_BEGIN(ed, seq)
- {
+ SEQP_BEGIN (ed, seq) {
if (seq->flag & SELECT) {
if (seq->type == SEQ_MOVIE) {
if (seq->strip && seq->strip->stripdata) {
@@ -899,8 +897,7 @@ static void set_filter_seq(Scene *scene)
if (okee("Set Deinterlace") == 0) return;
- SEQP_BEGIN(ed, seq)
- {
+ SEQP_BEGIN (ed, seq) {
if (seq->flag & SELECT) {
if (seq->type == SEQ_MOVIE) {
seq->flag |= SEQ_FILTERY;
@@ -935,8 +932,7 @@ static void UNUSED_FUNCTION(seq_remap_paths) (Scene * scene)
if (strcmp(to, from) == 0)
return;
- SEQP_BEGIN(ed, seq)
- {
+ SEQP_BEGIN (ed, seq) {
if (seq->flag & SELECT) {
if (strncmp(seq->strip->dir, from, strlen(from)) == 0) {
printf("found %s\n", seq->strip->dir);
@@ -1481,7 +1477,7 @@ static int sequencer_cut_exec(bContext *C, wmOperator *op)
BLI_movelisttolist(ed->seqbasep, &newlist);
if (cut_side != SEQ_SIDE_BOTH) {
- SEQP_BEGIN(ed, seq) {
+ SEQP_BEGIN (ed, seq) {
if (cut_side == SEQ_SIDE_LEFT) {
if (seq->startdisp >= cut_frame) {
seq->flag &= ~SEQ_ALLSEL;
@@ -3014,7 +3010,7 @@ static int sequencer_change_path_exec(bContext *C, wmOperator *op)
}
seq->strip->stripdata = se = MEM_callocN(len * sizeof(StripElem), "stripelem");
- RNA_BEGIN(op->ptr, itemptr, "files") {
+ RNA_BEGIN (op->ptr, itemptr, "files") {
char *filename = RNA_string_get_alloc(&itemptr, "name", NULL, 0);
BLI_strncpy(se->name, filename, sizeof(se->name));
MEM_freeN(filename);
diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c
index 2447ca6cfbe..f326052ea60 100644
--- a/source/blender/editors/space_sequencer/sequencer_select.c
+++ b/source/blender/editors/space_sequencer/sequencer_select.c
@@ -362,7 +362,7 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
deselect_all_seq(scene);
UI_view2d_region_to_view(v2d, event->mval[0], event->mval[1], &x, NULL);
- SEQP_BEGIN(ed, seq)
+ SEQP_BEGIN (ed, seq)
{
if (x < CFRA) {
if (seq->enddisp < CFRA) {
@@ -940,7 +940,7 @@ static short select_grouped_type(Editing *ed, Sequence *actseq)
Sequence *seq;
short changed = FALSE;
- SEQP_BEGIN(ed, seq) {
+ SEQP_BEGIN (ed, seq) {
if (seq->type == actseq->type) {
seq->flag |= SELECT;
changed = TRUE;
@@ -957,7 +957,7 @@ static short select_grouped_type_basic(Editing *ed, Sequence *actseq)
short changed = FALSE;
short is_sound = SEQ_IS_SOUND(actseq);
- SEQP_BEGIN(ed, seq) {
+ SEQP_BEGIN (ed, seq) {
if (is_sound ? SEQ_IS_SOUND(seq) : !SEQ_IS_SOUND(seq)) {
seq->flag |= SELECT;
changed = TRUE;
@@ -974,7 +974,7 @@ static short select_grouped_type_effect(Editing *ed, Sequence *actseq)
short changed = FALSE;
short is_effect = SEQ_IS_EFFECT(actseq);
- SEQP_BEGIN(ed, seq) {
+ SEQP_BEGIN (ed, seq) {
if (is_effect ? SEQ_IS_EFFECT(seq) : !SEQ_IS_EFFECT(seq)) {
seq->flag |= SELECT;
changed = TRUE;
@@ -995,7 +995,7 @@ static short select_grouped_data(Editing *ed, Sequence *actseq)
return changed;
if (SEQ_HAS_PATH(actseq) && dir) {
- SEQP_BEGIN(ed, seq) {
+ SEQP_BEGIN (ed, seq) {
if (SEQ_HAS_PATH(seq) && seq->strip && strcmp(seq->strip->dir, dir) == 0) {
seq->flag |= SELECT;
changed = TRUE;
@@ -1005,7 +1005,7 @@ static short select_grouped_data(Editing *ed, Sequence *actseq)
}
else if (actseq->type == SEQ_SCENE) {
Scene *sce = actseq->scene;
- SEQP_BEGIN(ed, seq) {
+ SEQP_BEGIN (ed, seq) {
if (seq->type == SEQ_SCENE && seq->scene == sce) {
seq->flag |= SELECT;
changed = TRUE;
@@ -1015,7 +1015,7 @@ static short select_grouped_data(Editing *ed, Sequence *actseq)
}
else if (actseq->type == SEQ_MOVIECLIP) {
MovieClip *clip = actseq->clip;
- SEQP_BEGIN(ed, seq) {
+ SEQP_BEGIN (ed, seq) {
if (seq->type == SEQ_MOVIECLIP && seq->clip == clip) {
seq->flag |= SELECT;
changed = TRUE;
@@ -1037,14 +1037,14 @@ static short select_grouped_effect(Editing *ed, Sequence *actseq)
for (i = 0; i <= SEQ_EFFECT_MAX; i++)
effects[i] = FALSE;
- SEQP_BEGIN(ed, seq) {
+ SEQP_BEGIN (ed, seq) {
if (ELEM3(actseq, seq->seq1, seq->seq2, seq->seq3)) {
effects[seq->type] = TRUE;
}
}
SEQ_END;
- SEQP_BEGIN(ed, seq) {
+ SEQP_BEGIN (ed, seq) {
if (effects[seq->type]) {
if (seq->seq1) seq->seq1->flag |= SELECT;
if (seq->seq2) seq->seq2->flag |= SELECT;
@@ -1062,7 +1062,7 @@ static short select_grouped_time_overlap(Editing *ed, Sequence *actseq)
Sequence *seq;
short changed = FALSE;
- SEQP_BEGIN(ed, seq) {
+ SEQP_BEGIN (ed, seq) {
if (!((seq->startdisp >= actseq->enddisp) || (seq->enddisp < actseq->startdisp))) {
seq->flag |= SELECT;
changed = TRUE;
@@ -1083,7 +1083,7 @@ static short select_grouped_effect_link(Editing *ed, Sequence *actseq)
int machine = actseq->machine;
SeqIterator iter;
- SEQP_BEGIN(ed, seq) {
+ SEQP_BEGIN (ed, seq) {
seq->tmp= NULL;
}
SEQ_END;
@@ -1153,7 +1153,7 @@ static int sequencer_select_grouped_exec(bContext *C, wmOperator *op)
}
if (extend == 0) {
- SEQP_BEGIN(ed, seq) {
+ SEQP_BEGIN (ed, seq) {
seq->flag &= ~SELECT;
changed = TRUE;
}
diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c
index fbb3f3c609f..674dd670cf7 100644
--- a/source/blender/editors/space_time/space_time.c
+++ b/source/blender/editors/space_time/space_time.c
@@ -357,8 +357,7 @@ static void time_draw_keyframes(const bContext *C, SpaceTime *stime, ARegion *ar
short active_done = 0;
/* draw keyframes from all selected objects */
- CTX_DATA_BEGIN(C, Object*, obsel, selected_objects)
- {
+ CTX_DATA_BEGIN (C, Object*, obsel, selected_objects) {
/* last arg is 0, since onlysel doesn't apply here... */
time_draw_idblock_keyframes(v2d, (ID *)obsel, 0);
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index d7e992e70e9..e1bbc0e1545 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -830,7 +830,7 @@ static int view3d_lasso_select_exec(bContext *C, wmOperator *op)
int i = 0;
int mcords[1024][2];
- RNA_BEGIN(op->ptr, itemptr, "path") {
+ RNA_BEGIN (op->ptr, itemptr, "path") {
float loc[2];
RNA_float_get_array(&itemptr, "loc", loc);
@@ -975,7 +975,7 @@ static int object_select_menu_exec(bContext *C, wmOperator *op)
const char *name = object_mouse_select_menu_data[name_index].idname;
if (!extend) {
- CTX_DATA_BEGIN(C, Base *, base, selectable_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, selectable_bases) {
if (base->flag & SELECT) {
ED_base_object_select(base, BA_DESELECT);
changed = 1;
@@ -984,7 +984,7 @@ static int object_select_menu_exec(bContext *C, wmOperator *op)
CTX_DATA_END;
}
- CTX_DATA_BEGIN(C, Base *, base, selectable_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, selectable_bases) {
/* this is a bit dodjy, there should only be ONE object with this name, but library objects can mess this up */
if (strcmp(name, base->object->id.name + 2) == 0) {
ED_base_object_activate(C, base);
@@ -1051,7 +1051,7 @@ static Base *object_mouse_select_menu(bContext *C, ViewContext *vc, unsigned int
short ok;
LinkNode *linklist = NULL;
- CTX_DATA_BEGIN(C, Base *, base, selectable_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, selectable_bases) {
ok = FALSE;
/* two selection methods, the CTRL select uses max dist of 15 */
@@ -1829,7 +1829,7 @@ static int do_object_pose_box_select(bContext *C, ViewContext *vc, rcti *rect, i
if (extend == 0 && select) {
if (bone_only) {
- CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pose_bones) {
+ CTX_DATA_BEGIN (C, bPoseChannel *, pchan, visible_pose_bones) {
if ((pchan->bone->flag & BONE_UNSELECTABLE) == 0) {
pchan->bone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
}
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c
index 1c1fa4c7fac..2c301dc8abc 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -557,7 +557,7 @@ static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op))
else {
struct KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_LOCATION_ID);
- CTX_DATA_BEGIN(C, Object *, ob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects) {
if (ob->mode & OB_MODE_POSE) {
bPoseChannel *pchan;
bArmature *arm = ob->data;
@@ -691,7 +691,7 @@ static int snap_sel_to_curs(bContext *C, wmOperator *UNUSED(op))
else {
struct KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_LOCATION_ID);
- CTX_DATA_BEGIN(C, Object *, ob, selected_editable_objects) {
+ CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects) {
if (ob->mode & OB_MODE_POSE) {
bPoseChannel *pchan;
bArmature *arm = ob->data;
@@ -928,7 +928,7 @@ static int snap_curs_to_sel(bContext *C, wmOperator *UNUSED(op))
}
}
else {
- CTX_DATA_BEGIN(C, Object *, ob, selected_objects) {
+ CTX_DATA_BEGIN (C, Object *, ob, selected_objects) {
copy_v3_v3(vec, ob->obmat[3]);
/* special case for camera -- snap to bundles */
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index ebbc2ca9267..bdae2c0c84f 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -5289,8 +5289,7 @@ static void createTransObject(bContext *C, TransInfo *t)
td = t->data = MEM_callocN(t->total*sizeof(TransData), "TransOb");
tx = t->ext = MEM_callocN(t->total*sizeof(TransDataExtension), "TransObExtension");
- CTX_DATA_BEGIN(C, Base*, base, selected_bases)
- {
+ CTX_DATA_BEGIN (C, Base*, base, selected_bases) {
Object *ob= base->object;
td->flag = TD_SELECTED;
@@ -5396,7 +5395,7 @@ static void createTransNodeData(bContext *C, TransInfo *t)
td = t->data = MEM_callocN(t->total*sizeof(TransData), "TransNode TransData");
td2d = t->data2d = MEM_callocN(t->total*sizeof(TransData2D), "TransNode TransData2D");
- CTX_DATA_BEGIN(C, bNode *, selnode, selected_nodes)
+ CTX_DATA_BEGIN (C, bNode *, selnode, selected_nodes)
NodeToTransData(td++, td2d++, selnode);
CTX_DATA_END
}
diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c
index 987f6b250cb..fb7e2254e45 100644
--- a/source/blender/editors/uvedit/uvedit_draw.c
+++ b/source/blender/editors/uvedit/uvedit_draw.c
@@ -186,8 +186,8 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, BMEditMesh *em, MTe
BLI_array_empty(tf_uv);
BLI_array_empty(tf_uvorig);
- BLI_array_growitems(tf_uv, efa->len);
- BLI_array_growitems(tf_uvorig, efa->len);
+ BLI_array_grow_items(tf_uv, efa->len);
+ BLI_array_grow_items(tf_uvorig, efa->len);
i = 0;
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
@@ -236,8 +236,8 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, BMEditMesh *em, MTe
BLI_array_empty(tf_uv);
BLI_array_empty(tf_uvorig);
- BLI_array_growitems(tf_uv, efa->len);
- BLI_array_growitems(tf_uvorig, efa->len);
+ BLI_array_grow_items(tf_uv, efa->len);
+ BLI_array_grow_items(tf_uvorig, efa->len);
i = 0;
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
@@ -303,12 +303,12 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, BMEditMesh *em, MTe
BLI_array_empty(ang);
BLI_array_empty(av);
BLI_array_empty(auv);
- BLI_array_growitems(tf_uv, nverts);
- BLI_array_growitems(tf_uvorig, nverts);
- BLI_array_growitems(uvang, nverts);
- BLI_array_growitems(ang, nverts);
- BLI_array_growitems(av, nverts);
- BLI_array_growitems(auv, nverts);
+ BLI_array_grow_items(tf_uv, nverts);
+ BLI_array_grow_items(tf_uvorig, nverts);
+ BLI_array_grow_items(uvang, nverts);
+ BLI_array_grow_items(ang, nverts);
+ BLI_array_grow_items(av, nverts);
+ BLI_array_grow_items(auv, nverts);
BM_ITER_ELEM_INDEX (l, &liter, efa, BM_LOOPS_OF_FACE, i) {
luv = CustomData_bmesh_get(&bm->ldata, l->head.data, CD_MLOOPUV);
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index 7883fac3ec2..a30274c0f2c 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -1756,8 +1756,8 @@ static int mouse_select(bContext *C, const float co[2], int extend, int loop)
}
/* mark 1 vertex as being hit */
- BLI_array_growitems(hitv, hit.efa->len);
- BLI_array_growitems(hituv, hit.efa->len);
+ BLI_array_grow_items(hitv, hit.efa->len);
+ BLI_array_grow_items(hituv, hit.efa->len);
for (i = 0; i < hit.efa->len; i++) {
hitv[i] = 0xFFFFFFFF;
}
@@ -1777,8 +1777,8 @@ static int mouse_select(bContext *C, const float co[2], int extend, int loop)
}
/* mark 2 edge vertices as being hit */
- BLI_array_growitems(hitv, hit.efa->len);
- BLI_array_growitems(hituv, hit.efa->len);
+ BLI_array_grow_items(hitv, hit.efa->len);
+ BLI_array_grow_items(hituv, hit.efa->len);
fill_vn_i(hitv, hit.efa->len, 0xFFFFFFFF);
hitv[hit.lindex] = hit.vert1;
@@ -1802,8 +1802,8 @@ static int mouse_select(bContext *C, const float co[2], int extend, int loop)
/* mark all face vertices as being hit */
- BLI_array_growitems(hitv, hit.efa->len);
- BLI_array_growitems(hituv, hit.efa->len);
+ BLI_array_grow_items(hitv, hit.efa->len);
+ BLI_array_grow_items(hituv, hit.efa->len);
i = 0;
BM_ITER_ELEM (l, &liter, hit.efa, BM_LOOPS_OF_FACE) {
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c
index 36b1e77e5e5..e1b2d87c4f2 100644
--- a/source/blender/editors/uvedit/uvedit_smart_stitch.c
+++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c
@@ -1162,7 +1162,7 @@ static int stitch_init(bContext *C, wmOperator *op)
EDBM_index_arrays_init(em, 0, 0, 1);
- RNA_BEGIN(op->ptr, itemptr, "selection") {
+ RNA_BEGIN (op->ptr, itemptr, "selection") {
faceIndex = RNA_int_get(&itemptr, "face_index");
elementIndex = RNA_int_get(&itemptr, "element_index");
efa = EDBM_face_at_index(em, faceIndex);