Fix: When transforming GP strokes in "Local" mode, the strokes would get obscured
authorJoshua Leung <aligorith@gmail.com>
Mon, 25 Sep 2017 23:56:24 +0000 (12:56 +1300)
committerJoshua Leung <aligorith@gmail.com>
Tue, 26 Sep 2017 00:00:38 +0000 (13:00 +1300)
by the transform constraint lines

Ported over e7395c75d504af2c2f720f43ea27b93e04a378e4 from the
greasepencil-object branch. I should've fixed this ages ago, but
couldn't figure out why at the time.

source/blender/editors/transform/transform_constraints.c

index d7b670b64764dcb2b88921218b565bd60b16529c..5621eede54338084270690f8666b31d55f0bb296 100644 (file)
@@ -831,6 +831,13 @@ static void drawObjectConstraint(TransInfo *t)
                        }
                }
 
+               if (t->options & CTX_GPENCIL_STROKES) {
+                       /* only draw a constraint line for one point, otherwise we can't see anything */
+                       if ((options & DRAWLIGHT) == 0) {
+                               break;
+                       }
+               }
+
                if (t->flag & T_OBJECT) {
                        copy_v3_v3(co, td->ob->obmat[3]);
                        axismtx = td->axismtx;