diff options
Diffstat (limited to 'source/blender/editors/space_graph')
-rw-r--r-- | source/blender/editors/space_graph/graph_buttons.c | 64 | ||||
-rw-r--r-- | source/blender/editors/space_graph/graph_draw.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_graph/graph_edit.c | 18 | ||||
-rw-r--r-- | source/blender/editors/space_graph/graph_intern.h | 2 | ||||
-rw-r--r-- | source/blender/editors/space_graph/graph_ops.c | 66 | ||||
-rw-r--r-- | source/blender/editors/space_graph/graph_select.c | 16 | ||||
-rw-r--r-- | source/blender/editors/space_graph/space_graph.c | 2 |
7 files changed, 85 insertions, 85 deletions
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index 437e3bef0d4..df2da0e78ed 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -122,20 +122,20 @@ static void graph_panel_view(const bContext *C, Panel *pa) RNA_pointer_create(&sc->id, &RNA_SpaceGraphEditor, sipo, &spaceptr); /* 2D-Cursor */ - col = uiLayoutColumn(pa->layout, FALSE); + col = uiLayoutColumn(pa->layout, false); uiItemR(col, &spaceptr, "show_cursor", 0, NULL, ICON_NONE); - sub = uiLayoutColumn(col, TRUE); + sub = uiLayoutColumn(col, true); uiLayoutSetActive(sub, RNA_boolean_get(&spaceptr, "show_cursor")); uiItemO(sub, IFACE_("Cursor from Selection"), ICON_NONE, "GRAPH_OT_frame_jump"); - sub = uiLayoutColumn(col, TRUE); + sub = uiLayoutColumn(col, true); uiLayoutSetActive(sub, RNA_boolean_get(&spaceptr, "show_cursor")); - row = uiLayoutSplit(sub, 0.7f, TRUE); + row = uiLayoutSplit(sub, 0.7f, true); uiItemR(row, &sceneptr, "frame_current", 0, IFACE_("Cursor X"), ICON_NONE); uiItemEnumO(row, "GRAPH_OT_snap", IFACE_("To Keys"), 0, "type", GRAPHKEYS_SNAP_CFRA); - row = uiLayoutSplit(sub, 0.7f, TRUE); + row = uiLayoutSplit(sub, 0.7f, true); uiItemR(row, &spaceptr, "cursor_position_y", 0, IFACE_("Cursor Y"), ICON_NONE); uiItemEnumO(row, "GRAPH_OT_snap", IFACE_("To Keys"), 0, "type", GRAPHKEYS_SNAP_VALUE); } @@ -165,24 +165,24 @@ static void graph_panel_properties(const bContext *C, Panel *pa) /* user-friendly 'name' for F-Curve */ /* TODO: only show the path if this is invalid? */ - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); icon = getname_anim_fcurve(name, ale->id, fcu); uiItemL(col, name, icon); /* RNA-Path Editing - only really should be enabled when things aren't working */ - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiLayoutSetEnabled(col, (fcu->flag & FCURVE_DISABLED) != 0); uiItemR(col, &fcu_ptr, "data_path", 0, "", ICON_RNA); uiItemR(col, &fcu_ptr, "array_index", 0, NULL, ICON_NONE); /* color settings */ - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemL(col, IFACE_("Display Color:"), ICON_NONE); - row = uiLayoutRow(col, TRUE); + row = uiLayoutRow(col, true); uiItemR(row, &fcu_ptr, "color_mode", 0, "", ICON_NONE); - sub = uiLayoutRow(row, TRUE); + sub = uiLayoutRow(row, true); uiLayoutSetEnabled(sub, (fcu->color_mode == FCURVE_COLOR_CUSTOM)); uiItemR(sub, &fcu_ptr, "color", 0, "", ICON_NONE); @@ -289,7 +289,7 @@ static void graph_panel_key_properties(const bContext *C, Panel *pa) } /* interpolation */ - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); uiItemR(col, &bezt_ptr, "interpolation", 0, NULL, ICON_NONE); /* easing type */ @@ -315,7 +315,7 @@ static void graph_panel_key_properties(const bContext *C, Panel *pa) * - we use the button-versions of the calls so that we can attach special update handlers * and unit conversion magic that cannot be achieved using a purely RNA-approach */ - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); /* keyframe itself */ { uiItemL(col, IFACE_("Key:"), ICON_NONE); @@ -466,7 +466,7 @@ static void graph_panel_driverVar__singleProp(uiLayout *layout, ID *id, DriverVa RNA_pointer_create(id, &RNA_DriverTarget, dtar, &dtar_ptr); /* Target ID */ - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiLayoutSetRedAlert(row, ((dtar->flag & DTAR_FLAG_INVALID) && !dtar->id)); uiTemplateAnyID(row, &dtar_ptr, "id", "id_type", IFACE_("Prop:")); @@ -478,7 +478,7 @@ static void graph_panel_driverVar__singleProp(uiLayout *layout, ID *id, DriverVa RNA_id_pointer_create(dtar->id, &root_ptr); /* rna path */ - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiLayoutSetRedAlert(col, (dtar->flag & DTAR_FLAG_INVALID)); uiTemplatePathBuilder(col, &dtar_ptr, "data_path", &root_ptr, IFACE_("Path")); } @@ -499,7 +499,7 @@ static void graph_panel_driverVar__rotDiff(uiLayout *layout, ID *id, DriverVar * RNA_pointer_create(id, &RNA_DriverTarget, dtar2, &dtar2_ptr); /* Bone 1 */ - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiLayoutSetRedAlert(col, (dtar->flag & DTAR_FLAG_INVALID)); /* XXX: per field... */ uiTemplateAnyID(col, &dtar_ptr, "id", "id_type", IFACE_("Bone 1:")); @@ -510,7 +510,7 @@ static void graph_panel_driverVar__rotDiff(uiLayout *layout, ID *id, DriverVar * uiItemPointerR(col, &dtar_ptr, "bone_target", &tar_ptr, "bones", "", ICON_BONE_DATA); } - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiLayoutSetRedAlert(col, (dtar2->flag & DTAR_FLAG_INVALID)); /* XXX: per field... */ uiTemplateAnyID(col, &dtar2_ptr, "id", "id_type", IFACE_("Bone 2:")); @@ -537,7 +537,7 @@ static void graph_panel_driverVar__locDiff(uiLayout *layout, ID *id, DriverVar * RNA_pointer_create(id, &RNA_DriverTarget, dtar2, &dtar2_ptr); /* Bone 1 */ - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiLayoutSetRedAlert(col, (dtar->flag & DTAR_FLAG_INVALID)); /* XXX: per field... */ uiTemplateAnyID(col, &dtar_ptr, "id", "id_type", IFACE_("Ob/Bone 1:")); @@ -551,7 +551,7 @@ static void graph_panel_driverVar__locDiff(uiLayout *layout, ID *id, DriverVar * uiLayoutSetRedAlert(col, false); /* we can clear it again now - it's only needed when creating the ID/Bone fields */ uiItemR(col, &dtar_ptr, "transform_space", 0, NULL, ICON_NONE); - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiLayoutSetRedAlert(col, (dtar2->flag & DTAR_FLAG_INVALID)); /* XXX: per field... */ uiTemplateAnyID(col, &dtar2_ptr, "id", "id_type", IFACE_("Ob/Bone 2:")); @@ -578,7 +578,7 @@ static void graph_panel_driverVar__transChan(uiLayout *layout, ID *id, DriverVar RNA_pointer_create(id, &RNA_DriverTarget, dtar, &dtar_ptr); /* properties */ - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiLayoutSetRedAlert(col, (dtar->flag & DTAR_FLAG_INVALID)); /* XXX: per field... */ uiTemplateAnyID(col, &dtar_ptr, "id", "id_type", IFACE_("Ob/Bone:")); @@ -589,7 +589,7 @@ static void graph_panel_driverVar__transChan(uiLayout *layout, ID *id, DriverVar uiItemPointerR(col, &dtar_ptr, "bone_target", &tar_ptr, "bones", "", ICON_BONE_DATA); } - sub = uiLayoutColumn(layout, TRUE); + sub = uiLayoutColumn(layout, true); uiItemR(sub, &dtar_ptr, "transform_type", 0, NULL, ICON_NONE); uiItemR(sub, &dtar_ptr, "transform_space", 0, IFACE_("Space"), ICON_NONE); } @@ -617,7 +617,7 @@ static void graph_panel_drivers(const bContext *C, Panel *pa) uiBlockSetHandleFunc(block, do_graph_region_driver_buttons, NULL); /* general actions - management */ - col = uiLayoutColumn(pa->layout, FALSE); + col = uiLayoutColumn(pa->layout, false); block = uiLayoutGetBlock(col); but = uiDefIconTextBut(block, BUT, B_IPO_DEPCHANGE, ICON_FILE_REFRESH, IFACE_("Update Dependencies"), 0, 0, 10 * UI_UNIT_X, 22, @@ -634,7 +634,7 @@ static void graph_panel_drivers(const bContext *C, Panel *pa) /* driver-level settings - type, expressions, and errors */ RNA_pointer_create(ale->id, &RNA_Driver, driver, &driver_ptr); - col = uiLayoutColumn(pa->layout, TRUE); + col = uiLayoutColumn(pa->layout, true); block = uiLayoutGetBlock(col); uiItemR(col, &driver_ptr, "type", 0, NULL, ICON_NONE); @@ -688,13 +688,13 @@ static void graph_panel_drivers(const bContext *C, Panel *pa) } } - col = uiLayoutColumn(pa->layout, TRUE); + col = uiLayoutColumn(pa->layout, true); /* debug setting */ uiItemR(col, &driver_ptr, "show_debug_info", 0, NULL, ICON_NONE); /* value of driver */ if (driver->flag & DRIVER_FLAG_SHOWDEBUG) { - uiLayout *row = uiLayoutRow(col, TRUE); + uiLayout *row = uiLayoutRow(col, true); char valBuf[32]; uiItemL(row, IFACE_("Driver Value:"), ICON_NONE); @@ -704,7 +704,7 @@ static void graph_panel_drivers(const bContext *C, Panel *pa) } /* add driver variables */ - col = uiLayoutColumn(pa->layout, FALSE); + col = uiLayoutColumn(pa->layout, false); block = uiLayoutGetBlock(col); but = uiDefIconTextBut(block, BUT, B_IPO_DEPCHANGE, ICON_ZOOMIN, IFACE_("Add Variable"), 0, 0, 10 * UI_UNIT_X, UI_UNIT_Y, @@ -718,14 +718,14 @@ static void graph_panel_drivers(const bContext *C, Panel *pa) uiLayout *box, *row; /* sub-layout column for this variable's settings */ - col = uiLayoutColumn(pa->layout, TRUE); + col = uiLayoutColumn(pa->layout, true); /* header panel */ box = uiLayoutBox(col); /* first row context info for driver */ RNA_pointer_create(ale->id, &RNA_DriverVariable, dvar, &dvar_ptr); - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); block = uiLayoutGetBlock(row); /* variable name */ uiItemR(row, &dvar_ptr, "name", 0, "", ICON_NONE); @@ -738,7 +738,7 @@ static void graph_panel_drivers(const bContext *C, Panel *pa) uiBlockSetEmboss(block, UI_EMBOSS); /* variable type */ - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); uiItemR(row, &dvar_ptr, "type", 0, "", ICON_NONE); /* variable type settings */ @@ -764,7 +764,7 @@ static void graph_panel_drivers(const bContext *C, Panel *pa) char valBuf[32]; box = uiLayoutBox(col); - row = uiLayoutRow(box, TRUE); + row = uiLayoutRow(box, true); uiItemL(row, IFACE_("Value:"), ICON_NONE); if ((dvar->type == DVAR_TYPE_ROT_DIFF) || @@ -816,7 +816,7 @@ static void graph_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); /* this is an operator button which calls a 'add modifier' operator... @@ -826,14 +826,14 @@ static void graph_panel_modifiers(const bContext *C, Panel *pa) 0.5 * UI_UNIT_X, 0, 7.5 * UI_UNIT_X, UI_UNIT_Y, TIP_("Adds a new F-Curve Modifier for the active F-Curve")); /* copy/paste (as sub-row)*/ - row = uiLayoutRow(row, TRUE); + row = uiLayoutRow(row, true); uiItemO(row, "", ICON_COPYDOWN, "GRAPH_OT_fmodifier_copy"); uiItemO(row, "", ICON_PASTEDOWN, "GRAPH_OT_fmodifier_paste"); } /* draw each modifier */ for (fcm = fcu->modifiers.first; fcm; fcm = fcm->next) { - col = uiLayoutColumn(pa->layout, TRUE); + col = uiLayoutColumn(pa->layout, true); ANIM_uiTemplate_fmodifier_draw(col, ale->id, &fcu->modifiers, fcm); } diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index 491309e5a07..e2b04476d46 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -1033,7 +1033,7 @@ void graph_draw_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid glScalef(1.0f, unit_scale, 1.0f); if (fcu->bezt) { - int do_handles = draw_fcurve_handles_check(sipo, fcu); + bool do_handles = draw_fcurve_handles_check(sipo, fcu); if (do_handles) { /* only draw handles/vertices on keyframes */ diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 0fa6edd0011..c2053c15f95 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -85,7 +85,7 @@ /* Get the min/max keyframes*/ /* note: it should return total boundbox, filter for selection only can be argument... */ void get_graph_keyframe_extents(bAnimContext *ac, float *xmin, float *xmax, float *ymin, float *ymax, - const short do_sel_only, const short include_handles) + const bool do_sel_only, const bool include_handles) { Scene *scene = ac->scene; @@ -105,7 +105,7 @@ void get_graph_keyframe_extents(bAnimContext *ac, float *xmin, float *xmax, floa /* check if any channels to set range with */ if (anim_data.first) { - short foundBounds = FALSE; + bool foundBounds = false; /* go through channels, finding max extents */ for (ale = anim_data.first; ale; ale = ale->next) { @@ -135,7 +135,7 @@ void get_graph_keyframe_extents(bAnimContext *ac, float *xmin, float *xmax, floa if ((ymin) && (tymin < *ymin)) *ymin = tymin; if ((ymax) && (tymax > *ymax)) *ymax = tymax; - foundBounds = TRUE; + foundBounds = true; } } @@ -187,7 +187,7 @@ static int graphkeys_previewrange_exec(bContext *C, wmOperator *UNUSED(op)) scene = ac.scene; /* set the range directly */ - get_graph_keyframe_extents(&ac, &min, &max, NULL, NULL, FALSE, FALSE); + get_graph_keyframe_extents(&ac, &min, &max, NULL, NULL, false, false); scene->r.flag |= SCER_PRV_RANGE; scene->r.psfra = iroundf(min); scene->r.pefra = iroundf(max); @@ -216,7 +216,7 @@ void GRAPH_OT_previewrange_set(wmOperatorType *ot) /* ****************** View-All Operator ****************** */ -static int graphkeys_viewall(bContext *C, const short do_sel_only, const short include_handles, +static int graphkeys_viewall(bContext *C, const bool do_sel_only, const bool include_handles, const int smooth_viewtx) { bAnimContext ac; @@ -243,7 +243,7 @@ static int graphkeys_viewall(bContext *C, const short do_sel_only, const short i static int graphkeys_viewall_exec(bContext *C, wmOperator *op) { - const short include_handles = RNA_boolean_get(op->ptr, "include_handles"); + const bool include_handles = RNA_boolean_get(op->ptr, "include_handles"); const int smooth_viewtx = WM_operator_smooth_viewtx_get(op); /* whole range */ @@ -252,7 +252,7 @@ static int graphkeys_viewall_exec(bContext *C, wmOperator *op) static int graphkeys_view_selected_exec(bContext *C, wmOperator *op) { - const short include_handles = RNA_boolean_get(op->ptr, "include_handles"); + const bool include_handles = RNA_boolean_get(op->ptr, "include_handles"); const int smooth_viewtx = WM_operator_smooth_viewtx_get(op); /* only selected */ @@ -274,7 +274,7 @@ void GRAPH_OT_view_all(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ - ot->prop = RNA_def_boolean(ot->srna, "include_handles", TRUE, "Include Handles", + ot->prop = RNA_def_boolean(ot->srna, "include_handles", true, "Include Handles", "Include handles of keyframes when calculating extents"); } @@ -293,7 +293,7 @@ void GRAPH_OT_view_selected(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ - ot->prop = RNA_def_boolean(ot->srna, "include_handles", TRUE, "Include Handles", + ot->prop = RNA_def_boolean(ot->srna, "include_handles", true, "Include Handles", "Include handles of keyframes when calculating extents"); } diff --git a/source/blender/editors/space_graph/graph_intern.h b/source/blender/editors/space_graph/graph_intern.h index fe1378679d8..408c78d194e 100644 --- a/source/blender/editors/space_graph/graph_intern.h +++ b/source/blender/editors/space_graph/graph_intern.h @@ -88,7 +88,7 @@ enum eGraphKeys_ColumnSelect_Mode { /* graph_edit.c */ void get_graph_keyframe_extents(struct bAnimContext *ac, float *xmin, float *xmax, float *ymin, float *ymax, - const short do_selected, const short include_handles); + const bool do_selected, const bool include_handles); void GRAPH_OT_previewrange_set(struct wmOperatorType *ot); void GRAPH_OT_view_all(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c index 1041c885697..907bcc3154b 100644 --- a/source/blender/editors/space_graph/graph_ops.c +++ b/source/blender/editors/space_graph/graph_ops.c @@ -282,70 +282,70 @@ static void graphedit_keymap_keyframes(wmKeyConfig *keyconf, wmKeyMap *keymap) /* graph_select.c - selection tools */ /* click-select: keyframe (replace) */ kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); - RNA_boolean_set(kmi->ptr, "curves", FALSE); - RNA_boolean_set(kmi->ptr, "column", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); + RNA_boolean_set(kmi->ptr, "curves", false); + RNA_boolean_set(kmi->ptr, "column", false); /* click-select: all keyframes on same frame (replace) */ kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); - RNA_boolean_set(kmi->ptr, "curves", FALSE); - RNA_boolean_set(kmi->ptr, "column", TRUE); + RNA_boolean_set(kmi->ptr, "extend", false); + RNA_boolean_set(kmi->ptr, "curves", false); + RNA_boolean_set(kmi->ptr, "column", true); /* click-select: keyframe (add) */ kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); - RNA_boolean_set(kmi->ptr, "curves", FALSE); - RNA_boolean_set(kmi->ptr, "column", FALSE); + RNA_boolean_set(kmi->ptr, "extend", true); + RNA_boolean_set(kmi->ptr, "curves", false); + RNA_boolean_set(kmi->ptr, "column", false); /* click-select: all keyframes on same frame (add) */ kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT | KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); - RNA_boolean_set(kmi->ptr, "curves", FALSE); - RNA_boolean_set(kmi->ptr, "column", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); + RNA_boolean_set(kmi->ptr, "curves", false); + RNA_boolean_set(kmi->ptr, "column", true); /* click-select: all keyframes in same curve (replace) */ kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); - RNA_boolean_set(kmi->ptr, "curves", TRUE); - RNA_boolean_set(kmi->ptr, "column", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); + RNA_boolean_set(kmi->ptr, "curves", true); + RNA_boolean_set(kmi->ptr, "column", false); /* click-select: all keyframes in same curve (add) */ kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_ALT | KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); - RNA_boolean_set(kmi->ptr, "curves", TRUE); - RNA_boolean_set(kmi->ptr, "column", FALSE); + RNA_boolean_set(kmi->ptr, "extend", true); + RNA_boolean_set(kmi->ptr, "curves", true); + RNA_boolean_set(kmi->ptr, "column", false); /* click-select left/right */ kmi = WM_keymap_add_item(keymap, "GRAPH_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", GRAPHKEYS_LRSEL_TEST); kmi = WM_keymap_add_item(keymap, "GRAPH_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", GRAPHKEYS_LRSEL_TEST); kmi = WM_keymap_add_item(keymap, "GRAPH_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", GRAPHKEYS_LRSEL_LEFT); kmi = WM_keymap_add_item(keymap, "GRAPH_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", GRAPHKEYS_LRSEL_RIGHT); /* deselect all */ kmi = WM_keymap_add_item(keymap, "GRAPH_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, "GRAPH_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, "GRAPH_OT_select_border", BKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "axis_range", FALSE); - RNA_boolean_set(kmi->ptr, "include_handles", FALSE); + RNA_boolean_set(kmi->ptr, "axis_range", false); + RNA_boolean_set(kmi->ptr, "include_handles", false); kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "axis_range", TRUE); - RNA_boolean_set(kmi->ptr, "include_handles", FALSE); + RNA_boolean_set(kmi->ptr, "axis_range", true); + RNA_boolean_set(kmi->ptr, "include_handles", false); kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "axis_range", FALSE); - RNA_boolean_set(kmi->ptr, "include_handles", TRUE); + RNA_boolean_set(kmi->ptr, "axis_range", false); + RNA_boolean_set(kmi->ptr, "include_handles", true); kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, KM_CTRL | KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "axis_range", TRUE); - RNA_boolean_set(kmi->ptr, "include_handles", TRUE); + RNA_boolean_set(kmi->ptr, "axis_range", true); + RNA_boolean_set(kmi->ptr, "include_handles", true); kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL, 0); RNA_boolean_set(kmi->ptr, "deselect", false); @@ -411,7 +411,7 @@ static void graphedit_keymap_keyframes(wmKeyConfig *keyconf, wmKeyMap *keymap) /* F-Modifiers */ kmi = WM_keymap_add_item(keymap, "GRAPH_OT_fmodifier_add", MKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "only_active", FALSE); + RNA_boolean_set(kmi->ptr, "only_active", false); /* animation module */ /* channels list diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index 342a2d18b99..23bc8e94ef8 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -164,9 +164,9 @@ static int graphkeys_deselectall_exec(bContext *C, wmOperator *op) /* 'standard' behavior - check if selected, then apply relevant selection */ if (RNA_boolean_get(op->ptr, "invert")) - deselect_graph_keys(&ac, 0, SELECT_INVERT, TRUE); + deselect_graph_keys(&ac, 0, SELECT_INVERT, true); else - deselect_graph_keys(&ac, 1, SELECT_ADD, TRUE); + deselect_graph_keys(&ac, 1, SELECT_ADD, true); /* restore active F-Curve... */ if (ale_active) { @@ -334,7 +334,7 @@ static int graphkeys_borderselect_exec(bContext *C, wmOperator *op) /* clear all selection if not extending selection */ extend = RNA_boolean_get(op->ptr, "extend"); if (!extend) - deselect_graph_keys(&ac, 1, SELECT_SUBTRACT, TRUE); + deselect_graph_keys(&ac, 1, SELECT_SUBTRACT, true); /* get select mode * - 'gesture_mode' from the operator specifies how to select @@ -395,7 +395,7 @@ void GRAPH_OT_select_border(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER /*|OPTYPE_UNDO*/; /* rna */ - WM_operator_properties_gesture_border(ot, TRUE); + WM_operator_properties_gesture_border(ot, true); ot->prop = RNA_def_boolean(ot->srna, "axis_range", 0, "Axis Range", ""); RNA_def_boolean(ot->srna, "include_handles", 0, "Include Handles", "Are handles tested individually against the selection criteria"); @@ -424,7 +424,7 @@ static int graphkeys_lassoselect_exec(bContext *C, wmOperator *op) /* clear all selection if not extending selection */ extend = RNA_boolean_get(op->ptr, "extend"); if (!extend) - deselect_graph_keys(&ac, 1, SELECT_SUBTRACT, TRUE); + deselect_graph_keys(&ac, 1, SELECT_SUBTRACT, true); if (!RNA_boolean_get(op->ptr, "deselect")) selectmode = SELECT_ADD; @@ -867,7 +867,7 @@ static void graphkeys_select_leftright(bAnimContext *ac, short leftright, short /* - deselect all other keyframes, so that just the newly selected remain * - channels aren't deselected, since we don't re-select any as a consequence */ - deselect_graph_keys(ac, 0, SELECT_SUBTRACT, FALSE); + deselect_graph_keys(ac, 0, SELECT_SUBTRACT, false); } /* set callbacks and editing data */ @@ -1234,7 +1234,7 @@ static void mouse_graph_keys(bAnimContext *ac, const int mval[2], short select_m select_mode = SELECT_ADD; /* deselect all other keyframes (+ F-Curves too) */ - deselect_graph_keys(ac, 0, SELECT_SUBTRACT, TRUE); + deselect_graph_keys(ac, 0, SELECT_SUBTRACT, true); /* deselect other channels too, but only only do this if * selection of channel when the visibility of keyframes @@ -1371,7 +1371,7 @@ static void graphkeys_mselect_column(bAnimContext *ac, const int mval[2], short /* - deselect all other keyframes, so that just the newly selected remain * - channels aren't deselected, since we don't re-select any as a consequence */ - deselect_graph_keys(ac, 0, SELECT_SUBTRACT, FALSE); + deselect_graph_keys(ac, 0, SELECT_SUBTRACT, false); } /* initialize keyframe editing data */ diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index 2aac3133b7b..bfc1bcbcba0 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -256,7 +256,7 @@ static void graph_main_area_draw(const bContext *C, ARegion *ar) graph_draw_curves(&ac, sipo, ar, grid, 1); /* XXX the slow way to set tot rect... but for nice sliders needed (ton) */ - get_graph_keyframe_extents(&ac, &v2d->tot.xmin, &v2d->tot.xmax, &v2d->tot.ymin, &v2d->tot.ymax, FALSE, TRUE); + get_graph_keyframe_extents(&ac, &v2d->tot.xmin, &v2d->tot.xmax, &v2d->tot.ymin, &v2d->tot.ymax, false, true); /* extra offset so that these items are visible */ v2d->tot.xmin -= 10.0f; v2d->tot.xmax += 10.0f; |