-
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
MAYA-103421 - UFE selecting certain USD objects will throw errors #381
MAYA-103421 - UFE selecting certain USD objects will throw errors #381
Conversation
If attribute has no time samples, the Get will automatically fallback to default time. MAYA-103421 - UFE selecting certain USD objects will throw errors on the outliner and script editor MAYA-103266 - USD Materials Erroring with USD attribute does not match created attribute class type
@robthebloke Rob, would you have time to review this? |
…the outliner and script editor MAYA-103266 - USD Materials Erroring with USD attribute does not match created attribute class type Fix for Mac (compiler error)
// Attributes with time samples will fail when calling Get with default time code. | ||
// So we'll always use the current time when calling Get. If there are no time | ||
// samples, it will fall-back to the default time code. | ||
return MayaUsd::ufe::getTime(item->path()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way I approached this was to query the time via a virtual call to MayaUsdProxyShapeBase. The reason is that in the AL proxy shape, we compute the time value via the following equation:
outTime = timeOffset + timeScalar * time;
This was primarily to allow artists a bit more control over cache playback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: these are the attributes that define our time value:
https://github.com/Autodesk/maya-usd/blob/dev/plugin/al/lib/AL_USDMaya/AL/usdmaya/nodes/ProxyShape.h#L283
and this is where we compute the time:
https://github.com/Autodesk/maya-usd/blob/dev/plugin/al/lib/AL_USDMaya/AL/usdmaya/nodes/ProxyShape.cpp#L1476
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@robthebloke please check the method we are having in utilities https://github.com/Autodesk/maya-usd/blob/dev/lib/ufe/Utils.cpp#L264. This method will call your version of getTime and time will be computed (for AL proxy) based on the equation you have mentioned.
* HYDRA-266: replace pre-removal with removal * HYDRA-266: replace variable name
Modified all the attribute Get calls to use current time.
If attribute has no time samples, the Get will automatically fallback to default time.
MAYA-103421 - UFE selecting certain USD objects will throw errors on the outliner and script editor
MAYA-103266 - USD Materials Erroring with USD attribute does not match created attribute class type