diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-21 09:46:41 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-21 09:46:41 +0400 |
commit | f3ece5a108db0bdbefb4663ef4ebd9a7e039e263 (patch) | |
tree | cb6329453be169ef1ec49ef8b8d50a6b14364880 /source/blender/editors/space_graph | |
parent | a1a0c8da13a7b91b0264c7535752864379f3d852 (diff) |
style cleanup: trailing tabs & expand some non prefix tabs into spaces.
Diffstat (limited to 'source/blender/editors/space_graph')
-rw-r--r-- | source/blender/editors/space_graph/graph_buttons.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_graph/graph_draw.c | 18 | ||||
-rw-r--r-- | source/blender/editors/space_graph/graph_edit.c | 26 | ||||
-rw-r--r-- | source/blender/editors/space_graph/graph_intern.h | 2 | ||||
-rw-r--r-- | source/blender/editors/space_graph/graph_select.c | 8 | ||||
-rw-r--r-- | source/blender/editors/space_graph/space_graph.c | 4 |
6 files changed, 31 insertions, 31 deletions
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index 3e8f6f1c7fc..551ef953538 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -299,7 +299,7 @@ static void graph_panel_key_properties(const bContext *C, Panel *pa) if (RNA_path_resolve(&id_ptr, fcu->rna_path, &fcu_prop_ptr, &fcu_prop) && fcu_prop) { /* determine the unit for this property */ unit = RNA_SUBTYPE_UNIT(RNA_property_subtype(fcu_prop)); - } + } /* interpolation */ col = uiLayoutColumn(layout, FALSE); @@ -407,7 +407,7 @@ static void driver_remove_cb(bContext *C, void *ale_v, void *UNUSED(arg)) if (ELEM(NULL, id, fcu)) return; - /* call API method to remove this driver */ + /* call API method to remove this driver */ ANIM_remove_driver(reports, id, fcu->rna_path, fcu->array_index, 0); } diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index c9864df393a..f665b979559 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -262,7 +262,7 @@ static void set_fcurve_vertex_color(FCurve *fcu, short sel) /* Curve's points ARE BEING edited */ if (sel) UI_ThemeColorShadeAlpha(TH_VERTEX_SELECT, 0, alphaOffset); else UI_ThemeColorShadeAlpha(TH_VERTEX, 0, alphaOffset); - } + } else { /* Curve's points CANNOT BE edited */ if (sel) UI_ThemeColorShadeAlpha(TH_TEXT_HI, 0, alphaOffset); @@ -318,7 +318,7 @@ static int draw_fcurve_handles_check(SpaceIpo *sipo, FCurve *fcu) ) { return 0; - } + } else { return 1; } @@ -561,7 +561,7 @@ static void draw_fcurve_curve_samples(bAnimContext *ac, ID *id, FCurve *fcu, Vie if ((fcu->extend == FCURVE_EXTRAPOLATE_CONSTANT) || (fcu->flag & FCURVE_INT_VALUES) || (fcu->totvert == 1)) { /* just extend across the first keyframe's value */ v[1] = prevfpt->vec[1]; - } + } else { /* extrapolate linear dosnt use the handle, use the next points center instead */ fac = (prevfpt->vec[0] - fpt->vec[0]) / (prevfpt->vec[0] - v[0]); @@ -599,7 +599,7 @@ static void draw_fcurve_curve_samples(bAnimContext *ac, ID *id, FCurve *fcu, Vie if ((fcu->extend == FCURVE_EXTRAPOLATE_CONSTANT) || (fcu->flag & FCURVE_INT_VALUES) || (fcu->totvert == 1)) { /* based on last keyframe's value */ v[1] = prevfpt->vec[1]; - } + } else { /* extrapolate linear dosnt use the handle, use the previous points center instead */ fpt = prevfpt - 1; @@ -642,13 +642,13 @@ static void draw_fcurve_curve_bezts(bAnimContext *ac, ID *id, FCurve *fcu, View2 if ((fcu->extend == FCURVE_EXTRAPOLATE_CONSTANT) || (prevbezt->ipo == BEZT_IPO_CONST) || (fcu->totvert == 1)) { /* just extend across the first keyframe's value */ v1[1] = prevbezt->vec[1][1]; - } + } else if (prevbezt->ipo == BEZT_IPO_LIN) { /* extrapolate linear dosnt use the handle, use the next points center instead */ fac = (prevbezt->vec[1][0] - bezt->vec[1][0]) / (prevbezt->vec[1][0] - v1[0]); if (fac) fac = 1.0f / fac; v1[1] = prevbezt->vec[1][1] - fac * (prevbezt->vec[1][1] - bezt->vec[1][1]); - } + } else { /* based on angle of handle 1 (relative to keyframe) */ fac = (prevbezt->vec[0][0] - prevbezt->vec[1][0]) / (prevbezt->vec[1][0] - v1[0]); @@ -748,14 +748,14 @@ static void draw_fcurve_curve_bezts(bAnimContext *ac, ID *id, FCurve *fcu, View2 if ((fcu->extend == FCURVE_EXTRAPOLATE_CONSTANT) || (fcu->flag & FCURVE_INT_VALUES) || (prevbezt->ipo == BEZT_IPO_CONST) || (fcu->totvert == 1)) { /* based on last keyframe's value */ v1[1] = prevbezt->vec[1][1]; - } + } else if (prevbezt->ipo == BEZT_IPO_LIN) { /* extrapolate linear dosnt use the handle, use the previous points center instead */ bezt = prevbezt - 1; fac = (prevbezt->vec[1][0] - bezt->vec[1][0]) / (prevbezt->vec[1][0] - v1[0]); if (fac) fac = 1.0f / fac; v1[1] = prevbezt->vec[1][1] - fac * (prevbezt->vec[1][1] - bezt->vec[1][1]); - } + } else { /* based on angle of handle 1 (relative to keyframe) */ fac = (prevbezt->vec[2][0] - prevbezt->vec[1][0]) / (prevbezt->vec[1][0] - v1[0]); @@ -971,7 +971,7 @@ void graph_draw_channel_names(bContext *C, bAnimContext *ac, ARegion *ar) height = (float)((items * ACHANNEL_STEP) + (ACHANNEL_HEIGHT * 2)); UI_view2d_totRect_set(v2d, ar->winx, height); - /* loop through channels, and set up drawing depending on their type */ + /* loop through channels, and set up drawing depending on their type */ { /* first pass: just the standard GL-drawing for backdrop + text */ y = (float)ACHANNEL_FIRST; diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 30ec32ec0aa..56ebde6e316 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -332,7 +332,7 @@ static void create_ghost_curves(bAnimContext *ac, int start, int end) ChannelDriver *driver = fcu->driver; FPoint *fpt; float unitFac; - int cfra; + int cfra; /* disable driver so that it don't muck up the sampling process */ fcu->driver = NULL; @@ -724,7 +724,7 @@ static int graphkeys_copy_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; /* copy keyframes */ - if (copy_graph_keys(&ac)) { + if (copy_graph_keys(&ac)) { BKE_report(op->reports, RPT_ERROR, "No keyframes copied to keyframes copy/paste buffer"); return OPERATOR_CANCELLED; } @@ -1824,17 +1824,17 @@ void GRAPH_OT_frame_jump(wmOperatorType *ot) /* defines for snap keyframes tool */ static EnumPropertyItem prop_graphkeys_snap_types[] = { - {GRAPHKEYS_SNAP_CFRA, "CFRA", 0, "Current Frame", + {GRAPHKEYS_SNAP_CFRA, "CFRA", 0, "Current Frame", "Snap selected keyframes to the current frame"}, - {GRAPHKEYS_SNAP_VALUE, "VALUE", 0, "Cursor Value", + {GRAPHKEYS_SNAP_VALUE, "VALUE", 0, "Cursor Value", "Set values of selected keyframes to the cursor value (Y/Horizontal component)"}, - {GRAPHKEYS_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame", + {GRAPHKEYS_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame", "Snap selected keyframes to the nearest (whole) frame (use to fix accidental sub-frame offsets)"}, - {GRAPHKEYS_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, "Nearest Second", + {GRAPHKEYS_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, "Nearest Second", "Snap selected keyframes to the nearest second"}, - {GRAPHKEYS_SNAP_NEAREST_MARKER, "NEAREST_MARKER", 0, "Nearest Marker", + {GRAPHKEYS_SNAP_NEAREST_MARKER, "NEAREST_MARKER", 0, "Nearest Marker", "Snap selected keyframes to the nearest marker"}, - {GRAPHKEYS_SNAP_HORIZONTAL, "HORIZONTAL", 0, "Flatten Handles", + {GRAPHKEYS_SNAP_HORIZONTAL, "HORIZONTAL", 0, "Flatten Handles", "Flatten handles for a smoother transition"}, {0, NULL, 0, NULL, NULL} }; @@ -1938,15 +1938,15 @@ void GRAPH_OT_snap(wmOperatorType *ot) /* defines for mirror keyframes tool */ static EnumPropertyItem prop_graphkeys_mirror_types[] = { - {GRAPHKEYS_MIRROR_CFRA, "CFRA", 0, "By Times over Current Frame", + {GRAPHKEYS_MIRROR_CFRA, "CFRA", 0, "By Times over Current Frame", "Flip times of selected keyframes using the current frame as the mirror line"}, - {GRAPHKEYS_MIRROR_VALUE, "VALUE", 0, "By Values over Cursor Value", + {GRAPHKEYS_MIRROR_VALUE, "VALUE", 0, "By Values over Cursor Value", "Flip values of selected keyframes using the cursor value (Y/Horizontal component) as the mirror line"}, - {GRAPHKEYS_MIRROR_YAXIS, "YAXIS", 0, "By Times over Time=0", + {GRAPHKEYS_MIRROR_YAXIS, "YAXIS", 0, "By Times over Time=0", "Flip times of selected keyframes, effectively reversing the order they appear in"}, - {GRAPHKEYS_MIRROR_XAXIS, "XAXIS", 0, "By Values over Value=0", + {GRAPHKEYS_MIRROR_XAXIS, "XAXIS", 0, "By Values over Value=0", "Flip values of selected keyframes (i.e. negative values become positive, and vice versa)"}, - {GRAPHKEYS_MIRROR_MARKER, "MARKER", 0, "By Times over First Selected Marker", + {GRAPHKEYS_MIRROR_MARKER, "MARKER", 0, "By Times over First Selected Marker", "Flip times of selected keyframes using the first selected marker as the reference point"}, {0, NULL, 0, NULL, NULL} }; diff --git a/source/blender/editors/space_graph/graph_intern.h b/source/blender/editors/space_graph/graph_intern.h index eb657169970..b2dbf764c1d 100644 --- a/source/blender/editors/space_graph/graph_intern.h +++ b/source/blender/editors/space_graph/graph_intern.h @@ -123,7 +123,7 @@ enum { GRAPHKEYS_SNAP_CFRA = 1, GRAPHKEYS_SNAP_NEAREST_FRAME, GRAPHKEYS_SNAP_NEAREST_SECOND, - GRAPHKEYS_SNAP_NEAREST_MARKER, + GRAPHKEYS_SNAP_NEAREST_MARKER, GRAPHKEYS_SNAP_HORIZONTAL, GRAPHKEYS_SNAP_VALUE, } eGraphKeys_Snap_Mode; diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index e2fc1657379..978b3224850 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -757,7 +757,7 @@ static void graphkeys_select_leftright(bAnimContext *ac, short leftright, short if (leftright == GRAPHKEYS_LRSEL_LEFT) { ked.f1 = MINAFRAMEF; ked.f2 = (float)(CFRA + 0.1f); - } + } else { ked.f1 = (float)(CFRA - 0.1f); ked.f2 = MAXFRAMEF; @@ -835,7 +835,7 @@ static int graphkeys_select_leftright_invoke(bContext *C, wmOperator *op, wmEven UI_view2d_region_to_view(v2d, event->mval[0], event->mval[1], &x, NULL); if (x < CFRA) RNA_enum_set(op->ptr, "mode", GRAPHKEYS_LRSEL_LEFT); - else + else RNA_enum_set(op->ptr, "mode", GRAPHKEYS_LRSEL_RIGHT); } @@ -1113,7 +1113,7 @@ static void mouse_graph_keys(bAnimContext *ac, const int mval[2], short select_m nvi = find_nearest_fcurve_vert(ac, mval); /* check if anything to select */ - if (nvi == NULL) + if (nvi == NULL) return; /* deselect all other curves? */ @@ -1241,7 +1241,7 @@ static void graphkeys_mselect_column(bAnimContext *ac, const int mval[2], short nvi = find_nearest_fcurve_vert(ac, mval); /* check if anything to select */ - if (nvi == NULL) + if (nvi == NULL) return; /* get frame number on which elements should be selected */ diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index a4611cf1453..f41169b6c39 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -441,7 +441,7 @@ static void graph_listener(ScrArea *sa, wmNotifier *wmn) ED_area_tag_refresh(sa); break; case NC_SCENE: - switch (wmn->data) { + switch (wmn->data) { case ND_OB_ACTIVE: /* selection changed, so force refresh to flush (needs flag set to do syncing) */ case ND_OB_SELECT: sipo->flag |= SIPO_TEMP_NEEDCHANSYNC; @@ -461,7 +461,7 @@ static void graph_listener(ScrArea *sa, wmNotifier *wmn) ED_area_tag_refresh(sa); break; case ND_TRANSFORM: - break; /*do nothing*/ + break; /*do nothing*/ default: /* just redrawing the view will do */ ED_area_tag_redraw(sa); |