Commit Graph

326 Commits

Author SHA1 Message Date
ec8d277c64 BLI_math rename functions:
- mult_m4_m4m4 -> mul_m4_m4m4
- mult_m3_m3m4 -> mul_m3_m3m4

these temporary names were used to avoid problems when argument order was switched.
2013-05-26 18:36:25 +00:00
df502ffd5f knife tool: use faster method for sort_by_frac_along(), no need to call
line_point_factor_v3().
2013-05-08 12:56:31 +00:00
a2221cad15 knife tool: use the squared distance for comparison. 2013-05-08 12:56:24 +00:00
02c1e6162c knife tool: use 2d vectors for screen coords. 2013-05-08 12:56:17 +00:00
2a78a14369 knife sort_by_frac_along was re-calculating the reference factor for every test, change to only calculate once and use line_point_factor_v3().
also add zero division check for line_point_factor_v3() since the 2d version already checked for this.
2013-05-03 05:57:33 +00:00
e5344adda3 fix error running ED_view3d_project_float_v3_m4 on 2d vec (thanks Sergey for pointing out!), also remove redundant vector copy in knife project. 2013-05-01 17:03:00 +00:00
36e7a98459 fix [#35007] clipping border error
add clip option to ED_view3d_win_to_ray(), ED_view3d_win_to_segment()
2013-04-22 20:00:37 +00:00
6db3375e4f code cleanup: removed unneeded null check in object drawing, some warnings, style. 2013-04-18 15:09:30 +00:00
8a06acfd7a add mesh distort display mode (highlights distorted faces) 2013-04-18 04:24:18 +00:00
9cceec40c4 use modified vertex coords for calculating display thickness and intersections.
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()
2013-04-18 01:20:04 +00:00
9f5006a967 add distance arg to BKE_bmbvh_ray_cast(). currently unused. 2013-04-16 15:16:48 +00:00
37e73aa368 code cleanup: use BKE naming conventions for functions in BKE_editmesh.h and BKE_editmesh_bvh.h 2013-04-16 05:59:48 +00:00
fa919d23bc move editmesh_bvh.c into blenkernel. 2013-04-16 05:23:34 +00:00
afb4b65167 Random number generator: replace a bunch of usage of the global random number
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.
2013-04-15 23:12:40 +00:00
da5e0ea8fe bmesh operators: use operator type-flag to specify which operations require normal-calculations and which operations require selection flushing.
eg, no need to flush selection after 'Smooth' tool, no need to recalculate normals after 'Select Similar'.
2013-04-14 06:22:34 +00:00
6da961775f code cleanup: rename BKE_tessmesh -> BKE_editmesh, rename EditDerivedBMesh.tc -> em. ('tc' is odd name which isn't used elsewhere). 2013-04-13 20:31:52 +00:00
6d8e25dfdc code cleanup: split editmesh_tools.c, into inset, bevel (both modal operators) and moved extrude operators into their own file.
also move some selection operators from editmesh_tools.c into editmesh_select.c
2013-04-01 10:18:01 +00:00
e7c15beaf6 code cleanup: use booleans for mesh and selection code. 2013-03-19 23:17:44 +00:00
cb11af8b06 fix for knife tool crash when knife_make_chain_cut() couldn't create a new face. 2013-03-19 21:37:22 +00:00
a7b83837db fix for crash when using BM_face_calc_tessellation(), its not ensured that all tris will be filled in.
(effected knife project and laplacian smooth).
2013-03-16 14:18:32 +00:00
6347f96f53 knife project improvements
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.
2013-03-15 20:39:56 +00:00
433c82649e knife project: improve selection inside/outside checks.
- 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.
2013-03-15 19:38:42 +00:00
40bfce6616 use bool for knife, also scons tab/space mix. 2013-03-15 19:00:21 +00:00
630798ba3c add in ifdef for WITH_LIBMV, correct own error passing float[2] as float[3] 2013-03-15 15:47:32 +00:00
1d5d8bc934 knife project:
- selecting faces inside the cut now works properly
- improve epsilon for detecing if faces are inside a cut (still not perfect)
2013-03-15 14:43:09 +00:00
03f02019f2 knife projection feature,
apart of 3d printing tools - use to cookie-cut text into a mesh.
2013-03-15 13:06:31 +00:00
d92e32e4e7 use floats for knife tool internal mouse coord. 2013-03-14 14:46:59 +00:00
8dd2464626 minor knife refactor to prepare for running non interactively. 2013-03-14 13:58:56 +00:00
1158f06b57 code cleanup: de-duplicate view clipping function for paint and knife tool, minor changes to knife initialization. 2013-03-14 07:56:40 +00:00
aaa8a13c49 code cleanup: use const events for modal and invoke operators. 2013-03-13 09:03:46 +00:00
347e2b6cb0 code cleanup: make bmesh var names more consistent 2013-03-09 17:12:24 +00:00
d9d1f8e58f Raise a bit Header string fixed length, else some translations (e.g. Japanese) have not enough room! 2013-02-20 13:07:28 +00:00
04d628a5b5 Another huge bunch of new UI translations (some reported by Leon Cheung, thanks!)... 2013-02-19 15:45:56 +00:00
66e160d503 Fix Knife cut-through bug #34072. 2013-02-08 13:51:29 +00:00
c30fb009cc problem with own changes to triabgulate: calling beauty fill directly would re-allocate the faces which mean't triangulates output slots pointers became invalid. (noticed when using from py api) 2013-02-06 15:57:12 +00:00
c93e127e7a code cleanup: style and replace (float)sin, (float)cos with sinf, cosf 2013-01-12 14:28:23 +00:00
45c453c9b1 replace inline with BLI_INLINE define. 2013-01-12 10:39:09 +00:00
d1d3384750 Fix knife angle constraint bug #33813 by changing knife mvals to floats.
The problem was that by snapping the integer mouse values to
lines through the previous point, the angle was slightly off.
2013-01-11 14:13:22 +00:00
e24443b79a style cleanup 2013-01-09 03:30:15 +00:00
4190169282 code cleanup, also remove glError check in font drawing code since its now a debug option. 2013-01-04 17:24:40 +00:00
0f56514986 Fix knife cut bug #33625, failure to cut in otho mode sometimes.
Problem was that the code to limit the front and back planes
for better precision assumed line would have center near origin.
2013-01-04 15:06:34 +00:00
b2c66e268f replace MIN/MAX 3,4 with inline functions 2012-12-21 05:07:26 +00:00
1f3e3b0d68 include cleanup 2012-12-19 04:49:32 +00:00
f596cb2721 Fix knife cut-through bug #33571.
The code to connect across a face didn't stop after it found one.
2012-12-17 00:31:59 +00:00
d5c2a1f8f4 remove context argument from EDBM_update_generic() 2012-12-12 15:22:54 +00:00
44b634bcb1 make EDBM_index_arrays's stay in memory, blender was allocating an array and filling it for verts/edges/faces on every redraw.
this may introduce bugs which I didn't catch, but they are very easy to identify in a debug build which has asserts to ensure the arrays are valid before use.

in my own test drawing ~98,304 quads - this gave an overall ~16% drawing speedup.
2012-12-12 06:53:39 +00:00
71730f26d7 replace BLI_array_fixedstack_declare with() new macro BLI_array_alloca() which uses stack memory always and doesn't need to be freed explicitly. 2012-12-11 15:10:19 +00:00
634b22fc46 code cleanup: spelling labda -> lambda 2012-12-11 14:18:37 +00:00
1b19b790dd fix for knife when clipping was enabled, The knife would not snap to edges/verts outside the clip area but the geometry would still get cut 2012-12-10 08:15:14 +00:00
b0a361584a knife tool was incorrectly moving points into worldspace, then checking clipping against the object space bounds.
more fixes needed here but at least correct whats there.

also ensure clipping is initialized from the object before handling modal operator events.
2012-12-10 07:20:52 +00:00