-
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-127404 sub-layers relative to their parent #2885
Conversation
pierrebai-adsk
commented
Feb 16, 2023
- Handle making the root layer relative to the scene when converting anonymous layers.
- Added a helper class to change the current directory temporarily.
- Added getLayerFileDir helper to get the directory containing a given layer.
- Added getPathRelativeToLayerFile helper to make a path relative to a layer.
- Added prepareLayerSaveUILayer helper to prepare the UI to save layers in case the paths need to be relative.
- AddedrequireUsdPathsRelativeToParentLayer helper to verify if paths should be relative to a parent layer.
- Updated saveAnonymousLayer helper function to handle saving sub-layers relative to their parent.
- Added a parentLayer function to the LayerTreeItem to retrieve the parent layer, if any.
- Added support to save layer relative to their parent in the LayerTreeItem::saveAnonymousLayer function.
- Changed the saveLayerUI interface function to take the parent layer, so that sub-layer can be made relative to their parent if needed.
- Changed SaveLayersDialog::saveLayerFilePathUI to accept the parent layer and passing it to the UI.
- Updated SaveLayerPathRow::onOpenBrowser to handle saving sub-layers relative to the parent.
- Added MEL script code for the UI to support saving sub-layer relative to their parent layer.
- Added Python usdSubLayerFileRelative class to implement the save layer UI for saving sub-layers relative to their parent.
- Updated context menu to use the new functions.
- Replace the sub-layer in its parent using multiple possible identifiers.
- Make sure to use the desired file path form (absolute or relative) when replacing the sub-layer in its parent.
- Temporarily modify the current directory when initially loading the sub-layer.
- Handle making the root layer relative to the scene when converting anonymous layers. - Added a helper class to change the current directory temporarily. - Added getLayerFileDir helper to get the directory containing a given layer. - Added getPathRelativeToLayerFile helper to make a path relative to a layer. - Added prepareLayerSaveUILayer helper to prepare the UI to save layers in case the paths need to be relative. - AddedrequireUsdPathsRelativeToParentLayer helper to verify if paths should be relative to a parent layer. - Updated saveAnonymousLayer helper function to handle saving sub-layers relative to their parent. - Added a parentLayer function to the LayerTreeItem to retrieve the parent layer, if any. - Added support to save layer relative to their parent in the LayerTreeItem::saveAnonymousLayer function. - Changed the saveLayerUI interface function to take the parent layer, so that sub-layer can be made relative to their parent if needed. - Changed SaveLayersDialog::saveLayerFilePathUI to accept the parent layer and passing it to the UI. - Updated SaveLayerPathRow::onOpenBrowser to handle saving sub-layers relative to the parent. - Added MEL script code for the UI to support saving sub-layer relative to their parent layer. - Added Python usdSubLayerFileRelative class to implement the save layer UI for saving sub-layers relative to their parent. - Updated context menu to use the new functions. - Replace the sub-layer in its parent using multiple possible identifiers. - Make sure to use the desired file path form (absolute or relative) when replacing the sub-layer in its parent. - Temporarily modify the current directory when initially loading the sub-layer.
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.
Looks good
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.
Sorry it took me so long to review this. You'll need some changes since I've merged in my relative preview fields.
Co-authored-by: Sean Donnelly <23455376+seando-adsk@users.noreply.github.com>
Co-authored-by: Sean Donnelly <23455376+seando-adsk@users.noreply.github.com>
@seando-adsk I believe I made all requested changes. |