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:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-04-18 16:40:51 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-04-18 16:41:51 +0300
commit3b209a45de420a4e4e98ab71c6e1c521612171fa (patch)
tree43efd2be3378d58a9850eaf2b4a911c51872d6e9 /source/blender/makesrna/intern/rna_scene_api.c
parent21081429347e274de29040c04c377ddce5d060ef (diff)
Fix missing initialization of depsgraph for snapping context
Was causing crashes once attempting to use snapping. Reported by mano-wii in IRC, thanks!
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_scene_api.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c
index 7887ea49f19..b3dc9c57577 100644
--- a/source/blender/makesrna/intern/rna_scene_api.c
+++ b/source/blender/makesrna/intern/rna_scene_api.c
@@ -163,15 +163,16 @@ static void rna_SceneRender_get_frame_path(RenderData *rd, int frame, int previe
}
static void rna_Scene_ray_cast(
- Scene *scene, ViewLayer *UNUSED(view_layer),
+ Scene *scene, ViewLayer *view_layer,
float origin[3], float direction[3], float ray_dist,
int *r_success, float r_location[3], float r_normal[3], int *r_index,
Object **r_ob, float r_obmat[16])
{
normalize_v3(direction);
+ Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, view_layer, true);
SnapObjectContext *sctx = ED_transform_snap_object_context_create(
- G.main, scene, 0);
+ G.main, scene, depsgraph, 0);
bool ret = ED_transform_snap_object_project_ray_ex(
sctx,