diff options
author | José Luis Oliveira Cunha <JoseCunha> | 2017-11-29 21:18:04 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-11-29 21:21:51 +0300 |
commit | 5ec8a9ac27c2dcb654ba3a9057625687136cd87f (patch) | |
tree | 5c81a5f07c37132f10b4a115dbc498a542ca2609 /source/blender/blenkernel/intern/texture.c | |
parent | e4b54f44c1b19069de5818d47ce899c690e9b56d (diff) |
Fix T53116: default texture coordinates for volume materials are blank.
Differential Revision: https://developer.blender.org/D2935
Diffstat (limited to 'source/blender/blenkernel/intern/texture.c')
-rw-r--r-- | source/blender/blenkernel/intern/texture.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index 50bb3a5f10d..122b605f160 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -1165,6 +1165,10 @@ void set_current_material_texture(Material *ma, Tex *newtex) ma->mtex[act] = BKE_texture_mtex_add(); /* Reset this slot's ON/OFF toggle, for materials, when slot was empty. */ ma->septex &= ~(1 << act); + /* For volumes the default UV texture coordinates are not available. */ + if (ma->material_type == MA_TYPE_VOLUME) { + ma->mtex[act]->texco = TEXCO_ORCO; + } } ma->mtex[act]->tex = newtex; |