System Information
Linux Mint 19 Nvidia 1070
Blender Version
Broken: 2.8
Worked: 2.79
Short description of error
python .scene_raycast returned object is not selectable
Exact steps for others to reproduce the error
Perform a scene ray cast and then use a .select_set(action='SELECT') on returned object.
RuntimeError: Error: Object 'Cube' not in View Layer 'RenderLayer'!
Load startup file, then run this into blender's console.
context = C
orig = Vector((10,10,10))
vec = -orig
res, pos, normal, face_index, obj, matrix_world = context.scene.ray_cast(
view_layer=context.view_layer,
origin=orig,
direction=vec)
obj.select_set(action='SELECT')