-
Notifications
You must be signed in to change notification settings - Fork 201
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
mayaUSD export results in incorrectly determined UV set names due to Maya bug #1079
Comments
Hi, just bumping this because we continue to wonder if we should work around this in the Maya-USD exporter for now; could we get confirmation on this issue and if/when it might be addressed within Maya itself, or if this is expected behaviour for reasons I'm not aware of? Thanks! |
In this case, you have to be explicit about the full path to the shape. Here is the code that will work as expected with your example
I'm guessing what happens here is that Maya will find the transform and the shape. Then for each of them, we do an attribute query and receive an array of results. You may wonder why transform returned a value - it has to do with the fact that when we pick something in the viewport, we select transform and not the shape. |
@ysiewappl did the above solve your issue? |
Hi; I'm not actually 100% I understand the reasoning for why a transform should return a value when queried for a non-existent ( |
Describe the bug
Hi:
There is an issue we're running into where if a Maya scene has a mesh shape that is named exactly the same as its parent transform, Maya interprets it as a string array attribute rather than a single string.
There also doesn't seem to be any way to "fix" this through OpenMaya or the GUI.
This is a problem, because mayaUsd (and many things regardless) expect the UV set name to be a basic string attribute, not a string array.
From
maya-usd/lib/mayaUsd/fileio/shading/shadingModeExporterContext.cpp:468
:Steps to reproduce
An example maya scene is provided below that demonstrates this issue. If you rename the mesh node to any other name other than the transform name and query the attribute again, you'll get the expected
map1
string instead of an array of strings.Expected behavior
The attribute type should remain as a string attribute.
Attachments
Please see the embedded Maya sample scene above.
Specs (if applicable):
Additional context
We could certainly update mayaUsd to account for this odd behaviour and parse the plug's value properly for export, but I'd like to ask if this is actually intended, since Maya generally doesn't allow for node class attributes to suddenly change attribute types between different nodes.
Thanks.
The text was updated successfully, but these errors were encountered: