Files
test2/source
Michael Kowalski 109c1b92cd Fix #105621: USD export: incorrect texture alpha mapping
Fixed bug where texture alpha was incorrectly remapped to red when exporting material shaders.

Now connecting the UsdPreviewSurface 'opacity' input to the UsdUVTexture 'a' output if the Blender texture image node source socket identifier is 'Alpha'.

Changes include the following:

The InputSpec::source_name struct member was removed, as the connection source name is now determined at runtime based on the Blender node input socket identifier.

The traverse_channel() utility function now returns a bNodeLink*, so that the source socket identifier can be queried from the link.

In create_usd_preview_surface_materia(), the code for creating and connecting a UsdUVTexture shader was reorganized to group it within one conditional block, to make it easier to follow.  Also replaced a call to a deprecated version of UsdShadeInput::ConnectToSource().

Pull Request: https://projects.blender.org/blender/blender/pulls/107022
2023-05-03 16:12:52 +02:00
..