diff options
author | José Luis Oliveira Cunha <JoseCunha> | 2017-11-29 21:18:04 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-01-01 17:57:51 +0300 |
commit | 576899b90a2e316cd716aa2b011f26392fbb2532 (patch) | |
tree | 5fed795cd714d6b03c7ffb35328ffc776aedad0a | |
parent | 0f841e24b0b326e8869fd4c78e56c4cac0cb4bd0 (diff) |
Fix T53116: default texture coordinates for volume materials are blank.
Differential Revision: https://developer.blender.org/D2935
-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 1e0659d3d67..a8a03607435 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -1131,6 +1131,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; |