[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40727] trunk/blender/source/blender/ blenkernel/intern: Bugfixes for: [#28525] [#28690] [#28774] [#28777]

Joshua Leung aligorith at gmail.com
Sat Oct 1 03:27:44 CEST 2011


Revision: 40727
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40727
Author:   aligorith
Date:     2011-10-01 01:27:44 +0000 (Sat, 01 Oct 2011)
Log Message:
-----------
Bugfixes for: [#28525] [#28690] [#28774] [#28777]

This commit basically disables the RNA update caches for now, and
introduces a workaround/hack to ensure that modifier properties still
work when animated/driven. The whole way that updates currently get
handled needs reviewing in future.

Fix provided by Brecht.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/anim_sys.c
    trunk/blender/source/blender/blenkernel/intern/depsgraph.c

Modified: trunk/blender/source/blender/blenkernel/intern/anim_sys.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/anim_sys.c	2011-10-01 00:56:36 UTC (rev 40726)
+++ trunk/blender/source/blender/blenkernel/intern/anim_sys.c	2011-10-01 01:27:44 UTC (rev 40727)
@@ -1160,6 +1160,8 @@
 					return 0;
 			}
 			
+			/* RNA property update disabled for now - [#28525] [#28690] [#28774] [#28777] */
+#if 0
 			/* buffer property update for later flushing */
 			if (RNA_property_update_check(prop)) {
 				short skip_updates_hack = 0;
@@ -1176,6 +1178,7 @@
 				if (skip_updates_hack == 0)
 					RNA_property_update_cache_add(&new_ptr, prop);
 			}
+#endif
 		}
 		
 		/* successful */

Modified: trunk/blender/source/blender/blenkernel/intern/depsgraph.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/depsgraph.c	2011-10-01 00:56:36 UTC (rev 40726)
+++ trunk/blender/source/blender/blenkernel/intern/depsgraph.c	2011-10-01 01:27:44 UTC (rev 40727)
@@ -2028,17 +2028,27 @@
 	/* 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...
 	}




More information about the Bf-blender-cvs mailing list