[Bf-blender-cvs] [ba8e5de3782] temp-lineart-contained: LineArt: Weight threshold conditional display.

YimingWu noreply at git.blender.org
Fri Mar 19 04:50:33 CET 2021


Commit: ba8e5de3782333a0f3817c0519984073bec212c3
Author: YimingWu
Date:   Fri Mar 19 09:27:09 2021 +0800
Branches: temp-lineart-contained
https://developer.blender.org/rBba8e5de3782333a0f3817c0519984073bec212c3

LineArt: Weight threshold conditional display.

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

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 6e9962caf80..938ca49e73a 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
@@ -424,7 +424,11 @@ static void vgroup_panel_draw(const bContext *UNUSED(C), Panel *panel)
 
   col = uiLayoutColumn(layout, true);
   uiItemR(col, ptr, "binary_weights", 0, NULL, ICON_NONE);
-  uiItemR(col, ptr, "weight_threshold", 0, NULL, ICON_NONE);
+
+  const bool binary_weights = RNA_boolean_get(ptr, "binary_weights");
+  if (binary_weights) {
+    uiItemR(col, ptr, "weight_threshold", 0, IFACE_("Threshold"), ICON_NONE);
+  }
 }
 
 static void baking_panel_draw(const bContext *UNUSED(C), Panel *panel)



More information about the Bf-blender-cvs mailing list