Fix: USD import: set active mesh color. #105925

Merged
Bastien Montagne merged 1 commits from makowalski/blender:usd_import_set_active_color-v3.5 into blender-v3.5-release 2023-03-20 17:06:13 +01:00

1 Commits

Author SHA1 Message Date
Michael Kowalski e9db83a7b0 USD import fix: set active mesh color.
buildbot/v350-code-daily-coordinator Build done. Details
Fixed a bug where the active color wasn't being set
on imported meshes, resulting in no colors displaying
in the viewport.

This bug has been in the code for a long time. However,
the colors have been displaying correctly until recently,
so this issue wasn't previously apparent.

Also, changed custom color data name from "displayColors"
to "displayColor", to match the actual USD primvar name.
(This was a typo in the original code.)

Note that pull request

#104542

addresses other issues in the color import code (e.g.,
converting all color primvars and not just "displayColor",
avoiding hard-coding of attribute names, handling all
iterpolation types, etc.).

However, the current commit is meant as a short term fix
to a regression, where the "displayColor" attribute does
not render in the viewport at all, until the above pull
can be merged.
2023-03-20 16:50:59 +01:00