Hello,
This is a problem I’ve already solved in the past, but the fix in the past seemed like a dumb fix, so I’m looking for smarter fixes. The problem is that when you make a custom property. make it animatable, give it an updater, and then animate it, the updater does not fire on frame change.
My solution in the past was to loop over all the properties with a frame_change_pre handler firing them all manually. To prevent an absurd amount of needless processing, I did a
if obj.custom_property != obj.custom_property_checker: # don't fire updater if no change
obj.custom_property = obj.custom_property # fire the updater
obj.custom_property_checker = obj.custom_property # store the new value
Now, I’ve experimented with trying to find all changes in the depsgraph updates, but it didn’t seem like the despgraph updates were including stuff changed by f-curves. Goal is to reduce wasted processing time. Ideally there is a place that stores all the stuff that is actually changed so that I don’t have to loop over hundreds and hundreds of properties looking for stuff that changed.
Is there a better way? I found this post on I guess it’s the blender.org forum, which seemed to indicate it’s a non-fixed issue, at least as of 2020.
Also, side question, is there any way at all to append custom code to the updaters for built in properties like x_location/y_location/z_updaters or is that pure wishful thinking? I’m using despgraph stuff for that now, but any way to reduce processing time is strongly desired.