diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-06-18 18:20:25 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-06-18 18:20:25 +0400 |
commit | 5ea992df98d152f83072e886a0b1f9464a4883d6 (patch) | |
tree | 3d3ff82225033a8307ae9fbc7de9892808db948e /release/ui/buttons_texture.py | |
parent | 7e57823c47761383a458665e923bb189e489c1f4 (diff) |
UI:
* Fix context.cloth, was not being set correct.
* Fix errors with context pinning, scripts should
not assume context.object to be there.
* Always show preview even if e.g. the material is not
set, to keep ID buttons from jumping while you're
using them.
Diffstat (limited to 'release/ui/buttons_texture.py')
-rw-r--r-- | release/ui/buttons_texture.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/release/ui/buttons_texture.py b/release/ui/buttons_texture.py index 286c1240d0e..de166cef796 100644 --- a/release/ui/buttons_texture.py +++ b/release/ui/buttons_texture.py @@ -13,6 +13,9 @@ class TEXTURE_PT_preview(TextureButtonsPanel): __idname__= "TEXTURE_PT_preview" __label__ = "Preview" + def poll(self, context): + return (context.material or context.world or context.lamp or context.texture) + def draw(self, context): layout = self.layout tex = context.texture @@ -24,7 +27,7 @@ class TEXTURE_PT_texture(TextureButtonsPanel): __label__ = "Texture" def poll(self, context): - return (context.material or context.world or context.lamp) + return (context.material or context.world or context.lamp or context.texture) def draw(self, context): layout = self.layout |