diff options
author | Antonioya <blendergit@gmail.com> | 2019-04-10 18:32:44 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2019-04-10 18:33:01 +0300 |
commit | a3b88c9172999deb120d98ab0da3206e31fe2527 (patch) | |
tree | 0d99fc3ea968be433e7f8cc35dce6b6ca4c89513 /source/blender/editors/gpencil/annotate_paint.c | |
parent | b9e6f9b9c511e35727a3b6f94f09495e999da219 (diff) |
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.
Diffstat (limited to 'source/blender/editors/gpencil/annotate_paint.c')
-rw-r--r-- | source/blender/editors/gpencil/annotate_paint.c | 26 |
1 files changed, 0 insertions, 26 deletions
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; |