Open ntamas opened 1 year ago
Finding all occurrences of constraints.remove
in our codebase gives us all locations where we ever remove a constraint. We should cater for the removals of stale F-curves near these places, but when we are deleting many constraints in a loop, it's best to leave the cleanup to after the end of the loop.
While investigating one of the Blender project files sent to us in private, I've found several F-curves in the animation data of drones where the target data path of the F-curve does not exist any more. I think this happens when formations are removed from the project after the user has already created transitions from them.
The easiest way to detect these stale F-curves (which appear with a red outline in the Dope Sheet) is with scripting. Assume that
drone
is a drone object:These should be cleaned up regularly. We should probably also filter in data paths whose name matches
/constraints["Skybrush.Entry.*"].influence/
to avoid deleting something that we did not create ourselves.