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

UsdMayaAdaptor::RegisterTypedSchemaConversion is lacking a way to overwrite the exiting registration. #3490

Open
NickWu opened this issue Dec 1, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@NickWu
Copy link

NickWu commented Dec 1, 2023

Hi, we have been using an internal feature to maya-usd to allow us to overwrite the default camera prim writer, but recently we wanted to try the new prim writer override feature #3189 to register our internal ALCamera prim writer so that we can remove our internal patch. After trying, I found we could register our ALCamera prim writer successfully with the new UsdMayaPrimWriterRegistry::Register function to overwrite the existing default camera registration, but I found I couldn't register my custom prim writer to UsdMayaAdaptor via UsdMayaAdaptor::RegisterTypedSchemaConversion, like many default prim writers do: https://github.com/search?q=repo%3AAutodesk%2Fmaya-usd%20PXRUSDMAYA_REGISTER_ADAPTOR_SCHEMA&type=code.

I found this is because UsdMayaAdaptor::RegisterTypedSchemaConversion doesn't support overriding existing registration (in our internal path, we have updated it to support overriding). The function description says "re-registering the same Maya type again will overwrite the previous registration.", but it's not true.

Describe the solution you'd like
I'd like UsdMayaAdaptor::RegisterTypedSchemaConversion to be updated to support overwriting so that we can use it along with the new UsdMayaPrimWriterRegistry::Register to take full advantage of custom prim writers.

@NickWu NickWu added the enhancement New feature or request label Dec 1, 2023
@wallworm
Copy link
Collaborator

wallworm commented Dec 1, 2023

Thanks for bringing this up. I'll bring it up with the devs.

@github-project-automation github-project-automation bot moved this to Needs triage in maya-usd Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Needs triage
Development

No branches or pull requests

2 participants