Open rr4e opened 4 years ago
This is wrong: https://github.com/NatronGitHub/Natron/blob/8f2cf8f5dea9c385aedacac2e9f124967631e736/Gui/DopeSheetView.cpp#L1941
It's taking the frame range of the input, (fmin,fmax), and then asking ReTime which frames from the input are used to produce fmin and fmax on output. So if the speed is 2, these will be fmin and fmin+(fmax-fmin)/2.
Getting the frame range of a retime node is a bit more complicated that it looks (especially because of the time warp curve), I'll try to make a fix.
Proposed solution:
_speed->integrate(srcRange.min, time) > srcRange.max
in DopeSheetView, make no special case for the retime node: getTimeDomain() should be used
unfortunately,
Proposed solution:
- add an "average speed" parameter to retime, which cannot be animated, and is only used to compute the timedomain. "average speed" should have the same value as "speed" in a simple setup.
- add an "update average speed" button, which has to loop on output frame numbers starting from srcRange.min, and compute the required input frame (by integrating speed), until it goes out of the source range:
_speed->integrate(srcRange.min, time) > srcRange.max
- remove the (unused) "duration" parameter from retime which is not used in Natron
- let getTimeDomain() use the new "average speed" parameter to compute the time domain.
in DopeSheetView, make no special case for the retime node: getTimeDomain() should be used
unfortunately,
super cool!