was regression in r59665 (fix for [#35002]).
now when checking a segment that lies on the same plane as the triangle intersects,
clip the segment by the triangle bounds so we know the points remain inside the triangle.
A crash was reported but without info to reproduce.
This is a likely crash introduced by previous fix
to allow linehits to snap to vertices.
The function to find connected linehits can't
assume all linehits have edges any more.
fix as suggested by Ton Roosendaal in tracker:
"the knife tool has a "MODE_PANNING" state, it could be nice to set this
in the modal map as well, to define the shortcut(s) that have to be passed on."
I caught this while looking at:
[#34663] Cannot rotate view while using Knife tool with Maya preset
(though it's not the original report).
I'll look at the other operators, there are probably a few in the same
situation as knife.
Now cut lines detect vertices that they pass (almost) exactly over
and snap to them, to avoid making verts vert close to other ones.
Added radius arg to BKE_bmbvh_ray_cast so that can detect an obscuring
face when the ray might otherwise go exactly between two triangles.
Needed an isect_line_tri_epsilon function for similar reason.
Fixes last part of bug #35002. Other knife bugs still present but
getting this commit in now before continuing bug fixing.
internal improvement to editmesh_bvh.c
- optionally pass cage-coords as an arg, rather then calculating the coords in BKE_bmbvh_new(),
since all callers already have coords calculated.
- de-duplicate coords creation function from knife and bmbvhm, move into own generic function: BKE_editmesh_vertexCos_get()
generator with a local one. It's not thread safe and will not give repeatable
results, so in most cases it should not be used.
Also fixes#34992 where the noise texture of a displacement modifier was not
properly random in opengl animation render, because the seed got reset to a
fixed value by an unrelated function while for final render it changed each
frame.
When running in non-interactive mode, dont add a area draw callback or adjust the cursor, use a fixed snap value and don't use opengl lookups on faces.
Minor optimization - compare squared distances where possible.
- use more accurate method to find if a face is inside projected lines.
- check faces intersect while expanding selection - in some cases this could result in the entire model being selected.