Page MenuHome

Fix T80121: Forcefield F-curve modifier changes don't reset cache
ClosedPublic

Authored by Sybren A. Stüvel (sybren) on Sep 28 2020, 3:30 PM.

Details

Summary

Add a dependency graph relation Force Object Animation → Scene Rigid Body World Rebuild. This ensures that the rigid body world is rebuilt when a force object is re-tagged for animation updates.

The extra relation doesn't add any new calculations when the animation is running, as the Time Source node already had a relation to the scene's RIGIDBODY_REBUILD node.

The relation is created directly to the RIGIDBODY_REBUILD Operation. I would have liked to target the containing Component instead. However, that has the RIGIDBODY_SIM operation as entry node, which isn't enough to actually fix T80121.

Diff Detail

Repository
rB Blender
Branch
temp-T80121-force-fcurve-updates (branched from master)
Build Status
Buildable 10440
Build 10440: arc lint + arc unit

Event Timeline

Sybren A. Stüvel (sybren) requested review of this revision.Sep 28 2020, 3:30 PM

I think the fact that RIGIDBODY_SIM is the entry operation is actually a typo.

As discussed here, we might go into more granular checks before adding the relation, but it also have downsides (slower build, etc). For now I think this is a fine solution.

This revision is now accepted and ready to land.Sep 28 2020, 3:45 PM

Already committed on: 48a0c931eea84fb072ce0b958090dda4b27cabff

I would have liked to target the containing Component instead. However, that has the RIGIDBODY_SIM operation as entry node, which isn't enough to actually fix T80121.

Adding any keyframe to a force object (can be "regular" transform keys) will spit out following warning:

add_relation(Animation -> Rigid Body) - Failed, but op_from (ComponentKey(OBForce, ANIMATION)) was ok
add_relation(Animation -> Rigid Body) - Could not find op_to (OperationKey(type: TRANSFORM, component name: '', operation code: RIGIDBODY_REBUILD))

Harmless?