[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [27597] branches/render25/release/scripts/ ui/properties_texture.py: Render Branch: Fix node material texture slots list not being correct.
Brecht Van Lommel
brecht at blender.org
Thu Mar 18 12:18:56 CET 2010
Revision: 27597
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=27597
Author: blendix
Date: 2010-03-18 12:18:56 +0100 (Thu, 18 Mar 2010)
Log Message:
-----------
Render Branch: Fix node material texture slots list not being correct.
Modified Paths:
--------------
branches/render25/release/scripts/ui/properties_texture.py
Modified: branches/render25/release/scripts/ui/properties_texture.py
===================================================================
--- branches/render25/release/scripts/ui/properties_texture.py 2010-03-18 11:14:44 UTC (rev 27596)
+++ branches/render25/release/scripts/ui/properties_texture.py 2010-03-18 11:18:56 UTC (rev 27597)
@@ -43,7 +43,16 @@
layout.operator("texture.envmap_clear", icon='FILE_REFRESH')
layout.operator("texture.envmap_clear_all", icon='FILE_REFRESH')
+def node_texture_slots_idblock(idblock):
+ # need this exception still for texture slots, active_texture
+ # already takes into acount node materials automatically
+ if type(idblock) == bpy.types.Material:
+ mat_node = idblock.active_node_material
+ if mat_node:
+ return mat_node
+ return idblock
+
def context_tex_datablock(context):
idblock = context.material
if idblock:
@@ -108,6 +117,7 @@
if tex_collection:
row = layout.row()
+ idblock = node_texture_slots_idblock(idblock)
row.template_list(idblock, "texture_slots", idblock, "active_texture_index", rows=2)
col = row.column(align=True)
More information about the Bf-blender-cvs
mailing list