From a3b88c9172999deb120d98ab0da3206e31fe2527 Mon Sep 17 00:00:00 2001 From: Antonioya Date: Wed, 10 Apr 2019 17:32:44 +0200 Subject: Annotations: Make all 2D editors locked to View Before, there was a hacky code for Image editor when the image was empty. Now, all 2D editors are locked to view and when you Move or Zoom, the stroke moves. This is a fix of T63402. Still pending if we add more options to 2D editors, but at least now, we have something consistent. --- source/blender/editors/gpencil/annotate_paint.c | 26 ------------------------- 1 file changed, 26 deletions(-) (limited to 'source/blender/editors') diff --git a/source/blender/editors/gpencil/annotate_paint.c b/source/blender/editors/gpencil/annotate_paint.c index b9b0c8fe788..5152bcb0a90 100644 --- a/source/blender/editors/gpencil/annotate_paint.c +++ b/source/blender/editors/gpencil/annotate_paint.c @@ -1423,34 +1423,8 @@ static void gp_paint_initstroke(tGPsdata *p, eGPencil_PaintModes paintmode, Deps break; } case SPACE_NODE: - { - p->gpd->runtime.sbuffer_sflag |= GP_STROKE_2DSPACE; - break; - } case SPACE_SEQ: - { - p->gpd->runtime.sbuffer_sflag |= GP_STROKE_2DSPACE; - break; - } case SPACE_IMAGE: - { - SpaceImage *sima = (SpaceImage *)p->sa->spacedata.first; - - /* only set these flags if the image editor doesn't have an image active, - * otherwise user will be confused by strokes not appearing after they're drawn - * - * Admittedly, this is a bit hacky, but it works much nicer from an ergonomic standpoint! - */ - if (ELEM(NULL, sima, sima->image)) { - /* make strokes be drawn in screen space */ - p->gpd->runtime.sbuffer_sflag &= ~GP_STROKE_2DSPACE; - *(p->align_flag) &= ~GP_PROJECT_VIEWSPACE; - } - else { - p->gpd->runtime.sbuffer_sflag |= GP_STROKE_2DSPACE; - } - break; - } case SPACE_CLIP: { p->gpd->runtime.sbuffer_sflag |= GP_STROKE_2DSPACE; -- cgit v1.2.3