Commit: 44622d063cf63bee77cd4ce2983ae187a3fcc648
Author: Antonio Vazquez
Date:   Tue Aug 20 13:58:27 2019 +0200
Branches: greasepencil-object
https://developer.blender.org/rB44622d063cf63bee77cd4ce2983ae187a3fcc648

GPencil: Check the material converted from curves has something
Check the material has Stroke or Fill enabled and avoid unactivated materials.

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

M       source/blender/blenkernel/intern/gpencil.c

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

diff --git a/source/blender/blenkernel/intern/gpencil.c 
b/source/blender/blenkernel/intern/gpencil.c
index ee69a423761..bda825fb4bc 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -2884,11 +2884,17 @@ static Material *gpencil_add_from_curve_material(Main 
*bmain,
 
   /* Fill color. */
   linearrgb_to_srgb_v4(gp_style->fill_rgba, cu_color);
-  /* Fill is false if the original curva hasn't material assigned. */
+  /* Fill is false if the original curve hasn't material assigned. */
   if (fill) {
     gp_style->flag |= GP_STYLE_FILL_SHOW;
   }
 
+  /* Check at least one is enabled. */
+  if (((gp_style->flag & GP_STYLE_STROKE_SHOW) == 0) &&
+      ((gp_style->flag & GP_STYLE_FILL_SHOW) == 0)) {
+    gp_style->flag |= GP_STYLE_STROKE_SHOW;
+  }
+
   return mat_gp;
 }

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

Reply via email to