From eecf7722b635545f0f5c51b74a15418e3cc9f47e Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 7 Jun 2009 13:36:12 +0000 Subject: UI Buttons: * Context now allows pinning a datablock, independent of selection. * Initial ID browse buttons for most buttons tabs. * Browsing from world to texture now displays world textures again, but is a bit of a hack, not sure there is a right way to do this. * There's a button to switch between active materials and textures now, only temporary though. * There's some code to put context part in own region, disabled still because it doesn't work that well yet. --- release/ui/buttons_data_lamp.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'release/ui/buttons_data_lamp.py') diff --git a/release/ui/buttons_data_lamp.py b/release/ui/buttons_data_lamp.py index 532098cf786..f626eb45ed6 100644 --- a/release/ui/buttons_data_lamp.py +++ b/release/ui/buttons_data_lamp.py @@ -24,9 +24,22 @@ class DATA_PT_lamp(DataButtonsPanel): __label__ = "Lamp" def draw(self, context): + ob = context.object lamp = context.lamp + space = context.space_data layout = self.layout + split = layout.split(percentage=0.65) + + if ob: + split.template_ID(context, ob, "data") + split.itemS() + elif lamp: + split.template_ID(context, space, "pin_id") + split.itemS() + + layout.itemS() + layout.itemR(lamp, "type", expand=True) split = layout.split() -- cgit v1.2.3