[Bf-blender-cvs] [557d425] depsgraph_refactor: Depagraph: Partial fix for missing updates when changing action

Sergey Sharybin noreply at git.blender.org
Mon Feb 16 16:18:18 CET 2015


Commit: 557d425d095af6ba812abb0640e4b07507ca41df
Author: Sergey Sharybin
Date:   Mon Feb 16 20:16:51 2015 +0500
Branches: depsgraph_refactor
https://developer.blender.org/rB557d425d095af6ba812abb0640e4b07507ca41df

Depagraph: Partial fix for missing updates when changing action

This doesn't totally work because of the missing tag re-scheduling
described in the previous commit. However, it at least ensures relations
are correct which hopefully will prevent some crashes.

===================================================================

M	source/blender/makesrna/intern/rna_animation.c
M	source/blender/makesrna/intern/rna_space.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c
index e4696d8..a37029f 100644
--- a/source/blender/makesrna/intern/rna_animation.c
+++ b/source/blender/makesrna/intern/rna_animation.c
@@ -112,6 +112,7 @@ static void rna_AnimData_action_set(PointerRNA *ptr, PointerRNA value)
 	adt = BKE_animdata_from_id(ownerId);
 	if (adt) {
 		adt->recalc |= ADT_RECALC_ANIM;
+		DAG_id_tag_update(ownerId, OB_RECALC_TIME);
 	}
 }
 
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index b123f79..acce59e 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -1103,7 +1103,7 @@ static void rna_SpaceDopeSheetEditor_action_set(PointerRNA *ptr, PointerRNA valu
 	}
 }
 
-static void rna_SpaceDopeSheetEditor_action_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
+static void rna_SpaceDopeSheetEditor_action_update(Main *bmain, Scene *scene, PointerRNA *ptr)
 {
 	SpaceAction *saction = (SpaceAction *)(ptr->data);
 	Object *obact = (scene->basact) ? scene->basact->object : NULL;
@@ -1136,7 +1136,8 @@ static void rna_SpaceDopeSheetEditor_action_update(Main *UNUSED(bmain), Scene *s
 		}
 		
 		/* force depsgraph flush too */
-		DAG_id_tag_update(&obact->id, OB_RECALC_OB | OB_RECALC_DATA);
+		DAG_id_tag_update(&obact->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
+		DAG_relations_tag_update(bmain);
 	}
 }




More information about the Bf-blender-cvs mailing list