usdAbc: do not collapse Alembic geometries into their transform parent if the parent has multiple children #1940
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change(s)
This avoids erroneously collapsing multiple sibling geometries into a single USD prim, forcing one to clobber the others.
The Alembic file used by the unit test contains six (poorly hand/mouse-drawn) curves representing numerical digits. The structure of the file looks like this (as reported by
abcinfo -o
):Prior to this change, the resulting
Curve1
,Curve2
, andCurve3
BasisCurves
prims are all correctly translated and collapsed from their respective AlembicXform
andCurve
nodes through the file format plugin, but theCurves456
BasisCurves
prim would only represent theCurveShape6
curve from Alembic and would have lostCurveShape4
andCurveShape5
from having attempted to merge all three curve nodes into a single transform parent.With this change, a parent with multiple children like this is detected as a case where collapsing cannot be performed, and
Curves456
ends up as anXform
prim instead with threeBasisCurves
children.