diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2013-04-28 19:20:52 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2013-04-28 19:20:52 +0400 |
commit | 428debd9c8af81ed5870c70466d46a60646f49e3 (patch) | |
tree | e0c5ed8607273a33293764eb203d02e559fbfba5 /intern | |
parent | 85a4938c101ab5d50b2313ffeddf8af198e40074 (diff) |
Fix for "new" Cycles handling of textures, UI code assumed all texture users use "texture" as prop name, but at least WeightVG modifiers do not.
Fixed by adding a "texture_user_property" member to spacebuts' context, and using it to get the prop identifier in ui script.
Thanks to Brecht for its advice!
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/blender/addon/ui.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index e1cd928cc4c..fcb0b680fde 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -896,8 +896,9 @@ class CyclesTexture_PT_context(CyclesButtonsPanel, Panel): if pin_id: col.template_ID(space, "pin_id") - elif user: - col.template_ID(user, "texture", new="texture.new") + else: + propname = context.texture_user_property.identifier + col.template_ID(user, propname, new="texture.new") if tex: split = layout.split(percentage=0.2) |