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-103421 - UFE selecting certain USD objects will throw errors #381

Merged

Conversation

seando-adsk
Copy link
Collaborator

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

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
@seando-adsk
Copy link
Collaborator Author

@robthebloke Rob, would you have time to review this?

lib/ufe/UsdAttribute.cpp Show resolved Hide resolved
lib/ufe/UsdAttribute.h Show resolved Hide resolved
@kxl-adsk kxl-adsk added ufe-usd Related to UFE-USD plugin in Maya-Usd workflows Related to in-context workflows labels Mar 25, 2020
…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());
Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link

@kxl-adsk kxl-adsk Mar 26, 2020

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.

@kxl-adsk kxl-adsk merged commit ec85ed3 into dev Mar 27, 2020
@kxl-adsk kxl-adsk deleted the donnels/103421/use_current_time_when_getting_attribute_value branch March 27, 2020 16:48
ppt-adsk pushed a commit that referenced this pull request May 30, 2023
* HYDRA-266: replace pre-removal with removal

* HYDRA-266: replace variable name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ufe-usd Related to UFE-USD plugin in Maya-Usd workflows Related to in-context workflows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants