[Bf-blender-cvs] [a1f00219cef] greasepencil-object: UI: Move frame lock and opacity to layer panel
Antonio Vazquez
noreply at git.blender.org
Wed Jul 12 20:40:45 CEST 2017
Commit: a1f00219cef169d6fb69b2c32b453eec30edc2d8
Author: Antonio Vazquez
Date: Wed Jul 12 20:33:57 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rBa1f00219cef169d6fb69b2c32b453eec30edc2d8
UI: Move frame lock and opacity to layer panel
===================================================================
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 f6d2ab5f1ef..15fb0539073 100644
--- a/release/scripts/startup/bl_ui/properties_data_gpencil.py
+++ b/release/scripts/startup/bl_ui/properties_data_gpencil.py
@@ -113,8 +113,8 @@ class DATA_PT_gpencil_display(DataButtonsPanel, Panel):
classes = (
DATA_PT_gpencil,
DATA_PT_gpencil_datapanel,
- DATA_PT_gpencil_layeroptionpanel,
DATA_PT_gpencil_onionpanel,
+ DATA_PT_gpencil_layeroptionpanel,
DATA_PT_gpencilparentpanel,
DATA_PT_gpencil_display,
)
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 c4da1545338..f80ec5e0363 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -1021,6 +1021,23 @@ class GreasePencilDataPanel:
sub.operator("gpencil.layer_isolate", icon='LOCKED', text="").affect_visibility = False
sub.operator("gpencil.layer_isolate", icon='RESTRICT_VIEW_OFF', text="").affect_visibility = True
+ row = layout.row(align=True)
+ row.prop(gpl, "opacity", text="Opacity", slider=True)
+
+ layout.separator()
+
+ # Full-Row - Frame Locking (and Delete Frame)
+ row = layout.row(align=True)
+ row.active = not gpl.lock
+
+ if gpl.active_frame:
+ lock_status = iface_("Locked") if gpl.lock_frame else iface_("Unlocked")
+ lock_label = iface_("Frame: %d (%s)") % (gpl.active_frame.frame_number, lock_status)
+ else:
+ lock_label = iface_("Lock Frame")
+ row.prop(gpl, "lock_frame", text=lock_label, icon='UNLOCKED')
+ row.operator("gpencil.active_frame_delete", text="", icon='X')
+
class GreasePencilLayerOptionPanel:
bl_label = "Options"
@@ -1057,9 +1074,6 @@ class GreasePencilLayerOptionPanel:
gpl = context.active_gpencil_layer
ts = context.scene.tool_settings
- row = layout.row(align=True)
- row.prop(gpl, "opacity", text="Opacity", slider=True)
-
# Layer options
if context.space_data.type not in ('VIEW_3D', 'PROPERTIES'):
split = layout.split(percentage=0.5)
@@ -1086,20 +1100,6 @@ class GreasePencilLayerOptionPanel:
row = layout.row(align=True)
row.prop(gpl, "use_stroke_location", text="Draw on Stroke Location")
- layout.separator()
-
- # Full-Row - Frame Locking (and Delete Frame)
- row = layout.row(align=True)
- row.active = not gpl.lock
-
- if gpl.active_frame:
- lock_status = iface_("Locked") if gpl.lock_frame else iface_("Unlocked")
- lock_label = iface_("Frame: %d (%s)") % (gpl.active_frame.frame_number, lock_status)
- else:
- lock_label = iface_("Lock Frame")
- row.prop(gpl, "lock_frame", text=lock_label, icon='UNLOCKED')
- row.operator("gpencil.active_frame_delete", text="", icon='X')
-
class GreasePencilOnionPanel:
bl_label = "Onion Skinning"
More information about the Bf-blender-cvs
mailing list