[Bf-blender-cvs] [1250e862e3d] lanpr-under-gp: LineArt: UI fixes.
YimingWu
noreply at git.blender.org
Wed Jul 15 12:23:43 CEST 2020
Commit: 1250e862e3db9446d4ca8d80c58f3d0466b28b4a
Author: YimingWu
Date: Wed Jul 15 17:42:26 2020 +0800
Branches: lanpr-under-gp
https://developer.blender.org/rB1250e862e3db9446d4ca8d80c58f3d0466b28b4a
LineArt: UI fixes.
===================================================================
M release/scripts/startup/bl_ui/properties_render.py
M source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py
index 05eda285e23..0dbde7155ed 100644
--- a/release/scripts/startup/bl_ui/properties_render.py
+++ b/release/scripts/startup/bl_ui/properties_render.py
@@ -717,37 +717,17 @@ class RENDER_PT_lineart(RenderButtonsPanel, Panel):
layout.use_property_split = True
layout.use_property_decorate = False # No animation.
- layout.prop(lineart, "crease_threshold", slider=True)
-
- col.prop(lineart, 'auto_update', text='Auto Update')
-
if not scene.camera:
- has_camera = False
col.label(text="No active camera.")
- else:
- has_camera = True
-
- c = col.column()
- c.enabled = has_camera
-
-
-class RENDER_PT_lineart_options(RenderButtonsPanel, Panel):
- bl_label = "Settings"
- bl_parent_id = "RENDER_PT_lineart"
- bl_options = {'DEFAULT_CLOSED'}
- COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
- def draw(self, context):
- scene = context.scene
- lineart = scene.lineart
+ else:
+ layout.prop(lineart, 'auto_update', text='Auto Update')
+ layout.prop(lineart, "use_intersections")
- layout = self.layout
- layout.use_property_split = True
- layout.use_property_decorate = False
+ layout.prop(lineart, "crease_threshold", slider=True)
- layout.prop(lineart, "use_intersections")
- layout.prop(lineart, "chaining_image_threshold")
- layout.prop(lineart, "chaining_geometry_threshold")
+ layout.prop(lineart, "chaining_image_threshold")
+ layout.prop(lineart, "chaining_geometry_threshold")
class RENDER_PT_lineart_baking(RenderButtonsPanel, Panel):
@@ -800,7 +780,6 @@ classes = (
RENDER_PT_simplify_render,
RENDER_PT_simplify_greasepencil,
RENDER_PT_lineart,
- RENDER_PT_lineart_options,
RENDER_PT_lineart_baking,
)
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
index c34b64f23b6..3e40c42ded8 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
@@ -247,9 +247,6 @@ static void panel_draw(const bContext *C, Panel *panel)
uiLayoutSetPropSep(layout, true);
- uiItemR(layout, &ptr, "thickness", 0, NULL, ICON_NONE);
- uiItemR(layout, &ptr, "opacity", 0, NULL, ICON_NONE);
-
uiItemR(layout, &ptr, "source_type", 0, NULL, ICON_NONE);
if (source_type == LRT_SOURCE_OBJECT) {
@@ -279,6 +276,11 @@ static void occlusion_panel_draw(const bContext *C, Panel *panel)
uiLayout *layout = panel->layout;
+ uiLayoutSetPropSep(layout, true);
+
+ uiItemR(layout, &ptr, "thickness", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
+ uiItemR(layout, &ptr, "opacity", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
+
bool use_multiple_levels = RNA_boolean_get(&ptr, "use_multiple_levels");
uiItemR(layout, &ptr, "use_multiple_levels", 0, "Multiple Levels", ICON_NONE);
@@ -299,7 +301,7 @@ static void panelRegister(ARegionType *region_type)
region_type, eGpencilModifierType_Lineart, panel_draw);
gpencil_modifier_subpanel_register(
- region_type, "occlusion", "Occlusion", NULL, occlusion_panel_draw, panel_type);
+ region_type, "settings", "Settings", NULL, occlusion_panel_draw, panel_type);
}
GpencilModifierTypeInfo modifierType_Gpencil_Lineart = {
More information about the Bf-blender-cvs
mailing list