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-04-01 04:34:00 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-04-01 08:22:28 +0400
commit617557b08ea94e2b65a1697ddf0b79651204d92b (patch)
tree50b24bab075b42fa20456140c9a9681cfb01325b /source/blender/editors/space_nla
parent2c00ecc738c04dc5dc22d4a6b81a1e937526ba6d (diff)
Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define
Diffstat (limited to 'source/blender/editors/space_nla')
-rw-r--r--source/blender/editors/space_nla/nla_buttons.c56
-rw-r--r--source/blender/editors/space_nla/nla_draw.c2
-rw-r--r--source/blender/editors/space_nla/nla_edit.c10
-rw-r--r--source/blender/editors/space_nla/nla_ops.c28
4 files changed, 48 insertions, 48 deletions
diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c
index ce7d537a518..0c4f08c9199 100644
--- a/source/blender/editors/space_nla/nla_buttons.c
+++ b/source/blender/editors/space_nla/nla_buttons.c
@@ -269,7 +269,7 @@ static void nla_panel_animdata(const bContext *C, Panel *pa)
RNA_id_pointer_create(id, &id_ptr);
/* ID-block name > AnimData */
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_LEFT);
uiItemL(row, id->name + 2, RNA_struct_ui_icon(id_ptr.type)); /* id-block (src) */
@@ -281,19 +281,19 @@ static void nla_panel_animdata(const bContext *C, Panel *pa)
/* Active Action Properties ------------------------------------- */
/* action */
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiTemplateID(row, (bContext *)C, &adt_ptr, "action", "ACTION_OT_new", NULL, NULL /*"ACTION_OT_unlink"*/); // XXX: need to make these operators
/* extrapolation */
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, &adt_ptr, "action_extrapolation", 0, NULL, ICON_NONE);
/* blending */
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, &adt_ptr, "action_blend_type", 0, NULL, ICON_NONE);
/* influence */
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, &adt_ptr, "action_influence", 0, NULL, ICON_NONE);
}
@@ -313,7 +313,7 @@ static void nla_panel_track(const bContext *C, Panel *pa)
uiBlockSetHandleFunc(block, do_nla_region_buttons, NULL);
/* Info - Active NLA-Context:Track ---------------------- */
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, &nlt_ptr, "name", 0, NULL, ICON_NLA);
}
@@ -334,12 +334,12 @@ static void nla_panel_properties(const bContext *C, Panel *pa)
/* Strip Properties ------------------------------------- */
/* strip type */
- row = uiLayoutColumn(layout, TRUE);
+ row = uiLayoutColumn(layout, true);
uiItemR(row, &strip_ptr, "name", 0, NULL, ICON_NLA); // XXX icon?
uiItemR(row, &strip_ptr, "type", 0, NULL, ICON_NONE);
/* strip extents */
- column = uiLayoutColumn(layout, TRUE);
+ column = uiLayoutColumn(layout, true);
uiItemL(column, IFACE_("Strip Extents:"), ICON_NONE);
uiItemR(column, &strip_ptr, "frame_start", 0, NULL, ICON_NONE);
uiItemR(column, &strip_ptr, "frame_end", 0, NULL, ICON_NONE);
@@ -353,27 +353,27 @@ static void nla_panel_properties(const bContext *C, Panel *pa)
/* only show if allowed to... */
if (showEvalProps) {
/* extrapolation */
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, &strip_ptr, "extrapolation", 0, NULL, ICON_NONE);
/* blending */
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, &strip_ptr, "blend_type", 0, NULL, ICON_NONE);
/* blend in/out + autoblending
* - blend in/out can only be set when autoblending is off
*/
- column = uiLayoutColumn(layout, TRUE);
- uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_influence") == FALSE);
+ column = uiLayoutColumn(layout, true);
+ 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, TRUE);
- uiLayoutSetActive(sub, RNA_boolean_get(&strip_ptr, "use_auto_blend") == FALSE);
+ sub = uiLayoutColumn(column, true);
+ 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);
/* settings */
- column = uiLayoutColumn(layout, TRUE);
+ column = uiLayoutColumn(layout, true);
uiLayoutSetActive(column, !(RNA_boolean_get(&strip_ptr, "use_animated_influence") || RNA_boolean_get(&strip_ptr, "use_animated_time")));
uiItemL(column, IFACE_("Playback Settings:"), ICON_NONE);
uiItemR(column, &strip_ptr, "mute", 0, NULL, ICON_NONE);
@@ -399,24 +399,24 @@ static void nla_panel_actclip(const bContext *C, Panel *pa)
/* Strip Properties ------------------------------------- */
/* action pointer */
- row = uiLayoutRow(layout, TRUE);
+ row = uiLayoutRow(layout, true);
uiItemR(row, &strip_ptr, "action", 0, NULL, ICON_ACTION);
/* action extents */
// XXX custom names were used here (to avoid the prefixes)... probably not necessary in future?
- column = uiLayoutColumn(layout, TRUE);
+ column = uiLayoutColumn(layout, true);
uiItemL(column, IFACE_("Action Extents:"), ICON_NONE);
uiItemR(column, &strip_ptr, "action_frame_start", 0, IFACE_("Start Frame"), ICON_NONE);
uiItemR(column, &strip_ptr, "action_frame_end", 0, IFACE_("End Frame"), ICON_NONE);
// XXX: this layout may actually be too abstract and confusing, and may be better using standard column layout
- row = uiLayoutRow(layout, FALSE);
+ row = uiLayoutRow(layout, false);
uiItemR(row, &strip_ptr, "use_sync_length", 0, IFACE_("Sync Length"), ICON_NONE);
uiItemO(row, IFACE_("Now"), ICON_FILE_REFRESH, "NLA_OT_action_sync_length");
/* action usage */
- column = uiLayoutColumn(layout, TRUE);
- uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_time") == FALSE);
+ column = uiLayoutColumn(layout, true);
+ uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_time") == false);
uiItemL(column, IFACE_("Playback Settings:"), ICON_NONE);
uiItemR(column, &strip_ptr, "scale", 0, NULL, ICON_NONE);
uiItemR(column, &strip_ptr, "repeat", 0, NULL, ICON_NONE);
@@ -437,19 +437,19 @@ static void nla_panel_evaluation(const bContext *C, Panel *pa)
block = uiLayoutGetBlock(layout);
uiBlockSetHandleFunc(block, do_nla_region_buttons, NULL);
- col = uiLayoutColumn(layout, TRUE);
+ col = uiLayoutColumn(layout, true);
uiItemR(col, &strip_ptr, "use_animated_influence", 0, NULL, ICON_NONE);
- sub = uiLayoutColumn(col, TRUE);
+ sub = uiLayoutColumn(col, true);
uiLayoutSetEnabled(sub, RNA_boolean_get(&strip_ptr, "use_animated_influence"));
uiItemR(sub, &strip_ptr, "influence", 0, NULL, ICON_NONE);
- col = uiLayoutColumn(layout, TRUE);
- sub = uiLayoutRow(col, FALSE);
+ col = uiLayoutColumn(layout, true);
+ sub = uiLayoutRow(col, false);
uiItemR(sub, &strip_ptr, "use_animated_time", 0, NULL, ICON_NONE);
uiItemR(sub, &strip_ptr, "use_animated_time_cyclic", 0, NULL, ICON_NONE);
- sub = uiLayoutRow(col, FALSE);
+ sub = uiLayoutRow(col, false);
uiLayoutSetEnabled(sub, RNA_boolean_get(&strip_ptr, "use_animated_time"));
uiItemR(sub, &strip_ptr, "strip_time", 0, NULL, ICON_NONE);
}
@@ -473,7 +473,7 @@ static void nla_panel_modifiers(const bContext *C, Panel *pa)
/* 'add modifier' button at top of panel */
{
- row = uiLayoutRow(pa->layout, FALSE);
+ row = uiLayoutRow(pa->layout, false);
block = uiLayoutGetBlock(row);
// XXX for now, this will be a operator button which calls a temporary 'add modifier' operator
@@ -482,14 +482,14 @@ static void nla_panel_modifiers(const bContext *C, Panel *pa)
TIP_("Adds a new F-Modifier for the active NLA Strip"));
/* copy/paste (as sub-row)*/
- row = uiLayoutRow(row, TRUE);
+ row = uiLayoutRow(row, true);
uiItemO(row, "", ICON_COPYDOWN, "NLA_OT_fmodifier_copy");
uiItemO(row, "", ICON_PASTEDOWN, "NLA_OT_fmodifier_paste");
}
/* draw each modifier */
for (fcm = strip->modifiers.first; fcm; fcm = fcm->next) {
- col = uiLayoutColumn(pa->layout, TRUE);
+ col = uiLayoutColumn(pa->layout, true);
ANIM_uiTemplate_fmodifier_draw(col, strip_ptr.id.data, &strip->modifiers, fcm);
}
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index 9f83bc80314..cf01ebd6976 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -656,7 +656,7 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View
BLI_strncpy(name, act ? act->id.name + 2 : "<No Action>", sizeof(name));
/* draw manually still */
- do_draw = TRUE;
+ do_draw = true;
break;
}
default: /* handled by standard channel-drawing API */
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index f54ceeeb702..80b1918ff8e 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -342,13 +342,13 @@ static int nlaedit_viewall(bContext *C, const short onlySel)
static int nlaedit_viewall_exec(bContext *C, wmOperator *UNUSED(op))
{
/* whole range */
- return nlaedit_viewall(C, FALSE);
+ return nlaedit_viewall(C, false);
}
static int nlaedit_viewsel_exec(bContext *C, wmOperator *UNUSED(op))
{
/* only selected */
- return nlaedit_viewall(C, TRUE);
+ return nlaedit_viewall(C, true);
}
void NLA_OT_view_all(wmOperatorType *ot)
@@ -527,7 +527,7 @@ static int nlaedit_add_transition_exec(bContext *C, wmOperator *op)
bAnimListElem *ale;
int filter;
- int done = FALSE;
+ int done = false;
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
@@ -846,7 +846,7 @@ static int nlaedit_duplicate_exec(bContext *C, wmOperator *UNUSED(op))
bAnimListElem *ale;
int filter;
- short done = FALSE;
+ bool done = false;
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
@@ -889,7 +889,7 @@ static int nlaedit_duplicate_exec(bContext *C, wmOperator *UNUSED(op))
/* auto-name newly created strip */
BKE_nlastrip_validate_name(adt, nstrip);
- done++;
+ done = true;
}
}
}
diff --git a/source/blender/editors/space_nla/nla_ops.c b/source/blender/editors/space_nla/nla_ops.c
index 7a7431b22b3..0a010ffb819 100644
--- a/source/blender/editors/space_nla/nla_ops.c
+++ b/source/blender/editors/space_nla/nla_ops.c
@@ -178,16 +178,16 @@ static void nla_keymap_channels(wmKeyMap *keymap)
/* click-select */
// XXX for now, only leftmouse....
kmi = WM_keymap_add_item(keymap, "NLA_OT_channels_click", LEFTMOUSE, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
kmi = WM_keymap_add_item(keymap, "NLA_OT_channels_click", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
/* channel operations ------------------------------------------------------------ */
/* add tracks */
kmi = WM_keymap_add_item(keymap, "NLA_OT_tracks_add", AKEY, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "above_selected", FALSE);
+ RNA_boolean_set(kmi->ptr, "above_selected", false);
kmi = WM_keymap_add_item(keymap, "NLA_OT_tracks_add", AKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "above_selected", TRUE);
+ RNA_boolean_set(kmi->ptr, "above_selected", true);
/* delete tracks */
WM_keymap_add_item(keymap, "NLA_OT_tracks_delete", XKEY, KM_PRESS, 0, 0);
@@ -201,38 +201,38 @@ static void nla_keymap_main(wmKeyConfig *keyconf, wmKeyMap *keymap)
/* selection ------------------------------------------------ */
/* click select */
kmi = WM_keymap_add_item(keymap, "NLA_OT_click_select", SELECTMOUSE, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
kmi = WM_keymap_add_item(keymap, "NLA_OT_click_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
/* select left/right */
kmi = WM_keymap_add_item(keymap, "NLA_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
RNA_enum_set(kmi->ptr, "mode", NLAEDIT_LRSEL_TEST);
kmi = WM_keymap_add_item(keymap, "NLA_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
- RNA_boolean_set(kmi->ptr, "extend", TRUE);
+ RNA_boolean_set(kmi->ptr, "extend", true);
RNA_enum_set(kmi->ptr, "mode", NLAEDIT_LRSEL_TEST);
kmi = WM_keymap_add_item(keymap, "NLA_OT_select_leftright", LEFTBRACKETKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
RNA_enum_set(kmi->ptr, "mode", NLAEDIT_LRSEL_LEFT);
kmi = WM_keymap_add_item(keymap, "NLA_OT_select_leftright", RIGHTBRACKETKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "extend", FALSE);
+ RNA_boolean_set(kmi->ptr, "extend", false);
RNA_enum_set(kmi->ptr, "mode", NLAEDIT_LRSEL_RIGHT);
/* deselect all */
/* TODO: uniformize with other select_all ops? */
kmi = WM_keymap_add_item(keymap, "NLA_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "invert", FALSE);
+ RNA_boolean_set(kmi->ptr, "invert", false);
kmi = WM_keymap_add_item(keymap, "NLA_OT_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0);
- RNA_boolean_set(kmi->ptr, "invert", TRUE);
+ RNA_boolean_set(kmi->ptr, "invert", true);
/* borderselect */
kmi = WM_keymap_add_item(keymap, "NLA_OT_select_border", BKEY, KM_PRESS, 0, 0);
- RNA_boolean_set(kmi->ptr, "axis_range", FALSE);
+ RNA_boolean_set(kmi->ptr, "axis_range", false);
kmi = WM_keymap_add_item(keymap, "NLA_OT_select_border", BKEY, KM_PRESS, KM_ALT, 0);
- RNA_boolean_set(kmi->ptr, "axis_range", TRUE);
+ RNA_boolean_set(kmi->ptr, "axis_range", true);
/* view ---------------------------------------------------- */
/* auto-set range */