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>2014-02-03 11:55:59 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-02-03 12:35:44 +0400
commitd900f5be55d0812eb5c7dfd3ea47020c3edafd41 (patch)
tree7d5035e3dbafdcd4988e7ed57068e48c951a989a /source/blender/editors/space_nla
parenta948ae2c5167c49819241572d3aacb4e4bf5b6d7 (diff)
Code cleanup: use bools where possible
Diffstat (limited to 'source/blender/editors/space_nla')
-rw-r--r--source/blender/editors/space_nla/nla_draw.c2
-rw-r--r--source/blender/editors/space_nla/nla_edit.c6
-rw-r--r--source/blender/editors/space_nla/nla_intern.h2
-rw-r--r--source/blender/editors/space_nla/nla_ops.c4
4 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index c9a86547984..9f83bc80314 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -641,7 +641,7 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View
short indent = 0, offset = 0, sel = 0, group = 0;
int special = -1;
char name[128];
- short do_draw = FALSE;
+ bool do_draw = false;
/* determine what needs to be drawn */
switch (ale->type) {
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index 7347b446bce..37efd52f246 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -1587,7 +1587,7 @@ static int nlaedit_sync_actlen_exec(bContext *C, wmOperator *op)
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
- short active_only = RNA_boolean_get(op->ptr, "active");
+ const bool active_only = RNA_boolean_get(op->ptr, "active");
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
@@ -2004,7 +2004,7 @@ static int nla_fmodifier_add_exec(bContext *C, wmOperator *op)
FModifier *fcm;
int type = RNA_enum_get(op->ptr, "type");
- short onlyActive = RNA_boolean_get(op->ptr, "only_active");
+ const bool active_only = RNA_boolean_get(op->ptr, "only_active");
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
@@ -2021,7 +2021,7 @@ static int nla_fmodifier_add_exec(bContext *C, wmOperator *op)
for (strip = nlt->strips.first; strip; strip = strip->next) {
/* can F-Modifier be added to the current strip? */
- if (onlyActive) {
+ if (active_only) {
/* if not active, cannot add since we're only adding to active strip */
if ((strip->flag & NLASTRIP_FLAG_ACTIVE) == 0)
continue;
diff --git a/source/blender/editors/space_nla/nla_intern.h b/source/blender/editors/space_nla/nla_intern.h
index 2ad2418fc77..dedd6404a2c 100644
--- a/source/blender/editors/space_nla/nla_intern.h
+++ b/source/blender/editors/space_nla/nla_intern.h
@@ -141,7 +141,7 @@ void NLA_OT_selected_objects_add(wmOperatorType *ot);
int nlaop_poll_tweakmode_off(bContext *C);
int nlaop_poll_tweakmode_on(bContext *C);
-short nlaedit_is_tweakmode_on(bAnimContext *ac);
+bool nlaedit_is_tweakmode_on(bAnimContext *ac);
/* --- */
diff --git a/source/blender/editors/space_nla/nla_ops.c b/source/blender/editors/space_nla/nla_ops.c
index aa3224507bc..149690e10f7 100644
--- a/source/blender/editors/space_nla/nla_ops.c
+++ b/source/blender/editors/space_nla/nla_ops.c
@@ -101,10 +101,10 @@ int nlaop_poll_tweakmode_on(bContext *C)
}
/* is tweakmode enabled - for use in NLA operator code */
-short nlaedit_is_tweakmode_on(bAnimContext *ac)
+bool nlaedit_is_tweakmode_on(bAnimContext *ac)
{
if (ac && ac->scene)
- return (ac->scene->flag & SCE_NLA_EDIT_ON);
+ return (ac->scene->flag & SCE_NLA_EDIT_ON) != 0;
return 0;
}