[Bf-blender-cvs] [df990e78fac] temp-lineart-contained: LineArt: better ui logic for crease threshold.

YimingWu noreply at git.blender.org
Mon May 10 05:49:35 CEST 2021


Commit: df990e78fac31662ea1be526fe16ecf599162a37
Author: YimingWu
Date:   Mon May 10 11:49:20 2021 +0800
Branches: temp-lineart-contained
https://developer.blender.org/rBdf990e78fac31662ea1be526fe16ecf599162a37

LineArt: better ui logic for crease threshold.

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

M	source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c

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

diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
index 40d3a72c2f4..0401a7ab5c7 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
@@ -269,6 +269,7 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel)
 
   const int source_type = RNA_enum_get(ptr, "source_type");
   const bool is_baked = RNA_boolean_get(ptr, "is_baked");
+  const bool use_cache = RNA_boolean_get(ptr, "use_cached_result");
 
   uiLayoutSetPropSep(layout, true);
   uiLayoutSetEnabled(layout, !is_baked);
@@ -300,7 +301,7 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel)
 
   uiLayout *sub = uiLayoutRow(col, true);
   uiLayoutSetActive(sub,
-                    RNA_boolean_get(ptr, "use_crease") ||
+                    (RNA_boolean_get(ptr, "use_crease") && !use_cache) ||
                         BKE_gpencil_lineart_is_first_run(ob_ptr.data, ptr->data));
   uiLayoutSetPropSep(sub, true);
   uiItemR(sub, ptr, "crease_threshold", UI_ITEM_R_SLIDER, " ", ICON_NONE);



More information about the Bf-blender-cvs mailing list