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:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-05-04 03:47:39 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-05-04 03:47:39 +0400
commite3535e884a08b631ee31964e0d3d62c976a004e4 (patch)
tree02ce2ddc8213eeffc022d6a38d84f2c7d79eb5bf
parent9a9924c79c71de6207e11145a4e360a2c91876f5 (diff)
Style cleanup: spaces around operators
-rw-r--r--source/blender/blenkernel/intern/movieclip.c30
-rw-r--r--source/blender/blenkernel/intern/tracking.c58
-rw-r--r--source/blender/editors/space_clip/clip_buttons.c14
-rw-r--r--source/blender/editors/space_clip/clip_draw.c26
-rw-r--r--source/blender/editors/space_clip/clip_editor.c6
-rw-r--r--source/blender/editors/space_clip/clip_graph_draw.c8
-rw-r--r--source/blender/editors/space_clip/clip_graph_ops.c10
-rw-r--r--source/blender/editors/space_clip/clip_ops.c10
-rw-r--r--source/blender/editors/space_clip/clip_utils.c2
-rw-r--r--source/blender/editors/space_clip/space_clip.c10
-rw-r--r--source/blender/editors/space_clip/tracking_ops.c8
-rw-r--r--source/blender/imbuf/intern/moviecache.c8
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_moviedistortion.c6
13 files changed, 98 insertions, 98 deletions
diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c
index d2219484ff4..7a279572738 100644
--- a/source/blender/blenkernel/intern/movieclip.c
+++ b/source/blender/blenkernel/intern/movieclip.c
@@ -155,7 +155,7 @@ static void get_sequence_fname(MovieClip *clip, int framenr, char *name)
/* movieclips always points to first image from sequence,
* autoguess offset for now. could be something smarter in the future */
- offset= sequence_guess_offset(clip->name, strlen(head), numlen);
+ offset = sequence_guess_offset(clip->name, strlen(head), numlen);
if (numlen)
BLI_stringenc(name, head, tail, numlen, offset + framenr - 1);
@@ -195,7 +195,7 @@ static ImBuf *movieclip_load_sequence_file(MovieClip *clip, MovieClipUser *user,
{
struct ImBuf *ibuf;
char name[FILE_MAX];
- int loadflag, use_proxy= 0;
+ int loadflag, use_proxy = 0;
use_proxy = (flag & MCLIP_USE_PROXY) && user->render_size != MCLIP_PROXY_RENDER_SIZE_FULL;
if (use_proxy) {
@@ -432,7 +432,7 @@ static MovieClip *movieclip_alloc(const char *name)
clip = alloc_libblock(&G.main->movieclip, ID_MC, name);
- clip->aspx = clip->aspy= 1.0f;
+ clip->aspx = clip->aspy = 1.0f;
BKE_tracking_init_settings(&clip->tracking);
@@ -660,7 +660,7 @@ static ImBuf *put_postprocessed_frame_to_cache(MovieClip *clip, MovieClipUser *u
copy_v2_v2(cache->postprocessed.principal, camera->principal);
copy_v3_v3(&cache->postprocessed.k1, &camera->k1);
cache->postprocessed.undistoriton_used = TRUE;
- postproc_ibuf= get_undistorted_ibuf(clip, NULL, ibuf);
+ postproc_ibuf = get_undistorted_ibuf(clip, NULL, ibuf);
}
else {
cache->postprocessed.undistoriton_used = FALSE;
@@ -704,14 +704,14 @@ static ImBuf *movieclip_get_postprocessed_ibuf(MovieClip *clip, MovieClipUser *u
/* try to obtain cached postprocessed frame first */
if (need_postprocessed_frame(user, flag, postprocess_flag)) {
- ibuf= get_postprocessed_cached_frame(clip, user, flag, postprocess_flag);
+ ibuf = get_postprocessed_cached_frame(clip, user, flag, postprocess_flag);
if (!ibuf)
need_postprocess = TRUE;
}
if (!ibuf)
- ibuf= get_imbuf_cache(clip, user, flag);
+ ibuf = get_imbuf_cache(clip, user, flag);
if (!ibuf) {
int use_sequence = FALSE;
@@ -825,7 +825,7 @@ static ImBuf *put_stabilized_frame_to_cache(MovieClip *clip, MovieClipUser *user
stableibuf = BKE_tracking_stabilize(&clip->tracking, framenr, ibuf, tloc, &tscale, &tangle);
- cache->stabilized.ibuf= stableibuf;
+ cache->stabilized.ibuf = stableibuf;
copy_v2_v2(cache->stabilized.loc, tloc);
@@ -862,7 +862,7 @@ ImBuf *BKE_movieclip_get_stable_ibuf(MovieClip *clip, MovieClipUser *user, float
return NULL;
if (clip->tracking.stabilization.flag & TRACKING_2D_STABILIZATION) {
- MovieClipCache *cache= clip->cache;
+ MovieClipCache *cache = clip->cache;
stableibuf = get_stable_cached_frame(clip, user, framenr, postprocess_flag);
@@ -873,20 +873,20 @@ ImBuf *BKE_movieclip_get_stable_ibuf(MovieClip *clip, MovieClipUser *user, float
copy_v2_v2(loc, cache->stabilized.loc);
if (scale)
- *scale= cache->stabilized.scale;
+ *scale = cache->stabilized.scale;
if (angle)
- *angle= cache->stabilized.angle;
+ *angle = cache->stabilized.angle;
}
else {
if (loc)
zero_v2(loc);
if (scale)
- *scale= 1.0f;
+ *scale = 1.0f;
if (angle)
- *angle= 0.0f;
+ *angle = 0.0f;
stableibuf = ibuf;
}
@@ -1044,7 +1044,7 @@ void BKE_movieclip_update_scopes(MovieClip *clip, MovieClipUser *user, MovieClip
if (user->render_flag & MCLIP_PROXY_RENDER_UNDISTORT) {
int width, height;
- float aspy= 1.0f / clip->tracking.camera.pixel_aspect;
+ float aspy = 1.0f / clip->tracking.camera.pixel_aspect;
BKE_movieclip_get_size(clip, user, &width, &height);
@@ -1058,14 +1058,14 @@ void BKE_movieclip_update_scopes(MovieClip *clip, MovieClipUser *user, MovieClip
}
/* NOTE: margin should be kept in sync with value from ui_draw_but_TRACKPREVIEW */
- tmpibuf= BKE_tracking_get_pattern_imbuf(ibuf, track, &undist_marker, 3 /* margin */,
+ tmpibuf = BKE_tracking_get_pattern_imbuf(ibuf, track, &undist_marker, 3 /* margin */,
1 /* anchor */, scopes->track_pos, NULL);
if (tmpibuf->rect_float)
IMB_rect_from_float(tmpibuf);
if (tmpibuf->rect)
- scopes->track_preview= tmpibuf;
+ scopes->track_preview = tmpibuf;
else
IMB_freeImBuf(tmpibuf);
}
diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c
index be3bda4b625..f4335862629 100644
--- a/source/blender/blenkernel/intern/tracking.c
+++ b/source/blender/blenkernel/intern/tracking.c
@@ -107,7 +107,7 @@ void BKE_tracking_clamp_track(MovieTrackingTrack *track, int event)
float max_pyramid_level_factor = 1.0;
if (track->tracker == TRACKER_KLT) {
- max_pyramid_level_factor= 1 << (track->pyramid_levels - 1);
+ max_pyramid_level_factor = 1 << (track->pyramid_levels - 1);
}
/* sort */
@@ -277,7 +277,7 @@ MovieTrackingTrack *BKE_tracking_add_track(MovieTracking *tracking, ListBase *tr
MovieTrackingMarker *BKE_tracking_insert_marker(MovieTrackingTrack *track, MovieTrackingMarker *marker)
{
- MovieTrackingMarker *old_marker= NULL;
+ MovieTrackingMarker *old_marker = NULL;
if (track->markersnr)
old_marker = BKE_tracking_exact_marker(track, marker->framenr);
@@ -313,7 +313,7 @@ MovieTrackingMarker *BKE_tracking_insert_marker(MovieTrackingTrack *track, Movie
void BKE_tracking_delete_marker(MovieTrackingTrack *track, int framenr)
{
- int a= 0;
+ int a = 0;
while (a<track->markersnr) {
if (track->markers[a].framenr == framenr) {
@@ -464,7 +464,7 @@ void BKE_tracking_clear_path(MovieTrackingTrack *track, int ref_frame, int actio
put_disabled_marker(track, &track->markers[track->markersnr-1], 0, 1);
}
else if (action == TRACK_CLEAR_UPTO) {
- a= track->markersnr-1;
+ a = track->markersnr-1;
while (a >= 0) {
if (track->markers[a].framenr <= ref_frame) {
@@ -786,7 +786,7 @@ static void tracks_map_get(TracksMap *map, int index, MovieTrackingTrack **track
static void tracks_map_insert(TracksMap *map, MovieTrackingTrack *track, void *customdata)
{
- MovieTrackingTrack new_track= *track;
+ MovieTrackingTrack new_track = *track;
new_track.markers = MEM_dupallocN(new_track.markers);
@@ -866,10 +866,10 @@ static void tracks_map_merge(TracksMap *map, MovieTracking *tracking)
BLI_ghash_insert(map->hash, track, new_track);
if (replace_sel) /* update current selection in clip */
- tracking->act_track= new_track;
+ tracking->act_track = new_track;
if (replace_rot) /* update track used for rotation stabilization */
- tracking->stabilization.rot_track= new_track;
+ tracking->stabilization.rot_track = new_track;
BLI_addtail(&tracks, new_track);
}
@@ -882,7 +882,7 @@ static void tracks_map_merge(TracksMap *map, MovieTracking *tracking)
track->next = track->prev = NULL;
BLI_addtail(&new_tracks, track);
- track= next;
+ track = next;
}
/* now move all tracks which are currently operating and keep their names unique */
@@ -897,15 +897,15 @@ static void tracks_map_merge(TracksMap *map, MovieTracking *tracking)
BLI_uniquename(&new_tracks, track, "Track", '.', offsetof(MovieTrackingTrack, name), sizeof(track->name));
- track= next;
+ track = next;
}
- *old_tracks= new_tracks;
+ *old_tracks = new_tracks;
}
static void tracks_map_free(TracksMap *map, void (*customdata_free) (void *customdata))
{
- int i= 0;
+ int i = 0;
BLI_ghash_free(map->hash, NULL, NULL);
@@ -1021,7 +1021,7 @@ MovieTrackingContext *BKE_tracking_context_new(MovieClip *clip, MovieClipUser *u
* than the search size */
int level = MIN2(track->pyramid_levels, max_pyramid_levels);
- if (track->tracker==TRACKER_KLT) {
+ if (track->tracker == TRACKER_KLT) {
track_context.region_tracker =
libmv_pyramidRegionTrackerNew(100, level, half_wnd, track->minimum_correlation);
}
@@ -1030,7 +1030,7 @@ MovieTrackingContext *BKE_tracking_context_new(MovieClip *clip, MovieClipUser *u
libmv_hybridRegionTrackerNew(100, half_wnd, track->minimum_correlation);
}
else if (track->tracker == TRACKER_SAD) {
- track_context.region_tracker= libmv_bruteRegionTrackerNew(MAX2(wndx, wndy), track->minimum_correlation);
+ track_context.region_tracker = libmv_bruteRegionTrackerNew(MAX2(wndx, wndy), track->minimum_correlation);
}
}
#endif
@@ -1053,7 +1053,7 @@ MovieTrackingContext *BKE_tracking_context_new(MovieClip *clip, MovieClipUser *u
* - MCLIP_USE_PROXY_CUSTOM_DIR is needed because proxy/timecode files might
* be stored in a different location
* ignore all the rest possible flags for now */
- context->clip_flag = clip->flag&MCLIP_TIMECODE_FLAGS;
+ context->clip_flag = clip->flag & MCLIP_TIMECODE_FLAGS;
context->user = *user;
context->user.render_size = MCLIP_PROXY_RENDER_SIZE_FULL;
@@ -1321,7 +1321,7 @@ static ImBuf *get_keyframed_ibuf(MovieTrackingContext *context, MovieTrackingTra
MovieTrackingMarker *next_marker = NULL;
if (next>=0 && next<track->markersnr)
- next_marker= &track->markers[next];
+ next_marker = &track->markers[next];
/* if next mrker is disabled, stop searching keyframe and use current frame as keyframe */
if (next_marker && next_marker->flag & MARKER_DISABLED)
@@ -1498,7 +1498,7 @@ int BKE_tracking_next(MovieTrackingContext *context)
}
marker_new.flag |= MARKER_TRACKED;
- marker_new.framenr= nextfra;
+ marker_new.framenr = nextfra;
#pragma omp critical
{
@@ -1757,7 +1757,7 @@ static int get_refine_intrinsics_flags(MovieTracking *tracking, MovieTrackingObj
static int count_tracks_on_both_keyframes(MovieTracking *tracking, ListBase *tracksbase)
{
int tot = 0;
- int frame1 = tracking->settings.keyframe1, frame2= tracking->settings.keyframe2;
+ int frame1 = tracking->settings.keyframe1, frame2 = tracking->settings.keyframe2;
MovieTrackingTrack *track;
track = tracksbase->first;
@@ -1888,7 +1888,7 @@ void BKE_tracking_reconstruction_context_free(MovieReconstructContext *context)
#ifdef WITH_LIBMV
static void solve_reconstruction_update_cb(void *customdata, double progress, const char *message)
{
- ReconstructProgressData *progressdata= customdata;
+ ReconstructProgressData *progressdata = customdata;
if (progressdata->progress) {
*progressdata->progress = progress;
@@ -2004,7 +2004,7 @@ MovieTrackingTrack *BKE_tracking_named_track(MovieTracking *tracking, MovieTrack
static int reconstruction_camera_index(MovieTrackingReconstruction *reconstruction, int framenr, int nearest)
{
- MovieReconstructedCamera *cameras= reconstruction->cameras;
+ MovieReconstructedCamera *cameras = reconstruction->cameras;
int a = 0, d = 1;
if (!reconstruction->camnr)
@@ -2241,7 +2241,7 @@ MovieTrackingObject *BKE_tracking_get_camera_object(MovieTracking *tracking)
if (object->flag & TRACKING_OBJECT_CAMERA)
return object;
- object= object->next;
+ object = object->next;
}
return NULL;
@@ -2274,7 +2274,7 @@ MovieTrackingReconstruction *BKE_tracking_get_reconstruction(MovieTracking *trac
void BKE_tracking_apply_intrinsics(MovieTracking *tracking, float co[2], float nco[2])
{
- MovieTrackingCamera *camera= &tracking->camera;
+ MovieTrackingCamera *camera = &tracking->camera;
#ifdef WITH_LIBMV
double x, y;
@@ -2334,7 +2334,7 @@ static int point_in_stroke(bGPDstroke *stroke, float x, float y)
count++;
}
- prev= i;
+ prev = i;
}
return count % 2;
@@ -2443,10 +2443,10 @@ MovieTrackingTrack *BKE_tracking_indexed_track(MovieTracking *tracking, int trac
track = track->next;
}
- object= object->next;
+ object = object->next;
}
- *tracksbase_r= NULL;
+ *tracksbase_r = NULL;
return NULL;
}
@@ -2670,8 +2670,8 @@ void BKE_tracking_stabilization_data(MovieTracking *tracking, int framenr, int w
if ((stab->flag & TRACKING_2D_STABILIZATION) == 0) {
zero_v2(loc);
- *scale= 1.0f;
- *angle= 0.0f;
+ *scale = 1.0f;
+ *angle = 0.0f;
return;
}
@@ -2790,10 +2790,10 @@ ImBuf *BKE_tracking_stabilize(MovieTracking *tracking, int framenr, ImBuf *ibuf,
copy_v2_v2(loc, tloc);
if (scale)
- *scale= tscale;
+ *scale = tscale;
if (angle)
- *angle= tangle;
+ *angle = tangle;
return tmpibuf;
}
@@ -3026,7 +3026,7 @@ void BKE_tracking_remove_object(MovieTracking *tracking, MovieTrackingObject *ob
if (track == tracking->act_track)
tracking->act_track = NULL;
- track= track->next;
+ track = track->next;
}
tracking_object_free(object);
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 */
diff --git a/source/blender/imbuf/intern/moviecache.c b/source/blender/imbuf/intern/moviecache.c
index 8b18be87b3c..485f593a8fb 100644
--- a/source/blender/imbuf/intern/moviecache.c
+++ b/source/blender/imbuf/intern/moviecache.c
@@ -44,7 +44,7 @@
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
-static MEM_CacheLimiterC *limitor= NULL;
+static MEM_CacheLimiterC *limitor = NULL;
typedef struct MovieCache {
GHash *hash;
@@ -113,7 +113,7 @@ static void check_unused_keys(MovieCache *cache)
{
GHashIterator *iter;
- iter= BLI_ghashIterator_new(cache->hash);
+ iter = BLI_ghashIterator_new(cache->hash);
while (!BLI_ghashIterator_isDone(iter)) {
MovieCacheKey *key = BLI_ghashIterator_getKey(iter);
MovieCacheItem *item = BLI_ghashIterator_getValue(iter);
@@ -253,7 +253,7 @@ void IMB_moviecache_put(MovieCache *cache, void *userkey, ImBuf *ibuf)
if (cache->points) {
MEM_freeN(cache->points);
- cache->points= NULL;
+ cache->points = NULL;
}
}
@@ -321,7 +321,7 @@ void IMB_moviecache_get_cache_segments(MovieCache *cache, int proxy, int render_
GHashIterator *iter;
iter = BLI_ghashIterator_new(cache->hash);
- a= 0;
+ a = 0;
while (!BLI_ghashIterator_isDone(iter)) {
MovieCacheKey *key = BLI_ghashIterator_getKey(iter);
MovieCacheItem *item = BLI_ghashIterator_getValue(iter);
diff --git a/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c b/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c
index f6ffc783b08..7a28eabec34 100644
--- a/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c
+++ b/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c
@@ -76,9 +76,9 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
node->storage = BKE_tracking_distortion_create();
if (node->custom1 == 0)
- obuf= BKE_tracking_distortion_exec(node->storage, tracking, ibuf, width, height, overscan, 1);
+ obuf = BKE_tracking_distortion_exec(node->storage, tracking, ibuf, width, height, overscan, 1);
else
- obuf= BKE_tracking_distortion_exec(node->storage, tracking, ibuf, width, height, overscan, 0);
+ obuf = BKE_tracking_distortion_exec(node->storage, tracking, ibuf, width, height, overscan, 0);
stackbuf->rect = obuf->rect_float;
stackbuf->malloc = TRUE;
@@ -118,7 +118,7 @@ static void storage_free(bNode *node)
if (node->storage)
BKE_tracking_distortion_destroy(node->storage);
- node->storage= NULL;
+ node->storage = NULL;
}
static void storage_copy(bNode *orig_node, bNode *new_node)