[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38901] branches/soc-2011-salad: Merging r38858 through r38900 from soc-2011-tomato into soc-2011-salad
Sergey Sharybin
g.ulairi at gmail.com
Mon Aug 1 18:34:30 CEST 2011
Revision: 38901
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38901
Author: nazgul
Date: 2011-08-01 16:34:28 +0000 (Mon, 01 Aug 2011)
Log Message:
-----------
Merging r38858 through r38900 from soc-2011-tomato into soc-2011-salad
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38858
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38900
Modified Paths:
--------------
branches/soc-2011-salad/release/scripts/startup/bl_ui/space_clip.py
branches/soc-2011-salad/source/blender/blenkernel/BKE_movieclip.h
branches/soc-2011-salad/source/blender/blenkernel/BKE_node.h
branches/soc-2011-salad/source/blender/blenkernel/BKE_tracking.h
branches/soc-2011-salad/source/blender/blenkernel/intern/DerivedMesh.c
branches/soc-2011-salad/source/blender/blenkernel/intern/movieclip.c
branches/soc-2011-salad/source/blender/blenkernel/intern/node.c
branches/soc-2011-salad/source/blender/blenkernel/intern/tracking.c
branches/soc-2011-salad/source/blender/blenloader/intern/readfile.c
branches/soc-2011-salad/source/blender/editors/include/ED_clip.h
branches/soc-2011-salad/source/blender/editors/space_clip/clip_draw.c
branches/soc-2011-salad/source/blender/editors/space_clip/clip_editor.c
branches/soc-2011-salad/source/blender/editors/space_clip/clip_ops.c
branches/soc-2011-salad/source/blender/editors/space_clip/space_clip.c
branches/soc-2011-salad/source/blender/editors/space_clip/tracking_ops.c
branches/soc-2011-salad/source/blender/editors/space_node/drawnode.c
branches/soc-2011-salad/source/blender/makesdna/DNA_movieclip_types.h
branches/soc-2011-salad/source/blender/makesdna/DNA_space_types.h
branches/soc-2011-salad/source/blender/makesdna/DNA_tracking_types.h
branches/soc-2011-salad/source/blender/makesrna/intern/rna_nodetree.c
branches/soc-2011-salad/source/blender/makesrna/intern/rna_nodetree_types.h
branches/soc-2011-salad/source/blender/makesrna/intern/rna_space.c
branches/soc-2011-salad/source/blender/makesrna/intern/rna_tracking.c
branches/soc-2011-salad/source/blender/nodes/CMP_node.h
branches/soc-2011-salad/source/blender/nodes/CMakeLists.txt
branches/soc-2011-salad/source/blender/nodes/intern/CMP_nodes/CMP_movieclip.c
branches/soc-2011-salad/source/blender/nodes/intern/CMP_nodes/CMP_scale.c
branches/soc-2011-salad/source/blender/nodes/intern/CMP_nodes/CMP_stabilize2d.c
branches/soc-2011-salad/source/blender/nodes/intern/CMP_util.h
Added Paths:
-----------
branches/soc-2011-salad/source/blender/nodes/intern/CMP_nodes/CMP_transform.c
Property Changed:
----------------
branches/soc-2011-salad/
branches/soc-2011-salad/intern/audaspace/OpenAL/
Property changes on: branches/soc-2011-salad
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30783,30792-30793,30797-30798,30815
/branches/soc-2011-carrot:36854,37548,37564,37602,37622,37848,38043,38064,38226,38231,38282,38620,38661-38662
/branches/soc-2011-cucumber:36829-36994
/branches/soc-2011-onion:36833-38309
/branches/soc-2011-pepper:36830-38846
/branches/soc-2011-tomato:36831-38857
/trunk/blender:36834-38898
+ /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30783,30792-30793,30797-30798,30815
/branches/soc-2011-carrot:36854,37548,37564,37602,37622,37848,38043,38064,38226,38231,38282,38620,38661-38662
/branches/soc-2011-cucumber:36829-36994
/branches/soc-2011-onion:36833-38309
/branches/soc-2011-pepper:36830-38846
/branches/soc-2011-tomato:36831-38900
/trunk/blender:36834-38898
Property changes on: branches/soc-2011-salad/intern/audaspace/OpenAL
___________________________________________________________________
Added: svn:mergeinfo
+ /trunk/blender/intern/audaspace/OpenAL:38832-38897
Modified: branches/soc-2011-salad/release/scripts/startup/bl_ui/space_clip.py
===================================================================
--- branches/soc-2011-salad/release/scripts/startup/bl_ui/space_clip.py 2011-08-01 15:52:20 UTC (rev 38900)
+++ branches/soc-2011-salad/release/scripts/startup/bl_ui/space_clip.py 2011-08-01 16:34:28 UTC (rev 38901)
@@ -328,8 +328,9 @@
row = layout.row()
row.prop(sc, "show_track_path", text="Path")
- row.active = sc.show_track_path
- row.prop(sc, "path_length", text="Length")
+ sub = row.column()
+ sub.active = sc.show_track_path
+ sub.prop(sc, "path_length", text="Length")
row = layout.row()
row.prop(sc, "show_disabled", text="Disabled")
@@ -339,7 +340,9 @@
row.prop(sc, "show_names", text="Names")
row.prop(sc, "show_grid", text="Grid")
- layout.prop(sc, "show_tiny_markers", text="Tiny Markers")
+ row = layout.row()
+ row.prop(sc, "show_tiny_markers", text="Tiny Markers")
+ row.prop(sc, "show_stable", text="Stable")
layout.prop(sc, "lock_selection")
layout.prop(sc, "use_mute_footage")
@@ -377,7 +380,6 @@
layout.active = stab.use_2d_stabilization
- layout.prop(stab, "use_autoscale")
row = layout.row()
row.template_list(stab, "tracks", stab, "active_track_index", rows=3)
@@ -387,7 +389,14 @@
sub.operator("clip.stabilize_2d_remove", icon='ZOOMOUT', text="")
sub.menu('CLIP_MT_stabilize_2d_specials', text="", icon="DOWNARROW_HLT")
+ layout.prop(stab, "influence_location")
+ layout.prop(stab, "use_autoscale")
+ row = layout.row()
+ row.active = stab.use_autoscale
+ row.prop(stab, "influence_scale")
+
+
class CLIP_PT_footage(bpy.types.Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
Modified: branches/soc-2011-salad/source/blender/blenkernel/BKE_movieclip.h
===================================================================
--- branches/soc-2011-salad/source/blender/blenkernel/BKE_movieclip.h 2011-08-01 15:52:20 UTC (rev 38900)
+++ branches/soc-2011-salad/source/blender/blenkernel/BKE_movieclip.h 2011-08-01 16:34:28 UTC (rev 38901)
@@ -48,7 +48,7 @@
void BKE_movieclip_reload(struct MovieClip *clip);
struct ImBuf *BKE_movieclip_acquire_ibuf(struct MovieClip *clip, struct MovieClipUser *user);
-struct ImBuf *BKE_movieclip_acquire_stable_ibuf(struct MovieClip *clip, struct MovieClipUser *user, float mat[4][4]);
+struct ImBuf *BKE_movieclip_acquire_stable_ibuf(struct MovieClip *clip, struct MovieClipUser *user, float loc[2], float *scale);
void BKE_movieclip_acquire_size(struct MovieClip *clip, struct MovieClipUser *user, int *width, int *height);
int BKE_movieclip_has_frame(struct MovieClip *clip, struct MovieClipUser *user);
void BKE_movieclip_user_set_frame(struct MovieClipUser *user, int framenr);
Modified: branches/soc-2011-salad/source/blender/blenkernel/BKE_node.h
===================================================================
--- branches/soc-2011-salad/source/blender/blenkernel/BKE_node.h 2011-08-01 15:52:20 UTC (rev 38900)
+++ branches/soc-2011-salad/source/blender/blenkernel/BKE_node.h 2011-08-01 16:34:28 UTC (rev 38901)
@@ -389,6 +389,7 @@
#define CMP_NODE_HUECORRECT 261
#define CMP_NODE_MOVIECLIP 262
#define CMP_NODE_STABILIZE2D 263
+#define CMP_NODE_TRANSFORM 264
#define CMP_NODE_GLARE 301
#define CMP_NODE_TONEMAP 302
Modified: branches/soc-2011-salad/source/blender/blenkernel/BKE_tracking.h
===================================================================
--- branches/soc-2011-salad/source/blender/blenkernel/BKE_tracking.h 2011-08-01 15:52:20 UTC (rev 38900)
+++ branches/soc-2011-salad/source/blender/blenkernel/BKE_tracking.h 2011-08-01 16:34:28 UTC (rev 38901)
@@ -87,8 +87,9 @@
struct MovieTrackingTrack *BKE_tracking_indexed_bundle(struct MovieTracking *tracking, int bundlenr);
-void BKE_tracking_stabilization_matrix(struct MovieTracking *tracking, int framenr, int width, int height, float mat[4][4]);
-struct ImBuf *BKE_tracking_stabilize_shot(struct MovieTracking *tracking, int framenr, struct ImBuf *ibuf, float mat[4][4]);
+void BKE_tracking_stabilization_data(struct MovieTracking *tracking, int framenr, int width, int height, float loc[2], float *scale);
+struct ImBuf *BKE_tracking_stabilize_shot(struct MovieTracking *tracking, int framenr, struct ImBuf *ibuf, float loc[2], float *scale);
+void BKE_tracking_stabdata_to_mat4(float loc[2], float scale, float mat[4][4]);
#define TRACK_SELECTED(track) (((track->flag&TRACK_HIDDEN)==0) && ((track)->flag&SELECT || (track)->pat_flag&SELECT || (track)->search_flag&SELECT))
#define TRACK_AREA_SELECTED(track, area) (((track->flag&TRACK_HIDDEN)==0) && ((area)==TRACK_AREA_POINT?(track)->flag&SELECT : ((area)==TRACK_AREA_PAT?(track)->pat_flag&SELECT:(track)->search_flag&SELECT)))
Modified: branches/soc-2011-salad/source/blender/blenkernel/intern/DerivedMesh.c
===================================================================
--- branches/soc-2011-salad/source/blender/blenkernel/intern/DerivedMesh.c 2011-08-01 15:52:20 UTC (rev 38900)
+++ branches/soc-2011-salad/source/blender/blenkernel/intern/DerivedMesh.c 2011-08-01 16:34:28 UTC (rev 38901)
@@ -1960,10 +1960,12 @@
/* set the DerivedMesh to only copy needed data */
mask= (CustomDataMask)GET_INT_FROM_POINTER(curr->link);
mask |= append_mask;
- DM_set_only_copy(dm, mask);
/* needMapping check here fixes bug [#28112], otherwise its
* possible that it wont be copied */
DM_set_only_copy(dm, mask | (needMapping ? CD_MASK_ORIGINDEX : 0));
+ /* needMapping check here fixes bug [#28112], otherwise its
+ * possible that it wont be copied */
+ DM_set_only_copy(dm, mask | (needMapping ? CD_MASK_ORIGINDEX : 0));
/* add cloth rest shape key if need */
if(mask & CD_MASK_CLOTH_ORCO)
Modified: branches/soc-2011-salad/source/blender/blenkernel/intern/movieclip.c
===================================================================
--- branches/soc-2011-salad/source/blender/blenkernel/intern/movieclip.c 2011-08-01 15:52:20 UTC (rev 38900)
+++ branches/soc-2011-salad/source/blender/blenkernel/intern/movieclip.c 2011-08-01 16:34:28 UTC (rev 38901)
@@ -151,6 +151,16 @@
/*********************** image buffer cache *************************/
+typedef struct MovieClipCache {
+ /* regular moive cache */
+ struct MovieCache *moviecache;
+
+ /* cache for stable shot */
+ int stable_framenr;
+ float stable_loc[2], stable_scale;
+ ImBuf *stableibuf;
+} MovieClipCache;
+
typedef struct MovieClipImBufCacheKey {
int framenr;
} MovieClipImBufCacheKey;
@@ -183,11 +193,11 @@
static ImBuf *get_imbuf_cache(MovieClip *clip, MovieClipUser *user)
{
- if(clip->ibuf_cache) {
+ if(clip->cache) {
MovieClipImBufCacheKey key;
key.framenr= user?user->framenr:clip->lastframe;
- return BKE_moviecache_get(clip->ibuf_cache, &key);
+ return BKE_moviecache_get(clip->cache->moviecache, &key);
}
return NULL;
@@ -197,14 +207,16 @@
{
MovieClipImBufCacheKey key;
- if(!clip->ibuf_cache) {
- clip->ibuf_cache= BKE_moviecache_create(sizeof(MovieClipImBufCacheKey), moviecache_hashhash,
+ if(!clip->cache) {
+ clip->cache= MEM_callocN(sizeof(MovieClipCache), "movieClipCache");
+
+ clip->cache->moviecache= BKE_moviecache_create(sizeof(MovieClipImBufCacheKey), moviecache_hashhash,
moviecache_hashcmp, moviecache_keydata);
}
key.framenr= user?user->framenr:clip->lastframe;
- BKE_moviecache_put(clip->ibuf_cache, &key, ibuf);
+ BKE_moviecache_put(clip->cache->moviecache, &key, ibuf);
}
/*********************** common functions *************************/
@@ -227,6 +239,9 @@
clip->tracking.settings.keyframe2= 30;
clip->tracking.settings.dist= 1;
+ clip->tracking.stabilization.scaleinf= 1.f;
+ clip->tracking.stabilization.locinf= 1.f;
+
return clip;
}
@@ -322,25 +337,45 @@
return ibuf;
}
-ImBuf *BKE_movieclip_acquire_stable_ibuf(MovieClip *clip, MovieClipUser *user, float mat[4][4])
+ImBuf *BKE_movieclip_acquire_stable_ibuf(MovieClip *clip, MovieClipUser *user, float loc[2], float *scale)
{
- ImBuf *ibuf, *stableibuf;
+ ImBuf *ibuf, *stableibuf= NULL;
int framenr= user?user->framenr:clip->lastframe;
ibuf= BKE_movieclip_acquire_ibuf(clip, user);
if(clip->tracking.stabilization.flag&TRACKING_2D_STABILIZATION) {
- MovieTrackingStabilization *stab= &clip->tracking.stabilization;
+ float tloc[2], tscale;
- if(user->framenr!=stab->framenr)
- stab->ibufok= 0;
+ if(clip->cache->stableibuf && clip->cache->stable_framenr==framenr) {
+ stableibuf= clip->cache->stableibuf;
- stableibuf= BKE_tracking_stabilize_shot(&clip->tracking, framenr, ibuf, mat);
+ BKE_tracking_stabilization_data(&clip->tracking, framenr, stableibuf->x, stableibuf->y, tloc, &tscale);
- stab->framenr= user->framenr;
+ if(!equals_v2v2(tloc, clip->cache->stable_loc) || tscale!=clip->cache->stable_scale) {
+ stableibuf= NULL;
+ }
+ }
+
+ if(!stableibuf) {
+ if(clip->cache->stableibuf)
+ IMB_freeImBuf(clip->cache->stableibuf);
+
+ stableibuf= BKE_tracking_stabilize_shot(&clip->tracking, framenr, ibuf, tloc, &tscale);
+
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list