Fix T53116: default texture coordinates for volume materials are blank.
Differential Revision: https://developer.blender.org/D2935
This commit is contained in:
parent
0f841e24b0
commit
576899b90a
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue