Ability to register a prim to not be exported
- Dominant language
- Wolfram Language
- Stars
- 905
- Forks
- 223
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 17
Description
**Is your feature request related to a problem? Please describe.**
This came out of an attempt to use the schema api adaptors for `PxrMeshLight`. Instead of `PxrMeshLight` resulting in a new prim in usd, we instead just author it as an applied API on the mesh itself. We'd like to prevent the usd exporter from creating a prim for it because it interferes with the "merge shape and transform" logic.
If we follow the example in:
https://github.com/Autodesk/maya-usd/blob/dev/test/lib/usd/plugin/bulletAdaptor.cpp#L416
We still end up with a node, which breaks this case:
```
|SomeMesh # transform
|SomeMeshShape # mesh
| PxrMeshLight # transform
| PxrMeshLightShape # PxrMeshLight
```
The `|SomeMesh|PxrMeshLight|PxrMeshLightShape` would end up still being exported at `/SomeMesh/PxrMeshLight` which would mess up the `mergeTransformAndShape` logic. With the `Primless` registry, we're able to tell the writer to completely ignore the prim, which allows `|SomeMesh` and `|SomeMesh|SomeMeshShape` to be merged into just `/SomeMesh`.
**Describe the solution you'd like**
Part of https://github.com/Autodesk/maya-usd/pull/2557 was adding a new `Primless` registry. This told the exporter to not create a node which allowed the merge logic to behave as expected.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with test/lib/usd/plugin/bulletAdaptor.cpp around the referenced example and review the Primless registry work from pull request 2557. Trace how the USD exporter handles the registered prim and verify that the PxrMeshLight path produces no exported prim, allowing the parent mesh and shape to merge as described.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100