You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-open in usdview : great it works!
-in usdview, File>Save Flattened As, create a new usd file : anim_clips_flat.usd
-open in usdview : reverse timings have disappeared !
What I have found
It seems that the problem come from here.
I can have it working by modifying this part to this:
for (InternalTime t: timeSamplesInClip) {
for (size_t i = 0; i < times.size() - 1; ++i) {
const TimeMapping& m1 = times[i];
const TimeMapping& m2 = times[i+1];
// Ignore time mappings whose external time domain does not
// intersect the times at which this clip is active.
InternalTime minTime =
(m1.internalTime <= m2.internalTime) ?
m1.internalTime : m2.internalTime;
InternalTime maxTime =
(m1.internalTime <= m2.internalTime) ?
m2.internalTime : m1.internalTime;
const GfInterval mappingInterval(minTime, maxTime);
if (!mappingInterval.Intersects(clipTimeInterval)) {
continue;
}
if (minTime <= t && t <= maxTime) {
if (minTime == maxTime) {
timeSamples.insert(m1.externalTime);
timeSamples.insert(m2.externalTime);
}
else {
timeSamples.insert(_TranslateTimeToExternal(t, m1, m2));
}
}
}
}
I just send my Contributor License Agreement and will make a pull request when granted, if this make sense of course.
The text was updated successfully, but these errors were encountered:
Hi @benmalartre, thank you for filing this issue! We had noticed this internally as well and just fixed it as part of a packet of work around value clips. The fix should be pushed up to the dev branch soon and will be included in the next USD release. I'm going to leave this issue open until then.
Reverse Timings in clips are ignored when calling UsdStage.Flatten()
Steps to reproduce:
-reference an animated usd file (ex: Maneki USD Animated Model) and author a loop with forward and reverse timing in a anim_clips.usda:
-open in usdview : great it works!
-in usdview, File>Save Flattened As, create a new usd file : anim_clips_flat.usd
-open in usdview : reverse timings have disappeared !
What I have found
It seems that the problem come from here.
I can have it working by modifying this part to this:
I just send my Contributor License Agreement and will make a pull request when granted, if this make sense of course.
The text was updated successfully, but these errors were encountered: