What would be the most effective way to track changes in the user mesh-data's? I would like to receive a notification signal if a user mesh data has changed.
I see a few (fast) approaches possible:
- on depsgraph handler: Keeping track of all meshes vertex-count
- on depsgraph handler: Keeping track of all meshes bounding-boxes
- via msgbus: Overseeing if a user is entering edit/sculpt mode, on which mesh
But:
- Keeping track of BB & vertcount wouldn't work if the user is simply moving a vertex within the BB area
- Overseeing edit/sculpt mode could create false positives if the user is just toggling edit mode on/off
Did I miss something obvious? We could gather bmesh information, but I'm afraid this method would be much too slow.
Context: creating a live bridge between blender and a game engine. Extra points if the solutions can also detect changes in mesh attributes