Skip to content

Commit 1ad2055

Browse files
[usdUtil] issue warning instead of error for ComputAllDependencies
1 parent 0faa3a4 commit 1ad2055

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

pxr/usd/usdUtils/dependencies.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ struct UsdUtils_ComputeAllDependenciesClient
131131
if (dependencyLayer) {
132132
layers.insert(dependencyLayer);
133133
} else {
134-
TF_RUNTIME_ERROR("Failed to open dependency layer: %s (%s)", dependency.c_str(), anchoredPath.c_str());
134+
TF_WARN("Failed to open dependency layer: %s (%s)", dependency.c_str(), anchoredPath.c_str());
135135
}
136136
}
137137
else {

pxr/usd/usdUtils/testenv/testUsdUtilsDependencies.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,13 +301,16 @@ def test_ComputeAllDependenciesInvalidPayload(self):
301301
def TestDirPath(path):
302302
return os.path.normcase(
303303
os.path.abspath(os.path.join(testDir, path)))
304-
304+
305305
testDir = "computeAllDependenciesInvalidPayload"
306306
stagePath = "root.usda"
307307

308-
with self.assertRaises(Tf.ErrorException):
309-
layers, assets, unresolved = \
310-
UsdUtils.ComputeAllDependencies(TestDirPath(stagePath))
308+
layers, references, unresolved = UsdUtils.ComputeAllDependencies(TestDirPath(stagePath))
309+
self.assertEqual(len(layers), 1)
310+
self.assertEqual(layers[0].identifier, TestDirPath(stagePath))
311+
self.assertEqual(len(references), 0)
312+
self.assertEqual(len(unresolved), 0)
313+
311314

312315
if __name__=="__main__":
313316
unittest.main()

0 commit comments

Comments
 (0)