Update calls to `Scene.ray_cast()` to pass depsgraph instead of view layer
This is in light of the change in Blender rBe03d53874dac5f.
This commit is contained in:
parent
f905183239
commit
82ed41ec63
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue