svn merge ^/trunk/blender -r46370:46380
authorOve Murberg Henriksen <sorayasilvermoon@hotmail.com>
Tue, 8 May 2012 00:09:00 +0000 (00:09 +0000)
committerOve Murberg Henriksen <sorayasilvermoon@hotmail.com>
Tue, 8 May 2012 00:09:00 +0000 (00:09 +0000)
1 Tree conflict
I deleted the source/tools/GL and then ran:
svn -r46380 co https://svn.blender.org/svnroot/bf-blender/trunk/blender/source/tools/GL
svn resolve --accept working -R source/tools/GL

18 files changed:
1  2 
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/displist.c
source/blender/blenkernel/intern/movieclip.c
source/blender/blenkernel/intern/tracking.c
source/blender/collada/MeshImporter.cpp
source/blender/editors/mesh/editmesh_select.c
source/blender/editors/object/object_add.c
source/blender/editors/space_clip/clip_buttons.c
source/blender/editors/space_clip/clip_draw.c
source/blender/editors/space_clip/clip_editor.c
source/blender/editors/space_clip/clip_graph_draw.c
source/blender/editors/space_clip/clip_graph_ops.c
source/blender/editors/space_clip/clip_ops.c
source/blender/editors/space_clip/clip_utils.c
source/blender/editors/space_clip/space_clip.c
source/blender/editors/space_clip/tracking_ops.c
source/blender/editors/space_view3d/drawobject.c

@@@ -313,14 -314,15 +314,15 @@@ MovieTrackingMarker *BKE_tracking_inser
  
  void BKE_tracking_delete_marker(MovieTrackingTrack *track, int framenr)
  {
 -      int a = 0;
 +      int a= 0;
  
-       while (a<track->markersnr) {
+       while (a < track->markersnr) {
                if (track->markers[a].framenr == framenr) {
                        if (track->markersnr > 1) {
-                               memmove(track->markers+a, track->markers+a+1, (track->markersnr-a-1)*sizeof(MovieTrackingMarker));
+                               memmove(track->markers + a, track->markers + a + 1,
+                                       (track->markersnr - a - 1) * sizeof(MovieTrackingMarker));
                                track->markersnr--;
-                               track->markers = MEM_reallocN(track->markers, sizeof(MovieTrackingMarker)*track->markersnr);
+                               track->markers = MEM_reallocN(track->markers, sizeof(MovieTrackingMarker) * track->markersnr);
                        }
                        else {
                                MEM_freeN(track->markers);
@@@ -1305,8 -1326,8 +1311,8 @@@ static ImBuf *get_keyframed_ibuf(MovieT
                MovieTrackingMarker *cur_marker = &track->markers[a];
                MovieTrackingMarker *next_marker = NULL;
  
-               if (next>=0 && next<track->markersnr)
+               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)
@@@ -371,11 -373,12 +373,12 @@@ void uiTemplateMarker(uiLayout *layout
                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);
+               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);
        }
        else {
@@@ -354,10 -354,10 +354,10 @@@ static void draw_track_path(SpaceClip *
  
                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]);
+                       ED_clip_point_undistorted_pos(sc, path[b - 1], path[b - 1]);
                }
                else
                        break;
        glPointSize(1.0f);
  }
  
- static void draw_marker_outline(SpaceClip *sc, MovieTrackingTrack *track, MovieTrackingMarker *marker, float marker_pos[2], int width, int height)
+ 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];
  
@@@ -513,19 -514,20 +514,20 @@@ static void track_colors(MovieTrackingT
        }
  }
  
- static void draw_marker_areas(SpaceClip *sc, MovieTrackingTrack *track, MovieTrackingMarker *marker, float marker_pos[2], int width, int height, int act, int sel)
+ 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);
  
-       px[0]= 1.0f / width / sc->zoom;
-       px[1]= 1.0f / height / sc->zoom;
+       px[0] = 1.0f / width / sc->zoom;
+       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;
  
@@@ -845,11 -847,11 +847,11 @@@ static void draw_marker_slide_zones(Spa
                glLineWidth(1.0f);
  }
  
- static void draw_marker_texts(SpaceClip *sc, MovieTrackingTrack *track, MovieTrackingMarker *marker, float marker_pos[2], int act,
-                               int width, int height, float zoomx, float zoomy)
+ static void draw_marker_texts(SpaceClip *sc, MovieTrackingTrack *track, MovieTrackingMarker *marker,
+                               float marker_pos[2], int act, 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;
  
@@@ -971,10 -973,10 +973,10 @@@ static void draw_tracking_tracks(SpaceC
                /* count */
                track = tracksbase->first;
                while (track) {
-                       if ((track->flag & TRACK_HIDDEN)==0) {
+                       if ((track->flag & TRACK_HIDDEN) == 0) {
                                marker = BKE_tracking_get_marker(track, framenr);
  
 -                              if (MARKER_VISIBLE(sc, track, marker))
 +                              if (MARKER_VISIBLE(sc, marker))
                                        count++;
                        }
  
                        track = tracksbase->first;
                        fp = marker_pos;
                        while (track) {
-                               if ((track->flag & TRACK_HIDDEN)==0) {
+                               if ((track->flag & TRACK_HIDDEN) == 0) {
                                        marker = BKE_tracking_get_marker(track, framenr);
  
 -                                      if (MARKER_VISIBLE(sc, track, marker)) {
 +                                      if (MARKER_VISIBLE(sc, marker)) {
                                                ED_clip_point_undistorted_pos(sc, marker->pos, fp);
  
                                                if (track == act_track)
        track = tracksbase->first;
        fp = marker_pos;
        while (track) {
-               if ((track->flag & TRACK_HIDDEN)==0) {
+               if ((track->flag & TRACK_HIDDEN) == 0) {
                        marker = BKE_tracking_get_marker(track, framenr);
  
 -                      if (MARKER_VISIBLE(sc, track, marker)) {
 +                      if (MARKER_VISIBLE(sc, marker)) {
                                copy_v2_v2(cur_pos, fp ? fp : marker->pos);
  
                                draw_marker_outline(sc, track, marker, cur_pos, width, height);
  
        /* active marker would be displayed on top of everything else */
        if (act_track) {
-               if ((act_track->flag & TRACK_HIDDEN)==0) {
+               if ((act_track->flag & TRACK_HIDDEN) == 0) {
                        marker = BKE_tracking_get_marker(act_track, framenr);
  
 -                      if (MARKER_VISIBLE(sc, act_track, marker)) {
 +                      if (MARKER_VISIBLE(sc, marker)) {
                                copy_v2_v2(cur_pos, active_pos ? active_pos : marker->pos);
  
                                draw_marker_areas(sc, act_track, marker, cur_pos, width, height, 1, 1);
                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)) {
 +                              if (MARKER_VISIBLE(sc, marker)) {
                                        float npos[2];
                                        copy_v4_v4(vec, track->bundle_pos);
-                                       vec[3]=1;
+                                       vec[3] = 1;
  
                                        mul_v4_m4v4(pos, mat, vec);
  
@@@ -534,10 -538,10 +536,10 @@@ void CLIP_OT_view_zoom(wmOperatorType *
        ot->invoke = view_zoom_invoke;
        ot->modal = view_zoom_modal;
        ot->cancel = view_zoom_cancel;
 -      ot->poll = ED_space_clip_view_clip_poll;
 +      ot->poll = ED_space_clip_poll;
  
        /* flags */
-       ot->flag = OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER;
+       ot->flag = OPTYPE_BLOCKING | OPTYPE_GRAB_POINTER;
  
        /* properties */
        RNA_def_float(ot->srna, "factor", 0.0f, 0.0f, FLT_MAX,
@@@ -580,10 -585,11 +582,11 @@@ void CLIP_OT_view_zoom_in(wmOperatorTyp
        /* api callbacks */
        ot->exec = view_zoom_in_exec;
        ot->invoke = view_zoom_in_invoke;
 -      ot->poll = ED_space_clip_view_clip_poll;
 +      ot->poll = ED_space_clip_poll;
  
        /* properties */
-       RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, "Location", "Cursor location in screen coordinates", -10.0f, 10.0f);
+       RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, "Location",
+                            "Cursor location in screen coordinates", -10.0f, 10.0f);
  }
  
  static int view_zoom_out_exec(bContext *C, wmOperator *op)
@@@ -620,10 -627,11 +623,11 @@@ void CLIP_OT_view_zoom_out(wmOperatorTy
        /* api callbacks */
        ot->exec = view_zoom_out_exec;
        ot->invoke = view_zoom_out_invoke;
 -      ot->poll = ED_space_clip_view_clip_poll;
 +      ot->poll = ED_space_clip_poll;
  
        /* properties */
-       RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, "Location", "Cursor location in normalised (0.0-1.0) coordinates", -10.0f, 10.0f);
+       RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, "Location",
+                            "Cursor location in normalised (0.0-1.0) coordinates", -10.0f, 10.0f);
  }
  
  /********************** view zoom ratio operator *********************/
@@@ -194,16 -194,17 +194,15 @@@ void clip_delete_track(bContext *C, Mov
  
        if (update_stab) {
                tracking->stabilization.ok = FALSE;
-               DAG_id_tag_update(&clip->id, 0);
-               WM_event_add_notifier(C, NC_MOVIECLIP|ND_DISPLAY, clip);
+               WM_event_add_notifier(C, NC_MOVIECLIP | ND_DISPLAY, clip);
        }
  
 -      DAG_id_tag_update(&clip->id, 0);
 -
        if (has_bundle)
-               WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+               WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, NULL);
  }
  
- void clip_delete_marker(bContext *C, MovieClip *clip, ListBase *tracksbase, MovieTrackingTrack *track, MovieTrackingMarker *marker)
+ void clip_delete_marker(bContext *C, MovieClip *clip, ListBase *tracksbase,
+                         MovieTrackingTrack *track, MovieTrackingMarker *marker)
  {
        if (track->markersnr == 1) {
                clip_delete_track(C, clip, tracksbase, track);
@@@ -984,11 -985,11 +985,11 @@@ static void movieclip_main_area_set_vie
        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;
@@@ -729,11 -731,12 +737,12 @@@ static MovieTrackingTrack *find_nearest
        while (cur) {
                MovieTrackingMarker *marker = BKE_tracking_get_marker(cur, sc->user.framenr);
  
 -              if (((cur->flag & TRACK_HIDDEN) == 0) && MARKER_VISIBLE(sc, cur, marker)) {
 +              if (((cur->flag & TRACK_HIDDEN) == 0) && MARKER_VISIBLE(sc, 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])+
-                                         (co[1]-marker->pos[1]-cur->offset[1])*(co[1]-marker->pos[1]-cur->offset[1])); /* distance to marker point */
+                       /* distance to marker point */
+                       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 pattern boundbox */
                        if (sc->flag & SC_SHOW_MARKER_PATTERN)
@@@ -795,8 -798,9 +804,8 @@@ static int mouse_select(bContext *C, fl
                sc->ylockof = 0.0f;
        }
  
-       WM_event_add_notifier(C, NC_GEOM|ND_SELECT, NULL);
 -      BKE_tracking_dopesheet_tag_update(tracking);
 -
+       WM_event_add_notifier(C, NC_GEOM | ND_SELECT, NULL);
 +      ED_space_clip_update_dopesheet(sc);
  
        return OPERATOR_FINISHED;
  }
@@@ -892,9 -897,9 +901,9 @@@ static int border_select_exec(bContext 
                if ((track->flag & TRACK_HIDDEN) == 0) {
                        MovieTrackingMarker *marker = BKE_tracking_get_marker(track, sc->user.framenr);
  
 -                      if (MARKER_VISIBLE(sc, track, marker)) {
 +                      if (MARKER_VISIBLE(sc, marker)) {
                                if (BLI_in_rctf(&rectf, marker->pos[0], marker->pos[1])) {
-                                       BKE_tracking_track_flag(track, TRACK_AREA_ALL, SELECT, mode!=GESTURE_MODAL_SELECT);
+                                       BKE_tracking_track_flag(track, TRACK_AREA_ALL, SELECT, mode != GESTURE_MODAL_SELECT);
                                }
                                else if (!extend) {
                                        BKE_tracking_track_flag(track, TRACK_AREA_ALL, SELECT, 1);
        }
  
        if (change) {
 -              BKE_tracking_dopesheet_tag_update(tracking);
 +              ED_space_clip_update_dopesheet(sc);
  
-               WM_event_add_notifier(C, NC_GEOM|ND_SELECT, NULL);
+               WM_event_add_notifier(C, NC_GEOM | ND_SELECT, NULL);
  
                return OPERATOR_FINISHED;
        }
@@@ -983,8 -989,8 +992,8 @@@ static int circle_select_exec(bContext 
                if ((track->flag & TRACK_HIDDEN) == 0) {
                        MovieTrackingMarker *marker = BKE_tracking_get_marker(track, sc->user.framenr);
  
 -                      if (MARKER_VISIBLE(sc, track, marker) && marker_inside_ellipse(marker, offset, ellipse)) {
 +                      if (MARKER_VISIBLE(sc, marker) && marker_inside_ellipse(marker, offset, ellipse)) {
-                               BKE_tracking_track_flag(track, TRACK_AREA_ALL, SELECT, mode!=GESTURE_MODAL_SELECT);
+                               BKE_tracking_track_flag(track, TRACK_AREA_ALL, SELECT, mode != GESTURE_MODAL_SELECT);
  
                                change = TRUE;
                        }
        }
  
        if (change) {
 -              BKE_tracking_dopesheet_tag_update(tracking);
 +              ED_space_clip_update_dopesheet(sc);
  
-               WM_event_add_notifier(C, NC_GEOM|ND_SELECT, NULL);
+               WM_event_add_notifier(C, NC_GEOM | ND_SELECT, NULL);
  
                return OPERATOR_FINISHED;
        }
@@@ -1059,10 -1066,10 +1068,10 @@@ static int select_all_exec(bContext *C
  
        track = tracksbase->first;
        while (track) {
-               if ((track->flag & TRACK_HIDDEN)==0) {
+               if ((track->flag & TRACK_HIDDEN) == 0) {
                        marker = BKE_tracking_get_marker(track, framenr);
  
 -                      if (MARKER_VISIBLE(sc, track, marker)) {
 +                      if (MARKER_VISIBLE(sc, marker)) {
                                switch (action) {
                                        case SEL_SELECT:
                                                track->flag |= SELECT;
        if (!has_selection)
                sc->flag &= ~SC_LOCK_SELECTION;
  
 -      BKE_tracking_dopesheet_tag_update(tracking);
 +      ED_space_clip_update_dopesheet(sc);
  
-       WM_event_add_notifier(C, NC_GEOM|ND_SELECT, NULL);
+       WM_event_add_notifier(C, NC_GEOM | ND_SELECT, NULL);
  
        return OPERATOR_FINISHED;
  }
@@@ -1174,9 -1181,9 +1183,9 @@@ static int select_groped_exec(bContext 
                track = track->next;
        }
  
 -      BKE_tracking_dopesheet_tag_update(tracking);
 +      ED_space_clip_update_dopesheet(sc);
  
-       WM_event_add_notifier(C, NC_MOVIECLIP|ND_DISPLAY, clip);
+       WM_event_add_notifier(C, NC_MOVIECLIP | ND_DISPLAY, clip);
  
        return OPERATOR_FINISHED;
  }
@@@ -1555,8 -1566,8 +1568,8 @@@ static int track_markers_invoke(bContex
  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;
+               return OPERATOR_FINISHED | OPERATOR_PASS_THROUGH;
  
        /* running tracking */
        switch (event->type) {
@@@ -2745,9 -2756,9 +2758,9 @@@ static int hide_tracks_exec(bContext *C
                sc->flag &= ~SC_LOCK_SELECTION;
        }
  
 -      BKE_tracking_dopesheet_tag_update(tracking);
 +      BKE_tracking_update_dopesheet(tracking);
  
-       WM_event_add_notifier(C, NC_MOVIECLIP|ND_DISPLAY, NULL);
+       WM_event_add_notifier(C, NC_MOVIECLIP | ND_DISPLAY, NULL);
  
        return OPERATOR_FINISHED;
  }
@@@ -2786,7 -2798,9 +2799,7 @@@ static int hide_tracks_clear_exec(bCont
                track = track->next;
        }
  
-       WM_event_add_notifier(C, NC_MOVIECLIP|ND_DISPLAY, NULL);
 -      BKE_tracking_dopesheet_tag_update(tracking);
 -
+       WM_event_add_notifier(C, NC_MOVIECLIP | ND_DISPLAY, NULL);
  
        return OPERATOR_FINISHED;
  }