diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-12-08 16:35:14 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-12-08 16:35:14 +0400 |
commit | ec33687d6cf74775e37fdc1a14e22dea08289cb1 (patch) | |
tree | a98875cf3deae05c46cdd70192858b8844ab1ea4 /source/blender/editors/space_buttons/buttons_context.c | |
parent | 724746dba2deed8e336fc66b36bfc3b5b1858a8e (diff) | |
parent | 7b9adab594d1cc670d642b56ae8d76069ce91107 (diff) |
Merged changes in the trunk up to revision 52815.
Diffstat (limited to 'source/blender/editors/space_buttons/buttons_context.c')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_context.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index a7f18c9de53..91f069d16de 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -823,12 +823,12 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r ButsContextTexture *ct = sbuts->texuser; PointerRNA *ptr; - if (ct) - return 0; /* new shading system */ - if ((ptr = get_pointer_type(path, &RNA_Material))) { Material *ma = ptr->data; + if (ct) + return 0; /* new shading system */ + /* if we have a node material, get slot from material in material node */ if (ma && ma->use_nodes && ma->nodetree) { /* if there's an active texture node in the node tree, @@ -849,12 +849,18 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r else if ((ptr = get_pointer_type(path, &RNA_Lamp))) { Lamp *la = ptr->data; + if (ct) + return 0; /* new shading system */ + if (la) CTX_data_pointer_set(result, &la->id, &RNA_LampTextureSlot, la->mtex[(int)la->texact]); } else if ((ptr = get_pointer_type(path, &RNA_World))) { World *wo = ptr->data; + if (ct) + return 0; /* new shading system */ + if (wo) CTX_data_pointer_set(result, &wo->id, &RNA_WorldTextureSlot, wo->mtex[(int)wo->texact]); } |