[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60003] trunk/blender/source/blender/ editors/space_clip: Don' t show 2D cursor in tracking mode i pivoting is not set to 2D cursor
Sergey Sharybin
sergey.vfx at gmail.com
Tue Sep 10 14:46:23 CEST 2013
Revision: 60003
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60003
Author: nazgul
Date: 2013-09-10 12:46:23 +0000 (Tue, 10 Sep 2013)
Log Message:
-----------
Don't show 2D cursor in tracking mode i pivoting is not set to 2D cursor
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_clip/clip_ops.c
trunk/blender/source/blender/editors/space_clip/space_clip.c
Modified: trunk/blender/source/blender/editors/space_clip/clip_ops.c
===================================================================
--- trunk/blender/source/blender/editors/space_clip/clip_ops.c 2013-09-10 12:46:18 UTC (rev 60002)
+++ trunk/blender/source/blender/editors/space_clip/clip_ops.c 2013-09-10 12:46:23 UTC (rev 60003)
@@ -1464,7 +1464,15 @@
static int clip_set_2d_cursor_exec(bContext *C, wmOperator *op)
{
SpaceClip *sclip = CTX_wm_space_clip(C);
+ bool show_cursor = false;
+ show_cursor |= sclip->mode == SC_MODE_MASKEDIT;
+ show_cursor |= sclip->around == V3D_CURSOR;
+
+ if (!show_cursor) {
+ return OPERATOR_CANCELLED;
+ }
+
RNA_float_get_array(op->ptr, "location", sclip->cursor);
WM_event_add_notifier(C, NC_SPACE | ND_SPACE_CLIP, NULL);
Modified: trunk/blender/source/blender/editors/space_clip/space_clip.c
===================================================================
--- trunk/blender/source/blender/editors/space_clip/space_clip.c 2013-09-10 12:46:18 UTC (rev 60002)
+++ trunk/blender/source/blender/editors/space_clip/space_clip.c 2013-09-10 12:46:23 UTC (rev 60003)
@@ -1129,6 +1129,7 @@
MovieClip *clip = ED_space_clip_get_clip(sc);
float aspx, aspy, zoomx, zoomy, x, y;
int width, height;
+ bool show_cursor = false;
/* if tracking is in progress, we should synchronize framenr from clipuser
* so latest tracked frame would be shown */
@@ -1181,14 +1182,19 @@
}
}
- glPushMatrix();
- glTranslatef(x, y, 0);
- glScalef(zoomx, zoomy, 0);
- glMultMatrixf(sc->stabmat);
- glScalef(width, height, 0);
- draw_image_cursor(ar, sc->cursor);
- glPopMatrix();
+ show_cursor |= sc->mode == SC_MODE_MASKEDIT;
+ show_cursor |= sc->around == V3D_CURSOR;
+ if (show_cursor) {
+ glPushMatrix();
+ glTranslatef(x, y, 0);
+ glScalef(zoomx, zoomy, 0);
+ glMultMatrixf(sc->stabmat);
+ glScalef(width, height, 0);
+ draw_image_cursor(ar, sc->cursor);
+ glPopMatrix();
+ }
+
if (sc->flag & SC_SHOW_GPENCIL) {
/* Grease Pencil */
clip_draw_grease_pencil((bContext *)C, true);
More information about the Bf-blender-cvs
mailing list