ID 120619 - [RenderOutputUtils] getFlattenedMaterialAttr() wrongly caches return values on a per-location basis

Follow

Problem summary
RenderOutputUtils::getFlattenedMaterialAttr() is supposed to return a "collapsed" material attribute derived from the material attribute at the given location and all of its parents. As well as a location (actually a geometry producer) it takes a list of terminals.

Currently, Katana caches the return value for this function in a global map but use only the location name as the key. This means if the user makes multiple calls for the same location but with different sets of terminals, Katana returns incorrect results.
 
Katana will allow the user to clear the cache, which works around the issue, but have no documentation about this quirky behaviour.

 

Customer reported version
katanaunsure/unknown

 

Workaround
Clearing the cache resolved the issue for the user.

 

Reproduced by support

This bug has been reproduced in:
Katana1.6v3 

Katana2.0v1 

Katana2.0v2

 

Earliest version tested
- This issue appears to be in all versions of the product

 

Expected behaviour
If the user makes multiple calls for the same location but with different sets of terminals, Katana  should provide the correct results.

 

Actual behaviour
Katana caches the return value for this function in a global map but use only the location name as the key

    We're sorry to hear that

    Please tell us why