Texture context selector for texture panel:

* Texture context was previously determined by going to the appropriate panel, for example "world panel -> texture panel" to access world textures. Additionally there was a separate button to access brush textures.
* Now the texture context can be selected directly through an expanded icon menu, which shows the available context options.
* This context selector is now at the top of the texture panel, but this could later be perhaps integrated to the context path somehow to be more intuitive.
This commit is contained in:
2011-02-08 14:29:48 +00:00
parent 9e73ac2b9f
commit 811a1b910c
5 changed files with 70 additions and 19 deletions

View File

@@ -99,6 +99,9 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel, bpy.types.Panel):
if not isinstance(pin_id, bpy.types.Material):
pin_id = None
if not space.use_pin_id:
layout.prop(space, "texture_context", expand=True)
tex_collection = (pin_id is None) and (node is None) and (not isinstance(idblock, bpy.types.Brush))
if tex_collection:
@@ -126,9 +129,6 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel, bpy.types.Panel):
col = split.column()
if not space.pin_id:
col.prop(space, "show_brush_texture", text="Brush", toggle=True)
if tex:
split = layout.split(percentage=0.2)