[Bf-blender-cvs] [eb89570] master: Followup to the previous commit

Sergey Sharybin noreply at git.blender.org
Wed Jan 15 11:40:20 CET 2014


Commit: eb89570733227610ce658331c11fdedb87d3c670
Author: Sergey Sharybin
Date:   Wed Jan 15 16:36:48 2014 +0600
https://developer.blender.org/rBeb89570733227610ce658331c11fdedb87d3c670

Followup to the previous commit

It was actually rather simple to make sure depsgraph is up to date
before calling BKE_object_handle_update() in the transform code by
just moving DAG_scene_relations_update() to the beginning of the
function.

Wouldn't expect any side effects for other cases since DAG is not
used bu the code between new location of the call and old one.

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

M	source/blender/editors/transform/transform_conversions.c

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

diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index d19bf8d..0e2e2ca 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -4905,6 +4905,9 @@ static void set_trans_object_base_flags(TransInfo *t)
 	/* makes sure base flags and object flags are identical */
 	BKE_scene_base_flag_to_objects(t->scene);
 
+	/* Make sure depsgraph is here. */
+	DAG_scene_relations_update(G.main, t->scene);
+
 	/* handle pending update events, otherwise they got copied below */
 	for (base = scene->base.first; base; base = base->next) {
 		if (base->object->recalc) {
@@ -4948,7 +4951,6 @@ static void set_trans_object_base_flags(TransInfo *t)
 	}
 
 	/* all recalc flags get flushed to all layers, so a layer flip later on works fine */
-	DAG_scene_relations_update(G.main, t->scene);
 	DAG_scene_flush_update(G.main, t->scene, -1, 0);
 
 	/* and we store them temporal in base (only used for transform code) */




More information about the Bf-blender-cvs mailing list