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:
authorMiika Hamalainen <blender@miikah.org>2011-07-22 22:51:53 +0400
committerMiika Hamalainen <blender@miikah.org>2011-07-22 22:51:53 +0400
commit2a97e5a772d69c0963c7757033e240abef8d56b5 (patch)
treea8737d358a27bbee8b996d31806a87069c094e23 /source/blender/editors/space_buttons
parentcbe1613c0123d7705b9bba3806c03fe09151e729 (diff)
parentffc490cbf1d93c7e0a9b97953f6f52e69b9bc8ec (diff)
Merge with trunk r38619
Diffstat (limited to 'source/blender/editors/space_buttons')
-rw-r--r--source/blender/editors/space_buttons/CMakeLists.txt2
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c9
2 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/editors/space_buttons/CMakeLists.txt b/source/blender/editors/space_buttons/CMakeLists.txt
index 0a4f251e46f..631e2adea34 100644
--- a/source/blender/editors/space_buttons/CMakeLists.txt
+++ b/source/blender/editors/space_buttons/CMakeLists.txt
@@ -22,8 +22,8 @@
set(INC
../include
../../blenkernel
- ../../blenloader
../../blenlib
+ ../../blenloader
../../makesdna
../../makesrna
../../windowmanager
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index 8d5a54908f3..56226280554 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -218,7 +218,7 @@ static int buttons_context_path_modifier(ButsContextPath *path)
return 0;
}
-static int buttons_context_path_material(ButsContextPath *path)
+static int buttons_context_path_material(ButsContextPath *path, int for_texture)
{
Object *ob;
PointerRNA *ptr= &path->ptr[path->len-1];
@@ -236,6 +236,9 @@ static int buttons_context_path_material(ButsContextPath *path)
ma= give_current_material(ob, ob->actcol);
RNA_id_pointer_create(&ma->id, &path->ptr[path->len]);
path->len++;
+
+ if(for_texture && give_current_material_texture_node(ma))
+ return 1;
ma= give_node_material(ma);
if(ma) {
@@ -432,7 +435,7 @@ static int buttons_context_path_texture(ButsContextPath *path)
}
}
/* try material */
- if(buttons_context_path_material(path)) {
+ if(buttons_context_path_material(path, 1)) {
ma= path->ptr[path->len-1].data;
if(ma) {
@@ -524,7 +527,7 @@ static int buttons_context_path(const bContext *C, ButsContextPath *path, int ma
found= buttons_context_path_particle(path);
break;
case BCONTEXT_MATERIAL:
- found= buttons_context_path_material(path);
+ found= buttons_context_path_material(path, 0);
break;
case BCONTEXT_TEXTURE:
found= buttons_context_path_texture(path);