forked from bartvdbraak/blender
2.5 Texture Buttons:
* Now texture settings (colors, mapping, influence) only show up, when the texture type != None.
This commit is contained in:
parent
63abf1ec6c
commit
0e170f8e56
@ -70,6 +70,9 @@ class TEXTURE_PT_mapping(TextureButtonsPanel):
|
||||
__idname__= "TEXTURE_PT_mapping"
|
||||
__label__ = "Mapping"
|
||||
|
||||
def poll(self, context):
|
||||
return (context.texture != None and context.texture.type != 'NONE')
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
tex = context.texture_slot
|
||||
@ -81,7 +84,6 @@ class TEXTURE_PT_mapping(TextureButtonsPanel):
|
||||
col = split.column()
|
||||
col.itemR(tex, "texture_coordinates", text="")
|
||||
|
||||
|
||||
if tex.texture_coordinates == 'UV':
|
||||
row = layout.row()
|
||||
row.itemR(tex, "uv_layer")
|
||||
@ -97,14 +99,15 @@ class TEXTURE_PT_mapping(TextureButtonsPanel):
|
||||
col.itemR(tex, "mapping", text="")
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.itemR(tex, "from_dupli")
|
||||
|
||||
col = split.column()
|
||||
colrow = col.row()
|
||||
colrow.itemR(tex, "x_mapping", text="")
|
||||
colrow.itemR(tex, "y_mapping", text="")
|
||||
colrow.itemR(tex, "z_mapping", text="")
|
||||
row = col.row()
|
||||
row.itemR(tex, "x_mapping", text="")
|
||||
row.itemR(tex, "y_mapping", text="")
|
||||
row.itemR(tex, "z_mapping", text="")
|
||||
|
||||
row = layout.row()
|
||||
row.column().itemR(tex, "offset")
|
||||
@ -114,6 +117,9 @@ class TEXTURE_PT_influence(TextureButtonsPanel):
|
||||
__idname__= "TEXTURE_PT_influence"
|
||||
__label__ = "Influence"
|
||||
|
||||
def poll(self, context):
|
||||
return (context.texture != None and context.texture.type != 'NONE')
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
textype = context.texture
|
||||
@ -173,6 +179,9 @@ class TEXTURE_PT_colors(TextureButtonsPanel):
|
||||
__idname__= "TEXTURE_PT_colors"
|
||||
__label__ = "Colors"
|
||||
|
||||
def poll(self, context):
|
||||
return (context.texture != None and context.texture.type != 'NONE')
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
tex = context.texture
|
||||
|
Loading…
Reference in New Issue
Block a user