Templates: Raycast Modal Op does not catch RuntimeError caused by Object.ray_cast for meshes with no faces #38493
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#38493
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
ray_cast()
raises a RuntimeError if a mesh has no faces:The template does neither check for
len(obj.data.polygons) < 1
, nor try/catch the exception.Changed status to: 'Open'
Added subscriber: @CodeManX
Added subscribers: @ideasman42, @Sergey
Not sure whether templates should handle all sorts of issues. They're more like hints how to do the things.
@ideasman42, leaving this one for you.
There's no indication in the API docs, that ray_cast could ever raise an exception, so why would it be inappropriate to add this check if everyone should do it this way?
Added subscriber: @AtomP
It also raises an exception in official 2.70 if the mesh is in edit mode.
Try this on the default cube in edit mode.
This issue was referenced by blender/blender@c6de033bf1
Changed status from 'Open' to: 'Resolved'
Closed by commit blender/blender@c6de033bf1.