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

Pr/remove calls to configure resolver for asset under ar2 #1530

Conversation

dj-mcg
Copy link
Collaborator

@dj-mcg dj-mcg commented Jun 29, 2021

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.

dj-mcg added 2 commits June 28, 2021 17:55
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.
#include <system_error>

namespace {
std::string generateUniqueName()

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?

Copy link
Collaborator Author

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

Copy link

@kxl-adsk kxl-adsk left a 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.

@kxl-adsk kxl-adsk requested a review from fabal June 30, 2021 17:11
Copy link
Contributor

@fabal fabal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dj-mcg 👍

@kxl-adsk kxl-adsk merged commit fc168b9 into Autodesk:dev Jul 7, 2021
@dj-mcg dj-mcg deleted the pr/Remove_calls_to_ConfigureResolverForAsset_under_AR2 branch July 9, 2021 19:10
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.

4 participants