Commit Graph

332 Commits

Author SHA1 Message Date
c727fc59ab BVH-raycast: ensure input direction is unit-length
This was already the case for most users of ray-cast.
Doing this avoids 2x normalize calls per ray-cast in many places.
2015-08-21 17:09:18 +10:00
176b806626 BVH-overlap: add callback to BLI_bvhtree_overlap
The callback checks if 2 nodes intersect (not just their AABB).

Advantages:
- theres no need to allocate overlaps which are later ignored.
- expensive intersection tests will run multi-threaded.

Currently only used for Python API.
2015-08-20 17:52:26 +10:00
2e2dc9b9e3 Refactor translation code out of blenfont
- Add blentranslation `BLT_*` module.
- moved & split `BLF_translation.h` into (`BLT_translation.h`, `BLT_lang.h`).
- moved `BLF_*_unifont` functions from `blf_translation.c` to new source file `blf_font_i18n.c`.
2015-08-18 07:01:26 +10:00
52fa5b12e1 Cleanup: ws 2015-07-15 11:43:23 +10:00
f4f7348c41 Minor tweaking to Knife header text.
Confirm/cancel shall always be first, and also makes more sense to have
define cut/close cut/new cut together.
2015-07-12 21:52:59 +02:00
c2bcf2dc05 Add new modalkeymap usage in helper header message to Knife tool. 2015-07-12 21:32:16 +02:00
b8b57d2da9 BLI_listbase: match arg order with BLI_qsort_r 2015-06-11 21:54:06 +10:00
ec3c2d3be9 Fix T45009: Bad 'tri area computation' code in knife tool.
Was causing wrong selection of 'outside' face.
2015-06-10 16:35:52 +02:00
c760c0dbb3 Cleanup: use mul_v3_mat3_m4v3 2015-04-28 01:18:50 +10:00
3f80accfb3 Fix T44011: Ruler/Knife/Loop-cut fail in quad-view
This is a kind of sloppy-focus,
resolving long standing bug with loop-cut/knife/ruler /w quad-view.

Where activating a tool would lock onto one of quad-views,
especially problematic when activating from the toolbar or menus.
2015-04-27 19:17:07 +10:00
86d3a1f683 Cleanup 2015-04-25 12:29:52 +10:00
c2f861453e Fix T44492: knife tool should cut across a split edge.
Added filter condition in visibility check that prevented
a "butting-up-against" face from obscuring an edge.
2015-04-24 07:29:45 -04:00
e2c24a18e3 Knife: fix glitch dragging mouse outside the face
Had a small gap between the last-vertex & new-cut
2015-03-03 09:29:44 +11:00
d2b6c6fd9b Fix T43862: Knife fails with concave ngon 2015-03-03 00:26:20 +11:00
cfd176bcb1 MEM_SAFE_FREE caused issues /w const & GCC5 2015-02-27 15:26:22 +11:00
87dc01e690 Fix T43806: Knife project crashes
Need to re-create the bmbvh after executing the cut.
2015-02-27 09:53:23 +11:00
a8fa291b8c Fix two potential bugs reported by latest coverity scan. 2015-01-19 17:51:25 +01:00
ef80914c99 error in last commit 2015-01-14 05:11:19 +11:00
a97c5d1f9f Fix T42459: Knife fails at small scale
Occluding geometry failed when near overlapping (or cutting small objects).
2015-01-14 01:36:03 +11:00
b77dd13004 Fix T43229: Knife-project regression (broke knife-project)
There have been quite a few issues with knife precision,
tested reports (T43229, T42864, T42459, T41164) and this works with all.
2015-01-13 21:28:58 +11:00
aab4f2b762 cleanup: redundant casts & const cast correctness 2015-01-01 23:42:28 +11:00
5ea243bbec cleanup: knife tools, use generic sort function 2014-12-27 12:37:11 +11:00
72341537e8 Fix T42864: Knife-project fails with 'cut-through'
Removing edge-hit-doubles could incorrectly de-duplicate intersections between different edges.

Gave noticeable errors cutting through geometry that overlapped exactly.
2014-12-15 21:17:10 +01:00
db0e2e7347 Fix T42864 (partial): knife-project included uncut backfaces
When knife-project ran with cut-through disabled,
it would still try to select faces behind the cut.

Now check if the faces are obscured.
2014-12-15 15:10:49 +01:00
2329b58fd3 Fix T42864 (partial): Knife-project had too-low precision 2014-12-15 15:10:49 +01:00
17f0a01a56 Correct last commit checking knife edges 2014-12-09 20:57:37 +01:00
6fb1e1680b Knife: cuts along existing edges are now selected
This means cuts along existing edges don't have gaps in the selection.

Fixes T42616
2014-12-09 19:51:08 +01:00
2efc3211ab Knife: rename vert & edge 'draw' to 'is_cut'
More logical for checking if the edge is a cut into the mesh.
2014-12-09 17:24:19 +01:00
4d9f2f7e86 Knife: fix edge aligned cuts, could add redundant verts 2014-12-09 17:23:10 +01:00
781db5f8a6 Knife: test if an edge is on the face boundary
Was checking if an edges midpoint was inside the face,
giving random results (point-inside for an edge location).
2014-12-09 15:57:59 +01:00
171a6bb5dc Fix T42488: Knife (selected_only + occlude) failed 2014-12-09 15:51:58 +01:00
1cb59394ae Cleanup: use const, avoid float -> double in matrix invert 2014-11-29 17:49:38 +01:00
6dcf8ba189 Knife: fix recent drag option /w loop close
It would miss adding an edge when closing the loop.
2014-11-16 14:57:28 +01:00
c31f74de6b Cleanup: use BLI_listbase_count_ex to avoid redundant looping 2014-11-16 14:23:37 +01:00
7d040d2a08 Cleanup: use BLI_listbase_*** prefix for count,sort,sort_r 2014-11-16 13:57:58 +01:00
497a26665c Knife: double clicking now closes the loop 2014-11-16 12:59:47 +01:00
c6ab67bffc Fix T42611: Knife fails from an edge to a vertex 2014-11-15 22:17:37 +01:00
bfa75dc990 Knife: freehand drawing while LMB held 2014-11-15 20:50:15 +01:00
1f4915e290 Cleanup: avoid alloc for each knife-project vector 2014-10-06 18:23:44 +02:00
e6828a71d7 Fix T41850: Knife fails with mesh behind view
Was using first vertex for depth (which could be anywhere),
now use the view-pivot.

was also copying uninitialized vector into knife_find_closest_* return values (confused debugging).
2014-09-17 00:34:48 +10:00
ba314683fb Fix T41849: Knife fails with small lens
knife cursor depth could be projected behind the view with a wide angle lens.
2014-09-17 00:34:48 +10:00
3ac640b19e Fix T41842: Knife edge-snap, incorrect offset 2014-09-16 15:43:57 +10:00
1083da4bde Fix T41730: Knife Cut fails on concave faces 2014-09-06 18:39:59 +10:00
f7945c659b Knife: remove redundant allocations 2014-09-06 18:39:59 +10:00
7971e441c1 Knife: no need to find the face-loops
Just check if verts are used in the face.
2014-09-06 11:28:06 +10:00
1dd17bed4a Knife tool: simplify hit-depth calculation 2014-08-17 12:50:48 +10:00
f2821e392b hint checks to re-alloc as unlikely
also edit comments for knife tool
2014-08-14 11:07:33 +10:00
818a036c1a Fix T39387: Knife makes duplicate verts with subsurf 2014-08-13 15:06:38 +10:00
3529913629 Math Lib: name signed versions of dist_to_plane_v3 explicitly
also add unsigned versions
2014-08-13 14:34:58 +10:00
3e90d7971a Knife tool: avoid copying vectors 2014-08-13 13:56:53 +10:00