diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-11-07 18:29:31 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-11-07 18:36:25 +0300 |
commit | ba1197fe5e27f1cb7be281b3f20166a69050a273 (patch) | |
tree | d2852f12af386701db2f3c8dddf96b185efb248e /source/blender/editors/transform/transform_conversions.c | |
parent | f16199d479189f1f142aebecf896182a7276c483 (diff) |
Depsgraph: Simplify some workarounds and make API closer to final
Diffstat (limited to 'source/blender/editors/transform/transform_conversions.c')
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index b1013140711..ed215a84dc7 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -5540,7 +5540,10 @@ 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); + Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, sl, false); + + /* Transform tool is expected to be executed from an evaluated scene. */ + BLI_assert(depsgraph != NULL); /* * if Base selected and has parent selected: @@ -5641,9 +5644,12 @@ 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); + Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, sl, false); 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))) |