Fix #109887: Adding driver from python might crash #109895

Merged
Sergey Sharybin merged 1 commits from Sergey/blender:fix_109887 into main 2023-07-10 10:11:52 +02:00

1 Commits

Author SHA1 Message Date
22e42adf6e Fix #109887: Adding driver from python might crash
Originally was noticed when adding drivers to a rigid body., but
it could potentially happen with any configuration.

The reason for the crash was that the ID which was modified was
not tagged as such.

Modifying drivers from the interface are likely tagging for updates
from the operator. This change makes it so the python function also
does tagging.

It is not really how one would design the system nowadays, but it
is how the Blender historically handles such cases. A bigger refactor
is possible to move tags to the places where modification actually
happens, but it seems to be a better idea to tackle it as a separate
project which will be considered no-functional-changes.
2023-07-10 09:40:07 +02:00