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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-10-09 13:50:49 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-10-09 13:50:49 +0400
commit2226a5139a2ad78d4de2eaaf09e734adf1ce0ae4 (patch)
tree788e76978dcc715819544c2a3abce5636ed1d6e5 /source/blender/editors/space_buttons/buttons_context.c
parent9ebcd9c5e46c8addd80c8adb97fcee91a1916d57 (diff)
Fix some issues with showing the current textures when using
material nodes and texture nodes. Made it all use the same give_current_*_texture functions now.
Diffstat (limited to 'source/blender/editors/space_buttons/buttons_context.c')
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index 9333ba9209c..a5a7524e584 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -52,6 +52,7 @@
#include "BKE_paint.h"
#include "BKE_particle.h"
#include "BKE_screen.h"
+#include "BKE_texture.h"
#include "BKE_utildefines.h"
#include "BKE_world.h"
@@ -342,7 +343,6 @@ static int buttons_context_path_texture(const bContext *C, ButsContextPath *path
Lamp *la;
Brush *br;
World *wo;
- MTex *mtex;
Tex *tex;
PointerRNA *ptr= &path->ptr[path->len-1];
@@ -355,8 +355,7 @@ static int buttons_context_path_texture(const bContext *C, ButsContextPath *path
br= path->ptr[path->len-1].data;
if(br) {
- mtex= br->mtex[(int)br->texact];
- tex= (mtex)? mtex->tex: NULL;
+ tex= give_current_brush_texture(br);
RNA_id_pointer_create(&tex->id, &path->ptr[path->len]);
path->len++;
@@ -368,8 +367,7 @@ static int buttons_context_path_texture(const bContext *C, ButsContextPath *path
wo= path->ptr[path->len-1].data;
if(wo) {
- mtex= wo->mtex[(int)wo->texact];
- tex= (mtex)? mtex->tex: NULL;
+ give_current_world_texture(wo);
RNA_id_pointer_create(&tex->id, &path->ptr[path->len]);
path->len++;
@@ -381,8 +379,7 @@ static int buttons_context_path_texture(const bContext *C, ButsContextPath *path
ma= path->ptr[path->len-1].data;
if(ma) {
- mtex= ma->mtex[(int)ma->texact];
- tex= (mtex)? mtex->tex: NULL;
+ tex= give_current_material_texture(ma);
RNA_id_pointer_create(&tex->id, &path->ptr[path->len]);
path->len++;
@@ -394,8 +391,7 @@ static int buttons_context_path_texture(const bContext *C, ButsContextPath *path
la= path->ptr[path->len-1].data;
if(la) {
- mtex= la->mtex[(int)la->texact];
- tex= (mtex)? mtex->tex: NULL;
+ tex= give_current_lamp_texture(la);
RNA_id_pointer_create(&tex->id, &path->ptr[path->len]);
path->len++;