maya-usd
maya-usd copied to clipboard
EMSUSD-1091 Save and restore non local edit target layer and anonymous layer
This PR aims to fix issue-3637, the changes include three different but still highly related problems all together, I have split them to cover their own problems and added unit test accordingly:
- 0c28b99ab78ffa99d694c9f6d2df3481d2d292d3:
- Fixes the non local edit target layer issue by extending
stage->GetLayerStack()
to bestage->GetUsedLayers()
to include reference layers and their sub layers which are not visible in local layer stack; - The main code to locate a non local layer when restoring is in
copyTargetLayerToAttribute()
andfindPrimNode()
functions in fileutils/targetLayer.cpp
, it has assumption that: if a non local edit target layer can be constructed by a PrimNode, there must be at least one valid prim path contributes to the final composition, which must be able to find it at the time when reopening, this is the reason the code serializes one reference prim path incopyTargetLayerToAttribute()
function atutils/targetLayer.cpp#L141
, and will need it to reconstruct the edit target ingetEditTargetFromAttribute()
function at line 233. - We use this logic internally in our pipeline and it's been working fine for us for a few years, we haven't had other use cases to verify if this logic is also useful for other studios, that said, it's arguable a generic solution to fix this 'non local edit target layer' issue.
- A unit test
test/lib/mayaUsd/fileio/testNonLocalEditTargetLayer.py
has been provided to demo the typical use case we have.
- Fixes the non local edit target layer issue by extending
- 49d0435937b50c8a810bd7fa6e3a2758f60f4320:
- Fixes the problem where the root layer was anonymous layer
- The unit test testStageAnonymousRootLayerInMaya demo-ed our use case in our pipeline that we usually configure and setup the stage (from a URI or in-memory) somewhere else, then we load the stage into Maya by creating the proxy shape and set the .filePath to visualize the content, this is why we have a root layer path point to an anonymous layer id. This commit 49d0435937b50c8a810bd7fa6e3a2758f60f4320 was trying to correct the .filePath attribute to be the newly created anonymous root layer.
- 06b157df4c14770c805f7e959561c7799d39c454:
- This is kind of related to the anonymous root layer issue but it's a different case to address if edit target layer was an anonymous sub layer
Hi @neilh-adsk @wallworm, let me know if you have any chance to take a look, cheers!
Hi @neilh-adsk @wallworm, let me know if you have any chance to take a look, cheers!
Our team is going to be talking about this early next week.
@csyshing Just to keep you updated. Before proceeding with code review we will creating an internal build and send it to our QA for some testing. Sean
@csyshing Just to keep you updated. Before proceeding with code review we will creating an internal build and send it to our QA for some testing. Sean
@seando-adsk No problem and no rush, happy to discuss if any concerns.
Hi @csyshing, During my testing I found an issue where if I lock or mute one of the layers that is above the non local target and save the file. Maya will lock up causing me to need to end the task for Maya to close it out. Steps to reproduce:
- I am using the file you provided in the issue you logged: https://github.com/Autodesk/maya-usd/issues/3637
- After running the script I open the USD Layer Editor and either Mute or Lock outer_sub_layer.usda
- Save the Maya file.
- Attempt to re-open the Maya file and Maya will just try to load it for a long time until the task just needs to be ended. Would you be able to take a look at this? This doesn't happen when Non-Local edit targets exist. There is a warning "Unresolved edit prim path." and points to the non-local layer. I have attached a video showing the issue.
https://github.com/Autodesk/maya-usd/assets/29235905/1130765f-effa-48c5-b466-fe2052909dbf
Hi @csyshing, During my testing I found an issue where if I lock or mute one of the layers that is above the non local target and save the file. Maya will lock up causing me to need to end the task for Maya to close it out.
Hi @santosd , thanks for the feedback, I will be on leave, so probably won't be able to send update soon, but I will take a look as soon as I can.
On my testing, I also found another issue with the file locks. It seems our current logic for when all layers are locked will bypass this code and take over. CUrrently, our logic deals with situations when all layers are locked, and we target the session layer - if that situation is present, we will force the session layer to be the target, reproducing the original issue.
to reproduce this case:
- run the first part of the script on #3637:
import pxr
from maya import cmds
import mayaUsd.ufe
usdFile = '/path/to/example/root_layer.usda' # See attached zip file
# Prepare the stage
proxyShapeNode = cmds.createNode('mayaUsdProxyShape')
cmds.setAttr(proxyShapeNode + '.filePath', usdFile, type='string')
stage = mayaUsd.ufe.getStage('|world|mayaUsdProxy1|mayaUsdProxyShape1')
prim = stage.GetPrimAtPath("/root/group/sphere/group/sphere")
assert(prim.IsValid())
- Lock all Layers - this should cause the session layer to be targeted, as all layers are locked.
- run the second part of the snippet code:
# Find the pcp node for the prim
primNode = prim.GetPrimIndex().rootNode.children[0].children[0].children[0]
assert(primNode)
# For this particular case, the layer should be the deepest "geo.usda" layer
targetLayer = primNode.layerStack.identifier.rootLayer
assert(targetLayer)
# Verify target layer that it is **not** in stage layer stack
assert(targetLayer not in stage.GetLayerStack())
# Verify current edit target layer is not the target layer
assert(stage.GetEditTarget().GetLayer() != targetLayer)
# Change edit target layer
stage.SetEditTarget(pxr.Usd.EditTarget(targetLayer, primNode))
# Verify edit target layer
assert(stage.GetEditTarget().GetLayer() == targetLayer)
- Save the Maya File
- Reload the file - note that the session layer is now the target, and not the geo layer.
This same behavior will happen if a system lock changes before the maya File is reloaded. which seems to indicate that it's a conflict with our logic on scene load, rather than on file save.
this also seems ot get maya on a state that isn't very stable as i crashed soon after reloading the file.
I was also able to reproduce the crash @santosd mentioned above. other than those instabilities, i haven't ran into any other major issues.
Hi @santosd , I have rebased and fast-forwarded the previous commits:
- https://github.com/Autodesk/maya-usd/pull/3716/commits/7217ea9417aaba6ccca601dedf9cf84017bdb5f4 (was https://github.com/Autodesk/maya-usd/commit/0c28b99ab78ffa99d694c9f6d2df3481d2d292d3): no major changes except aligning the static variable naming (
targetLayerAttrName
->kTargetLayerAttrName
) and namespaces (UsdUfe::
etc.) - https://github.com/Autodesk/maya-usd/pull/3716/commits/06bcdfe3f0ed6d6739071cc206806c4693b06610 (NEW): new commit to fix the crash you mentioned earlier, I moved setting the muting layers to be the last operation, also extended the unit test to cover the cases where edit target layer would be the sub layer of muted layer - unit tests seem to pass fine, but let me know if there is any concern for such changes
- https://github.com/Autodesk/maya-usd/pull/3716/commits/9d9edf0814863e83e4a7aebdad5ba627bd709987 (was https://github.com/Autodesk/maya-usd/commit/49d0435937b50c8a810bd7fa6e3a2758f60f4320): No change
- https://github.com/Autodesk/maya-usd/pull/3716/commits/83f9790a7daa51c5dcb10f20c03ae9420f2a516f (was https://github.com/Autodesk/maya-usd/commit/06b157df4c14770c805f7e959561c7799d39c454): No change
Please have a look and let me know, thanks!
Hi @santosd , I have rebased and fast-forwarded the previous commits:
- 7217ea9 (was 0c28b99): no major changes except aligning the static variable naming (
targetLayerAttrName
->kTargetLayerAttrName
) and namespaces (UsdUfe::
etc.)- 06bcdfe (NEW): new commit to fix the crash you mentioned earlier, I moved setting the muting layers to be the last operation, also extended the unit test to cover the cases where edit target layer would be the sub layer of muted layer - unit tests seem to pass fine, but let me know if there is any concern for such changes
- 9d9edf0 (was 49d0435): No change
- 83f9790 (was 06b157d): No change
Please have a look and let me know, thanks!
Thank you @csyshing I will take a look and let you know. If all is well, we will have our dev's merge the PR. Thank you again for your contribution to the code.
Hello @csyshing, Thank you for making the changes. I have retested my previous workflow and see that the issue is no longer occurring. I did however notice a crash that I am getting when I keep the Maya session open and just do a file new and then attempt to assign the target to the non-local layer. This seems to me like an issue with something that is being kept in memory. I don't think it is something that anyone will hit very frequently, but because it is a crash I think we should fix the issue. Here are steps to reproduce:
- Open a new Maya Scene.
- Run your code from https://github.com/Autodesk/maya-usd/issues/3637 to build the scene.
- Save your file.
- Perform a File > New in Maya.
- Open the file you saved.
- Set the target again running the following command
stage.SetEditTarget(pxr.Usd.EditTarget(targetLayer, primNode))
- Maya Crashes. If I completely close out of Maya, reopen, and then try. I don't get a crash. Which is why I think it has something to do with data stored in memory. If you come to find out that the issue is not on your end, feel free to let me know and I can log something internally.
Other than this issue everything else seems good to me.
Hi @santosd , I tested your latest repro steps, for step 6, I have done the test like this:
# Retrieve the stage from reopened Maya scene
stage = mayaUsd.ufe.getStage('|world|mayaUsdProxy1|mayaUsdProxyShape1')
# Retrieve the target layer and prim node from stage
prim = stage.GetPrimAtPath("/root/group/sphere/group/sphere")
primNode = prim.GetPrimIndex().rootNode.children[0].children[0].children[0]
targetLayer = primNode.layerStack.identifier.rootLayer
# Reset the edit target layer
stage.SetEditTarget(pxr.Usd.EditTarget(targetLayer, primNode))
Maya seems working fine without crash.
Could you elaborate your step 6 to see if I missed anything please? Thanks!
Hi @santosd , if I simply run this line without re-retrieving the stage and layer:
stage.SetEditTarget(pxr.Usd.EditTarget(targetLayer, primNode))
Maya indeed crashes, but I think this is expected since the Python variable stage
, targetLayer
and primNode
have been destroyed in step 4, this is basically the same thing as accessing deleted objects. I don't this is related to my PR.
Let me know if I missed something, thanks!
Hi @santosd , if I simply run this line without re-retrieving the stage and layer:
stage.SetEditTarget(pxr.Usd.EditTarget(targetLayer, primNode))
Maya indeed crashes, but I think this is expected since the Python variable
stage
,targetLayer
andprimNode
have been destroyed in step 4, this is basically the same thing as accessing deleted objects. I don't this is related to my PR.Let me know if I missed something, thanks!
Thank you @csyshing I figured this didn't have to do with your changes. I think we are good to go from the QA side.
@csyshing Unfortunately there was a test failure on Windows using Maya 2022 (both Python 2 and 3) and Windows using Maya 2023.
ERROR: testNonLocalEditTargetLayerInMaya (testNonLocalEditTargetLayer.NonLocalEditTargetLayer)
Test saving and restoring non local edit target layer, dirty layers are saved in Maya.
----------------------------------------------------------------------
Traceback (most recent call last):
File "S:\jenkins\workspace\ECP\ecg-maya-usd\ecg-mayausd-branch-preflight-2023-python3-windows\ecg-maya-usd\maya-usd\test\lib\mayaUsd\fileio\testNonLocalEditTargetLayer.py", line 223, in testNonLocalEditTargetLayerInMaya
self._runTestNonLocalEditTargetLayer(2)
File "S:\jenkins\workspace\ECP\ecg-maya-usd\ecg-mayausd-branch-preflight-2023-python3-windows\ecg-maya-usd\maya-usd\test\lib\mayaUsd\fileio\testNonLocalEditTargetLayer.py", line 128, in _runTestNonLocalEditTargetLayer
mayaUsd.lib.lockLayer(proxyShapePath, subLayer)
Boost.Python.ArgumentError: Python argument types in
mayaUsd.lib._mayaUsd.lockLayer(str, NoneType)
did not match C++ signature:
lockLayer(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >, class pxrInternal_v0_21__pxrReserved__::SdfLayer {lvalue})
======================================================================
ERROR: testNonLocalEditTargetLayerInUSD (testNonLocalEditTargetLayer.NonLocalEditTargetLayer)
Test saving and restoring non local edit target layer, dirty layers are saved in USD.
----------------------------------------------------------------------
Traceback (most recent call last):
File "S:\jenkins\workspace\ECP\ecg-maya-usd\ecg-mayausd-branch-preflight-2023-python3-windows\ecg-maya-usd\maya-usd\test\lib\mayaUsd\fileio\testNonLocalEditTargetLayer.py", line 217, in testNonLocalEditTargetLayerInUSD
self._runTestNonLocalEditTargetLayer(1)
File "S:\jenkins\workspace\ECP\ecg-maya-usd\ecg-mayausd-branch-preflight-2023-python3-windows\ecg-maya-usd\maya-usd\test\lib\mayaUsd\fileio\testNonLocalEditTargetLayer.py", line 128, in _runTestNonLocalEditTargetLayer
mayaUsd.lib.lockLayer(proxyShapePath, subLayer)
Boost.Python.ArgumentError: Python argument types in
mayaUsd.lib._mayaUsd.lockLayer(str, NoneType)
did not match C++ signature:
lockLayer(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >, class pxrInternal_v0_21__pxrReserved__::SdfLayer {lvalue})
Hi @seando-adsk, it's not obvious to me why only the Windows tests failed, but I reorganized the unit tests in https://github.com/Autodesk/maya-usd/pull/3716/commits/17f224417ce2d7c253bda5e64a54074fd32899fc to separate each case to reduce the chance that cases affect each other; and hope to get a better understanding if it still fails.
Hi @seando-adsk , I can see the unit tests still failing on Windows:
Run if grep -i failed transfer/10285552961_4836_result.txt; then exit 1; else exit 0; fi
2022 Windows python2: failed -- /job/ecg-mayausd-branch-preflight-2022-windows/2000
2022 Windows python3: failed -- /job/ecg-mayausd-branch-preflight-2022-python3-windows/1999
2023 Windows python3: failed -- /job/ecg-mayausd-branch-preflight-2023-python3-windows/1999
202[4](https://github.com/Autodesk/maya-usd/actions/runs/10285552961/job/28464127174?pr=3716#step:12:5) Windows python3: failed -- /job/ecg-mayausd-branch-preflight-2024-python3-windows/139[5](https://github.com/Autodesk/maya-usd/actions/runs/10285552961/job/28464127174?pr=3716#step:12:6)
2025 Windows python3: failed -- /job/ecg-mayausd-branch-preflight-2025-python3-windows/476
MayaUsd - Maya 2022 [USD min, Python 2, Interactive] - Branch Preflight (Windows): failed -- /job/ecg-mayausd-branch-preflight-2022-python2-pxrusd-min-interactive-windows/2004
MayaUsd - Maya 202[6](https://github.com/Autodesk/maya-usd/actions/runs/10285552961/job/28464127174?pr=3716#step:12:7) - BETA [USD max, Py 3.11] - Branch Preflight (Windows): failed -- /job/ecg-mayausd-branch-preflight-beta-python3-pxrusd-max-windows/1392
Could you share the log please? I will try again to see if I can figure that out.
The same test testNonLocalEditTargetLayer
is failing on all the Maya builds but only on the Windows platform. Here is the log from the 2024 build:
FAIL: testSaveInMayaMutedLocked (testNonLocalEditTargetLayer.NonLocalEditTargetLayer)
Test preserving non local edit target layer, save dirty layers in Maya, parent of target layer is muted and locked.
----------------------------------------------------------------------
Traceback (most recent call last):
File "...\maya-usd\test\lib\mayaUsd\fileio\testNonLocalEditTargetLayer.py", line 286, in testSaveInMayaMutedLocked
self._runTestMutedLocked(2)
File "...\maya-usd\test\lib\mayaUsd\fileio\testNonLocalEditTargetLayer.py", line 214, in _runTestMutedLocked
proxyShapePath, stage = self._prepareStage(testDir)
File "...\maya-usd\test\lib\mayaUsd\fileio\testNonLocalEditTargetLayer.py", line 80, in _prepareStage
self.assertEqual(targetLayerId, os.path.join(testDir, 'data', 'nested_reference_geo.usda'))
AssertionError: 'w:/build/RelWithDebInfo/test/Temporary/te[102 chars]usda' != 'W:\\build\\RelWithDebInfo\\test\\Temporar[110 chars]usda'
- w:/build/RelWithDebInfo/test/Temporary/testNonLocalEditTargetLayer/NonLocalEditTargetLayerTest_2_MutedLockedr84ju41i/data/nested_reference_geo.usda
? ^ ^ ^ ^ ^ ^ ^ ^ ^
+ W:\build\RelWithDebInfo\test\Temporary\testNonLocalEditTargetLayer\NonLocalEditTargetLayerTest_2_MutedLockedr84ju41i\data\nested_reference_geo.usda
? ^ ^ ^ ^ ^ ^ ^ ^ ^
======================================================================
FAIL: testSaveInMayaMutedUnlocked (testNonLocalEditTargetLayer.NonLocalEditTargetLayer)
Test preserving non local edit target layer, save dirty layers in Maya, parent of target layer is muted and unlocked.
----------------------------------------------------------------------
Traceback (most recent call last):
File "...\maya-usd\test\lib\mayaUsd\fileio\testNonLocalEditTargetLayer.py", line 280, in testSaveInMayaMutedUnlocked
self._runTestMutedUnlocked(2)
File "...\maya-usd\test\lib\mayaUsd\fileio\testNonLocalEditTargetLayer.py", line 187, in _runTestMutedUnlocked
proxyShapePath, stage = self._prepareStage(testDir)
File "...\maya-usd\test\lib\mayaUsd\fileio\testNonLocalEditTargetLayer.py", line 80, in _prepareStage
self.assertEqual(targetLayerId, os.path.join(testDir, 'data', 'nested_reference_geo.usda'))
AssertionError: 'w:/build/RelWithDebInfo/test/Temporary/te[104 chars]usda' != 'W:\\build\\RelWithDebInfo\\test\\Temporar[112 chars]usda'
- w:/build/RelWithDebInfo/test/Temporary/testNonLocalEditTargetLayer/NonLocalEditTargetLayerTest_2_MutedUnlockedpd_wdom4/data/nested_reference_geo.usda
? ^ ^ ^ ^ ^ ^ ^ ^ ^
+ W:\build\RelWithDebInfo\test\Temporary\testNonLocalEditTargetLayer\NonLocalEditTargetLayerTest_2_MutedUnlockedpd_wdom4\data\nested_reference_geo.usda
? ^ ^ ^ ^ ^ ^ ^ ^ ^
======================================================================
FAIL: testSaveInMayaUnmutedLocked (testNonLocalEditTargetLayer.NonLocalEditTargetLayer)
Test preserving non local edit target layer, save dirty layers in Maya, parent of target layer is unmuted and locked.
----------------------------------------------------------------------
Traceback (most recent call last):
File "...\maya-usd\test\lib\mayaUsd\fileio\testNonLocalEditTargetLayer.py", line 274, in testSaveInMayaUnmutedLocked
self._runTestUnmutedLocked(2)
File "...\maya-usd\test\lib\mayaUsd\fileio\testNonLocalEditTargetLayer.py", line 155, in _runTestUnmutedLocked
proxyShapePath, stage = self._prepareStage(testDir)
File "...\maya-usd\test\lib\mayaUsd\fileio\testNonLocalEditTargetLayer.py", line 80, in _prepareStage
self.assertEqual(targetLayerId, os.path.join(testDir, 'data', 'nested_reference_geo.usda'))
AssertionError: 'w:/build/RelWithDebInfo/test/Temporary/te[104 chars]usda' != 'W:\\build\\RelWithDebInfo\\test\\Temporar[112 chars]usda'
- w:/build/RelWithDebInfo/test/Temporary/testNonLocalEditTargetLayer/NonLocalEditTargetLayerTest_2_UnmutedLocked_zsx4d2m/data/nested_reference_geo.usda
? ^ ^ ^ ^ ^ ^ ^ ^ ^
+ W:\build\RelWithDebInfo\test\Temporary\testNonLocalEditTargetLayer\NonLocalEditTargetLayerTest_2_UnmutedLocked_zsx4d2m\data\nested_reference_geo.usda
? ^ ^ ^ ^ ^ ^ ^ ^ ^
======================================================================
FAIL: testSaveInMayaUnmutedUnlocked (testNonLocalEditTargetLayer.NonLocalEditTargetLayer)
Test preserving non local edit target layer, save dirty layers in Maya, parent of target layer is unmuted and unlocked.
----------------------------------------------------------------------
Traceback (most recent call last):
File "...\maya-usd\test\lib\mayaUsd\fileio\testNonLocalEditTargetLayer.py", line 268, in testSaveInMayaUnmutedUnlocked
self._runTestUnmutedUnlocked(2)
File "...\maya-usd\test\lib\mayaUsd\fileio\testNonLocalEditTargetLayer.py", line 128, in _runTestUnmutedUnlocked
proxyShapePath, _ = self._prepareStage(testDir)
File "...\maya-usd\test\lib\mayaUsd\fileio\testNonLocalEditTargetLayer.py", line 80, in _prepareStage
self.assertEqual(targetLayerId, os.path.join(testDir, 'data', 'nested_reference_geo.usda'))
AssertionError: 'w:/build/RelWithDebInfo/test/Temporary/te[106 chars]usda' != 'W:\\build\\RelWithDebInfo\\test\\Temporar[114 chars]usda'
- w:/build/RelWithDebInfo/test/Temporary/testNonLocalEditTargetLayer/NonLocalEditTargetLayerTest_2_UnmutedUnlockedh5mgzr5n/data/nested_reference_geo.usda
? ^ ^ ^ ^ ^ ^ ^ ^ ^
+ W:\build\RelWithDebInfo\test\Temporary\testNonLocalEditTargetLayer\NonLocalEditTargetLayerTest_2_UnmutedUnlockedh5mgzr5n\data\nested_reference_geo.usda
? ^ ^ ^ ^ ^ ^ ^ ^ ^
======================================================================
FAIL: testSaveInUSDMutedLocked (testNonLocalEditTargetLayer.NonLocalEditTargetLayer)
Test preserving non local edit target layer, save dirty layers in USD, parent of target layer is muted and locked.
----------------------------------------------------------------------
Traceback (most recent call last):
File "...\maya-usd\test\lib\mayaUsd\fileio\testNonLocalEditTargetLayer.py", line 262, in testSaveInUSDMutedLocked
self._runTestMutedLocked(1)
File "...\maya-usd\test\lib\mayaUsd\fileio\testNonLocalEditTargetLayer.py", line 214, in _runTestMutedLocked
proxyShapePath, stage = self._prepareStage(testDir)
File "...\maya-usd\test\lib\mayaUsd\fileio\testNonLocalEditTargetLayer.py", line 80, in _prepareStage
self.assertEqual(targetLayerId, os.path.join(testDir, 'data', 'nested_reference_geo.usda'))
AssertionError: 'w:/build/RelWithDebInfo/test/Temporary/te[102 chars]usda' != 'W:\\build\\RelWithDebInfo\\test\\Temporar[110 chars]usda'
- w:/build/RelWithDebInfo/test/Temporary/testNonLocalEditTargetLayer/NonLocalEditTargetLayerTest_1_MutedLocked0rgq8qcs/data/nested_reference_geo.usda
? ^ ^ ^ ^ ^ ^ ^ ^ ^
+ W:\build\RelWithDebInfo\test\Temporary\testNonLocalEditTargetLayer\NonLocalEditTargetLayerTest_1_MutedLocked0rgq8qcs\data\nested_reference_geo.usda
? ^ ^ ^ ^ ^ ^ ^ ^ ^
======================================================================
FAIL: testSaveInUSDMutedUnlocked (testNonLocalEditTargetLayer.NonLocalEditTargetLayer)
Test preserving non local edit target layer, save dirty layers in USD, parent of target layer is muted and unlocked.
----------------------------------------------------------------------
Traceback (most recent call last):
File "...\maya-usd\test\lib\mayaUsd\fileio\testNonLocalEditTargetLayer.py", line 256, in testSaveInUSDMutedUnlocked
self._runTestMutedUnlocked(1)
File "...\maya-usd\test\lib\mayaUsd\fileio\testNonLocalEditTargetLayer.py", line 187, in _runTestMutedUnlocked
proxyShapePath, stage = self._prepareStage(testDir)
File "...\maya-usd\test\lib\mayaUsd\fileio\testNonLocalEditTargetLayer.py", line 80, in _prepareStage
self.assertEqual(targetLayerId, os.path.join(testDir, 'data', 'nested_reference_geo.usda'))
AssertionError: 'w:/build/RelWithDebInfo/test/Temporary/te[104 chars]usda' != 'W:\\build\\RelWithDebInfo\\test\\Temporar[112 chars]usda'
- w:/build/RelWithDebInfo/test/Temporary/testNonLocalEditTargetLayer/NonLocalEditTargetLayerTest_1_MutedUnlockedqnxw7065/data/nested_reference_geo.usda
? ^ ^ ^ ^ ^ ^ ^ ^ ^
+ W:\build\RelWithDebInfo\test\Temporary\testNonLocalEditTargetLayer\NonLocalEditTargetLayerTest_1_MutedUnlockedqnxw7065\data\nested_reference_geo.usda
? ^ ^ ^ ^ ^ ^ ^ ^ ^
======================================================================
FAIL: testSaveInUSDUnmutedLocked (testNonLocalEditTargetLayer.NonLocalEditTargetLayer)
Test preserving non local edit target layer, save dirty layers in USD, parent of target layer is unmuted and locked.
----------------------------------------------------------------------
Traceback (most recent call last):
File "...\maya-usd\test\lib\mayaUsd\fileio\testNonLocalEditTargetLayer.py", line 250, in testSaveInUSDUnmutedLocked
self._runTestUnmutedLocked(1)
File "...\maya-usd\test\lib\mayaUsd\fileio\testNonLocalEditTargetLayer.py", line 155, in _runTestUnmutedLocked
proxyShapePath, stage = self._prepareStage(testDir)
File "...\maya-usd\test\lib\mayaUsd\fileio\testNonLocalEditTargetLayer.py", line 80, in _prepareStage
self.assertEqual(targetLayerId, os.path.join(testDir, 'data', 'nested_reference_geo.usda'))
AssertionError: 'w:/build/RelWithDebInfo/test/Temporary/te[104 chars]usda' != 'W:\\build\\RelWithDebInfo\\test\\Temporar[112 chars]usda'
- w:/build/RelWithDebInfo/test/Temporary/testNonLocalEditTargetLayer/NonLocalEditTargetLayerTest_1_UnmutedLockedy16u6uwu/data/nested_reference_geo.usda
? ^ ^ ^ ^ ^ ^ ^ ^ ^
+ W:\build\RelWithDebInfo\test\Temporary\testNonLocalEditTargetLayer\NonLocalEditTargetLayerTest_1_UnmutedLockedy16u6uwu\data\nested_reference_geo.usda
? ^ ^ ^ ^ ^ ^ ^ ^ ^
======================================================================
FAIL: testSaveInUSDUnmutedUnlocked (testNonLocalEditTargetLayer.NonLocalEditTargetLayer)
Test preserving non local edit target layer, save dirty layers in USD, parent of target layer is unmuted and unlocked.
----------------------------------------------------------------------
Traceback (most recent call last):
File "...\maya-usd\test\lib\mayaUsd\fileio\testNonLocalEditTargetLayer.py", line 244, in testSaveInUSDUnmutedUnlocked
self._runTestUnmutedUnlocked(1)
File "...\maya-usd\test\lib\mayaUsd\fileio\testNonLocalEditTargetLayer.py", line 128, in _runTestUnmutedUnlocked
proxyShapePath, _ = self._prepareStage(testDir)
File "...\maya-usd\test\lib\mayaUsd\fileio\testNonLocalEditTargetLayer.py", line 80, in _prepareStage
self.assertEqual(targetLayerId, os.path.join(testDir, 'data', 'nested_reference_geo.usda'))
AssertionError: 'w:/build/RelWithDebInfo/test/Temporary/te[106 chars]usda' != 'W:\\build\\RelWithDebInfo\\test\\Temporar[114 chars]usda'
- w:/build/RelWithDebInfo/test/Temporary/testNonLocalEditTargetLayer/NonLocalEditTargetLayerTest_1_UnmutedUnlockedzmmqeaet/data/nested_reference_geo.usda
? ^ ^ ^ ^ ^ ^ ^ ^ ^
+ W:\build\RelWithDebInfo\test\Temporary\testNonLocalEditTargetLayer\NonLocalEditTargetLayerTest_1_UnmutedUnlockedzmmqeaet\data\nested_reference_geo.usda
? ^ ^ ^ ^ ^ ^ ^ ^ ^
Seems like a file path issue, on Windows they use backslash and the assertion uses forward slashes.
Hi @seando-adsk @pierrebai-adsk , I have pushed another commit https://github.com/Autodesk/maya-usd/pull/3716/commits/8715e6333eaae3e806532d335813b7575c7e2830 attempting to fix the path comparison problem, could you rerun the test again please? Sorry for the inconvenience, I don't have a Windows box to test locally.
@csyshing It failed on Windows again. I can ask one of our internal devs with a Windows machine to get your branch and run the test locally to fix the error.
Thanks @seando-adsk ! Let me know if there is anything else besides Windows path style. I have requested my studio to setup a Windows dev machine but very likely need to take some time.
@csyshing I made a new PR with the fixes for the unit test here: https://github.com/Autodesk/maya-usd/pull/3904 If you have not modified your branch, you could close this PR and we will use mine instead.
@pierrebai-adsk , no, I have not modified my branch, thanks a lot for fixing the unit tests!