Blender Git Loki
Git Commits -> Revision 98a0bcd
Revision 98a0bcd by Sybren A. Stüvel (master) June 28, 2018, 12:20 (GMT) |
Prevent copying too much in the Rigid Body simulation To prevent the pointcache from being copied-on-write too (and requiring copying back), the cache is now shared between the original and evaluated scenes. Reading from the cache is always allowed; running the sim and writing to the cache is only allowed when the depsgraph is active. Some pointers have moved from RigidBodyWorld (RBO) to RigidBodyWorldShared (RBOS). writefile.c copies some pointers back from RBOS to RBO so that the file can still be opened on older Blenders without crashing on a segfault. The RigidBodyWorldShared struct is written to the blend file, because it refers to the PointCache ID block. The RigidObjectShared struct is runtime-only, and thus not saved to the blend file. An RNA getter-function is used to hide the new 'shared' pointer. As a result the Python API hasn't changed. Reviewed by: campbellbarton Differential Revision: https://developer.blender.org/D3508 |
Commit Details:
Full Hash: 98a0bcd4252e952fa5438e9d1b69b0204f8a8746
Parent Commit: 9b050b7
Lines Changed: +284, -203
11 Modified Paths:
/source/blender/blenkernel/BKE_rigidbody.h (+2, -2) (Diff)
/source/blender/blenkernel/intern/object.c (+1, -1) (Diff)
/source/blender/blenkernel/intern/pointcache.c (+5, -5) (Diff)
/source/blender/blenkernel/intern/rigidbody.c (+141, -129) (Diff)
/source/blender/blenkernel/intern/scene.c (+1, -2) (Diff)
/source/blender/blenloader/intern/readfile.c (+30, -17) (Diff)
/source/blender/blenloader/intern/versioning_280.c (+29, -0) (Diff)
/source/blender/blenloader/intern/writefile.c (+6, -1) (Diff)
/source/blender/editors/physics/rigidbody_world.c (+3, -4) (Diff)
/source/blender/makesdna/DNA_rigidbody_types.h (+27, -10) (Diff)
/source/blender/makesrna/intern/rna_rigidbody.c (+39, -32) (Diff)
/source/blender/blenkernel/intern/object.c (+1, -1) (Diff)
/source/blender/blenkernel/intern/pointcache.c (+5, -5) (Diff)
/source/blender/blenkernel/intern/rigidbody.c (+141, -129) (Diff)
/source/blender/blenkernel/intern/scene.c (+1, -2) (Diff)
/source/blender/blenloader/intern/readfile.c (+30, -17) (Diff)
/source/blender/blenloader/intern/versioning_280.c (+29, -0) (Diff)
/source/blender/blenloader/intern/writefile.c (+6, -1) (Diff)
/source/blender/editors/physics/rigidbody_world.c (+3, -4) (Diff)
/source/blender/makesdna/DNA_rigidbody_types.h (+27, -10) (Diff)
/source/blender/makesrna/intern/rna_rigidbody.c (+39, -32) (Diff)