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:
authorCampbell Barton <ideasman42@gmail.com>2017-11-30 10:30:41 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-11-30 10:30:41 +0300
commit03a5eccc945497da3cffafdf050c17fb4ccf999c (patch)
treeb451841a8bb0e614184de8a530322f4e45736b51 /source/blender/blenkernel
parent84d39ab97bba5d4885a062363c8b3f3d28cb7da7 (diff)
parent28d2148b09a2d975876f4418bd5ba15ab5edea8d (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/texture.c4
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;