[Bf-blender-cvs] [ee78c860b8a] master: LineArt: Move style options to top of the modifier.

Yiming Wu noreply at git.blender.org
Tue Jun 21 10:11:18 CEST 2022


Commit: ee78c860b8aa4206ec4d00d733b23c0a0f8d469a
Author: Yiming Wu
Date:   Tue Jun 21 15:17:30 2022 +0800
Branches: master
https://developer.blender.org/rBee78c860b8aa4206ec4d00d733b23c0a0f8d469a

LineArt: Move style options to top of the modifier.

Reviewed By: Antonio Vazquez (antoniov)

Differential Revision: https://developer.blender.org/D15164

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

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 f179713e8cb..8d77fb50c71 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
@@ -324,6 +324,10 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel)
   uiItemPointerR(
       row, ptr, "target_material", &obj_data_ptr, "materials", NULL, ICON_SHADING_TEXTURE);
 
+  uiLayout *col = uiLayoutColumn(layout, false);
+  uiItemR(col, ptr, "thickness", UI_ITEM_R_SLIDER, IFACE_("Line Thickness"), ICON_NONE);
+  uiItemR(col, ptr, "opacity", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
+
   gpencil_modifier_panel_end(layout, ptr);
 }
 
@@ -398,21 +402,6 @@ static void options_panel_draw(const bContext *UNUSED(C), Panel *panel)
   uiItemR(col, ptr, "use_back_face_culling", 0, IFACE_("Force Backface Culling"), ICON_NONE);
 }
 
-static void style_panel_draw(const bContext *UNUSED(C), Panel *panel)
-{
-  uiLayout *layout = panel->layout;
-  PointerRNA *ptr = gpencil_modifier_panel_get_property_pointers(panel, NULL);
-
-  const bool is_baked = RNA_boolean_get(ptr, "is_baked");
-
-  uiLayoutSetPropSep(layout, true);
-  uiLayoutSetEnabled(layout, !is_baked);
-
-  uiItemR(layout, ptr, "thickness", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
-
-  uiItemR(layout, ptr, "opacity", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
-}
-
 static void occlusion_panel_draw(const bContext *UNUSED(C), Panel *panel)
 {
   uiLayout *layout = panel->layout;
@@ -708,8 +697,6 @@ static void panelRegister(ARegionType *region_type)
       region_type, "edge_types", "Edge Types", NULL, edge_types_panel_draw, panel_type);
   gpencil_modifier_subpanel_register(
       region_type, "geometry", "Geometry Processing", NULL, options_panel_draw, panel_type);
-  gpencil_modifier_subpanel_register(
-      region_type, "style", "Style", NULL, style_panel_draw, panel_type);
   PanelType *occlusion_panel = gpencil_modifier_subpanel_register(
       region_type, "occlusion", "Occlusion", NULL, occlusion_panel_draw, panel_type);
   gpencil_modifier_subpanel_register(region_type,



More information about the Bf-blender-cvs mailing list