[Bf-blender-cvs] [c3c22af] GPencil_EditStrokes: Fix for error in previous commit: Layouts were not getting deactivated properly

Joshua Leung noreply at git.blender.org
Sun Oct 12 15:07:44 CEST 2014


Commit: c3c22afd9ebda204390d28279ec168b00c0ec5fa
Author: Joshua Leung
Date:   Mon Oct 13 01:52:28 2014 +1300
Branches: GPencil_EditStrokes
https://developer.blender.org/rBc3c22afd9ebda204390d28279ec168b00c0ec5fa

Fix for error in previous commit: Layouts were not getting deactivated properly

===================================================================

M	release/scripts/startup/bl_ui/properties_grease_pencil_common.py

===================================================================

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 4dee85b..d324d37 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -276,14 +276,24 @@ class GreasePencilDataPanel():
             col.prop(gpl, "show_x_ray")
 
             # Full-Row - Frame Locking
+            row = layout.row()
+            row.active = not gpl.lock
+
             if gpl.active_frame:
                 lock_status = "Locked" if gpl.lock_frame else "Unlocked"
                 lock_label = "Frame: %d (%s)" % (gpl.active_frame.frame_number, lock_status)
             else:
                 lock_label = "Lock Frame"
-            layout.prop(gpl, "lock_frame", text=lock_label, icon='UNLOCKED')
+            row.prop(gpl, "lock_frame", text=lock_label, icon='UNLOCKED')
 
             # Onion skinning
             col = layout.column(align=True)
+            col.active = not gpl.lock
             col.prop(gpl, "use_onion_skinning")
-            col.prop(gpl, "ghost_range_max", text="Frames")
+
+            subcol = col.column()
+            subcol.active = gpl.use_onion_skinning
+            subcol.prop(gpl, "ghost_range_max", text="Frames")
+
+            # XXX: replace "frames" with a split for "before" and "after",
+            # each of which contains a color/toggle for using that + number of frames




More information about the Bf-blender-cvs mailing list