[Bf-blender-cvs] [20e249274ff] greasepencil-refactor: GPencil: Move Use Lights to new Panel
Antonio Vazquez
noreply at git.blender.org
Mon Jan 6 22:08:06 CET 2020
Commit: 20e249274ff2e98013271f44331bca7e2461fc50
Author: Antonio Vazquez
Date: Mon Jan 6 22:07:51 2020 +0100
Branches: greasepencil-refactor
https://developer.blender.org/rB20e249274ff2e98013271f44331bca7e2461fc50
GPencil: Move Use Lights to new Panel
===================================================================
M release/scripts/startup/bl_ui/properties_object.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py
index 9167fe93d3a..33ba981e235 100644
--- a/release/scripts/startup/bl_ui/properties_object.py
+++ b/release/scripts/startup/bl_ui/properties_object.py
@@ -396,9 +396,26 @@ class OBJECT_PT_visibility(ObjectButtonsPanel, Panel):
col = flow.column()
col.prop(ob, "hide_select", text="Selectable", toggle=False, invert_checkbox=True)
- if ob.type == 'GPENCIL':
- col = flow.column()
- col.prop(ob, "use_grease_pencil_lights", toggle=False)
+
+class OBJECT_PT_greasepencil_light(ObjectButtonsPanel, Panel):
+ bl_label = "Grease Pencil"
+ bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
+
+ @classmethod
+ def poll(cls, context):
+ return (context.object) and (context.engine in cls.COMPAT_ENGINES) and (context.object.type == 'GPENCIL')
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+
+ flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
+ layout = self.layout
+ ob = context.object
+
+ col = flow.column()
+ col.prop(ob, "use_grease_pencil_lights", toggle=False)
class OBJECT_PT_custom_props(ObjectButtonsPanel, PropertyPanel, Panel):
@@ -421,6 +438,7 @@ classes = (
OBJECT_PT_display,
OBJECT_PT_display_bounds,
OBJECT_PT_visibility,
+ OBJECT_PT_greasepencil_light,
OBJECT_PT_custom_props,
)
More information about the Bf-blender-cvs
mailing list