USD Import: Incorrect merge of untyped prims.
Fixed bug where prims with undefined types were incorrectly merged with parent xforms on import. In some cases, this was causing root xforms to be lost and prevented unit scale from being applied. As an example, a scene with a single untyped prim parented to the top level World xform would result in the World and untyped prim being merged into a single Blender object representing only the untyped prim. Moreover, the UsdXformReader logic for identifying root transform objects would fail in this case and no scene scale would be applied to the imported hierarchy.
This commit is contained in:
parent
d742007c8e
commit
82964294a5
|
@ -194,9 +194,11 @@ bool USDStageReader::merge_with_parent(USDPrimReader *reader) const
|
|||
return false;
|
||||
}
|
||||
|
||||
/* Don't merge Xform and Scope prims. */
|
||||
/* Don't merge Xform, Scope or undefined prims. */
|
||||
if (xform_reader->prim().IsA<pxr::UsdGeomXform>() ||
|
||||
xform_reader->prim().IsA<pxr::UsdGeomScope>()) {
|
||||
xform_reader->prim().IsA<pxr::UsdGeomScope>() ||
|
||||
xform_reader->prim().GetPrimTypeInfo()
|
||||
== pxr::UsdPrimTypeInfo::GetEmptyPrimType()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue