[Bf-blender-cvs] [a155734faca] greasepencil-object: GP Properties: Tidy up Onion Skinning and Display panels
Joshua Leung
noreply at git.blender.org
Wed Sep 20 03:13:04 CEST 2017
Commit: a155734faca0686dd1013cbd32f19372a8a42fc6
Author: Joshua Leung
Date: Wed Sep 20 13:07:38 2017 +1200
Branches: greasepencil-object
https://developer.blender.org/rBa155734faca0686dd1013cbd32f19372a8a42fc6
GP Properties: Tidy up Onion Skinning and Display panels
Initial attempts to tidy these panels up, according to points identified
in last night's review.
===================================================================
M release/scripts/startup/bl_ui/properties_data_gpencil.py
M release/scripts/startup/bl_ui/properties_grease_pencil_common.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_data_gpencil.py b/release/scripts/startup/bl_ui/properties_data_gpencil.py
index 50d14772afd..16f07686cf9 100644
--- a/release/scripts/startup/bl_ui/properties_data_gpencil.py
+++ b/release/scripts/startup/bl_ui/properties_data_gpencil.py
@@ -66,7 +66,7 @@ class DATA_PT_gpencil_layeroptionpanel(GreasePencilLayerOptionPanel, Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "data"
- bl_label = "Options"
+ bl_label = "Layer Adjustments"
bl_options = {'DEFAULT_CLOSED'}
# NOTE: this is just a wrapper around the generic GP Panel
@@ -116,31 +116,39 @@ class DATA_PT_gpencil_display(DataButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
+
ob = context.object
- layout.prop(ob, "empty_draw_size", text="Size")
gpd = context.gpencil_data
- row = layout.row()
- row.prop(gpd, "xray_mode", text="Draw Mode")
- row = layout.row()
- row.prop(gpd, "keep_stroke_thickness")
+ gpl = context.active_gpencil_layer
- row = layout.row()
- row.prop(gpd, "show_stroke_direction", text="Show Stroke Directions")
- gpl = context.active_gpencil_layer
+ layout.prop(gpd, "xray_mode", text="Depth Ordering")
+ layout.prop(ob, "empty_draw_size", text="Marker Size")
+
+ layout.separator()
+
if gpl:
- row = layout.row()
- row.prop(gpl, "show_points")
+ col = layout.column(align=True)
+ col.prop(gpl, "show_points")
+ col.prop(gpd, "show_stroke_direction", text="Show Stroke Directions")
+
+ layout.separator()
- row = layout.row()
- row.prop(gpd, "pixfactor", text="Pixel Factor")
+ col = layout.column(align=True)
+ col.prop(gpd, "keep_stroke_thickness")
+ sub = col.column()
+ sub.active = not gpd.keep_stroke_thickness
+ sub.prop(gpd, "pixfactor", text="Pixel Factor")
+
+ layout.separator()
col = layout.column()
- col.label("Edit")
+ col.label("Edit Lines:") # TODO: Editline toggle here
col.prop(gpd, "edit_line_color", text="")
col.prop(gpd, "multiedit_line_only", text="Only Lines in MultiEdit")
+
classes = (
DATA_PT_gpencil,
DATA_PT_gpencil_datapanel,
diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index 56e668ebdb3..a8ef61debe0 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -1242,6 +1242,10 @@ class GreasePencilOnionPanel:
sub.prop(gpd, "use_ghosts_always", text="", icon=icon)
sub.prop(gpd, "use_ghost_custom_colors", text="", icon='COLOR')
+ row = layout.row(align=True)
+ row.active = gpd.use_onion_skinning
+ row.prop(gpd, "onion_mode", expand=True)
+
split = layout.split(percentage=0.5)
split.active = gpd.use_onion_skinning
@@ -1251,24 +1255,21 @@ class GreasePencilOnionPanel:
row.active = gpd.use_ghost_custom_colors
row.prop(gpd, "before_color", text="")
+ row = sub.row(align=True)
+ row.active = gpd.onion_mode in ('ABSOLUTE', 'RELATIVE')
+ row.prop(gpd, "ghost_before_range", text="Before")
+
# - After Frames
sub = split.column(align=True)
row = sub.row(align=True)
row.active = gpd.use_ghost_custom_colors
row.prop(gpd, "after_color", text="")
- split = layout.split(percentage=0.5)
- split.active = gpd.onion_mode in ('ABSOLUTE', 'RELATIVE')
- sub = split.column(align=True)
- sub.prop(gpd, "ghost_before_range", text="Before")
-
- sub = split.column(align=True)
- sub.prop(gpd, "ghost_after_range", text="After")
-
- row = layout.row(align=True)
- row.active = gpd.use_onion_skinning
- row.prop(gpd, "onion_mode", text="Mode")
+ row = sub.row(align=True)
+ row.active = gpd.onion_mode in ('ABSOLUTE', 'RELATIVE')
+ row.prop(gpd, "ghost_after_range", text="After")
+ # - fade
split = layout.split(percentage=0.5)
split.active = gpd.use_onion_skinning
sub = split.column(align=True)
@@ -1294,6 +1295,9 @@ class GreasePencilOnionPanel:
sub.prop(gpl, "use_ghosts_always", text="", icon=icon)
sub.prop(gpl, "use_ghost_custom_colors", text="", icon='COLOR')
+ row = box.row(align=True)
+ row.active = ovr
+ row.prop(gpl, "onion_mode", expand=True)
split = box.split(percentage=0.5)
split.active = ovr
@@ -1301,27 +1305,24 @@ class GreasePencilOnionPanel:
# - Before Frames
sub = split.column(align=True)
row = sub.row(align=True)
- row.active = gpl.use_ghost_custom_colors
+ row.active = gpl.use_ghost_custom_color
+ s
row.prop(gpl, "before_color", text="")
+ row = sub.row(align=True)
+ row.active = gpl.onion_mode in ('ABSOLUTE', 'RELATIVE')
+ row.prop(gpl, "ghost_before_range", text="Before")
# - After Frames
sub = split.column(align=True)
row = sub.row(align=True)
row.active = gpl.use_ghost_custom_colors
row.prop(gpl, "after_color", text="")
+
+ row = sub.row(align=True)
+ row.active = gpl.onion_mode in ('ABSOLUTE', 'RELATIVE')
+ row.prop(gpl, "ghost_after_range", text="After")
- split = box.split(percentage=0.5)
- split.active = gpl.onion_mode in ('ABSOLUTE', 'RELATIVE')
- sub = split.column(align=True)
- sub.prop(gpl, "ghost_before_range", text="Before")
-
- sub = split.column(align=True)
- sub.prop(gpl, "ghost_after_range", text="After")
-
- row = box.row(align=True)
- row.active = ovr
- row.prop(gpl, "onion_mode", text="Mode")
-
+ # - Fade
split = box.split(percentage=0.5)
split.active = ovr
sub = split.column(align=True)
More information about the Bf-blender-cvs
mailing list