Page MenuHome

Issue T53116 resolved
ClosedPublic

Authored by José Luis Oliveira Cunha (JoseCunha) on Nov 29 2017, 2:02 PM.

Details

Summary

The error:
If the material is of type "Volume", then when creating a new texture, the type of texture coordinates is blank. Adding a texture to any empty slot of a volume material does not automatically set Coordinates in Texture Mapping panel to Generated.

Resolving the problem:
Blender, by default, sets the texture’s “Coordinates” attribute to “UV”. However, the “Volume” type material doesn’t support the “UV” option so if this texture is assigned to this material, “Coordinates” would always be blank. To resolve this problem we change the texture.c file (in the directory blender/source/blender/blendkernel/intern/texture.c).
Thus, in the function void set_current_material_texture(Material *ma, Tex *newtex) if we are in a case of an active node with material ma, if that material is of type “Volume” (type MA_TYPE_VOLUME) we change the texture coordinates of the material (ma->mtex[act]->texco) to “Generated” (TEXCO_ORCO).

Diff Detail

Repository
rB Blender

Event Timeline

Looks good to me, thanks!

For future reference, it's better to set a more specific project like "Rendering" as reviewers.

This revision is now accepted and ready to land.Nov 29 2017, 7:27 PM
This revision was automatically updated to reflect the committed changes.