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

EMSUSD-1504 prevent warnings when reloading the plugin #3959

Merged
merged 3 commits into from
Oct 17, 2024

Conversation

pierrebai-adsk
Copy link
Collaborator

Use our own version of the function to register string resources to avoid spamming warning about duplicate resources.

@pierrebai-adsk pierrebai-adsk self-assigned this Oct 11, 2024
- Move all resource to a Python dictionary.
- This allows unregistering resources when unloaded.
@pierrebai-adsk pierrebai-adsk force-pushed the bailp/EMSUSD-1504/reload-plugin-warnings branch from a1d86cb to 068062f Compare October 11, 2024 18:21
@pierrebai-adsk pierrebai-adsk added the enhancement New feature or request label Oct 11, 2024
@pierrebai-adsk pierrebai-adsk added ready-for-merge Development process is finished, PR is ready for merge and removed ready-for-merge Development process is finished, PR is ready for merge labels Oct 15, 2024
Copy link
Collaborator

@seando-adsk seando-adsk left a comment

Choose a reason for hiding this comment

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

How do the existing MEL files that call getMayaUsdLibString work now? You've deleted the MEL file mayaUsdLibRegisterStrings.mel that contained this proc. I think those scripts will error now.

@pierrebai-adsk
Copy link
Collaborator Author

Yes, that is a mistake. I must not have opened a window that depended on them when testing. I fill revert that part.

The MEl version of localized strings for MayaUSdLib was lost. It is only used in the "Add Maya Reference" dialog and was not noticed during testing.
@pierrebai-adsk
Copy link
Collaborator Author

The reason I missed it is that they are only used in a single dialog: Add Maya Reference. Added them back and tested that window. Now it works again.

Also, reduce spam in one test due to trying to set-up up-axis when alredy the same axis.
@@ -50,9 +50,11 @@ def setUp(self):
"""Clear the scene and setup the Maya preferences."""
cmds.file(f=True, new=True)
# Make sure up-axis is Z.
cmds.upAxis(axis='z')
if cmds.upAxis(query=True, axis=True).lower() != 'z':
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do these occur when reloading the plugin?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The commands were issuing warnings that the up-axis was already Z, I'm just reducing the amount of noise when running the tests.

@pierrebai-adsk pierrebai-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Oct 16, 2024
@seando-adsk seando-adsk removed the enhancement New feature or request label Oct 17, 2024
@seando-adsk seando-adsk added the adsk Related to Autodesk plugin label Oct 17, 2024
@seando-adsk seando-adsk merged commit 3e504e7 into dev Oct 17, 2024
11 checks passed
@seando-adsk seando-adsk deleted the bailp/EMSUSD-1504/reload-plugin-warnings branch October 17, 2024 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adsk Related to Autodesk plugin ready-for-merge Development process is finished, PR is ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants