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:
authorJoshua Leung <aligorith@gmail.com>2012-12-21 09:57:37 +0400
committerJoshua Leung <aligorith@gmail.com>2012-12-21 09:57:37 +0400
commitfcd5bc147ca0c5ca9c6a9af3a0c0862f0acb91ef (patch)
tree8b717911053e12035170eb5d68d6d71e46045fd9 /source/blender/editors/animation/anim_filter.c
parent44dd39ea2239ca78d21a51ae40790ee6a0329678 (diff)
Code cleanup - Replacing 0/1 with boolean constants
Diffstat (limited to 'source/blender/editors/animation/anim_filter.c')
-rw-r--r--source/blender/editors/animation/anim_filter.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index 5e215fbd6a2..655ab2bfb15 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -290,7 +290,7 @@ static short nlaedit_get_context(bAnimContext *ac, SpaceNla *snla)
short ANIM_animdata_context_getdata(bAnimContext *ac)
{
SpaceLink *sl = ac->sl;
- short ok = 0;
+ short ok = FALSE;
/* context depends on editor we are currently in */
if (sl) {
@@ -319,10 +319,7 @@ short ANIM_animdata_context_getdata(bAnimContext *ac)
}
/* check if there's any valid data */
- if (ok && ac->data)
- return 1;
- else
- return 0;
+ return (ok && ac->data);
}
/* Obtain current anim-data context from Blender Context info
@@ -354,6 +351,7 @@ short ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
ac->regiontype = (ar) ? ar->regiontype : 0;
/* get data context info */
+ // XXX: if the below fails, try to grab this info from context instead... (to allow for scripting)
return ANIM_animdata_context_getdata(ac);
}
@@ -913,14 +911,14 @@ static short skip_fcurve_selected_data(bDopeSheet *ads, FCurve *fcu, ID *owner_i
Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
Sequence *seq = NULL;
char *seq_name;
-
+
if (ed) {
/* get strip name, and check if this strip is selected */
seq_name = BLI_str_quoted_substrN(fcu->rna_path, "sequences_all[");
seq = BKE_sequence_get_by_name(ed->seqbasep, seq_name, FALSE);
if (seq_name) MEM_freeN(seq_name);
}
-
+
/* can only add this F-Curve if it is selected */
if (ads->filterflag & ADS_FILTER_ONLYSEL) {
if ((seq == NULL) || (seq->flag & SELECT) == 0)
@@ -2146,7 +2144,7 @@ static size_t animdata_filter_dopesheet_scene(bAnimContext *ac, ListBase *anim_d
if ((ntree) && !(ads->filterflag & ADS_FILTER_NONTREE)) {
tmp_items += animdata_filter_ds_nodetree(ac, &tmp_data, ads, (ID *)sce, ntree, filter_mode);
}
-
+
/* TODO: one day, when sequencer becomes its own datatype, perhaps it should be included here */
}
END_ANIMFILTER_SUBCHANNELS;