Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetSessionLayerForVariantSelections takes full path, not model name #161

Conversation

pmolodo
Copy link
Contributor

@pmolodo pmolodo commented Feb 8, 2017

This makes the variant-selections cache key more accurate, as the variants are tied to a particular prim-path, not a root name.

This necessitated some other changes - for instance, pxrUsdReferenceAssembly.inStageDataCached is now affected by .primPath. Also, it allowed us to eliminate a double-setting of variants that was (potentially) occuring in usdReadJob::doIt

Description of Change(s)

The current args to GetSessionLayerForVariantSelections seemed to make it re-used cached session layers inappropriately in some cases (as well as set variant overrides incorrectly), as the variant selections often do NOT apply to a root-level prim. This fixes this by making it take a full SdfPath as the arg to build the key (and apply the variant overs).

Included Commit(s)

Fixes Issue(s)

  • None filed

@pmolodo pmolodo force-pushed the GetSessionLayerForVariantSelections_SdfPath branch from 187718e to 5f71e5f Compare April 7, 2017 18:18
@pmolodo
Copy link
Contributor Author

pmolodo commented Apr 7, 2017

I rebased / collapsed our changes, and pushed a fresh / clean copy. Look here for the full history:

https://github.com/LumaPictures/USD/commits/tg/simple_features/GetSessionLayerForVariantSelections_SdfPath

@pmolodo pmolodo force-pushed the GetSessionLayerForVariantSelections_SdfPath branch from 5f71e5f to 059d794 Compare April 26, 2017 22:13
@pmolodo pmolodo force-pushed the GetSessionLayerForVariantSelections_SdfPath branch from 059d794 to 318372e Compare May 4, 2017 21:53
@pmolodo
Copy link
Contributor Author

pmolodo commented May 4, 2017

Updated with version which fixes a test failure

formerly failed testUsdReferenceAssemblyChangeRepresentations - did not error if no explicit primPath given, and the usd has no default prim defined

@jtran56
Copy link

jtran56 commented Jun 2, 2017

Filed as internal issue #147129.

…odel name

This makes the variant-selections cache key more accurate, as the variants are tied to a particular prim-path, not a root name.

This necessitated some other changes - for instance, pxrUsdReferenceAssembly.inStageDataCached is now affected by .primPath.  Also, it allowed us to eliminate a double-setting of variants that was (potentially) occuring in usdReadJob::doIt
@pmolodo pmolodo force-pushed the GetSessionLayerForVariantSelections_SdfPath branch from 318372e to fa414d4 Compare April 10, 2018 18:29
@pmolodo
Copy link
Contributor Author

pmolodo commented Apr 10, 2018

Pushed a refreshed version of this PR for posterity, but going to just close this PR, due to the fact that, after discussing with Spiff, it seems unlikely to be merged, and because we no longer use this method ourselves.

Ideally would like to revisit this at some point, and refactor along lines Spiff suggested, to make it take a vector of SdfPaths + var selections, similar to katana's wrapper, but then, ideally I'd ride a dragon to work every day...

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.

2 participants