Revision: 39969
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39969
Author:   nazgul
Date:     2011-09-06 14:02:28 +0000 (Tue, 06 Sep 2011)
Log Message:
-----------
Fix for poly line grease pencil and surface drawing.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/gpencil/gpencil_paint.c

Modified: trunk/blender/source/blender/editors/gpencil/gpencil_paint.c
===================================================================
--- trunk/blender/source/blender/editors/gpencil/gpencil_paint.c        
2011-09-06 13:48:20 UTC (rev 39968)
+++ trunk/blender/source/blender/editors/gpencil/gpencil_paint.c        
2011-09-06 14:02:28 UTC (rev 39969)
@@ -400,6 +400,15 @@
 
                        pts = &gps->points[gps->totpoints-1];
 
+                       /* special case for poly lines: normally, depth is 
needed only when creating new stroke from buffer,
+                          but poly lines are converting to stroke instantly, 
so initialize depth buffer before converting coordinates */
+                       if (gpencil_project_check(p)) {
+                               View3D *v3d= p->sa->spacedata.first;
+
+                               view3d_region_operator_needs_opengl(p->win, 
p->ar);
+                               ED_view3d_autodist_init(p->scene, p->ar, v3d, 
(p->gpd->flag & GP_DATA_DEPTH_STROKE) ? 1:0);
+                       }
+
                        /* convert screen-coordinates to appropriate 
coordinates (and store them) */
                        gp_stroke_convertcoords(p, &pt->x, &pts->x, NULL);
 

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to