Merging r40653 through r40847 from trunk into soc-2011-tomato
[blender.git] / source / blender / blenkernel / intern / depsgraph.c
index 8415d6a..343c431 100644 (file)
@@ -2060,17 +2060,27 @@ static int object_modifiers_use_time(Object *ob)
        /* check whether any modifiers are animated */
        if (ob->adt) {
                AnimData *adt = ob->adt;
+               FCurve *fcu;
                
                /* action - check for F-Curves with paths containing 'modifiers[' */
                if (adt->action) {
-                       FCurve *fcu;
-                       
                        for (fcu = adt->action->curves.first; fcu; fcu = fcu->next) {
                                if (fcu->rna_path && strstr(fcu->rna_path, "modifiers["))
                                        return 1;
                        }
                }
                
+               /* This here allows modifier properties to get driven and still update properly
+                *
+                * Workaround to get [#26764] (e.g. subsurf levels not updating when animated/driven)
+                * working, without the updating problems ([#28525] [#28690] [#28774] [#28777]) caused
+                * by the RNA updates cache introduced in r.38649
+                */
+               for (fcu = adt->drivers.first; fcu; fcu = fcu->next) {
+                       if (fcu->rna_path && strstr(fcu->rna_path, "modifiers["))
+                               return 1;
+               }
+               
                // XXX: also, should check NLA strips, though for now assume that nobody uses
                // that and we can omit that for performance reasons...
        }