[Bf-blender-cvs] [9ae27c2d240] greasepencil-object: UI: Move Panel Adjustments and Relations as Subpanels of Layers
Antonio Vazquez
noreply at git.blender.org
Wed Jun 6 18:47:15 CEST 2018
Commit: 9ae27c2d24082f7ce6a769d78d2d6c959b28b22f
Author: Antonio Vazquez
Date: Wed Jun 6 18:46:59 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB9ae27c2d24082f7ce6a769d78d2d6c959b28b22f
UI: Move Panel Adjustments and Relations as Subpanels of Layers
===================================================================
M release/scripts/startup/bl_ui/properties_data_gpencil.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_data_gpencil.py b/release/scripts/startup/bl_ui/properties_data_gpencil.py
index ef1469dd950..e1bdf33f7d1 100644
--- a/release/scripts/startup/bl_ui/properties_data_gpencil.py
+++ b/release/scripts/startup/bl_ui/properties_data_gpencil.py
@@ -80,6 +80,7 @@ class DATA_PT_gpencil_layer_optionpanel(LayerDataButtonsPanel, Panel):
bl_region_type = 'WINDOW'
bl_context = "data"
bl_label = "Layer Adjustments"
+ bl_parent_id = 'DATA_PT_gpencil_datapanel'
bl_options = {'DEFAULT_CLOSED'}
def draw(self, context):
@@ -102,6 +103,29 @@ class DATA_PT_gpencil_layer_optionpanel(LayerDataButtonsPanel, Panel):
layout.prop(gpl, "use_stroke_location", text="Draw On Stroke Location")
+class DATA_PT_gpencil_parentpanel(LayerDataButtonsPanel, Panel):
+ bl_space_type = 'PROPERTIES'
+ bl_region_type = 'WINDOW'
+ bl_context = "data"
+ bl_label = "Layer Relations"
+ bl_parent_id = 'DATA_PT_gpencil_datapanel'
+ bl_options = {'DEFAULT_CLOSED'}
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+
+ gpl = context.active_gpencil_layer
+ col = layout.column(align=True)
+ col.active = not gpl.lock
+ col.prop(gpl, "parent", text="Parent")
+ col.prop(gpl, "parent_type", text="Parent Type")
+ parent = gpl.parent
+
+ if parent and gpl.parent_type == 'BONE' and parent.type == 'ARMATURE':
+ col.prop_search(gpl, "parent_bone", parent.data, "bones", text="Bone")
+
+
class DATA_PT_gpencil_onionpanel(Panel):
bl_space_type = 'PROPERTIES'
@@ -128,28 +152,6 @@ class DATA_PT_gpencil_onionpanel(Panel):
GreasePencilOnionPanel.draw_settings(layout, gpd)
-class DATA_PT_gpencil_parentpanel(LayerDataButtonsPanel, Panel):
- bl_space_type = 'PROPERTIES'
- bl_region_type = 'WINDOW'
- bl_context = "data"
- bl_label = "Layer Relations"
- bl_options = {'DEFAULT_CLOSED'}
-
- def draw(self, context):
- layout = self.layout
- layout.use_property_split = True
-
- gpl = context.active_gpencil_layer
- col = layout.column(align=True)
- col.active = not gpl.lock
- col.prop(gpl, "parent", text="Parent")
- col.prop(gpl, "parent_type", text="Parent Type")
- parent = gpl.parent
-
- if parent and gpl.parent_type == 'BONE' and parent.type == 'ARMATURE':
- col.prop_search(gpl, "parent_bone", parent.data, "bones", text="Bone")
-
-
class GPENCIL_UL_vgroups(UIList):
def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
vgroup = item
More information about the Bf-blender-cvs
mailing list