-
Notifications
You must be signed in to change notification settings - Fork 203
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
Pr/remove calls to configure resolver for asset under ar2 #1530
Pr/remove calls to configure resolver for asset under ar2 #1530
Conversation
This method has been deprecated and is being removed for Ar 2.0. Among other reasons, the resolver is a global resource and a method for configuring it for a single asset is misleading since the resolver may be used by many different assets at the same time. If a resolver has asset-specific resolution behaviors, they should be encoded in the resolver context created via ArResolver::CreateDefaultContextForAsset. The AL_USDMaya plugin had previously subverted this function to configure its resolver by passing in an arbitrary string to ConfigureResolverForAsset. This has been removed as part of this change, but this could be replaced in the future with ArResolver::CreateContextFromString, which allow a resolver to create a resolver context from an arbitrary string and was introduced in Ar 2.0.
lib/mayaUsd/utils/utilFileSystem.cpp
Outdated
#include <system_error> | ||
|
||
namespace { | ||
std::string generateUniqueName() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dj-mcg How this change is related to AR 2.0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep - good catch - an internal patched change snuck in with my push. I'll be pushing a new version momentarily
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see this matches changes to https://github.com/PixarAnimationStudios/USD/blob/dev/pxr/usdImaging/usdviewq/__init__.py#L308. No concerns from my side but I will let @fabal review changes to AL proxy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dj-mcg 👍
This method has been deprecated and is being removed for Ar 2.0.
Among other reasons, the resolver is a global resource and a
method for configuring it for a single asset is misleading
since the resolver may be used by many different assets at
the same time. If a resolver has asset-specific resolution
behaviors, they should be encoded in the resolver context
created via ArResolver::CreateDefaultContextForAsset.
The AL_USDMaya plugin had previously subverted this function
to configure its resolver by passing in an arbitrary string
to ConfigureResolverForAsset. This has been removed as
part of this change, but this could be replaced in the
future with ArResolver::CreateContextFromString, which
allow a resolver to create a resolver context from an
arbitrary string and was introduced in Ar 2.0.