Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2020-08-05 19:13:39 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-08-05 19:14:06 +0300
commite03d53874dac5fc24120dfad496ef008c5244b84 (patch)
tree3a39075481b91f25ac7c76fe4a2fe5defd0e83ed /release/scripts/startup/bl_ui/space_view3d_toolbar.py
parentfff12be9456cbeb7eed6daa4d5a23c4bd4bcb1ee (diff)
Fix T79127: crash on `scene.ray_cast()` with non-viewport view layer
The `rna_Scene_ray_cast()` function tried to find the current depsgraph. To this end, it required the scene, the view layer, and bmain. Scene has a cache of per-view-layer depsgraphs, to speed up switching between view layers. This cache does not contain render depsgraphs, and evaluated view layers also don't have a depsgraph here. When a suitable depsgraph cannot be found, a new depsgraph is created. However, this depsgraph is not evaluated, and has an unexpanded scene pointer with a `NULL` `view_layer`. Using this then crashes Blender. Also, there was no way for the code to get the render depsgraph. The solution is to pass the depsgraph to the `ray_cast()` function, instead of the view layer. This avoids the depsgraph lookup, and also works correctly when rendering. Some add-ons also need updating, which I'll do in the `addons` repository soon. Reviewed By: Sergey Differential Revision: https://developer.blender.org/D8475
Diffstat (limited to 'release/scripts/startup/bl_ui/space_view3d_toolbar.py')
0 files changed, 0 insertions, 0 deletions