[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48115] branches/soc-2011-tomato: Merging r48110 through r48114 from trunk into soc-2011-tomato

Sergey Sharybin sergey.vfx at gmail.com
Wed Jun 20 14:06:58 CEST 2012


Revision: 48115
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48115
Author:   nazgul
Date:     2012-06-20 12:06:48 +0000 (Wed, 20 Jun 2012)
Log Message:
-----------
Merging r48110 through r48114 from trunk into soc-2011-tomato

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48110
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48114

Modified Paths:
--------------
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_movieclip.h
    branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/movieclip.c
    branches/soc-2011-tomato/source/blender/editors/gpencil/gpencil_paint.c
    branches/soc-2011-tomato/source/blender/editors/include/ED_clip.h
    branches/soc-2011-tomato/source/blender/editors/mask/mask_edit.c
    branches/soc-2011-tomato/source/blender/editors/mask/mask_relationships.c
    branches/soc-2011-tomato/source/blender/editors/mask/mask_select.c
    branches/soc-2011-tomato/source/blender/editors/space_clip/clip_draw.c
    branches/soc-2011-tomato/source/blender/editors/space_clip/clip_editor.c
    branches/soc-2011-tomato/source/blender/editors/space_clip/clip_intern.h
    branches/soc-2011-tomato/source/blender/editors/space_clip/clip_ops.c
    branches/soc-2011-tomato/source/blender/editors/space_clip/clip_utils.c
    branches/soc-2011-tomato/source/blender/editors/space_clip/space_clip.c
    branches/soc-2011-tomato/source/blender/editors/space_clip/tracking_ops.c
    branches/soc-2011-tomato/source/blender/editors/space_clip/tracking_select.c
    branches/soc-2011-tomato/source/blender/editors/transform/transform.c
    branches/soc-2011-tomato/source/blender/editors/transform/transform_conversions.c
    branches/soc-2011-tomato/source/blender/editors/transform/transform_generics.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_mask.c

Property Changed:
----------------
    branches/soc-2011-tomato/
    branches/soc-2011-tomato/source/blender/editors/interface/interface.c
    branches/soc-2011-tomato/source/blender/editors/space_outliner/


Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-48109
   + /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-48114

Modified: branches/soc-2011-tomato/source/blender/blenkernel/BKE_movieclip.h
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/BKE_movieclip.h	2012-06-20 11:16:51 UTC (rev 48114)
+++ branches/soc-2011-tomato/source/blender/blenkernel/BKE_movieclip.h	2012-06-20 12:06:48 UTC (rev 48115)
@@ -63,8 +63,8 @@
 void BKE_movieclip_build_proxy_frame(struct MovieClip *clip, int clip_flag, struct MovieDistortion *distortion,
                                      int cfra, int *build_sizes, int build_count, int undistorted);
 
-int BKE_movieclip_remap_scene_to_clip_frame(struct MovieClip *clip, int framenr);
-int BKE_movieclip_remap_clip_to_scene_frame(struct MovieClip *clip, int framenr);
+float BKE_movieclip_remap_scene_to_clip_frame(struct MovieClip *clip, float framenr);
+float BKE_movieclip_remap_clip_to_scene_frame(struct MovieClip *clip, float framenr);
 
 /* cacheing flags */
 #define MOVIECLIP_CACHE_SKIP        (1 << 0)

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c	2012-06-20 11:16:51 UTC (rev 48114)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c	2012-06-20 12:06:48 UTC (rev 48115)
@@ -1160,12 +1160,13 @@
 
 			if (ob) {
 				MovieTrackingTrack *track = BKE_tracking_track_get_named(tracking, ob, parent->sub_parent);
+				float clip_framenr = BKE_movieclip_remap_scene_to_clip_frame(clip, ctime);
 
 				MovieClipUser user = {0};
 				user.framenr = ctime;
 
 				if (track) {
-					MovieTrackingMarker *marker = BKE_tracking_marker_get(track, ctime);
+					MovieTrackingMarker *marker = BKE_tracking_marker_get(track, clip_framenr);
 					float marker_pos_ofs[2];
 					add_v2_v2v2(marker_pos_ofs, marker->pos, track->offset);
 					BKE_mask_coord_from_movieclip(clip, &user, r_co, marker_pos_ofs);

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/movieclip.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/movieclip.c	2012-06-20 11:16:51 UTC (rev 48114)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/movieclip.c	2012-06-20 12:06:48 UTC (rev 48115)
@@ -1270,12 +1270,12 @@
 	clip->id.us = 0;
 }
 
-int BKE_movieclip_remap_scene_to_clip_frame(MovieClip *clip, int framenr)
+float BKE_movieclip_remap_scene_to_clip_frame(MovieClip *clip, float framenr)
 {
-	return framenr - clip->start_frame + 1;
+	return framenr - (float) clip->start_frame + 1.0f;
 }
 
-int BKE_movieclip_remap_clip_to_scene_frame(MovieClip *clip, int framenr)
+float BKE_movieclip_remap_clip_to_scene_frame(MovieClip *clip, float framenr)
 {
-	return framenr + clip->start_frame - 1;
+	return framenr + (float) clip->start_frame - 1.0f;
 }

Modified: branches/soc-2011-tomato/source/blender/editors/gpencil/gpencil_paint.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/gpencil/gpencil_paint.c	2012-06-20 11:16:51 UTC (rev 48114)
+++ branches/soc-2011-tomato/source/blender/editors/gpencil/gpencil_paint.c	2012-06-20 12:06:48 UTC (rev 48115)
@@ -56,6 +56,7 @@
 #include "ED_gpencil.h"
 #include "ED_screen.h"
 #include "ED_view3d.h"
+#include "ED_clip.h"
 
 #include "BIF_gl.h"
 #include "BIF_glutil.h"
@@ -1032,8 +1033,9 @@
 			p->custom_color[3] = 0.9f;
 			
 			if (sc->gpencil_src == SC_GPENCIL_SRC_TRACK) {
-				int framenr = sc->user.framenr;
-				MovieTrackingTrack *track = BKE_tracking_track_get_active(&sc->clip->tracking);
+				MovieClip *clip = ED_space_clip_get_clip(sc);
+				int framenr = ED_space_clip_get_clip_frame_number(sc);
+				MovieTrackingTrack *track = BKE_tracking_track_get_active(&clip->tracking);
 				MovieTrackingMarker *marker = BKE_tracking_marker_get_exact(track, framenr);
 				
 				p->imat[3][0] -= marker->pos[0];

Modified: branches/soc-2011-tomato/source/blender/editors/include/ED_clip.h
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/include/ED_clip.h	2012-06-20 11:16:51 UTC (rev 48114)
+++ branches/soc-2011-tomato/source/blender/editors/include/ED_clip.h	2012-06-20 12:06:48 UTC (rev 48115)
@@ -42,6 +42,8 @@
 struct wmEvent;
 
 /*  ** clip_editor.c ** */
+
+/* common poll functions */
 int ED_space_clip_poll(struct bContext *C);
 
 int ED_space_clip_view_clip_poll(struct bContext *C);
@@ -50,33 +52,29 @@
 int ED_space_clip_maskedit_poll(struct bContext *C);
 int ED_space_clip_maskedit_mask_poll(bContext *C);
 
-struct MovieClip *ED_space_clip_get_clip(struct SpaceClip *sc);
-void ED_space_clip_set_clip(struct bContext *C, struct bScreen *screen, struct SpaceClip *sc, struct MovieClip *clip);
+void ED_space_clip_get_size(const struct bContext *C, int *width, int *height);
+void ED_space_clip_get_zoom(const struct bContext *C, float *zoomx, float *zoomy);
+void ED_space_clip_get_aspect(struct SpaceClip *sc, float *aspx, float *aspy);
+void ED_space_clip_get_aspect_dimension_aware(struct SpaceClip *sc, float *aspx, float *aspy);
 
-void ED_space_clip_get_zoom(struct SpaceClip *sc, ARegion *ar, float *zoomx, float *zoomy);
-
-void ED_space_clip_get_clip_size(struct SpaceClip *sc, int *width, int *height);
-void ED_space_clip_get_clip_aspect(struct SpaceClip *sc, float *aspx, float *aspy);
-void ED_space_clip_get_clip_aspect_dimension_aware(struct SpaceClip *sc, float *aspx, float *aspy);
-
 int ED_space_clip_get_clip_frame_number(struct SpaceClip *sc);
 
 struct ImBuf *ED_space_clip_get_buffer(struct SpaceClip *sc);
 struct ImBuf *ED_space_clip_get_stable_buffer(struct SpaceClip *sc, float loc[2], float *scale, float *angle);
 
 void ED_clip_update_frame(const struct Main *mainp, int cfra);
-int ED_clip_view_selection(struct SpaceClip *sc, struct ARegion *ar, int fit);
+int ED_clip_view_selection(const struct bContext *C, struct ARegion *ar, int fit);
 
 void ED_clip_point_undistorted_pos(SpaceClip *sc, const float co[2], float r_co[2]);
 void ED_clip_point_stable_pos(const struct bContext *C, float x, float y, float *xr, float *yr);
-void ED_clip_point_stable_pos__reverse(SpaceClip *sc, ARegion *ar, const float co[2], float r_co[2]);
+void ED_clip_point_stable_pos__reverse(const struct bContext *C, const float co[2], float r_co[2]);
 void ED_clip_mouse_pos(const struct bContext *C, struct wmEvent *event, float co[2]);
 
 int ED_space_clip_check_show_trackedit(struct SpaceClip *sc);
 int ED_space_clip_check_show_maskedit(struct SpaceClip *sc);
 
-void ED_space_clip_get_mask_size(struct SpaceClip *sc, int *width, int *height);
-void ED_space_clip_get_mask_aspect(struct SpaceClip *sc, float *aspx, float *aspy);
+struct MovieClip *ED_space_clip_get_clip(struct SpaceClip *sc);
+void ED_space_clip_set_clip(struct bContext *C, struct bScreen *screen, struct SpaceClip *sc, struct MovieClip *clip);
 
 struct Mask *ED_space_clip_get_mask(struct SpaceClip *sc);
 void ED_space_clip_set_mask(struct bContext *C, struct SpaceClip *sc, struct Mask *mask);


Property changes on: branches/soc-2011-tomato/source/blender/editors/interface/interface.c
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/ge_candy/source/blender/editors/interface/interface.c:45070-46163
/branches/ge_harmony/source/blender/editors/interface/interface.c:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber/source/blender/editors/interface/interface.c:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers/source/blender/editors/interface/interface.c:38694-39989
/trunk/blender/source/blender/editors/interface/interface.c:36831-48109
   + /branches/ge_candy/source/blender/editors/interface/interface.c:45070-46163
/branches/ge_harmony/source/blender/editors/interface/interface.c:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber/source/blender/editors/interface/interface.c:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers/source/blender/editors/interface/interface.c:38694-39989
/trunk/blender/source/blender/editors/interface/interface.c:36831-48114

Modified: branches/soc-2011-tomato/source/blender/editors/mask/mask_edit.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/mask/mask_edit.c	2012-06-20 11:16:51 UTC (rev 48114)
+++ branches/soc-2011-tomato/source/blender/editors/mask/mask_edit.c	2012-06-20 12:06:48 UTC (rev 48115)
@@ -121,7 +121,7 @@
 		co[0] = x;
 		co[1] = y;
 		BKE_mask_coord_to_movieclip(sc->clip, &sc->user, co, co);
-		ED_clip_point_stable_pos__reverse(sc, ar, co, co);
+		ED_clip_point_stable_pos__reverse(C, co, co);
 	}
 	else {
 		/* possible other spaces from which mask editing is available */
@@ -137,8 +137,7 @@
 	ScrArea *sa = CTX_wm_area(C);
 	if (sa && sa->spacedata.first) {
 		if (sa->spacetype == SPACE_CLIP) {
-			SpaceClip *sc = sa->spacedata.first;
-			ED_space_clip_get_mask_size(sc, width, height);
+			ED_space_clip_get_size(C, width, height);
 			return;
 		}

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list