Skip to content

Fix for ignored primvars:crypto_asset#2711

Open
cpichard wants to merge 4 commits into
Autodesk:fix-7.5.3from
cpichard:issue_2699
Open

Fix for ignored primvars:crypto_asset#2711
cpichard wants to merge 4 commits into
Autodesk:fix-7.5.3from
cpichard:issue_2699

Conversation

@cpichard

@cpichard cpichard commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Changes proposed in this pull request
Issue: primvars:crypto_asset (and similarly resolved inherited primvars) was being ignored when an asset was added through an instanceable reference, causing the Cryptomatte asset AOV to come out empty.

Root cause: The primvar is authored as a constant value on a parent Xform and inherited down to the geometry. When resolved through an instanceable reference, it arrived at the shape as a single-element uniform (per-element) array rather than a true constant value. Arnold declared this as a size-1 uniform array, but then tried to index it per-face, producing an out-of-range error (index N of 1) and silently failing to apply the value.

Fix (libs/common/parameters_utils.cpp): DeclareAndAssignParameter now treats any single-element array as constant user data, unless it's explicitly a "constant array" scope (scope == constantArray). Previously it only did this for scope == constant or the special-cased displayColor attribute — so uniform/varying/indexed single-element arrays fell through and got declared as arrays, which Arnold couldn't index correctly. Now a single value correctly applies to the whole shape regardless of interpolation scope.

Test: testsuite/test_2699 sets up an instanceable reference with an inherited primvars:crypto_asset, and asserts on the render log (no out-of-range/failed-lookup errors) rather than pixel values, since Cryptomatte hashes differ across reading paths.

I tested it with HTOA + nuke cryptomatte.

Issues fixed in this pull request
Fixes #2699

@cpichard cpichard marked this pull request as ready for review July 10, 2026 16:21
@cpichard

Copy link
Copy Markdown
Collaborator Author

✅ CI passed (build 11).

@cpichard cpichard changed the base branch from master to fix-7.5.3 July 13, 2026 17:08
@autodesk-chorus

Copy link
Copy Markdown

Chorus detected one or more security issues with this pull request. See the Checks tab for more details.

As a reminder, please follow the secure code review process as part of the Secure Coding Trust Commitment requirement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

primvars:crypto_asset is ignored on instanceable references

1 participant