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

[MAYA-121636] As artists, we would like to be able to parent prims underneath 'scopes' #2085

Closed
paulbaa opened this issue Feb 10, 2022 · 7 comments
Assignees
Labels
bug Something isn't working reproduced Issue has been reproduced requires maya This issue requires changes in Maya

Comments

@paulbaa
Copy link

paulbaa commented Feb 10, 2022

Currently, we are not able to parent existing prims underneath Usd-scopes in Maya. This is desired behaviour, so we can author our existing scenography with scopes at any point. Creating new prims underneath a scope works.

Open Maya 2022.3
Create a new empty USD stage
Create a scope
Create a (sibling) xform
parent the xform underneath the scope, either by middle-mouse drag, 'P' or edit >parent
ERROR: 'Object ... does not support parenting and therefore cannot be a parent.'

As per the conversation with @kxl-adsk

The culprit, on our end, is that the scope prim is not transformable. The new child would like to have the parent transform (probably to position itself correctly in world space) and because the scope has no 3D transform, it refuses to be parented under it. The default for the Maya parent command is parent -absolute, which preserves the world space position of objects by changing their local transformation (parent -relative preserves the local transform). Since a scope doesn't have a 3D transform, we error out.

@paulbaa paulbaa added the bug Something isn't working label Feb 10, 2022
@kxl-adsk kxl-adsk changed the title As artists, we would like to be able to parent prims underneath 'scopes' [MAYA-121636] As artists, we would like to be able to parent prims underneath 'scopes' Feb 10, 2022
@womanyoyoyo-adsk womanyoyoyo-adsk added the reproduced Issue has been reproduced label Feb 10, 2022
@ppt-adsk
Copy link
Collaborator

Hi @paulbaa, we are working on this issue, and have a question for you. What do you expect the behavior to be if we call parent -absolute (the default) on a USD child hierarchy that has a scope as its root? The scope transform cannot be changed. Two possibilities are:

  1. Simply add the child hierarchy to its new parent, and don't worry about fixing up the child hierarchy world space position. This would be the equivalent of parent -relative.
  2. Traverse the child hierarchy looking for prims that are transformable, and transform the highest-level prims we find in the hierarchy.

Option (2) is the most correct, but also the most complex to code and test, and has potential scalability problems for large child hierarchies. Therefore, we're wondering if it's a real use case, and the simpler option (1) would be a fine practical solution. Wouldn't you simply author a child hierarchy with a transform at its root if you wanted its world space position to be maintained by parent -absolute, rather than have a scope at the root of the child hierarchy? Thanks for any info!

@paulbaa
Copy link
Author

paulbaa commented Aug 23, 2022

Apologies for the late reply with holidays, Siggraph and thanks for looking into this.

I'd agree with 1) - in most/all cases our assets need to have a transform as it's root, to be positioned, parented etc. I could imagine if a scope is the root, you'd just get a warning saying 'root of asset is a scope and can't be transformed. Parenting relative'

I also think this has the benefit of staying explicit, i.e. you don't get a possibly arbitrary transform down the child's hierarchy.

@ppt-adsk
Copy link
Collaborator

Hi @paulbaa, thanks a lot for the answer. This matches my expectation. We will discuss this internally to make sure we all agree, and we'll get back to you.

@tanant
Copy link
Contributor

tanant commented Aug 24, 2022

Heya @paulbaa - doing a quick roundup from an internal discussion, one thing to pull out is a warning message - if a user does the parenting -absolute of a non-transformable prim, then we'd look to change the hierarchy, not move it in space, and transparently do it as a -relative.

Because this might create geo moving in space for a user who has absolute parenting set up we should display a warning, except that the warning only really should go up when the local space transform is non-identity. Does this sound like the main scenario where you'd want from a UI (or TD) perspective to know about it?

There was some wondering about what happens if the tree of objects being reparented is all non transformable as well, but i think that's enough of an edge case it's not something to worry about initially while prototyping.

@paulbaa
Copy link
Author

paulbaa commented Jan 24, 2023

Thanks Anthony - picking this up again, your example makes sense to me.
Did you get any further with your prototypes?

@santosg87
Copy link
Collaborator

this should be fixed with the latest builds of MayaUSD.

Note that the work here required changes in the Maya code, so this will only be usable on the latest version of Maya.

marking it as closed for now. if this is still an issue feel free to re-open or log a new issue. :)

@santosg87 santosg87 added the requires maya This issue requires changes in Maya label Mar 30, 2023
@dj-mcg
Copy link
Collaborator

dj-mcg commented Nov 20, 2023

This appears to be working for us in 2023.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working reproduced Issue has been reproduced requires maya This issue requires changes in Maya
Projects
Status: Done
Development

No branches or pull requests

6 participants