Getting occlusion state of BMesh elements. #36651
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#36651
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?
%%%My first "real" patch so bear with me...
It allows getting occlusion state of BMesh elements in a given RegionView3D.
rv3d = bpy.context.space_data.region_3d
v = bm.verts[0]
state = v.occlusion_get(rv3d)
Current implementation returns False for elements that dont have their component selection mode on.
(As they arent drawn to backbuffer) Maybe this is expected behaviour or we might set/unset the
component mode to verts+edges+faces during the time of the call...? Needs decision.
Also I dont know if I handled new needed include files well (I havent any experience with this big C projects...)
And I exposed an internal rna function in rna_internal.h because it was needed by my code to get the area
and region from given region_data.
I have been wrestling with all ways of raycasting to get occlusion state before so I suppose this addition will be welcome.
Gert De Roost
%%%
Changed status to: 'Open'
%%%New version :
Copied over code (few lines) included from rna_internal.h, and removed the dependency.
Thats cleaner!%%%
Changed status from 'Open' to: 'Archived'
There is a branch to add
mathutils.kdtree
, We intend to expose this in a way BMesh can make use of (so you can get a kdtree from).I'd rather go with this as a way to check mesh and do ray-casts.