-
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-104401 Add/Clear Reference menu op's #503
Conversation
string $result[] = `fileDialog2 | ||
-fileMode 1 | ||
-caption "Add Reference to USD Prim" | ||
-fileFilter "USD Files (*.usd *.usda *.usdc);;*.usd;;*.usda;;*.usdc"`; |
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.
It's my understanding that .usdz should not be in the list of files that can be referenced, so just adding the other three here..
{} | ||
|
||
void undo() override { | ||
|
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.
Not currently providing an Undo for clearing all references.
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 it because it's technically difficult, or because you're waiting for design to think about it? Perhaps we should add a separate JIRA entry for this one, so that it doesn't fall through the cracks.
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.
Bit of both actually. The request here was for something pretty basic, really just enough to get started with testing how the final design should look/work. If I'd seen a really obvious way of dealing with it then I would have added it, but it doesn't look like there is a straight forward get'er for the complete list of references to be stored (and then put back as part of Undo).
SelectUSDFileForAddReference(); | ||
)"; | ||
|
||
const char* clearAllReferencesConfirmScript = R"( |
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.
For the file dialog to choose a reference and a confirm box when clearing I'm just adding a quick and dirty MEL script as a string. Design has been thinking about what are final design should look like, but this should be good enough to start iterating with them on it.
{} | ||
|
||
void undo() override { | ||
|
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 it because it's technically difficult, or because you're waiting for design to think about it? Perhaps we should add a separate JIRA entry for this one, so that it doesn't fall through the cracks.
Once we get ClearAllReferences undo implemented, it would be good to add an automated test for this code. |
lib/mayaUsd/ufe/UsdContextOps.cpp
Outdated
UsdPrim fPrim; | ||
SdfReference fSdfRef; | ||
const std::string fFilePath; |
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.
All new code should use coding standard, member variables should have _
Added "Add Reference" and "Clear All References" menu items to the Outliner popup menu for UFE objects. This is just a quick initial implementation, a separate Issue will be logged by Design to cover a more complete/advanced workflow.