Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanne Karhu <jhkarh@gmail.com>2011-02-16 13:22:19 +0300
committerJanne Karhu <jhkarh@gmail.com>2011-02-16 13:22:19 +0300
commite6879c76466aa1d0cc3b773638959c827f8cdbe3 (patch)
treea271c645c826fd2a2cad6b64aa51b44af1ff76b9 /release
parent430bb75749343ce344a12ce3997f872954e1b3f9 (diff)
Correct texture pinning:
* Now texture pinning works consistently for all textures. * The only problem is that there is no way to pin textures if there are no textures in the context path, so it's for example impossible to pin the texture of a displace modifier without adding a texture somewhere else and selecting that texture first. I my opinion this is quite counter productive so perhaps a dedicated "only textures" texture context option is needed after all.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/ui/properties_texture.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/release/scripts/ui/properties_texture.py b/release/scripts/ui/properties_texture.py
index 8b652ba6e60..04edf8ea7e8 100644
--- a/release/scripts/ui/properties_texture.py
+++ b/release/scripts/ui/properties_texture.py
@@ -90,7 +90,7 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel, bpy.types.Panel):
engine = context.scene.render.engine
if not hasattr(context, "texture_slot"):
return False
- return ((context.material or context.world or context.lamp or context.brush or context.texture or context.particle_system)
+ return ((context.material or context.world or context.lamp or context.brush or context.texture or context.particle_system or isinstance(context.space_data.pin_id, bpy.types.ParticleSettings))
and (engine in cls.COMPAT_ENGINES))
def draw(self, context):
@@ -102,13 +102,14 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel, bpy.types.Panel):
idblock = context_tex_datablock(context)
pin_id = space.pin_id
- if not isinstance(pin_id, bpy.types.Material):
+ if space.use_pin_id and not isinstance(pin_id, bpy.types.Texture):
+ idblock = pin_id
pin_id = None
if not space.use_pin_id:
layout.prop(space, "texture_context", expand=True)
- tex_collection = (not space.use_pin_id) and (node is None) and (not isinstance(idblock, bpy.types.Brush))
+ tex_collection = (pin_id is None) and (node is None) and (not isinstance(idblock, bpy.types.Brush))
if tex_collection:
row = layout.row()