forked from bartvdbraak/blender
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!
This commit is contained in:
parent
44183a3535
commit
a96134d794
@ -5540,10 +5540,7 @@ static void set_trans_object_base_flags(TransInfo *t)
|
|||||||
Main *bmain = G.main;
|
Main *bmain = G.main;
|
||||||
SceneLayer *sl = t->scene_layer;
|
SceneLayer *sl = t->scene_layer;
|
||||||
Scene *scene = t->scene;
|
Scene *scene = t->scene;
|
||||||
Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, sl, false);
|
Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, sl, true);
|
||||||
|
|
||||||
/* Transform tool is expected to be executed from an evaluated scene. */
|
|
||||||
BLI_assert(depsgraph != NULL);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* if Base selected and has parent selected:
|
* if Base selected and has parent selected:
|
||||||
@ -5644,12 +5641,9 @@ static int count_proportional_objects(TransInfo *t)
|
|||||||
Main *bmain = G.main;
|
Main *bmain = G.main;
|
||||||
SceneLayer *sl = t->scene_layer;
|
SceneLayer *sl = t->scene_layer;
|
||||||
Scene *scene = t->scene;
|
Scene *scene = t->scene;
|
||||||
Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, sl, false);
|
Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, sl, true);
|
||||||
Base *base;
|
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 */
|
/* rotations around local centers are allowed to propagate, so we take all objects */
|
||||||
if (!((t->around == V3D_AROUND_LOCAL_ORIGINS) &&
|
if (!((t->around == V3D_AROUND_LOCAL_ORIGINS) &&
|
||||||
(t->mode == TFM_ROTATION || t->mode == TFM_TRACKBALL)))
|
(t->mode == TFM_ROTATION || t->mode == TFM_TRACKBALL)))
|
||||||
|
Loading…
Reference in New Issue
Block a user