BGE: Fix concern about rBd979ac4cc996, update animations at each logic frame to avoid shapekey actions playback errors.
Needs ReviewPublic

Authored by Quentin Wenger (Matpi) on Nov 25 2017, 11:35 PM.

Details

Summary

The commit rBd979ac4cc996 created a bug where shapekey actions are interpolated differently than other actions (see the concern on the commit page for more info and .blend example).
This fixes it by reinserting a round of animations update at each logical frame, as is needed and was wrongly removed in the commit mentioned above.

Diff Detail

Repository
rB Blender
Branch
master
Build Status
Buildable 1025
Build 1025: arc lint + arc unit
Quentin Wenger (Matpi) edited the summary of this revision. (Show Details)Nov 25 2017, 11:38 PM
Campbell Barton (campbellbarton) added inline comments.
source/gameengine/Ketsji/KX_KetsjiEngine.cpp
722–725

Any reason adding this block back no longer checks GetRestrictAnimationFPS() as the original code did?

  • Fix animations in restricted FPS animation mode.

@Campbell Barton (campbellbarton) When creating this patch, I looked at the UpdateAnimations method introduced with rBd979ac4cc996 and saw that the check for restricted FPS mode is included there. So I assumed it would not be necessary to have it again, now that we called UpdateAnimations(scene) instead of scene->UpdateAnimations(m_frameTime) in the loop.

However, after your comment I tested the patch with the Restricted mode on, and realized that it does not work in that case.

The updated version fixes this - in the loop we are back again with the simple scene->UpdateAnimations call and the restricted FPS check, and I re-added a call outside of the loop. It does work now in both modes and the example files provided in the bug reports patched in rBd979ac4cc996 do work, too.