-
Notifications
You must be signed in to change notification settings - Fork 214
Integrate the component manager #4386
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
Conversation
| bool isAdskUsdComponent(const std::string& proxyShapePath) | ||
| { | ||
| MString defineIsComponentCmd; | ||
| defineIsComponentCmd.format( |
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 for now, but I think we should eventually refactor all those Python functions into a "helper" sub-module of usd_component_creator and avoid redefining and reparsing these functions all the time. (Merged with Anthon's)
pierrebai-adsk
left a comment
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.
Just a few minor improvements.
…t_show_more_preview' into deboisj/comp_mgr # Conflicts: # lib/usd/ui/layerEditor/layerTreeModel.cpp
| } | ||
| } | ||
|
|
||
| std::string previewSaveAdskUsdComponent( |
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.
Code moved from what Anton merged. I just changed double quotes to quotes in the inlined python
| const auto result = MayaUsd::ComponentUtils::previewSaveAdskUsdComponent( | ||
| saveLocation, componentName, _proxyShapePath.c_str()); | ||
|
|
||
| QString jsonStr = QString::fromStdString(result); |
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.
No changes starting here.
| " stage = mayaUsd.ufe.getStage(\"^1s\")\n" | ||
| " if stage is None:\n" | ||
| " return \"\"\n" | ||
| " ids = MayaComponentManager.GetInstance().GetSaveInfo(stage)\n" |
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.
can this fail? if so maybe we need to add validation on the evaluation and reporting that error occured.
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.
(answer offline) the only thing that can fail is if the CC isnt present or the path isnt a component path - but this function documents expecting a valid component path - and this is made sure of before calling into this one. So any such error would be reported from "above"
Special handling of Save() and the overwrite prompt when dealin with Adsk USD Components.