-
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
MAYA-107239 - Proxy Shape AE template cleanup #922
MAYA-107239 - Proxy Shape AE template cleanup #922
Conversation
…e AE template * First pass at cleaning up the Proxy Shape AE template.
editorTemplate -addControl "visibility"; | ||
editorTemplate -label (uiRes("m_AEdagNodeCommon.kLODVisibility")) -addControl "lodVisibility"; |
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.
Current Maya has a label for "Visibility" as well, but that tag doesn't exist in Maya 2020.
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.
Any reason why you bother reusing a string defined in Maya at all? Everything else is kind of hard-coded and in English only, but a couple of them will come from Maya and possibly be in another language. It should work, and the odds of Maya changing (or moving the location of) one of those strings is pretty small, but just wondering why you're even bothering.
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.
Because the proxy shape is a Maya node, so I figured we should try and support the localization as much as possible.
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.
And this "Object Display" section is available on every Maya node.
editorTemplate -suppress "ghostRangeStart"; | ||
editorTemplate -suppress "ghostRangeEnd"; |
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.
Some of these (including these two) are from Maya 2020 (either removed or renamed). If an attribute doesn't exist the suppress/addControl will silently return.
@fowlertADSK First pass at cleanup of the MayaUsd proxy shape AE template. Basically removing a bunch of sections (by suppressing all the attributes). I no longer derive from the shape template, but instead fully define one here. It works in both Maya 2020 and current PR. |
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.
uiRes calls are ok, but I did leave a question about why you're bothering with them.
Also, double check that those strings are available even if this template is the very first thing the AE displays.
Other than that, looks good.
// include/call base class/node attributes | ||
AEsurfaceShapeTemplate $nodeName; | ||
// Object Display (from AEdagNodeCommon.mel): | ||
editorTemplate -beginLayout (uiRes("m_AEshapeTemplate.kObjectDisplay")); |
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.
Is the uiRes call going to fail if AEdagNodeCommon.mel hasn't been sourced yet? You were calling AEsurfaceShapeTemplate before (which calls a bunch of other base Templates). Almost anything would end calling it, but if the AE is not being shown on startup and the first time it's shown we have a USD node selected...will it spit out an error?
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 tried your steps just to be sure. But even at startup the AE is empty and if I just create an empty stage that is the first object to be displayed in the AE.
uiRes is just a MEL proc that actually sources the correct xxx.res.mel file. It doesn't need AEdagNodeCommon.mel.
editorTemplate -addControl "visibility"; | ||
editorTemplate -label (uiRes("m_AEdagNodeCommon.kLODVisibility")) -addControl "lodVisibility"; |
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.
Any reason why you bother reusing a string defined in Maya at all? Everything else is kind of hard-coded and in English only, but a couple of them will come from Maya and possibly be in another language. It should work, and the odds of Maya changing (or moving the location of) one of those strings is pretty small, but just wondering why you're even bothering.
@kxl-adsk This change is just a single MEL file that is only copied to the install folder. There is nothing to build, so a preflight is not needed. Please merge when you're ready. |
MAYA-107239 - Don't show attributes that aren't supported in the Stage AE template