diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-05-04 03:47:39 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-05-04 03:47:39 +0400 |
commit | e3535e884a08b631ee31964e0d3d62c976a004e4 (patch) | |
tree | 02ce2ddc8213eeffc022d6a38d84f2c7d79eb5bf /source/blender/editors/space_clip | |
parent | 9a9924c79c71de6207e11145a4e360a2c91876f5 (diff) |
Style cleanup: spaces around operators
Diffstat (limited to 'source/blender/editors/space_clip')
-rw-r--r-- | source/blender/editors/space_clip/clip_buttons.c | 14 | ||||
-rw-r--r-- | source/blender/editors/space_clip/clip_draw.c | 26 | ||||
-rw-r--r-- | source/blender/editors/space_clip/clip_editor.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_clip/clip_graph_draw.c | 8 | ||||
-rw-r--r-- | source/blender/editors/space_clip/clip_graph_ops.c | 10 | ||||
-rw-r--r-- | source/blender/editors/space_clip/clip_ops.c | 10 | ||||
-rw-r--r-- | source/blender/editors/space_clip/clip_utils.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_clip/space_clip.c | 10 | ||||
-rw-r--r-- | source/blender/editors/space_clip/tracking_ops.c | 8 |
9 files changed, 47 insertions, 47 deletions
diff --git a/source/blender/editors/space_clip/clip_buttons.c b/source/blender/editors/space_clip/clip_buttons.c index df6d713d82d..5761a285d72 100644 --- a/source/blender/editors/space_clip/clip_buttons.c +++ b/source/blender/editors/space_clip/clip_buttons.c @@ -371,9 +371,9 @@ void uiTemplateMarker(uiLayout *layout, PointerRNA *ptr, const char *propname, P block = uiLayoutGetBlock(layout); if (cb->marker_flag & MARKER_DISABLED) - tip= "Marker is disabled at current frame"; + tip = "Marker is disabled at current frame"; else - tip= "Marker is enabled at current frame"; + tip = "Marker is enabled at current frame"; bt = uiDefIconButBitI(block, TOGN, MARKER_DISABLED, 0, ICON_RESTRICT_VIEW_OFF, 0, 0, 20, 20, &cb->marker_flag, 0, 0, 1, 0, tip); uiButSetNFunc(bt, marker_update_cb, cb, NULL); @@ -393,7 +393,7 @@ void uiTemplateMarker(uiLayout *layout, PointerRNA *ptr, const char *propname, P return; } - step= 100; + step = 100; digits = 2; sub_v2_v2v2(pat_dim, track->pat_max, track->pat_min); @@ -413,20 +413,20 @@ void uiTemplateMarker(uiLayout *layout, PointerRNA *ptr, const char *propname, P cb->marker_flag = marker->flag; - block= uiLayoutAbsoluteBlock(layout); + block = uiLayoutAbsoluteBlock(layout); uiBlockSetHandleFunc(block, marker_block_handler, cb); uiBlockSetNFunc(block, marker_update_cb, cb, NULL); if (cb->marker_flag & MARKER_DISABLED) - tip= "Marker is disabled at current frame"; + tip = "Marker is disabled at current frame"; else - tip= "Marker is enabled at current frame"; + tip = "Marker is enabled at current frame"; uiDefButBitI(block, OPTIONN, MARKER_DISABLED, B_MARKER_FLAG, "Enabled", 10, 190, 145, 19, &cb->marker_flag, 0, 0, 0, 0, tip); col = uiLayoutColumn(layout, 1); - uiLayoutSetActive(col, (cb->marker_flag&MARKER_DISABLED)==0); + uiLayoutSetActive(col, (cb->marker_flag & MARKER_DISABLED) == 0); block = uiLayoutAbsoluteBlock(col); uiBlockBeginAlign(block); diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c index 6759743fabe..33bc67db8e4 100644 --- a/source/blender/editors/space_clip/clip_draw.c +++ b/source/blender/editors/space_clip/clip_draw.c @@ -310,7 +310,7 @@ static void draw_track_path(SpaceClip *sc, MovieClip *UNUSED(clip), MovieTrackin int count = sc->path_length; int i, a, b, curindex = -1; float path[102][2]; - int tiny = sc->flag&SC_SHOW_TINY_MARKER, framenr; + int tiny = sc->flag & SC_SHOW_TINY_MARKER, framenr; MovieTrackingMarker *marker; if (count == 0) @@ -354,7 +354,7 @@ static void draw_track_path(SpaceClip *sc, MovieClip *UNUSED(clip), MovieTrackin if (marker->framenr == i) { if (marker->framenr == sc->user.framenr) - curindex= b; + curindex = b; add_v2_v2v2(path[b++], marker->pos, track->offset); ED_clip_point_undistorted_pos(sc, path[b-1], path[b-1]); @@ -416,7 +416,7 @@ static void draw_track_path(SpaceClip *sc, MovieClip *UNUSED(clip), MovieTrackin static void draw_marker_outline(SpaceClip *sc, MovieTrackingTrack *track, MovieTrackingMarker *marker, float marker_pos[2], int width, int height) { - int tiny = sc->flag&SC_SHOW_TINY_MARKER; + int tiny = sc->flag & SC_SHOW_TINY_MARKER; int show_search = FALSE; float px[2]; @@ -515,8 +515,8 @@ static void track_colors(MovieTrackingTrack *track, int act, float col[3], float static void draw_marker_areas(SpaceClip *sc, MovieTrackingTrack *track, MovieTrackingMarker *marker, float marker_pos[2], int width, int height, int act, int sel) { - int tiny= sc->flag&SC_SHOW_TINY_MARKER; - int show_search= 0; + int tiny = sc->flag & SC_SHOW_TINY_MARKER; + int show_search = 0; float col[3], scol[3], px[2]; track_colors(track, act, col, scol); @@ -525,7 +525,7 @@ static void draw_marker_areas(SpaceClip *sc, MovieTrackingTrack *track, MovieTra px[1]= 1.0f / height / sc->zoom; /* marker position and offset position */ - if ((track->flag&SELECT) == sel && (marker->flag & MARKER_DISABLED) == 0) { + if ((track->flag & SELECT) == sel && (marker->flag & MARKER_DISABLED) == 0) { float pos[2]; rctf r; @@ -716,7 +716,7 @@ static void draw_marker_slide_zones(SpaceClip *sc, MovieTrackingTrack *track, Mo float marker_pos[2], int outline, int sel, int act, int width, int height) { float x, y, dx, dy, patdx, patdy, searchdx, searchdy, tdx, tdy; - int tiny = sc->flag&SC_SHOW_TINY_MARKER; + int tiny = sc->flag & SC_SHOW_TINY_MARKER; float col[3], scol[3], px[2]; if ((tiny && outline) || (marker->flag & MARKER_DISABLED)) @@ -849,7 +849,7 @@ static void draw_marker_texts(SpaceClip *sc, MovieTrackingTrack *track, MovieTra int width, int height, float zoomx, float zoomy) { char str[128] = {0}, state[64] = {0}; - float dx= 0.0f, dy = 0.0f, fontsize, pos[3]; + float dx = 0.0f, dy = 0.0f, fontsize, pos[3]; uiStyle *style = U.uistyles.first; int fontid = style->widget.uifont_id; @@ -1091,7 +1091,7 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip, track = tracksbase->first; while (track) { if ((track->flag & TRACK_HIDDEN) == 0 && track->flag & TRACK_HAS_BUNDLE) { - marker= BKE_tracking_get_marker(track, framenr); + marker = BKE_tracking_get_marker(track, framenr); if (MARKER_VISIBLE(sc, track, marker)) { float npos[2]; @@ -1216,7 +1216,7 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip, int wid if (a<2) ok = tpos[a%2] < val[a][a%2]; else - ok= tpos[a%2] > val[a][a%2]; + ok = tpos[a%2] > val[a][a%2]; if (ok) { copy_v2_v2(val[a], tpos); @@ -1282,7 +1282,7 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip, int wid } if (sc->flag & SC_MANUAL_CALIBRATION && clip->gpd) { - bGPDlayer *layer= clip->gpd->layers.first; + bGPDlayer *layer = clip->gpd->layers.first; while (layer) { bGPDframe *frame = layer->frames.first; @@ -1314,7 +1314,7 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip, int wid npos[1] = stroke->points[i+1].y * height * aspy; len = len_v2v2(pos, npos); - steps= ceil(len/5.0f); + steps = ceil(len/5.0f); /* we want to distort only long straight lines */ if (stroke->totpoints == 2) { @@ -1359,7 +1359,7 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip, int wid void clip_draw_main(SpaceClip *sc, ARegion *ar, Scene *scene) { - MovieClip *clip= ED_space_clip(sc); + MovieClip *clip = ED_space_clip(sc); ImBuf *ibuf; int width, height; float zoomx, zoomy; diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c index a5575cd125e..bd34a51819c 100644 --- a/source/blender/editors/space_clip/clip_editor.c +++ b/source/blender/editors/space_clip/clip_editor.c @@ -86,7 +86,7 @@ int ED_space_clip_view_clip_poll(bContext *C) int ED_space_clip_tracking_poll(bContext *C) { - SpaceClip *sc= CTX_wm_space_clip(C); + SpaceClip *sc = CTX_wm_space_clip(C); if (sc && sc->clip) return ED_space_clip_show_trackedit(sc); @@ -139,7 +139,7 @@ void ED_space_clip_set(bContext *C, bScreen *screen, SpaceClip *sc, MovieClip *c old_clip = sc->clip; sc->clip = clip; - if (sc->clip && sc->clip->id.us==0) + if (sc->clip && sc->clip->id.us == 0) sc->clip->id.us = 1; if (screen) { @@ -262,7 +262,7 @@ static int selected_boundbox(SpaceClip *sc, float min[2], float max[2]) MovieClip *clip = ED_space_clip(sc); MovieTrackingTrack *track; int width, height, ok = FALSE; - ListBase *tracksbase= BKE_tracking_get_tracks(&clip->tracking); + ListBase *tracksbase = BKE_tracking_get_tracks(&clip->tracking); INIT_MINMAX2(min, max); diff --git a/source/blender/editors/space_clip/clip_graph_draw.c b/source/blender/editors/space_clip/clip_graph_draw.c index 4825403fb4a..9f9bdcb6cd2 100644 --- a/source/blender/editors/space_clip/clip_graph_draw.c +++ b/source/blender/editors/space_clip/clip_graph_draw.c @@ -61,7 +61,7 @@ static void draw_curve_knot(float x, float y, float xscale, float yscale, float hsize) { - static GLuint displist=0; + static GLuint displist = 0; /* initialize round circle shape */ if (displist == 0) { @@ -101,7 +101,7 @@ void tracking_segment_start_cb(void *userdata, MovieTrackingTrack *track, int co copy_v3_v3(col, colors[coord]); - if (track==userdata) { + if (track == userdata) { col[3] = 1.0f; glLineWidth(2.0f); } @@ -126,7 +126,7 @@ static void tracking_segment_knot_cb(void *userdata, MovieTrackingTrack *track, MovieTrackingMarker *marker, int coord, float val) { struct { MovieTrackingTrack *act_track; int sel; float xscale, yscale, hsize; } *data = userdata; - int sel= 0, sel_flag; + int sel = 0, sel_flag; if (track != data->act_track) return; @@ -170,7 +170,7 @@ static void draw_tracks_curves(View2D *v2d, SpaceClip *sc) glDisable(GL_BLEND); /* selected knot handles on top of curves */ - userdata.sel= TRUE; + userdata.sel = TRUE; clip_graph_tracking_values_iterate(sc, &userdata, tracking_segment_knot_cb, NULL, NULL); } diff --git a/source/blender/editors/space_clip/clip_graph_ops.c b/source/blender/editors/space_clip/clip_graph_ops.c index 905aa2d11d4..efe48cd4b36 100644 --- a/source/blender/editors/space_clip/clip_graph_ops.c +++ b/source/blender/editors/space_clip/clip_graph_ops.c @@ -165,7 +165,7 @@ static void mouse_select_init_data(MouseSelectUserData *userdata, float *co) static int mouse_select_knot(bContext *C, float co[2], int extend) { SpaceClip *sc = CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); + MovieClip *clip = ED_space_clip(sc); ARegion *ar = CTX_wm_region(C); View2D *v2d = &ar->v2d; MovieTracking *tracking = &clip->tracking; @@ -328,7 +328,7 @@ static void border_select_cb(void *userdata, MovieTrackingTrack *UNUSED(track), data->change = TRUE; } else if (!data->extend) { - marker->flag&= ~MARKER_GRAPH_SEL; + marker->flag &= ~MARKER_GRAPH_SEL; } } @@ -489,7 +489,7 @@ void CLIP_OT_graph_delete_curve(wmOperatorType *ot) static int delete_knot_exec(bContext *C, wmOperator *UNUSED(op)) { SpaceClip *sc = CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); + MovieClip *clip = ED_space_clip(sc); MovieTracking *tracking = &clip->tracking; ListBase *tracksbase = BKE_tracking_get_tracks(tracking); MovieTrackingTrack *act_track = BKE_tracking_active_track(tracking); @@ -651,9 +651,9 @@ static int graph_disable_markers_exec(bContext *C, wmOperator *op) marker = &act_track->markers[a]; if (marker->flag & MARKER_GRAPH_SEL) { - if (action==0) + if (action == 0) marker->flag |= MARKER_DISABLED; - else if (action==1) + else if (action == 1) marker->flag &= ~MARKER_DISABLED; else marker->flag ^= MARKER_DISABLED; diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c index c8a5b487b65..06573136205 100644 --- a/source/blender/editors/space_clip/clip_ops.c +++ b/source/blender/editors/space_clip/clip_ops.c @@ -432,7 +432,7 @@ static void view_zoom_init(bContext *C, wmOperator *op, wmEvent *event) SpaceClip *sc = CTX_wm_space_clip(C); ViewZoomData *vpd; - op->customdata= vpd= MEM_callocN(sizeof(ViewZoomData), "ClipViewZoomData"); + op->customdata = vpd = MEM_callocN(sizeof(ViewZoomData), "ClipViewZoomData"); WM_cursor_modal(CTX_wm_window(C), BC_NSEW_SCROLLCURSOR); vpd->x = event->x; @@ -667,7 +667,7 @@ static int view_all_exec(bContext *C, wmOperator *op) ARegion *ar; int w, h, width, height; float aspx, aspy; - int fit_view= RNA_boolean_get(op->ptr, "fit_view"); + int fit_view = RNA_boolean_get(op->ptr, "fit_view"); float zoomx, zoomy; /* retrieve state */ @@ -680,7 +680,7 @@ static int view_all_exec(bContext *C, wmOperator *op) w = w * aspx; h = h * aspy; - /* check if the image will fit in the image with zoom==1 */ + /* check if the image will fit in the image with zoom == 1 */ width = ar->winrct.xmax - ar->winrct.xmin + 1; height = ar->winrct.ymax - ar->winrct.ymin + 1; @@ -878,7 +878,7 @@ typedef struct ProxyBuildJob { static void proxy_freejob(void *pjv) { - ProxyJob *pj= pjv; + ProxyJob *pj = pjv; MEM_freeN(pj); } @@ -957,7 +957,7 @@ static void proxy_startjob(void *pjv, short *stop, short *do_update, float *prog break; *do_update = TRUE; - *progress= ((float) cfra) / (efra - sfra); + *progress = ((float) cfra) / (efra - sfra); } if (distortion) diff --git a/source/blender/editors/space_clip/clip_utils.c b/source/blender/editors/space_clip/clip_utils.c index d45fe834fac..2545106d132 100644 --- a/source/blender/editors/space_clip/clip_utils.c +++ b/source/blender/editors/space_clip/clip_utils.c @@ -174,7 +174,7 @@ void clip_delete_track(bContext *C, MovieClip *clip, ListBase *tracksbase, Movie int has_bundle = FALSE, update_stab = FALSE; - if (track==act_track) + if (track == act_track) tracking->act_track = NULL; if (track == stab->rot_track) { diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c index b92b45752ef..32a4a7d1f83 100644 --- a/source/blender/editors/space_clip/space_clip.c +++ b/source/blender/editors/space_clip/space_clip.c @@ -984,11 +984,11 @@ static void movieclip_main_area_set_view2d(SpaceClip *sc, ARegion *ar) ar->v2d.mask.ymax = winy; /* which part of the image space do we see? */ - x1= ar->winrct.xmin + (winx-sc->zoom * w) / 2.0f; - y1= ar->winrct.ymin + (winy-sc->zoom * h) / 2.0f; + x1 = ar->winrct.xmin + (winx-sc->zoom * w) / 2.0f; + y1 = ar->winrct.ymin + (winy-sc->zoom * h) / 2.0f; - x1-= sc->zoom * sc->xof; - y1-= sc->zoom * sc->yof; + x1 -= sc->zoom * sc->xof; + y1 -= sc->zoom * sc->yof; /* relative display right */ ar->v2d.cur.xmin = (ar->winrct.xmin - (float)x1) / sc->zoom; @@ -1156,7 +1156,7 @@ static void dopesheet_area_draw(const bContext *C, ARegion *ar) UI_view2d_view_restore(C); /* scrollers */ - scrollers= UI_view2d_scrollers_calc(C, v2d, unit, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY); + scrollers = UI_view2d_scrollers_calc(C, v2d, unit, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY); UI_view2d_scrollers_draw(C, v2d, scrollers); UI_view2d_scrollers_free(scrollers); } diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c index ff0e88a506e..825415764f1 100644 --- a/source/blender/editors/space_clip/tracking_ops.c +++ b/source/blender/editors/space_clip/tracking_ops.c @@ -726,16 +726,16 @@ static MovieTrackingTrack *find_nearest_track(SpaceClip *sc, ListBase *tracksbas if (((cur->flag & TRACK_HIDDEN) == 0) && MARKER_VISIBLE(sc, cur, marker)) { float dist, d1, d2 = FLT_MAX, d3 = FLT_MAX; - d1= sqrtf((co[0]-marker->pos[0]-cur->offset[0])*(co[0]-marker->pos[0]-cur->offset[0])+ + d1 = sqrtf((co[0]-marker->pos[0]-cur->offset[0])*(co[0]-marker->pos[0]-cur->offset[0])+ (co[1]-marker->pos[1]-cur->offset[1])*(co[1]-marker->pos[1]-cur->offset[1])); /* distance to marker point */ /* distance to pattern boundbox */ if (sc->flag & SC_SHOW_MARKER_PATTERN) - d2= dist_to_rect(co, marker->pos, cur->pat_min, cur->pat_max); + d2 = dist_to_rect(co, marker->pos, cur->pat_min, cur->pat_max); /* distance to search boundbox */ if (sc->flag & SC_SHOW_MARKER_SEARCH && TRACK_VIEW_SELECTED(sc, cur)) - d3= dist_to_rect(co, marker->pos, cur->search_min, cur->search_max); + d3 = dist_to_rect(co, marker->pos, cur->search_min, cur->search_max); /* choose minimal distance. useful for cases of overlapped markers. */ dist = MIN3(d1, d2, d3); @@ -1553,7 +1553,7 @@ static int track_markers_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve static int track_markers_modal(bContext *C, wmOperator *UNUSED(op), wmEvent *event) { /* no running tracking, remove handler and pass through */ - if (0==WM_jobs_test(CTX_wm_manager(C), CTX_wm_area(C))) + if (0 == WM_jobs_test(CTX_wm_manager(C), CTX_wm_area(C))) return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH; /* running tracking */ |