[Bf-blender-cvs] [c59f6df5eb2] greasepencil-object: Fix reproject error for filling

Antonio Vazquez noreply at git.blender.org
Sat Dec 30 16:58:18 CET 2017


Commit: c59f6df5eb25b7e6e48d2721d1d5ef015ee2336e
Author: Antonio Vazquez
Date:   Sat Dec 30 16:58:03 2017 +0100
Branches: greasepencil-object
https://developer.blender.org/rBc59f6df5eb25b7e6e48d2721d1d5ef015ee2336e

Fix reproject error for filling

===================================================================

M	source/blender/editors/gpencil/gpencil_fill.c

===================================================================

diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c
index 1f6af3768f1..53b8376e95f 100644
--- a/source/blender/editors/gpencil/gpencil_fill.c
+++ b/source/blender/editors/gpencil/gpencil_fill.c
@@ -583,9 +583,6 @@ static void gpencil_stroke_from_stack(tGPDfill *tgpf)
 		gp_stroke_convertcoords_tpoint(tgpf->scene, tgpf->ar, tgpf->v3d, tgpf->ob, tgpf->gpl, &point2D, r_out);
 		copy_v3_v3(&pt->x, r_out);
 
-		/* if parented change position relative to parent object */
-		gp_apply_parent_point(tgpf->ob, tgpf->gpd, tgpf->gpl, pt);
-
 		pt->pressure = 1.0f;
 		pt->strength = 1.0f;;
 		pt->time = 0.0f;
@@ -619,6 +616,13 @@ static void gpencil_stroke_from_stack(tGPDfill *tgpf)
 		ED_gp_project_stroke_to_plane(tgpf->ob, tgpf->rv3d, gps, origin, 
 			tgpf->lock_axis - 1, ts->gpencil_src);
 	}
+
+	/* if parented change position relative to parent object */
+	for (int i = 0; i < totpoints; i++) {
+		pt = &gps->points[i];
+		gp_apply_parent_point(tgpf->ob, tgpf->gpd, tgpf->gpl, pt);
+	}
+
 }
 
 /* ----------------------- */



More information about the Bf-blender-cvs mailing list