Skip to content
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

Patch usddiff for USDZ containing crate layers #3438

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions pxr/usd/bin/usddiff/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -370,3 +370,18 @@ pxr_register_test(testDiffToolIterateUsdz4
PRE_PATH
${CMAKE_INSTALL_PREFIX}/bin
)

pxr_install_test_dir(
SRC testenv/testDiffToolIterateUsdz
DEST testDiffToolIterateUsdz5
)

pxr_register_test(testDiffToolIterateUsdz5
PYTHON
COMMAND "${CMAKE_INSTALL_PREFIX}/bin/usddiff a_crate.usdz b_crate.usdz"
EXPECTED_RETURN_CODE 1
STDOUT_REDIRECT iterate_usd_crate.txt
DIFF_COMPARE iterate_usd_crate.txt
PRE_PATH
${CMAKE_INSTALL_PREFIX}/bin
)
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,27 @@ Differences in a.usdz[basic.usda] and b.usdz[basic.usda]:
@@ -13 +13 @@
- float[] primvars:displayOpacity = [0.4]
+ float[] primvars:displayOpacity = [0.8]
@@ -50,0 +51 @@
+ add references = @./cone2.usda@
@@ -53,10 +54 @@
- def Xform "geom" {
- def Cone "cone1"
@@ -45,0 +46 @@
+ add references = @./cone2.usda@
@@ -48,11 +48,0 @@
- def Xform "geom"
- {
- def Cone "cone1"
- {
- double height = 4.0
- double height = 4
- float[] primvars:displayOpacity = [0.4]
- double3 xformOp:translate = (0.0, 0.0, 3.0)
- double3 xformOp:rotateXYZ = (45.0, 0.0, 0.0)
- double3 xformOp:rotateXYZ = (45, 0, 0)
- double3 xformOp:translate = (0, 0, 3)
- uniform token[] xformOpOrder = ["xformOp:rotateXYZ", "xformOp:translate"]
- }
- }
+
@@ -76 +67,0 @@
- asset baseline = @./baseline.txt@
@@ -69 +58,0 @@
- asset baseline = @./baseline.txt@
Differences in a.usdz[sphere.usdz[sphere.usda]] and b.usdz[sphere.usdz[sphere.usda]]:
@@ -9 +9 @@
- double radius = 1.0
+ double radius = 2.0
@@ -11 +11 @@
- double3 xformOp:translate = (-5.0, 0.0, 0.0)
+ double3 xformOp:translate = (-6.0, 0.0, 0.0)
@@ -9,2 +9,2 @@
- double radius = 1
- double3 xformOp:translate = (-5, 0, 0)
+ double radius = 2
+ double3 xformOp:translate = (-6, 0, 0)
Only in baseline: a.usdz[baseline.txt].
Not in baseline: b.usdz[cone2.usda].
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Differences in a_crate.usdz[basic.usdc] and b_crate.usdz[basic.usdc]:
@@ -13 +13 @@
- float[] primvars:displayOpacity = [0.4]
+ float[] primvars:displayOpacity = [0.8]
@@ -45,0 +46 @@
+ add references = @./cone2.usda@
@@ -48,11 +48,0 @@
- def Xform "geom"
- {
- def Cone "cone1"
- {
- double height = 4
- float[] primvars:displayOpacity = [0.4]
- double3 xformOp:rotateXYZ = (45, 0, 0)
- double3 xformOp:translate = (0, 0, 3)
- uniform token[] xformOpOrder = ["xformOp:rotateXYZ", "xformOp:translate"]
- }
- }
@@ -69 +58,0 @@
- asset baseline = @./baseline.txt@
Differences in a_crate.usdz[sphere.usdz[sphere.usda]] and b_crate.usdz[sphere.usdz[sphere.usda]]:
@@ -9,2 +9,2 @@
- double radius = 1
- double3 xformOp:translate = (-5, 0, 0)
+ double radius = 2
+ double3 xformOp:translate = (-6, 0, 0)
Only in baseline: a_crate.usdz[baseline.txt].
Not in baseline: b_crate.usdz[cone2.usda].
9 changes: 2 additions & 7 deletions pxr/usd/bin/usddiff/usddiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,13 +323,8 @@ def _diffUsdz(base, comp, brief, baseStack, compStack):

#run a traditional diff
else:
_, diffCmd, diffCmdArgs = _findDiffTools()

diffResult |= _launchDiffTool(diffCmd,
diffCmdArgs,
tempBaseline.name,
tempComparison.name,
brief)
diffResult |= _runDiff(tempBaseline.name, tempComparison.name,
flatten=False, noeffect=True, brief=brief)

for b in baseOnly:
print('Only in baseline: %s.' % _getArchivePath(baseStack, b))
Expand Down