[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38834] branches/soc-2011-salad: Merging r38784 through r38833 from soc-2011-tomato into soc-2011-salad
Sergey Sharybin
g.ulairi at gmail.com
Fri Jul 29 23:26:06 CEST 2011
Revision: 38834
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38834
Author: nazgul
Date: 2011-07-29 21:26:05 +0000 (Fri, 29 Jul 2011)
Log Message:
-----------
Merging r38784 through r38833 from soc-2011-tomato into soc-2011-salad
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38784
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38833
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/depsgraph.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_intern.h
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_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_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_util.h
Added Paths:
-----------
branches/soc-2011-salad/source/blender/nodes/intern/CMP_nodes/CMP_stabilize2d.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-38208
/branches/soc-2011-tomato:36831-38783
/trunk/blender:36834-38831
+ /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-38208
/branches/soc-2011-tomato:36831-38833
/trunk/blender:36834-38831
Property changes on: branches/soc-2011-salad/intern/audaspace/OpenAL
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/soc-2010-jwilkins/intern/audaspace/OpenAL:28499-37009
/branches/soc-2010-nicolasbishop/intern/audaspace/OpenAL:28448-30783,30792-30793,30797-30798,30815
/branches/soc-2011-carrot/intern/audaspace/OpenAL:36854,37548,37564,37602,37622,37848,38043,38064,38226,38231,38282,38620,38661-38662
/branches/soc-2011-cucumber/intern/audaspace/OpenAL:36829-36994
/branches/soc-2011-onion/intern/audaspace/OpenAL:36833-38309
/branches/soc-2011-pepper/intern/audaspace/OpenAL:36830-38208,38630
/branches/soc-2011-tomato/intern/audaspace/OpenAL:36831-38783
/trunk/blender/intern/audaspace/OpenAL:36834-38831
+ /branches/soc-2010-jwilkins/intern/audaspace/OpenAL:28499-37009
/branches/soc-2010-nicolasbishop/intern/audaspace/OpenAL:28448-30783,30792-30793,30797-30798,30815
/branches/soc-2011-carrot/intern/audaspace/OpenAL:36854,37548,37564,37602,37622,37848,38043,38064,38226,38231,38282,38620,38661-38662
/branches/soc-2011-cucumber/intern/audaspace/OpenAL:36829-36994
/branches/soc-2011-onion/intern/audaspace/OpenAL:36833-38309
/branches/soc-2011-pepper/intern/audaspace/OpenAL:36830-38208,38630
/branches/soc-2011-tomato/intern/audaspace/OpenAL:36831-38833
/trunk/blender/intern/audaspace/OpenAL:36834-38831
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-07-29 21:20:10 UTC (rev 38833)
+++ branches/soc-2011-salad/release/scripts/startup/bl_ui/space_clip.py 2011-07-29 21:26:05 UTC (rev 38834)
@@ -350,6 +350,44 @@
layout.prop(clip, "display_aspect", text="")
+class CLIP_PT_stabilization(bpy.types.Panel):
+ bl_space_type = 'CLIP_EDITOR'
+ bl_region_type = 'UI'
+ bl_label = "2D Stabilization"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ @classmethod
+ def poll(cls, context):
+ sc = context.space_data
+
+ return sc.clip
+
+ def draw_header(self, context):
+ sc = context.space_data
+ tracking = sc.clip.tracking
+ stab = tracking.stabilization
+
+ self.layout.prop(stab, "use_2d_stabilization", text="")
+
+ def draw(self, context):
+ layout = self.layout
+ sc = context.space_data
+ tracking = sc.clip.tracking
+ stab = tracking.stabilization
+
+ 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)
+
+ sub = row.column(align=True)
+ sub.operator("clip.stabilize_2d_add", icon='ZOOMIN', text="")
+ sub.operator("clip.stabilize_2d_remove", icon='ZOOMOUT', text="")
+ sub.menu('CLIP_MT_stabilize_2d_specials', text="", icon="DOWNARROW_HLT")
+
+
class CLIP_PT_footage(bpy.types.Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
@@ -588,5 +626,14 @@
layout.operator('clip.track_copy_color', icon='COPY_ID')
+class CLIP_MT_stabilize_2d_specials(bpy.types.Menu):
+ bl_label = "Track Color Specials"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator('clip.stabilize_2d_select')
+
+
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)
Modified: branches/soc-2011-salad/source/blender/blenkernel/BKE_movieclip.h
===================================================================
--- branches/soc-2011-salad/source/blender/blenkernel/BKE_movieclip.h 2011-07-29 21:20:10 UTC (rev 38833)
+++ branches/soc-2011-salad/source/blender/blenkernel/BKE_movieclip.h 2011-07-29 21:26:05 UTC (rev 38834)
@@ -48,6 +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]);
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-07-29 21:20:10 UTC (rev 38833)
+++ branches/soc-2011-salad/source/blender/blenkernel/BKE_node.h 2011-07-29 21:26:05 UTC (rev 38834)
@@ -388,6 +388,7 @@
#define CMP_NODE_COLORBALANCE 260
#define CMP_NODE_HUECORRECT 261
#define CMP_NODE_MOVIECLIP 262
+#define CMP_NODE_STABILIZE2D 263
#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-07-29 21:20:10 UTC (rev 38833)
+++ branches/soc-2011-salad/source/blender/blenkernel/BKE_tracking.h 2011-07-29 21:26:05 UTC (rev 38834)
@@ -87,6 +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]);
+
#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/depsgraph.c
===================================================================
--- branches/soc-2011-salad/source/blender/blenkernel/intern/depsgraph.c 2011-07-29 21:20:10 UTC (rev 38833)
+++ branches/soc-2011-salad/source/blender/blenkernel/intern/depsgraph.c 2011-07-29 21:26:05 UTC (rev 38834)
@@ -2498,6 +2498,16 @@
}
}
}
+
+ if(sce->nodetree) {
+ bNode *node;
+
+ for(node= sce->nodetree->nodes.first; node; node= node->next) {
+ if(node->id==id) {
+ NodeTagChanged(sce->nodetree, node);
+ }
+ }
+ }
}
/* camera's matrix is used to orient reconstructed stuff,
Modified: branches/soc-2011-salad/source/blender/blenkernel/intern/movieclip.c
===================================================================
--- branches/soc-2011-salad/source/blender/blenkernel/intern/movieclip.c 2011-07-29 21:20:10 UTC (rev 38833)
+++ branches/soc-2011-salad/source/blender/blenkernel/intern/movieclip.c 2011-07-29 21:26:05 UTC (rev 38834)
@@ -321,6 +321,38 @@
return ibuf;
}
+ImBuf *BKE_movieclip_acquire_stable_ibuf(MovieClip *clip, MovieClipUser *user, float mat[4][4])
+{
+ ImBuf *ibuf, *stableibuf;
+ 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;
+
+ if(user->framenr!=stab->framenr)
+ stab->ibufok= 0;
+
+ stableibuf= BKE_tracking_stabilize_shot(&clip->tracking, framenr, ibuf, mat);
+
+ stab->framenr= user->framenr;
+ } else {
+ if(mat)
+ unit_m4(mat);
+
+ stableibuf= ibuf;
+ }
+
+ if(stableibuf!=ibuf) {
+ IMB_freeImBuf(ibuf);
+ ibuf= stableibuf;
+ }
+
+ return ibuf;
+
+}
+
int BKE_movieclip_has_frame(MovieClip *clip, MovieClipUser *user)
{
ImBuf *ibuf= BKE_movieclip_acquire_ibuf(clip, user);
@@ -389,6 +421,9 @@
/* clear cache */
free_buffers(clip);
+ clip->tracking.stabilization.ok= 0;
+ clip->tracking.stabilization.ibufok= 0;
+
/* update clip source */
if(BLI_testextensie_array(clip->name, imb_ext_movie)) clip->source= MCLIP_SRC_MOVIE;
else clip->source= MCLIP_SRC_SEQUENCE;
Modified: branches/soc-2011-salad/source/blender/blenkernel/intern/node.c
===================================================================
--- branches/soc-2011-salad/source/blender/blenkernel/intern/node.c 2011-07-29 21:20:10 UTC (rev 38833)
+++ branches/soc-2011-salad/source/blender/blenkernel/intern/node.c 2011-07-29 21:26:05 UTC (rev 38834)
@@ -3305,7 +3305,7 @@
NodeTagChanged(ntree, node);
}
}
- else if(node->type==CMP_NODE_MOVIECLIP) {
+ else if(ELEM(node->type, CMP_NODE_MOVIECLIP, CMP_NODE_STABILIZE2D)) {
NodeTagChanged(ntree, node);
tagged= 1;
}
@@ -3520,6 +3520,7 @@
register_node_type_cmp_glare(ntypelist);
register_node_type_cmp_tonemap(ntypelist);
register_node_type_cmp_lensdist(ntypelist);
+ register_node_type_cmp_stabilize2d(ntypelist);
}
static void registerShaderNodes(ListBase *ntypelist)
Modified: branches/soc-2011-salad/source/blender/blenkernel/intern/tracking.c
===================================================================
--- branches/soc-2011-salad/source/blender/blenkernel/intern/tracking.c 2011-07-29 21:20:10 UTC (rev 38833)
+++ branches/soc-2011-salad/source/blender/blenkernel/intern/tracking.c 2011-07-29 21:26:05 UTC (rev 38834)
@@ -33,6 +33,7 @@
#include <stddef.h>
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list