[Bf-blender-cvs] [a96134d7941] blender2.8: Depsgraph: Fix assert/crash when transforming from redo system

Sergey Sharybin noreply at git.blender.org
Fri Nov 17 16:54:27 CET 2017


Commit: a96134d79417d05556bcad9a4425bf9056cef133
Author: Sergey Sharybin
Date:   Fri Nov 17 16:53:06 2017 +0100
Branches: blender2.8
https://developer.blender.org/rBa96134d79417d05556bcad9a4425bf9056cef133

Depsgraph: Fix assert/crash when transforming from redo system

Redo system will set depsgraph to NULL, so need to ensure it exists.

Reported by Julian in IRC, thanks!

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

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 29401bc2da1..0905e3785da 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -5540,10 +5540,7 @@ static void set_trans_object_base_flags(TransInfo *t)
 	Main *bmain = G.main;
 	SceneLayer *sl = t->scene_layer;
 	Scene *scene = t->scene;
-	Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, sl, false);
-
-	/* Transform tool is expected to be executed from an evaluated scene. */
-	BLI_assert(depsgraph != NULL);
+	Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, sl, true);
 
 	/*
 	 * if Base selected and has parent selected:
@@ -5644,12 +5641,9 @@ static int count_proportional_objects(TransInfo *t)
 	Main *bmain = G.main;
 	SceneLayer *sl = t->scene_layer;
 	Scene *scene = t->scene;
-	Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, sl, false);
+	Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, sl, true);
 	Base *base;
 
-	/* Transform tool is expected to be executed from an evaluated scene. */
-	BLI_assert(depsgraph != NULL);
-
 	/* rotations around local centers are allowed to propagate, so we take all objects */
 	if (!((t->around == V3D_AROUND_LOCAL_ORIGINS) &&
 	      (t->mode == TFM_ROTATION || t->mode == TFM_TRACKBALL)))



More information about the Bf-blender-cvs mailing list