[Bf-blender-cvs] [35d16ff4522] lanpr-under-gp: LineArt: Python formatting fix.

YimingWu noreply at git.blender.org
Wed Oct 28 04:24:51 CET 2020


Commit: 35d16ff45223d566c25da34113482680e8cc6ea1
Author: YimingWu
Date:   Wed Oct 28 11:24:36 2020 +0800
Branches: lanpr-under-gp
https://developer.blender.org/rB35d16ff45223d566c25da34113482680e8cc6ea1

LineArt: Python formatting fix.

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

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

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

diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py
index 6bbe197503e..8d8a0763fe8 100644
--- a/release/scripts/startup/bl_ui/properties_material.py
+++ b/release/scripts/startup/bl_ui/properties_material.py
@@ -111,8 +111,7 @@ class EEVEE_MATERIAL_PT_context_material(MaterialButtonsPanel, Panel):
 
             row = layout.row()
 
-            row.template_list("MATERIAL_UL_matslots", "", ob,
-                              "material_slots", ob, "active_material_index", rows=rows)
+            row.template_list("MATERIAL_UL_matslots", "", ob, "material_slots", ob, "active_material_index", rows=rows)
 
             col = row.column(align=True)
             col.operator("object.material_slot_add", icon='ADD', text="")
@@ -125,10 +124,8 @@ class EEVEE_MATERIAL_PT_context_material(MaterialButtonsPanel, Panel):
             if is_sortable:
                 col.separator()
 
-                col.operator("object.material_slot_move",
-                             icon='TRIA_UP', text="").direction = 'UP'
-                col.operator("object.material_slot_move",
-                             icon='TRIA_DOWN', text="").direction = 'DOWN'
+                col.operator("object.material_slot_move", icon='TRIA_UP', text="").direction = 'UP'
+                col.operator("object.material_slot_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
 
         row = layout.row()
 
@@ -178,8 +175,7 @@ class EEVEE_MATERIAL_PT_surface(MaterialButtonsPanel, Panel):
         layout.use_property_split = True
 
         if mat.use_nodes:
-            panel_node_draw(layout, mat.node_tree,
-                            'OUTPUT_MATERIAL', "Surface")
+            panel_node_draw(layout, mat.node_tree, 'OUTPUT_MATERIAL', "Surface")
         else:
             layout.prop(mat, "diffuse_color", text="Base Color")
             layout.prop(mat, "metallic")
@@ -221,8 +217,7 @@ def draw_material_settings(self, context):
     layout.prop(mat, "shadow_method")
 
     row = layout.row()
-    row.active = ((mat.blend_method == 'CLIP')
-                  or (mat.shadow_method == 'CLIP'))
+    row.active = ((mat.blend_method == 'CLIP') or (mat.shadow_method == 'CLIP'))
     row.prop(mat, "alpha_threshold")
 
     if mat.blend_method not in {'OPAQUE', 'CLIP', 'HASHED'}:
diff --git a/release/scripts/startup/bl_ui/properties_material_gpencil.py b/release/scripts/startup/bl_ui/properties_material_gpencil.py
index ef25ccdfbc6..da54ff1a137 100644
--- a/release/scripts/startup/bl_ui/properties_material_gpencil.py
+++ b/release/scripts/startup/bl_ui/properties_material_gpencil.py
@@ -33,10 +33,8 @@ class GPENCIL_MT_material_context_menu(Menu):
     def draw(self, _context):
         layout = self.layout
 
-        layout.operator("gpencil.material_reveal",
-                        icon='RESTRICT_VIEW_OFF', text="Show All")
-        layout.operator("gpencil.material_hide", icon='RESTRICT_VIEW_ON',
-                        text="Hide Others").unselected = True
+        layout.operator("gpencil.material_reveal", icon='RESTRICT_VIEW_OFF', text="Show All")
+        layout.operator("gpencil.material_hide", icon='RESTRICT_VIEW_ON', text="Hide Others").unselected = True
 
         layout.separator()
 
@@ -52,10 +50,8 @@ class GPENCIL_MT_material_context_menu(Menu):
         layout.operator("gpencil.stroke_merge_material", text="Merge Similar")
 
         layout.separator()
-        layout.operator("gpencil.material_to_vertex_color",
-                        text="Convert Materials to Vertex Color")
-        layout.operator("gpencil.extract_palette_vertex",
-                        text="Extract Palette from Vertex Color")
+        layout.operator("gpencil.material_to_vertex_color", text="Convert Materials to Vertex Color")
+        layout.operator("gpencil.extract_palette_vertex", text="Extract Palette from Vertex Color")
 
 
 class GPENCIL_UL_matslots(UIList):
@@ -163,8 +159,7 @@ class MATERIAL_PT_gpencil_strokecolor(GPMaterialButtonsPanel, Panel):
 
             if gpcolor.stroke_style == 'TEXTURE':
                 row = col.row()
-                row.prop(gpcolor, "mix_stroke_factor",
-                         text="Blend", slider=True)
+                row.prop(gpcolor, "mix_stroke_factor", text="Blend", slider=True)
                 if gpcolor.mode == 'LINE':
                     col.prop(gpcolor, "pixel_size", text="UV Factor")
 
diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py
index 9466e5ff4c7..e9e673ada05 100644
--- a/release/scripts/startup/bl_ui/properties_render.py
+++ b/release/scripts/startup/bl_ui/properties_render.py
@@ -76,8 +76,7 @@ class RENDER_PT_color_management(RenderButtonsPanel, Panel):
         scene = context.scene
         view = scene.view_settings
 
-        flow = layout.grid_flow(row_major=True, columns=0,
-                                even_columns=False, even_rows=False, align=True)
+        flow = layout.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=True)
 
         col = flow.column()
         col.prop(scene.display_settings, "display_device")
@@ -120,8 +119,7 @@ class RENDER_PT_color_management_curves(RenderButtonsPanel, Panel):
 
         layout.enabled = view.use_curve_mapping
 
-        layout.template_curve_mapping(
-            view, "curve_mapping", type='COLOR', levels=True)
+        layout.template_curve_mapping(view, "curve_mapping", type='COLOR', levels=True)
 
 
 class RENDER_PT_eevee_ambient_occlusion(RenderButtonsPanel, Panel):
@@ -422,10 +420,8 @@ class RENDER_PT_eevee_indirect_lighting(RenderButtonsPanel, Panel):
         props = scene.eevee
 
         col = layout.column()
-        col.operator("scene.light_cache_bake",
-                     text="Bake Indirect Lighting", icon='RENDER_STILL')
-        col.operator("scene.light_cache_bake", text="Bake Cubemap Only",
-                     icon='LIGHTPROBE_CUBEMAP').subset = 'CUBEMAPS'
+        col.operator("scene.light_cache_bake", text="Bake Indirect Lighting", icon='RENDER_STILL')
+        col.operator("scene.light_cache_bake", text="Bake Cubemap Only", icon='LIGHTPROBE_CUBEMAP').subset = 'CUBEMAPS'
         col.operator("scene.light_cache_free", text="Delete Lighting Cache")
 
         cache_info = scene.eevee.gi_cache_info
@@ -654,8 +650,7 @@ class RENDER_PT_simplify_viewport(RenderButtonsPanel, Panel):
 
         layout.active = rd.use_simplify
 
-        flow = layout.grid_flow(row_major=True, columns=0,
-                                even_columns=False, even_rows=False, align=True)
+        flow = layout.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=True)
 
         col = flow.column()
         col.prop(rd, "simplify_subdivision", text="Max Subdivision")
@@ -680,22 +675,19 @@ class RENDER_PT_simplify_render(RenderButtonsPanel, Panel):
 
         layout.active = rd.use_simplify
 
-        flow = layout.grid_flow(row_major=True, columns=0,
-                                even_columns=False, even_rows=False, align=True)
+        flow = layout.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=True)
 
         col = flow.column()
         col.prop(rd, "simplify_subdivision_render", text="Max Subdivision")
 
         col = flow.column()
-        col.prop(rd, "simplify_child_particles_render",
-                 text="Max Child Particles")
+        col.prop(rd, "simplify_child_particles_render", text="Max Child Particles")
 
 
 class RENDER_PT_simplify_greasepencil(RenderButtonsPanel, Panel, GreasePencilSimplifyPanel):
     bl_label = "Grease Pencil"
     bl_parent_id = "RENDER_PT_simplify"
-    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME',
-                      'BLENDER_CLAY', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
     bl_options = {'DEFAULT_CLOSED'}
 
 
@@ -746,6 +738,21 @@ class RENDER_PT_lineart_line_types(RenderButtonsPanel, Panel):
         layout.prop(lineart, "use_edge_mark", text='Edge Marks')
         layout.prop(lineart, "use_intersections", text='Intersections')
 
+
+class RENDER_PT_lineart_extras(RenderButtonsPanel, Panel):
+    bl_label = "Extras"
+    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
+
+        layout = self.layout
+        layout.use_property_split = True
+        layout.use_property_decorate = False
+
         layout.label(text="Fuzzy chaining:")
 
         if lineart.use_intersections:
@@ -756,7 +763,7 @@ class RENDER_PT_lineart_line_types(RenderButtonsPanel, Panel):
         row = layout.row(align=False)
         row.prop(lineart, "fuzzy_everything")
 
-        layout.label(text="Extras:")
+        layout.label(text="Algorithm Options:")
         layout.prop(lineart, "allow_duplication", text="Allow Instances")
         layout.prop(lineart, "allow_overlapping_edges")
         layout.prop(lineart, "allow_clipping_boundaries",
@@ -826,8 +833,10 @@ classes = (
     RENDER_PT_simplify_viewport,
     RENDER_PT_simplify_render,
     RENDER_PT_simplify_greasepencil,
+
     RENDER_PT_lineart,
     RENDER_PT_lineart_line_types,
+    RENDER_PT_lineart_extras,
     RENDER_PT_lineart_baking,
 )



More information about the Bf-blender-cvs mailing list