44505b38df
Cleanup: strip trailing space in editors
2018-06-04 09:31:30 +02:00
75fc1c3507
Cleanup: trailing whitespace (comment blocks)
...
Strip unindented comment blocks - mainly headers to avoid conflicts.
2018-06-01 18:19:39 +02:00
85de548e03
Cleanup: indentation
2018-04-16 17:08:27 +02:00
bfdb88f3f4
Cleanup: rename list count_ex -> count_at_most
2018-04-03 17:05:21 +02:00
342593f124
Cleanup: rename BLI_array_count -> len
...
Match naming convention used everywhere else.
Count should only be used when this isn't directly accessible.
2018-03-15 01:53:20 +11:00
ccdacf1c9b
Cleanup: use '_len' instead of '_size' w/ BLI API
...
- When returning the number of items in a collection use BLI_*_len()
- Keep _size() for size in bytes.
- Keep _count() for data structures that don't store length
(hint this isn't a simple getter).
See P611 to apply instead of manually resolving conflicts.
2018-02-15 23:39:08 +11:00
ab7ebf2b10
Cleanup: Use const for RNA EnumPropertyItem args
...
Practically all access to enum data is read-only.
2017-10-18 16:04:07 +11:00
d0f4d0df2a
Knife Tool: add wait_for_event option
2017-10-17 11:50:59 +11:00
6c66e1bc83
Fix T52251: Knife cur displaces surface
2017-09-06 01:50:36 +10:00
1d966ca7a1
Math Lib: add angle_on_axis_v3v3_v3
...
Use for calculating the angle between 2 directions on an axis.
Also signed version and normalized plane projection,
use when input is normalized.
2017-06-16 01:27:58 +10:00
Julian Eisel
0a26904a75
Fix T49872: 3D cursor places with camera shift in ortographic mode
2016-12-08 12:41:27 +01:00
e1e49fd1a8
Math Lib: rotate matrix cleanup
...
- Remove 'rotate_m2', unlike 'rotate_m4' it created a new matrix
duplicating 'angle_to_mat2' - now used instead.
(better avoid matching functions having different behavior).
- Add 'axis_angle_to_mat4_single',
convenience wrapper for 'axis_angle_to_mat3_single'.
- Replace 'unit_m4(), rotate_m4()' with a single call to 'axis_angle_to_mat4_single'.
2016-11-25 16:39:34 +11:00
2465bd90d5
Cleanup: style, whitespace, doxy filepaths
2016-06-19 06:33:29 +10:00
a9cd97673d
Knife Project: revert fix for T43896
...
For now leave precision at half a pixel until we have real fix.
Resolves T48023.
2016-04-02 01:33:10 +11:00
553ea6de8b
Fix NULL check before free
2016-04-01 06:23:35 +11:00
f209529c3d
Fix T47910: Knife project fails
...
Regression in fix for T43896, using screen-space precision here is very problematic,
using lower precision here works for both reports.
2016-03-24 18:27:39 +11:00
e25ba162c0
OpenGL: call glLineWidth less often
...
Each LINES draw call is now responsible for its own line width. No need
to set it back to its 1.0 default after every draw.
This eliminates half our calls to glLineWidth , similar to last week’s
work on glPointSize.
2016-01-23 00:58:51 -05:00
90293a8da3
Math Lib: optimize segment-plane clipping
...
Calculate the clipped min/max factor along the segment,
only applying to the coordinates at the end (will give better precision too).
Also make split input/output args.
2016-01-23 13:48:31 +11:00
aa69fb64ac
Cleanup: line length, indentation
2016-01-21 09:42:17 +11:00
6fa5d22109
Fix T43896: Knife Project fails when zoomed out
...
While knife-project still uses screen-space projection,
use much lower snap thresholds when projecting.
2016-01-20 20:46:25 +11:00
88191f7fa3
BMesh: support connecting single-edge island links
...
Handle these cases by temporarily disconnecting the single links to ensure isolated islands,
then link back up after.
2015-12-17 05:13:57 +11:00
879889c47c
Correct own error in knife edge-net cutting
...
Need to ensure no duplicate edges in the array.
2015-12-15 18:44:21 +11:00
9df6a539a2
Knife: use BM_face_split_edgenet for detecting holes
...
Knife had its own code for detecting holes which worked quite well,
but would prefer to use generic bmesh API call here.
2015-12-13 03:46:36 +11:00
a28e014313
BMesh: Add API call BM_face_calc_point_in_face
...
Was local to knife code, but this is generally useful.
2015-11-27 22:08:16 +11:00
48b1656a6c
Cleanup: shadowing (editors)
2015-11-23 17:40:50 +11:00
a7ac59414b
Cleanup: rename line to segments, avoids confusion
...
Differentiate between lines and segments.
2015-11-13 07:48:05 +11:00
eb49a76dca
Cleanup: warnings
...
- remove NULL checks for args already set as ATTR_NONNULL.
- double promotion.
2015-10-17 16:06:45 +11:00
85f3b21cc8
error in last commit
2015-10-16 21:57:59 +11:00
7dc80097a4
Fix for missing id_lib_extern, assigning ID's
2015-10-16 21:53:01 +11:00
14de9a5982
Knife tool: generalize angle snapping code
...
Replace hard-coded snap angles with function that allows arbitrary snapping increments.
Currently no user visible change.
2015-10-16 04:04:45 +11:00
df1e9fac06
Fix error w/ printing knife header angle-snapping
2015-10-16 00:41:14 +11:00
741cf193f1
Knife: Improve clamping extents in ortho view
...
- measure extents from mesh center instead of origin.
- use clamping method, guaranteed not to flip the input vectors direction.
- use cage coords when available (since knife operates on the cage).
2015-09-24 13:34:26 +10:00
4493cac21a
Fix T46219: Knife cuts fail away from center
2015-09-24 03:00:52 +10:00
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