[Bf-blender-cvs] [6acfdbb6e14] greasepencil-object: GP: Add missing initialization for surface projection
Antonioya
noreply at git.blender.org
Sun Dec 9 09:37:02 CET 2018
Commit: 6acfdbb6e14f9e9df858b582cc49efb155b9bfeb
Author: Antonioya
Date: Sun Dec 9 09:36:54 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rB6acfdbb6e14f9e9df858b582cc49efb155b9bfeb
GP: Add missing initialization for surface projection
===================================================================
M source/blender/editors/gpencil/gpencil_primitive.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c
index bce0d06c92a..67d7d76d52f 100644
--- a/source/blender/editors/gpencil/gpencil_primitive.c
+++ b/source/blender/editors/gpencil/gpencil_primitive.c
@@ -562,6 +562,10 @@ static void gp_primitive_update_strokes(bContext *C, tGPDprimitive *tgpi)
bool interp_depth = false;
bool found_depth = false;
+ /* need to restore the original projection settings before packing up */
+ view3d_region_operator_needs_opengl(tgpi->win, tgpi->ar);
+ ED_view3d_autodist_init(tgpi->depsgraph, tgpi->ar, tgpi->v3d, (ts->gpencil_v3d_align & GP_PROJECT_DEPTH_STROKE) ? 1 : 0);
+
depth_arr = MEM_mallocN(sizeof(float) * gps->totpoints, "depth_points");
tGPspoint *ptc = &points2D[0];
for (i = 0; i < gps->totpoints; i++, ptc++) {
More information about the Bf-blender-cvs
mailing list