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

git.blender.org/blender-addons.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:16:08 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-08-05 19:16:08 +0300
commit82ed41ec632483fa9260d90dae7afdf3192c509b (patch)
tree61661ba89a7394fe151be61e96cc023ef6393f1b
parentf905183239186a6ae893adbad665119a67e144ba (diff)
Update calls to `Scene.ray_cast()` to pass depsgraph instead of view layer
This is in light of the change in Blender rBe03d53874dac5f.
-rw-r--r--archipack/archipack_object.py2
-rw-r--r--archipack/archipack_wall2.py2
-rw-r--r--blenderkit/ui.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/archipack/archipack_object.py b/archipack/archipack_object.py
index 8c908214..f513b506 100644
--- a/archipack/archipack_object.py
+++ b/archipack/archipack_object.py
@@ -259,7 +259,7 @@ class ArchipackDrawTool(ArchipackCollectionManager):
view_vector_mouse = region_2d_to_vector_3d(region, rv3d, co2d)
ray_origin_mouse = region_2d_to_origin_3d(region, rv3d, co2d)
res, pos, normal, face_index, object, matrix_world = context.scene.ray_cast(
- view_layer=context.view_layer,
+ depsgraph=context.view_layer.depsgraph,
origin=ray_origin_mouse,
direction=view_vector_mouse)
return res, pos, normal, face_index, object, matrix_world
diff --git a/archipack/archipack_wall2.py b/archipack/archipack_wall2.py
index d9a486eb..53375992 100644
--- a/archipack/archipack_wall2.py
+++ b/archipack/archipack_wall2.py
@@ -1639,7 +1639,7 @@ class archipack_wall2(ArchipackObject, Manipulable, PropertyGroup):
# prevent self intersect
o.hide_viewport = True
res, pos, normal, face_index, r, matrix_world = context.scene.ray_cast(
- view_layer=context.view_layer,
+ depsgraph=context.view_layer.depsgraph,
origin=p,
direction=up)
diff --git a/blenderkit/ui.py b/blenderkit/ui.py
index 5333b65e..47bf1a51 100644
--- a/blenderkit/ui.py
+++ b/blenderkit/ui.py
@@ -927,7 +927,7 @@ def mouse_raycast(context, mx, my):
vec = ray_target - ray_origin
has_hit, snapped_location, snapped_normal, face_index, object, matrix = bpy.context.scene.ray_cast(
- bpy.context.view_layer, ray_origin, vec)
+ bpy.context.view_layer.depsgraph, ray_origin, vec)
# rote = mathutils.Euler((0, 0, math.pi))
randoffset = math.pi