Page MenuHome
Paste P2314

(An Untitled Masterwork)
ActivePublic

Authored by Aaron Carlisle (Blendify) on Aug 10 2021, 5:25 AM.
diff --git a/release/scripts/startup/bl_ui/properties_freestyle.py b/release/scripts/startup/bl_ui/properties_freestyle.py
index 9191c355c5e..6438acc0aea 100644
--- a/release/scripts/startup/bl_ui/properties_freestyle.py
+++ b/release/scripts/startup/bl_ui/properties_freestyle.py
@@ -301,10 +301,26 @@ class VIEWLAYER_PT_freestyle_lineset(ViewLayerFreestyleEditorButtonsPanel, Panel
layout.template_ID(lineset, "linestyle",
new="scene.freestyle_linestyle_new")
- layout.label(text="Selection By")
- row = layout.row(align=True)
- row.separator(factor=4.0)
- row.prop(lineset, "select_by_image_border", text="Image Border")
+ layout.separator()
+ layout.label(text="Select by:")
+
+
+class VIEWLAYER_PT_freestyle_lineset_image_border(ViewLayerFreestyleLineStyle, Panel):
+ bl_label = "Image Border"
+ bl_parent_id = "VIEWLAYER_PT_freestyle_lineset"
+ COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
+
+ def draw_header(self, context):
+ layout = self.layout
+
+ view_layer = context.view_layer
+ freestyle = view_layer.freestyle_settings
+ lineset = freestyle.linesets.active
+
+ layout.prop(lineset, "select_by_image_border", text="")
+
+ def draw(_self, _context):
+ pass
# Freestyle Lineset Sub Panels
@@ -1308,6 +1324,7 @@ classes = (
VIEWLAYER_PT_freestyle_edge_detection_options,
VIEWLAYER_PT_freestyle_style_modules,
VIEWLAYER_PT_freestyle_lineset,
+ VIEWLAYER_PT_freestyle_lineset_image_border,
VIEWLAYER_PT_freestyle_lineset_visibilty,
VIEWLAYER_PT_freestyle_lineset_edgetype,
VIEWLAYER_PT_freestyle_lineset_facemarks,