Bugfix [#29629] UV animation stops working forever if Edit mode entered

Thanks Sergey for the patch!

This bug, and many like it would arise because at some point a F-Curve would get
detected as being unable to be resolved (when trying to display its name in an
Animation Editor), so gets tagged as being "disabled". It was assumed that such
channels usually belonged to deleted data or stuff that wouldn't be able to be
resolved again for a long time. However, in cases like UV settings, they may
only be unavailable temporarily.

As a compromise, this patch clears this disabled flag if a channel is found to
be now working when (in the process of finding out its name when redrawing an
Animation Editor) it can be resolved, in the same place where the disabling was
taking place. This doesn't work fullproof in tests I've done, but should be
nicer than before.
This commit is contained in:
Joshua Leung 2012-01-03 02:11:11 +00:00
parent 84437bb5e9
commit 8983d68fd8

@ -161,6 +161,11 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
* use the struct's icon if it is set
*/
icon= RNA_struct_ui_icon(ptr.type);
/* valid path - remove the invalid tag since we now know how to use it saving
* users manual effort to reenable using "Revive Disabled FCurves" [#29629]
*/
fcu->flag &= ~FCURVE_DISABLED;
}
else {
/* invalid path */