[Bf-blender-cvs] [00e7a89f817] lanpr-under-gp: LineArt: Main panel UI optimizations.

YimingWu noreply at git.blender.org
Sat Oct 31 09:48:59 CET 2020


Commit: 00e7a89f817f1e172c90a3fe546df19e90e62fb8
Author: YimingWu
Date:   Sat Oct 31 16:06:04 2020 +0800
Branches: lanpr-under-gp
https://developer.blender.org/rB00e7a89f817f1e172c90a3fe546df19e90e62fb8

LineArt: Main panel UI optimizations.

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

M	release/scripts/startup/bl_ui/properties_render.py

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

diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py
index e9e673ada05..8bbbd96cbce 100644
--- a/release/scripts/startup/bl_ui/properties_render.py
+++ b/release/scripts/startup/bl_ui/properties_render.py
@@ -711,19 +711,50 @@ class RENDER_PT_lineart(RenderButtonsPanel, Panel):
             col.label(text="No active camera.")
 
         else:
-            layout.prop(lineart, "crease_threshold", slider=True)
-            layout.prop(lineart, "angle_splitting_threshold", slider=True)
+            layout.prop(lineart, "use_contour", text='Contour')
+            layout.prop(lineart, "use_material", text='Material Separation')
+            layout.prop(lineart, "use_edge_mark", text='Edge Marks')
 
-            layout.prop(lineart, "chaining_image_threshold")
-            layout.prop(lineart, "chaining_geometry_threshold")
 
+class RENDER_PT_lineart_crease(RenderButtonsPanel, Panel):
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
+    bl_label = "Crease Lines"
+    bl_parent_id = "RENDER_PT_lineart"
+    bl_options = {'DEFAULT_CLOSED'}
+
+
+    def draw_header(self, context):
+        scene = context.scene
+        lineart = scene.lineart
+
+        self.layout.prop(lineart, "use_crease", text='')
+
+
+    def draw(self, context):
+        scene = context.scene
+        lineart = scene.lineart
+
+        layout = self.layout
+        layout.active = lineart.auto_update
+        layout.use_property_split = True
+
+        layout.prop(lineart, "crease_threshold", slider=True)
 
-class RENDER_PT_lineart_line_types(RenderButtonsPanel, Panel):
+
+class RENDER_PT_lineart_intersection(RenderButtonsPanel, Panel):
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
-    bl_label = "Line Types"
+    bl_label = "Intersection Lines"
     bl_parent_id = "RENDER_PT_lineart"
     bl_options = {'DEFAULT_CLOSED'}
 
+
+    def draw_header(self, context):
+        scene = context.scene
+        lineart = scene.lineart
+
+        self.layout.prop(lineart, "use_intersections", text='')
+
+
     def draw(self, context):
         scene = context.scene
         lineart = scene.lineart
@@ -732,11 +763,9 @@ class RENDER_PT_lineart_line_types(RenderButtonsPanel, Panel):
         layout.active = lineart.auto_update
         layout.use_property_split = True
 
-        layout.prop(lineart, "use_contour", text='Contour')
-        layout.prop(lineart, "use_crease", text='Crease')
-        layout.prop(lineart, "use_material", text='Material Separation')
-        layout.prop(lineart, "use_edge_mark", text='Edge Marks')
-        layout.prop(lineart, "use_intersections", text='Intersections')
+        row = layout.row(align=False)
+        row.active = not lineart.fuzzy_everything
+        row.prop(lineart, "fuzzy_intersections")
 
 
 class RENDER_PT_lineart_extras(RenderButtonsPanel, Panel):
@@ -753,17 +782,13 @@ class RENDER_PT_lineart_extras(RenderButtonsPanel, Panel):
         layout.use_property_split = True
         layout.use_property_decorate = False
 
-        layout.label(text="Fuzzy chaining:")
-
-        if lineart.use_intersections:
-            row = layout.row(align=False)
-            row.active = not lineart.fuzzy_everything
-            row.prop(lineart, "fuzzy_intersections")
+        layout.prop(lineart, "angle_splitting_threshold", slider=True)
 
-        row = layout.row(align=False)
-        row.prop(lineart, "fuzzy_everything")
+        layout.prop(lineart, "chaining_image_threshold")
+        layout.prop(lineart, "chaining_geometry_threshold")
 
-        layout.label(text="Algorithm Options:")
+        layout.label(text="Advanced Options:")
+        layout.prop(lineart, "fuzzy_everything")
         layout.prop(lineart, "allow_duplication", text="Allow Instances")
         layout.prop(lineart, "allow_overlapping_edges")
         layout.prop(lineart, "allow_clipping_boundaries",
@@ -835,7 +860,8 @@ classes = (
     RENDER_PT_simplify_greasepencil,
 
     RENDER_PT_lineart,
-    RENDER_PT_lineart_line_types,
+    RENDER_PT_lineart_crease,
+    RENDER_PT_lineart_intersection,
     RENDER_PT_lineart_extras,
     RENDER_PT_lineart_baking,
 )



More information about the Bf-blender-cvs mailing list