Blender Git Loki
Git Commits -> Revision a84118b
Revision a84118b by Sergey Sharybin (depsgraph_refactor) December 4, 2014, 12:52 (GMT) |
Depsgraph: Update armatures when leaving edit mode The idea is to have proper operation nodes after editing the armature. This isn't so trivial as it sounds to be, because: - Dependency graph is being built from the pose channels, which means adding/deleting bones are not visible to the depsgraph because those operations doesn't rebuild pose. - Updating pose after every topology change is rather costy and better to be avoid. Currently experimenting with rebuilding dependency graph when leaving edit mode. This way i can work on partial graph rebuild which would be really handy for such relations edits. For now this partial update is rather a place holder and it invokes full dependency graph rebuild. Actual partial rebuild brains would be implemented as one of the next steps. However all this work unleashed rather fundamental questions: - it is already known that dependency graph uses pose channels for building. - Pose channels are being passed to the callback functions as arguments. - One of operation nodes rebuilds the pose when it's missing or when it's tagged for update. - Hrm, ok. Now, what if the pose is tagged for update and some topology changed? This could change some pose channel pointers leading to the bad memory access in the callback. How do we solve this? - A bit easier question: What should operations do if armature is edit mode? Simplest answer would be to copy matricies from bones, skipping pose rebuild, eval init, pose callbacks and eval flush callbacks. |
Commit Details:
Full Hash: a84118b564e7ce8979e074386f565bd2ebe68611
Parent Commit: e57a61c
Lines Changed: +16, -3