Ref T71217
This patch proposes to add a new option that ignores faces whose
normal is pointing in the opposite direction to the observer.
Details
Diff Detail
- Repository
- rB Blender
- Branch
- master
- Build Status
Buildable 5508 Build 5508: arc lint + arc unit
Event Timeline
I just tested it and it doesn't seem to work for me. If I have "Project Individual Elements" enabled it also causes Blender to crash.
- Fix crash when snap in edit mode (error in choosing callback)
- Support BackFace Culling for project individual elments
Could this also be added for vertex snapping? It will then for vertices check the vertex normal.
Generally LGTM, minor suggestions only.
| source/blender/editors/transform/transform_snap_object.c | ||
|---|---|---|
| 408 | a sqrtf can be avoided since you're only checking the sign of the dot product, cross_tri_v3 can be used instead. (applies above too). | |
| 911 | should use use_ prefix here too, variable above does. | |
| source/blender/makesrna/intern/rna_scene.c | ||
| 3038 | Use use_ prefix. | |
- Support test of backface culling for snap to edges and verts (object mode only)
- Add use_ prefix and avoid sqrtf
Isn't it possible to just check the vertex normal in edit mode to get culling of back facing vertices there as well?
It would not be fully reliable and since callbacks used for snapping vertices and edges are also used for Mesh objects, this would add unnecessary overhead in object mode.
A solution would be to redo the same scheme used for Mesh objects in EditMeshs, but this would result in a lot of changes that could change the initial focus of the patch.
It is best to think of a solution in another patch as it would need more precautions (performance testing and others).
