call BKE_scene_frame_set to remove duplication of frame setting logic
tiny refactor to reduce the occurence of if (next)
Details
Diff Detail
- Repository
- rB Blender
Event Timeline
| source/blender/editors/screen/screen_ops.c | ||
|---|---|---|
| 2954 | It's because if the delta is -1 as in jumping 1f to the left, it would actually do more than that, because the subframe is always zeroed. So 1.5 would jump to 0 because "1.5 -1 = 0.5" then 0.5 -> 0.0 | |
This patch seems to be partially a refactor (duplicating some code to simplify each if (next) branch) and partially a bugfix (adjusting delta += 1). Or is the former change actually changing the behaviour, requiring the other change to become non-functional again?
the code at the bottom I needed to change because I had to split
if (scene->r.cfra != (int)ak->cfra)
into
if (cfra > ak->cfra)
and
if (cfra < ak->cfra)
so in order to keep it readable I moved if (next) out
That is clear -- I meant that this bit:
if (delta < 0 && scene->r.subframe > 0) { delta += 1; }
seems to be a functional change (fixing an actual problem), whereas the other change is non-functional (fixing a code clarity issue but keeping its functionality the same).