From af3e348430218e609c80d86c8dd418bed15e70e8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 19 May 2012 13:28:19 +0000 Subject: code cleanup: use TRUE/FALSE rather then 1/0 for better readability, also replace do prefix with do_ for bool vars. --- source/blender/editors/space_nla/nla_buttons.c | 6 +++--- source/blender/editors/space_nla/nla_draw.c | 12 ++++++------ source/blender/editors/space_nla/nla_edit.c | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'source/blender/editors/space_nla') diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c index 95a56176523..63e518e5aaa 100644 --- a/source/blender/editors/space_nla/nla_buttons.c +++ b/source/blender/editors/space_nla/nla_buttons.c @@ -335,11 +335,11 @@ static void nla_panel_properties(const bContext *C, Panel *pa) * - blend in/out can only be set when autoblending is off */ column = uiLayoutColumn(layout, 1); - uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_influence") == 0); + uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_influence") == FALSE); uiItemR(column, &strip_ptr, "use_auto_blend", 0, NULL, ICON_NONE); // XXX as toggle? sub = uiLayoutColumn(column, 1); - uiLayoutSetActive(sub, RNA_boolean_get(&strip_ptr, "use_auto_blend") == 0); + uiLayoutSetActive(sub, RNA_boolean_get(&strip_ptr, "use_auto_blend") == FALSE); uiItemR(sub, &strip_ptr, "blend_in", 0, NULL, ICON_NONE); uiItemR(sub, &strip_ptr, "blend_out", 0, NULL, ICON_NONE); @@ -383,7 +383,7 @@ static void nla_panel_actclip(const bContext *C, Panel *pa) /* action usage */ column = uiLayoutColumn(layout, 1); - uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_time") == 0); + uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_time") == FALSE); uiItemL(column, "Playback Settings:", ICON_NONE); uiItemR(column, &strip_ptr, "scale", 0, NULL, ICON_NONE); uiItemR(column, &strip_ptr, "repeat", 0, NULL, ICON_NONE); diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c index c12cd6f2d39..096c16298e3 100644 --- a/source/blender/editors/space_nla/nla_draw.c +++ b/source/blender/editors/space_nla/nla_draw.c @@ -676,7 +676,7 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View short indent = 0, offset = 0, sel = 0, group = 0, nonSolo = 0; int expand = -1, protect = -1, special = -1, mute = -1; char name[128]; - short doDraw = 0; + short do_draw = FALSE; /* determine what needs to be drawn */ switch (ale->type) { @@ -716,8 +716,8 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View sel = SEL_NLT(nlt); BLI_strncpy(name, nlt->name, sizeof(name)); - // draw manually still - doDraw = 1; + /* draw manually still */ + do_draw = TRUE; } break; case ANIMTYPE_NLAACTION: /* NLA Action-Line */ @@ -733,8 +733,8 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View else BLI_strncpy(name, "", sizeof(name)); - // draw manually still - doDraw = 1; + /* draw manually still */ + do_draw = TRUE; } break; @@ -745,7 +745,7 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View } /* if special types, draw manually for now... */ - if (doDraw) { + if (do_draw) { if (ale->id) { /* special exception for textures */ if (GS(ale->id->name) == ID_TE) { diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index 8a7e2a8a904..5c9994e46d3 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -503,7 +503,7 @@ static int nlaedit_add_transition_exec(bContext *C, wmOperator *op) bAnimListElem *ale; int filter; - int done = 0; + int done = FALSE; /* get editor data */ if (ANIM_animdata_get_context(C, &ac) == 0) @@ -822,7 +822,7 @@ static int nlaedit_duplicate_exec(bContext *C, wmOperator *UNUSED(op)) bAnimListElem *ale; int filter; - short done = 0; + short done = FALSE; /* get editor data */ if (ANIM_animdata_get_context(C, &ac) == 0) -- cgit v1.2.3