[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49840] branches/soc-2011-tomato: Merging r49834 through r49839 from trunk into soc-2011-tomato
Sergey Sharybin
sergey.vfx at gmail.com
Sun Aug 12 15:38:46 CEST 2012
Revision: 49840
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49840
Author: nazgul
Date: 2012-08-12 13:38:46 +0000 (Sun, 12 Aug 2012)
Log Message:
-----------
Merging r49834 through r49839 from trunk into soc-2011-tomato
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49834
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49839
Modified Paths:
--------------
branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_sequencer.py
branches/soc-2011-tomato/source/blender/blenkernel/intern/sequencer.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/space_clip.c
branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_draw.c
branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_intern.h
branches/soc-2011-tomato/source/blender/editors/space_sequencer/space_sequencer.c
branches/soc-2011-tomato/source/blender/makesdna/DNA_space_types.h
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_space.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-49833
+ /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-49839
Modified: branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_sequencer.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_sequencer.py 2012-08-12 13:29:57 UTC (rev 49839)
+++ branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_sequencer.py 2012-08-12 13:38:46 UTC (rev 49840)
@@ -75,6 +75,9 @@
row.prop(ed, "overlay_frame", text="")
row.prop(ed, "overlay_lock", text="", icon='LOCKED')
+ row = layout.row()
+ row.prop(st, "overlay_type", text="")
+
row = layout.row(align=True)
props = row.operator("render.opengl", text="", icon='RENDER_STILL')
props.sequencer = True
Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/sequencer.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/sequencer.c 2012-08-12 13:29:57 UTC (rev 49839)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/sequencer.c 2012-08-12 13:38:46 UTC (rev 49840)
@@ -136,6 +136,8 @@
IMB_free_anim(seq->strip->proxy->anim);
seq->strip->proxy->anim = NULL;
}
+
+ BKE_sequencer_cache_cleanup_sequence(seq);
}
static void seq_free_strip(Strip *strip)
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-49833
+ /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-49839
Modified: branches/soc-2011-tomato/source/blender/editors/space_clip/clip_intern.h
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/space_clip/clip_intern.h 2012-08-12 13:29:57 UTC (rev 49839)
+++ branches/soc-2011-tomato/source/blender/editors/space_clip/clip_intern.h 2012-08-12 13:38:46 UTC (rev 49840)
@@ -102,6 +102,8 @@
void CLIP_OT_rebuild_proxy(struct wmOperatorType *ot);
void CLIP_OT_mode_set(struct wmOperatorType *ot);
+void CLIP_OT_view_ndof(struct wmOperatorType *ot);
+
/* clip_toolbar.c */
struct ARegion *ED_clip_has_properties_region(struct ScrArea *sa);
void CLIP_OT_tools(struct wmOperatorType *ot);
Modified: branches/soc-2011-tomato/source/blender/editors/space_clip/clip_ops.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/space_clip/clip_ops.c 2012-08-12 13:29:57 UTC (rev 49839)
+++ branches/soc-2011-tomato/source/blender/editors/space_clip/clip_ops.c 2012-08-12 13:38:46 UTC (rev 49840)
@@ -1111,6 +1111,65 @@
RNA_def_enum(ot->srna, "mode", clip_editor_mode_items, SC_MODE_TRACKING, "Mode", "");
}
+/********************** NDOF operator *********************/
+
+/* Combined pan/zoom from a 3D mouse device.
+ * Z zooms, XY pans
+ * "view" (not "paper") control -- user moves the viewpoint, not the image being viewed
+ * that explains the negative signs in the code below
+ */
+
+static int clip_view_ndof_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
+{
+ if (event->type != NDOF_MOTION)
+ return OPERATOR_CANCELLED;
+ else {
+ SpaceClip *sc = CTX_wm_space_clip(C);
+ ARegion *ar = CTX_wm_region(C);
+
+ wmNDOFMotionData *ndof = (wmNDOFMotionData *) event->customdata;
+
+ float dt = ndof->dt;
+
+ /* tune these until it feels right */
+ const float zoom_sensitivity = 0.5f; /* 50% per second (I think) */
+ const float pan_sensitivity = 300.0f; /* screen pixels per second */
+
+ float pan_x = pan_sensitivity * dt * ndof->tvec[0] / sc->zoom;
+ float pan_y = pan_sensitivity * dt * ndof->tvec[1] / sc->zoom;
+
+ /* "mouse zoom" factor = 1 + (dx + dy) / 300
+ * what about "ndof zoom" factor? should behave like this:
+ * at rest -> factor = 1
+ * move forward -> factor > 1
+ * move backward -> factor < 1
+ */
+ float zoom_factor = 1.0f + zoom_sensitivity * dt * - ndof->tvec[2];
+
+ if (U.ndof_flag & NDOF_ZOOM_INVERT)
+ zoom_factor = -zoom_factor;
+
+ sclip_zoom_set_factor(C, zoom_factor, NULL);
+ sc->xof += pan_x;
+ sc->yof += pan_y;
+
+ ED_region_tag_redraw(ar);
+
+ return OPERATOR_FINISHED;
+ }
+}
+
+void CLIP_OT_view_ndof(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "NDOF Pan/Zoom";
+ ot->idname = "CLIP_OT_view_ndof";
+ ot->description = "Use a 3D mouse device to pan/zoom the view";
+
+ /* api callbacks */
+ ot->invoke = clip_view_ndof_invoke;
+}
+
/********************** macroses *********************/
void ED_operatormacros_clip(void)
Modified: branches/soc-2011-tomato/source/blender/editors/space_clip/space_clip.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/space_clip/space_clip.c 2012-08-12 13:29:57 UTC (rev 49839)
+++ branches/soc-2011-tomato/source/blender/editors/space_clip/space_clip.c 2012-08-12 13:38:46 UTC (rev 49840)
@@ -444,6 +444,7 @@
WM_operatortype_append(CLIP_OT_change_frame);
WM_operatortype_append(CLIP_OT_rebuild_proxy);
WM_operatortype_append(CLIP_OT_mode_set);
+ WM_operatortype_append(CLIP_OT_view_ndof);
/* ** clip_toolbar.c ** */
WM_operatortype_append(CLIP_OT_tools);
@@ -608,6 +609,9 @@
WM_keymap_add_item(keymap, "CLIP_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "CLIP_OT_view_all", NDOF_BUTTON_FIT, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "CLIP_OT_view_ndof", NDOF_MOTION, 0, 0, 0);
+
/* jump to special frame */
kmi = WM_keymap_add_item(keymap, "CLIP_OT_frame_jump", LEFTARROWKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "position", 0);
Property changes on: branches/soc-2011-tomato/source/blender/editors/space_outliner
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/soc-2011-cucumber/source/blender/editors/space_outliner:38968,38970,38973,39045,40845
/branches/soc-2011-pepper/source/blender/editors/space_outliner:36831-38987
/trunk/blender/source/blender/editors/space_outliner:36831-49833
+ /branches/soc-2011-cucumber/source/blender/editors/space_outliner:38968,38970,38973,39045,40845
/branches/soc-2011-pepper/source/blender/editors/space_outliner:36831-38987
/trunk/blender/source/blender/editors/space_outliner:36831-49839
Modified: branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_draw.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_draw.c 2012-08-12 13:29:57 UTC (rev 49839)
+++ branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_draw.c 2012-08-12 13:38:46 UTC (rev 49840)
@@ -802,7 +802,7 @@
else special_seq_update = NULL;
}
-void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq, int cfra, int frame_ofs)
+void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq, int cfra, int frame_ofs, int draw_overlay)
{
struct Main *bmain = CTX_data_main(C);
struct ImBuf *ibuf = NULL;
@@ -842,7 +842,7 @@
viewrecty /= proxy_size / 100.0f;
}
- if (frame_ofs == 0) {
+ if (!draw_overlay || sseq->overlay_type == SEQ_DRAW_OVERLAY_REFERENCE) {
UI_GetThemeColor3fv(TH_SEQ_PREVIEW, col);
glClearColor(col[0], col[1], col[2], 0.0);
glClear(GL_COLOR_BUFFER_BIT);
@@ -930,17 +930,25 @@
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, ibuf->x, ibuf->y, 0, GL_RGBA, GL_UNSIGNED_BYTE, display_buffer);
glBegin(GL_QUADS);
- if (frame_ofs) {
- rctf tot_clip;
- tot_clip.xmin = v2d->tot.xmin + (ABS(v2d->tot.xmax - v2d->tot.xmin) * scene->ed->over_border.xmin);
- tot_clip.ymin = v2d->tot.ymin + (ABS(v2d->tot.ymax - v2d->tot.ymin) * scene->ed->over_border.ymin);
- tot_clip.xmax = v2d->tot.xmin + (ABS(v2d->tot.xmax - v2d->tot.xmin) * scene->ed->over_border.xmax);
- tot_clip.ymax = v2d->tot.ymin + (ABS(v2d->tot.ymax - v2d->tot.ymin) * scene->ed->over_border.ymax);
+ if (draw_overlay) {
+ if (sseq->overlay_type == SEQ_DRAW_OVERLAY_RECT) {
+ rctf tot_clip;
+ tot_clip.xmin = v2d->tot.xmin + (ABS(v2d->tot.xmax - v2d->tot.xmin) * scene->ed->over_border.xmin);
+ tot_clip.ymin = v2d->tot.ymin + (ABS(v2d->tot.ymax - v2d->tot.ymin) * scene->ed->over_border.ymin);
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list