svn merge ^/trunk/blender -r49118:49143
[blender.git] / source / blender / blenloader / intern / readfile.c
index 37fccfebe822e7377381aef879f8331f76e6843f..fbeab9c6d3f878cba9d77888ce837da27e52e568 100644 (file)
@@ -1958,14 +1958,25 @@ static void direct_link_fcurves(FileData *fd, ListBase *list)
                /* group */
                fcu->grp = newdataadr(fd, fcu->grp);
                
+               /* clear disabled flag - allows disabled drivers to be tried again ([#32155]),
+                * but also means that another method for "reviving disabled F-Curves" exists
+                */
+               fcu->flag &= ~FCURVE_DISABLED;
+               
                /* driver */
                fcu->driver= newdataadr(fd, fcu->driver);
                if (fcu->driver) {
                        ChannelDriver *driver= fcu->driver;
                        DriverVar *dvar;
                        
+                       /* compiled expression data will need to be regenerated (old pointer may still be set here) */
                        driver->expr_comp = NULL;
                        
+                       /* give the driver a fresh chance - the operating environment may be different now 
+                        * (addons, etc. may be different) so the driver namespace may be sane now [#32155]
+                        */
+                       driver->flag &= ~DRIVER_FLAG_INVALID;
+                       
                        /* relink variables, targets and their paths */
                        link_list(fd, &driver->variables);
                        for (dvar= driver->variables.first; dvar; dvar= dvar->next) {