Commit: c6185e7693cf06f36f88ad0f3c18ba38274d6203
Author: Antonio Vazquez
Date:   Wed Jun 10 19:34:48 2020 +0200
Branches: greasepencil-edit-curve
https://developer.blender.org/rBc6185e7693cf06f36f88ad0f3c18ba38274d6203

GPencil: Disable modifiers when Curve Edit is enabled

The handles edition is incompatible with the modifiers due the logic used to 
recreate the stroke when is editted with handles.

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

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

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

diff --git a/source/blender/blenkernel/intern/gpencil_modifier.c 
b/source/blender/blenkernel/intern/gpencil_modifier.c
index b889b91e366..5970306826b 100644
--- a/source/blender/blenkernel/intern/gpencil_modifier.c
+++ b/source/blender/blenkernel/intern/gpencil_modifier.c
@@ -836,7 +836,9 @@ void BKE_gpencil_prepare_eval_data(Depsgraph *depsgraph, 
Scene *scene, Object *o
   }
 
   const bool is_multiedit = (bool)GPENCIL_MULTIEDIT_SESSIONS_ON(gpd_eval);
-  const bool do_modifiers = (bool)((!is_multiedit) && 
(ob->greasepencil_modifiers.first != NULL) &&
+  const bool is_curve_edit = (bool)GPENCIL_CURVE_EDIT_SESSIONS_ON(gpd_eval);
+  const bool do_modifiers = (bool)((!is_multiedit) && (!is_curve_edit) &&
+                                   (ob->greasepencil_modifiers.first != NULL) 
&&
                                    (!GPENCIL_SIMPLIFY_MODIF(scene)));
   if ((!do_modifiers) && (!do_parent)) {
     return;
@@ -868,8 +870,10 @@ void BKE_gpencil_modifiers_calc(Depsgraph *depsgraph, 
Scene *scene, Object *ob)
   bGPdata *gpd = (bGPdata *)ob->data;
   const bool is_edit = GPENCIL_ANY_EDIT_MODE(gpd);
   const bool is_multiedit = (bool)GPENCIL_MULTIEDIT_SESSIONS_ON(gpd);
+  const bool is_curve_edit = (bool)GPENCIL_CURVE_EDIT_SESSIONS_ON(gpd);
   const bool is_render = (bool)(DEG_get_mode(depsgraph) == DAG_EVAL_RENDER);
-  const bool do_modifiers = (bool)((!is_multiedit) && 
(ob->greasepencil_modifiers.first != NULL) &&
+  const bool do_modifiers = (bool)((!is_multiedit) && (!is_curve_edit) &&
+                                   (ob->greasepencil_modifiers.first != NULL) 
&&
                                    (!GPENCIL_SIMPLIFY_MODIF(scene)));
   if (!do_modifiers) {
     return;

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

Reply via email to