[Bf-blender-cvs] [c1cfb475b32] master: LineArt: Fix(unreported) Material mask panel logic

YimingWu noreply at git.blender.org
Thu Oct 28 11:18:01 CEST 2021


Commit: c1cfb475b32ddef3a3f1d06e758cc1b940fb742f
Author: YimingWu
Date:   Thu Oct 28 17:17:48 2021 +0800
Branches: master
https://developer.blender.org/rBc1cfb475b32ddef3a3f1d06e758cc1b940fb742f

LineArt: Fix(unreported) Material mask panel logic

The logic should be: show material mask panel if in_front is on,
it was inverted unintentionally.

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

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 4411762aeea..fa31aec2b5b 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
@@ -478,7 +478,7 @@ static void material_mask_panel_draw_header(const bContext *UNUSED(C), Panel *pa
   const bool show_in_front = RNA_boolean_get(&ob_ptr, "show_in_front");
 
   uiLayoutSetEnabled(layout, !is_baked);
-  uiLayoutSetActive(layout, (!show_in_front) && anything_showing_through(ptr));
+  uiLayoutSetActive(layout, show_in_front && anything_showing_through(ptr));
 
   uiItemR(layout, ptr, "use_material_mask", 0, IFACE_("Material Mask"), ICON_NONE);
 }



More information about the Bf-blender-cvs mailing list