Page MenuHome

Object has no mesh data to be used for ray casting
Closed, DuplicatePublic

Description

System Information
Operating system: Windows 10 64
Graphics card: gtx 940 m

Blender Version
2.80, dafaa6f22881, blender2.8, 2018-12-22

Short description of error
Objcet has no mesh data to be used for ray casting

example:
https://github.com/Darcvizer/Destructive-Extrude/blob/master/Destructive-Extrude.py
line 208

When I try to make a ray_cast in object mode, I get an error “Object has no mesh data to be used for ray casting” I tried to fix it by following the steps:
bpy.context.scene.update()
context.active_object.data.update()
context.active_object.data.update(calc_edges=False)
context.active_object.update_tag(refresh={‘OBJECT’, ‘DATA’, ‘TIME’})

And even:
bpy.ops.object.mode_set(mode=‘EDIT’)
bpy.ops.object.mode_set(mode=‘OBJECT’)

Details

Type
Bug

Event Timeline

Can confirm this on Ubuntu 18.04 / GTX 1080

version affected: blender-2.80-6d89337257b6-linux-glibc224-x86_64
version that still works: 2.79b

Steps to reproduce:

  • Open blender default scene and make sure a mesh object is selected and active
  • In Python Console: >> C.active_object.ray_cast((0,0,0), (1,1,1))

Traceback (most recent call last):

File "<blender_console>", line 1, in <module>

RuntimeError: Error: Object 'Cube' has no mesh data to be used for ray casting

Michel Anders (varkenvarken) renamed this task from Objcet has no mesh data to be used for ray casting to Object has no mesh data to be used for ray casting.Wed, Dec 26, 12:13 PM