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

EMSUSD-243 load reference and payload without default prim #3190

Merged
merged 3 commits into from
Jul 5, 2023

Conversation

pierrebai-adsk
Copy link
Collaborator

  • Refactor add reference and add payload commands into a common base class.
  • (The code were almost similar and now have even more in common.)
  • Add validation of the ref or payload targeted prim to catch common errors.
  • For example, the targeted prim must have the same type as the referencing prim.
  • For example: an xform inside an xform, a mesh inside a mesh.
  • Target the first valid root prim when no explicit prim were given and there is no default prim.
  • Add warnings for common errors to help the user know what went wrong.
  • Add a unit test for files without default prim.

@pierrebai-adsk pierrebai-adsk added do-not-merge-yet Development is not finished, PR not ready for merge adsk Related to Autodesk plugin labels Jun 30, 2023
Base automatically changed from bailp/MAYA-129538/move-context-commands-to-usdufe to dev July 4, 2023 15:40
@pierrebai-adsk pierrebai-adsk removed the do-not-merge-yet Development is not finished, PR not ready for merge label Jul 4, 2023
- Refactor add reference and add payload commands into a common base class.
- (The code were almost similar and now have even more in common.)
- Add validation of the ref or payload targeted prim to catch common errors.
- For example, the targeted prim must have the same type as the referencing prim.
- For example: an xform inside an xform, a mesh inside a mesh.
- Target the first valid root prim when no explicit prim were given and there is no default prim.
- Add warnings for common errors to help the user know what went wrong.
- Add a unit test for files without default prim.
// If no prim path were specified and we are referencing a MaterialX file
// then use the MaterialX prim as the target for the reference.
//
// TODO: should we force this even when the referenced file has a default prim?
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code that this refactor was already doing this. It was added as part of the LookDevX effort. We can revisit (that is remove) this once we have a UI to specify the prim we want to load.

- First we print a status message that there is no default prim and that we wwill use the first valid prim.
- Afterwards, if no valid root prim is found, we print a warning about why we could not find a valid root prim.
@pierrebai-adsk pierrebai-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Jul 5, 2023
@seando-adsk seando-adsk added ufe-usd Related to UFE-USD plugin in Maya-Usd and removed adsk Related to Autodesk plugin labels Jul 5, 2023
@seando-adsk seando-adsk merged commit fd98bae into dev Jul 5, 2023
12 checks passed
@seando-adsk seando-adsk deleted the bailp/EMSUSD-243/ref-without-default-prim branch July 5, 2023 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge Development process is finished, PR is ready for merge ufe-usd Related to UFE-USD plugin in Maya-Usd
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants