-
Notifications
You must be signed in to change notification settings - Fork 202
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
ufe.PathString.path returns incorrect path if given path starts with |world #3822
Comments
You should not create a ufe scene item directly by using the constructor. The problem here is that it won't create the derived class which is a Maya scene item. Instead you should always use the Hierarchy.createItem() method.
Sean |
I think my example was not clear - I created the test scene like so: cmds.createNode('transform', 'world')
cmds.createNode('transform', 'foo', parent='world')
cmds.createNode('transform', 'bar' parent='bar') The example in your comment only works if |
Ah sorry I missed from your example. Maya Ufe paths must unconditionally have "world" added as a prefix, regardless of whether they start with "world" or not. This is because in Maya the root node is called "world".
Sean |
So if you have a literal DAG node in Maya named '|world', you need to prepend the root |
Unfortunately that is correct. We have a bug logged for that already: In Maya every DAG node is parented to a node called "world". That node is implicit and hidden and Maya knows about it so that is why you don't need to specify it. In Ufe when dealing with Maya paths we are Sean |
Understood. I will forward this to our VFX supes and let them decide if we want to rename the root prim in out scenes. Thank you. |
Just a note here, that this fix would require changes on the maya side, so a new version of maya would be needed in order to see the fix. |
Going to go ahead and close this one for now, @ika-rporter if anything else comes up, let use know and we can reopened the issue or feel free to log a new issue if it is a different topic. |
Describe the bug
The
ufe.PathString.path
function returns incorrect path if the given path starts with|world
Steps to reproduce
|world|foo|bar
bar
ufe.SceneItem
with the path.We can work around this by remembering to prepend
|world
to all of our DAG paths it's just ... annoying. Worst case, we change the name of our scene root to something other thanworld
.Expected behavior
The
ufe.PathString.path
function should return the correct pathSpecs (if applicable):
The text was updated successfully, but these errors were encountered: