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-10-21 09:46:41 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-10-21 09:46:41 +0400
commitf3ece5a108db0bdbefb4663ef4ebd9a7e039e263 (patch)
treecb6329453be169ef1ec49ef8b8d50a6b14364880 /source/blender/editors/animation
parenta1a0c8da13a7b91b0264c7535752864379f3d852 (diff)
style cleanup: trailing tabs & expand some non prefix tabs into spaces.
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c6
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c18
-rw-r--r--source/blender/editors/animation/anim_draw.c4
-rw-r--r--source/blender/editors/animation/anim_filter.c8
-rw-r--r--source/blender/editors/animation/anim_ipo_utils.c2
-rw-r--r--source/blender/editors/animation/anim_markers.c14
-rw-r--r--source/blender/editors/animation/drivers.c4
-rw-r--r--source/blender/editors/animation/keyframes_draw.c4
-rw-r--r--source/blender/editors/animation/keyframes_edit.c8
-rw-r--r--source/blender/editors/animation/keyframes_general.c4
-rw-r--r--source/blender/editors/animation/keyframing.c18
11 files changed, 45 insertions, 45 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 1998dafb3cd..9e3ebfb41a2 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -1186,7 +1186,7 @@ static void *acf_dsmat_setting_ptr(bAnimListElem *ale, int setting, short *type)
if (ma->adt)
return GET_ACF_FLAG_PTR(ma->adt->flag, type);
else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -1263,7 +1263,7 @@ static void *acf_dslam_setting_ptr(bAnimListElem *ale, int setting, short *type)
if (la->adt)
return GET_ACF_FLAG_PTR(la->adt->flag, type);
else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -1347,7 +1347,7 @@ static void *acf_dstex_setting_ptr(bAnimListElem *ale, int setting, short *type)
if (tex->adt)
return GET_ACF_FLAG_PTR(tex->adt->flag, type);
else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index d35f39a48e0..f19dbe740bc 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -464,7 +464,7 @@ void ANIM_flush_setting_anim_channels(bAnimContext *ac, ListBase *anim_data, bAn
/* store this level as the 'old' level now */
prevLevel = level;
- }
+ }
/* if the level is 'greater than' (i.e. less important) than the previous level... */
else if (level > prevLevel) {
/* if previous level was a base-level (i.e. 0 offset / root of one hierarchy),
@@ -600,7 +600,7 @@ static int animedit_poll_channels_nla_tweakmode_off(bContext *C)
if (ELEM3(sa->spacetype, SPACE_ACTION, SPACE_IPO, SPACE_NLA) == 0)
return 0;
- /* NLA TweakMode test */
+ /* NLA TweakMode test */
if (sa->spacetype == SPACE_NLA) {
if ((scene == NULL) || (scene->flag & SCE_NLA_EDIT_ON))
return 0;
@@ -794,7 +794,7 @@ static void rearrange_animchannel_add_to_islands(ListBase *islands, ListBase *sr
FCurve *fcu = (FCurve *)channel;
is_sel = SEL_FCU(fcu);
- }
+ }
break;
case ANIMTYPE_NLATRACK:
{
@@ -910,7 +910,7 @@ static void rearrange_nla_channels(bAnimContext *UNUSED(ac), AnimData *adt, shor
if (rearrange_func == NULL)
return;
- /* only consider NLA data if it's accessible */
+ /* only consider NLA data if it's accessible */
//if (EXPANDED_DRVD(adt) == 0)
// return;
@@ -931,7 +931,7 @@ static void rearrange_driver_channels(bAnimContext *UNUSED(ac), AnimData *adt, s
if (rearrange_func == NULL)
return;
- /* only consider drivers if they're accessible */
+ /* only consider drivers if they're accessible */
if (EXPANDED_DRVD(adt) == 0)
return;
@@ -2206,7 +2206,7 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in
}
notifierFlags |= (ND_ANIMCHAN | NA_SELECTED);
- }
+ }
break;
case ANIMTYPE_GROUP:
@@ -2219,7 +2219,7 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in
agrp->flag ^= AGRP_SELECTED;
}
else if (selectmode == -1) {
- /* select all in group (and deselect everthing else) */
+ /* select all in group (and deselect everthing else) */
FCurve *fcu;
/* deselect all other channels */
@@ -2228,7 +2228,7 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in
/* only select channels in group and group itself */
for (fcu = agrp->channels.first; fcu && fcu->grp == agrp; fcu = fcu->next)
fcu->flag |= FCURVE_SELECTED;
- agrp->flag |= AGRP_SELECTED;
+ agrp->flag |= AGRP_SELECTED;
}
else {
/* select group by itself */
@@ -2306,7 +2306,7 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in
/* invert selection status of this layer only */
gpl->flag ^= GP_LAYER_SELECT;
}
- else {
+ else {
/* select layer by itself */
ANIM_deselect_anim_channels(ac, ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR);
gpl->flag |= GP_LAYER_SELECT;
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c
index 620f5de9db7..01c0a95e200 100644
--- a/source/blender/editors/animation/anim_draw.c
+++ b/source/blender/editors/animation/anim_draw.c
@@ -261,8 +261,8 @@ void ANIM_draw_previewrange(const bContext *C, View2D *v2d)
/* only draw two separate 'curtains' if there's no overlap between them */
if (PSFRA < PEFRA) {
glRectf(v2d->cur.xmin, v2d->cur.ymin, (float)PSFRA, v2d->cur.ymax);
- glRectf((float)PEFRA, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax);
- }
+ glRectf((float)PEFRA, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax);
+ }
else {
glRectf(v2d->cur.xmin, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax);
}
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index d913779a883..721b3473792 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -682,7 +682,7 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
ale->datatype = ALE_ACT;
ale->adt = BKE_animdata_from_id(data);
- }
+ }
break;
case ANIMTYPE_DSSPK:
{
@@ -811,7 +811,7 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
}
ale->datatype = (ale->key_data) ? ALE_FCURVE : ALE_NONE;
}
- }
+ }
break;
case ANIMTYPE_GPLAYER:
@@ -1023,7 +1023,7 @@ static FCurve *animfilter_fcurve_next(bDopeSheet *ads, FCurve *first, bActionGro
if (skip_fcurve_selected_data(ads, fcu, owner_id, filter_mode))
continue;
}
- }
+ }
/* only include if visible (Graph Editor check, not channels check) */
if (!(filter_mode & ANIMFILTER_CURVE_VISIBLE) || (fcu->flag & FCURVE_VISIBLE)) {
@@ -1211,7 +1211,7 @@ static size_t animfilter_nla(bAnimContext *UNUSED(ac), ListBase *anim_data, bDop
*/
if (!(ads->filterflag & ADS_FILTER_NLA_NOACT) || (adt->action)) {
/* there isn't really anything editable here, so skip if need editable */
- if ((filter_mode & ANIMFILTER_FOREDIT) == 0) {
+ if ((filter_mode & ANIMFILTER_FOREDIT) == 0) {
/* just add the action track now (this MUST appear for drawing)
* - as AnimData may not have an action, we pass a dummy pointer just to get the list elem created, then
* overwrite this with the real value - REVIEW THIS...
diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c
index 5295950546d..d8e3349e998 100644
--- a/source/blender/editors/animation/anim_ipo_utils.c
+++ b/source/blender/editors/animation/anim_ipo_utils.c
@@ -89,7 +89,7 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
* i.e. Bone1.Location.X, or Object.Location.X
* 2) <array-index> <property-name> (<struct name>)
* i.e. X Location (Bone1), or X Location (Object)
- *
+ *
* Currently, option 2 is in use, to try and make it easier to quickly identify F-Curves (it does have
* problems with looking rather odd though). Option 1 is better in terms of revealing a consistent sense of
* hierarchy though, which isn't so clear with option 2.
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index 895aaec29da..0ae06e71b66 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -150,7 +150,7 @@ int ED_markers_post_apply_transform(ListBase *markers, Scene *scene, int mode, f
break;
case TFM_TIME_SCALE:
- {
+ {
/* rescale the distance between the marker and the current frame */
marker->frame = cfra + (int)floorf(((float)(marker->frame - cfra) * value) + 0.5f);
changed++;
@@ -249,7 +249,7 @@ void ED_markers_get_minmax(ListBase *markers, short sel, float *first, float *la
min = (float)marker->frame;
if (marker->frame > max)
max = (float)marker->frame;
- }
+ }
}
}
@@ -278,7 +278,7 @@ static void add_marker_to_cfra_elem(ListBase *lb, TimeMarker *marker, short only
return;
}
else if (ce->cfra > marker->frame) break;
- }
+ }
cen = MEM_callocN(sizeof(CfraElem), "add_to_cfra_elem");
if (ce) BLI_insertlinkbefore(lb, ce, cen);
@@ -360,7 +360,7 @@ static void draw_marker(View2D *v2d, TimeMarker *marker, int cfra, int flag)
glScalef(1.0f / xscale, 1.0f, 1.0f);
glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
/* vertical line - dotted */
#ifdef DURIAN_CAMERA_SWITCH
@@ -726,7 +726,7 @@ static int ed_marker_move_cancel(bContext *C, wmOperator *op)
{
RNA_int_set(op->ptr, "frames", 0);
ed_marker_move_apply(op);
- ed_marker_move_exit(C, op);
+ ed_marker_move_exit(C, op);
WM_event_add_notifier(C, NC_SCENE | ND_MARKERS, NULL);
WM_event_add_notifier(C, NC_ANIMATION | ND_MARKERS, NULL);
@@ -821,7 +821,7 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt)
}
else {
/* we only print the offset */
- if (mm->slink->spacetype == SPACE_TIME) {
+ if (mm->slink->spacetype == SPACE_TIME) {
SpaceTime *stime = (SpaceTime *)mm->slink;
if (stime->flag & TIME_DRAWFRAMES)
BLI_snprintf(str, sizeof(str), "Marker offset %d ", offs);
@@ -1030,7 +1030,7 @@ static int ed_marker_select(bContext *C, wmEvent *evt, int extend, int camera)
x = evt->x - ar->winrct.xmin;
y = evt->y - ar->winrct.ymin;
- UI_view2d_region_to_view(v2d, x, y, &viewx, NULL);
+ UI_view2d_region_to_view(v2d, x, y, &viewx, NULL);
cfra = ED_markers_find_nearest_marker_time(markers, viewx);
diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c
index 38f9119104b..25833c13925 100644
--- a/source/blender/editors/animation/drivers.c
+++ b/source/blender/editors/animation/drivers.c
@@ -91,7 +91,7 @@ FCurve *verify_driver_fcurve(ID *id, const char rna_path[], const int array_inde
adt = BKE_animdata_from_id(id);
if ((adt == NULL) && (add))
adt = BKE_id_add_animdata(id);
- if (adt == NULL) {
+ if (adt == NULL) {
/* if still none (as not allowed to add, or ID doesn't have animdata for some reason) */
return NULL;
}
@@ -478,7 +478,7 @@ static int add_driver_button_exec(bContext *C, wmOperator *op)
char *path = get_driver_path_hack(C, &ptr, prop);
short flags = CREATEDRIVER_WITH_DEFAULT_DVAR;
- if (path) {
+ if (path) {
success += ANIM_add_driver(op->reports, ptr.id.data, path, index, flags, DRIVER_TYPE_PYTHON);
MEM_freeN(path);
diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c
index 6c9105dde69..9e6301c91f5 100644
--- a/source/blender/editors/animation/keyframes_draw.c
+++ b/source/blender/editors/animation/keyframes_draw.c
@@ -345,7 +345,7 @@ static BezTriple *abk_get_bezt_with_value(ActBeztColumn *abk, float value)
return NULL;
/* look over each BezTriple in this container */
- for (i = 0; i < abk->numBezts; i++) {
+ for (i = 0; i < abk->numBezts; i++) {
/* only do exact match for now... */
if (/*i >= MAX_ABK_BUFSIZE*/ 0) {
// TODO: this case needs special handling
@@ -960,7 +960,7 @@ void fcurve_to_keylist(AnimData *adt, FCurve *fcu, DLRBT_Tree *keys, DLRBT_Tree
if (fcu && fcu->totvert && fcu->bezt) {
/* apply NLA-mapping (if applicable) */
- if (adt)
+ if (adt)
ANIM_nla_mapping_apply_fcurve(adt, fcu, 0, 0);
/* if getting long keyframes too, grab the BezTriples in a BST for
diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c
index b277d0eccb5..015c2667a93 100644
--- a/source/blender/editors/animation/keyframes_edit.c
+++ b/source/blender/editors/animation/keyframes_edit.c
@@ -154,7 +154,7 @@ short ANIM_fcurve_keyframes_loop(KeyframeEditData *ked, FCurve *fcu, KeyframeEdi
if (fcu_cb)
fcu_cb(fcu);
- /* done */
+ /* done */
return 0;
}
@@ -639,7 +639,7 @@ static short snap_bezier_horizontal(KeyframeEditData *UNUSED(ked), BezTriple *be
if (ELEM3(bezt->h1, HD_AUTO, HD_AUTO_ANIM, HD_VECT)) bezt->h1 = HD_ALIGN;
if (ELEM3(bezt->h2, HD_AUTO, HD_AUTO_ANIM, HD_VECT)) bezt->h2 = HD_ALIGN;
}
- return 0;
+ return 0;
}
/* value to snap to is stored in the custom data -> first float value slot */
@@ -880,7 +880,7 @@ KeyframeEditFunc ANIM_editkeyframes_ipo(short code)
switch (code) {
case BEZT_IPO_CONST: /* constant */
return set_bezt_constant;
- case BEZT_IPO_LIN: /* linear */
+ case BEZT_IPO_LIN: /* linear */
return set_bezt_linear;
default: /* bezier */
return set_bezt_bezier;
@@ -930,7 +930,7 @@ KeyframeEditFunc ANIM_editkeyframes_keytype(short code)
case BEZT_KEYTYPE_JITTER: /* jitter keyframe */
return set_keytype_jitter;
- case BEZT_KEYTYPE_KEYFRAME: /* proper keyframe */
+ case BEZT_KEYTYPE_KEYFRAME: /* proper keyframe */
default:
return set_keytype_keyframe;
}
diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c
index b5c0555bf63..9249b912da6 100644
--- a/source/blender/editors/animation/keyframes_general.c
+++ b/source/blender/editors/animation/keyframes_general.c
@@ -188,7 +188,7 @@ void clean_fcurve(FCurve *fcu, float thresh)
/* make a copy of the old BezTriples, and clear F-Curve */
old_bezts = fcu->bezt;
- totCount = fcu->totvert;
+ totCount = fcu->totvert;
fcu->bezt = NULL;
fcu->totvert = 0;
@@ -256,7 +256,7 @@ void clean_fcurve(FCurve *fcu, float thresh)
insert_vert_fcurve(fcu, cur[0], cur[1], 0);
}
}
- else {
+ else {
/* add if value doesn't equal that of previous */
if (IS_EQT(cur[1], prev[1], thresh) == 0) {
/* add new keyframe */
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index f0c5f063e57..238dd9c68e4 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -108,7 +108,7 @@ short ANIM_get_keyframing_flags(Scene *scene, short incl_mode)
}
/* only if including settings from the autokeying mode... */
- if (incl_mode) {
+ if (incl_mode) {
/* keyframing mode - only replace existing keyframes */
if (IS_AUTOKEY_MODE(scene, EDITKEYS))
flag |= INSERTKEY_REPLACE;
@@ -131,7 +131,7 @@ bAction *verify_adt_action(ID *id, short add)
adt = BKE_animdata_from_id(id);
if ((adt == NULL) && (add))
adt = BKE_id_add_animdata(id);
- if (adt == NULL) {
+ if (adt == NULL) {
/* if still none (as not allowed to add, or ID doesn't have animdata for some reason) */
printf("ERROR: Couldn't add AnimData (ID = %s)\n", (id) ? (id->name) : "<None>");
return NULL;
@@ -240,7 +240,7 @@ int insert_bezt_fcurve(FCurve *fcu, BezTriple *bezt, short flag)
i = binarysearch_bezt_index(fcu->bezt, bezt->vec[1][0], fcu->totvert, &replace);
/* replace an existing keyframe? */
- if (replace) {
+ if (replace) {
/* sanity check: 'i' may in rare cases exceed arraylen */
if ((i >= 0) && (i < fcu->totvert)) {
/* just change the values when replacing, so as to not overwrite handles */
@@ -412,12 +412,12 @@ static short new_key_needed(FCurve *fcu, float cFrame, float nValue)
float prevPosi = 0.0f, prevVal = 0.0f;
float beztPosi = 0.0f, beztVal = 0.0f;
- /* get current time+value */
+ /* get current time+value */
beztPosi = bezt->vec[1][0];
beztVal = bezt->vec[1][1];
if (prev) {
- /* there is a keyframe before the one currently being examined */
+ /* there is a keyframe before the one currently being examined */
/* get previous time+value */
prevPosi = prev->vec[1][0];
@@ -940,7 +940,7 @@ short insert_keyframe(ReportList *reports, ID *id, bAction *act, const char grou
}
/* key entire array convenience method */
- if (array_index == -1) {
+ if (array_index == -1) {
array_index = 0;
array_index_max = RNA_property_array_length(&ptr, prop);
@@ -1034,7 +1034,7 @@ short delete_keyframe(ReportList *reports, ID *id, bAction *act, const char grou
}
/* key entire array convenience method */
- if (array_index == -1) {
+ if (array_index == -1) {
array_index = 0;
array_index_max = RNA_property_array_length(&ptr, prop);
@@ -1064,7 +1064,7 @@ short delete_keyframe(ReportList *reports, ID *id, bAction *act, const char grou
/* try to find index of beztriple to get rid of */
i = binarysearch_bezt_index(fcu->bezt, cfra, fcu->totvert, &found);
- if (found) {
+ if (found) {
/* delete the key at the index (will sanity check + do recalc afterwards) */
delete_fcurve_key(fcu, i, 1);
@@ -1863,7 +1863,7 @@ short fcurve_frame_has_keyframe(FCurve *fcu, float frame, short filter)
/* binarysearch_bezt_index will set replace to be 0 or 1
* - obviously, 1 represents a match
*/
- if (replace) {
+ if (replace) {
/* sanity check: 'i' may in rare cases exceed arraylen */
if ((i >= 0) && (i < fcu->totvert))
return 1;