-
Notifications
You must be signed in to change notification settings - Fork 202
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
Conversation
- Move all resource to a Python dictionary. - This allows unregistering resources when unloaded.
a1d86cb
to
068062f
Compare
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.
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.
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.
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': |
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.
Do these occur when reloading the plugin?
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.
The commands were issuing warnings that the up-axis was already Z, I'm just reducing the amount of noise when running the tests.
Use our own version of the function to register string resources to avoid spamming warning about duplicate resources.