86f8470a5d
Some knife fixes. Avoids duplicating verts; better handling of cut-through ortho.
...
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.
2013-08-30 16:34:44 +00:00
00b39c4e5b
code cleanup: more confusion with 0/NULL/false
2013-08-07 03:55:21 +00:00
7c58ec9337
use math functions for copying matrix/vector types, also cast const pointers for freeing (clang error's out otherwise)
2013-07-26 10:43:23 +00:00
a788cca141
correct own error in recent edits to editderivedmesh
2013-07-23 15:05:33 +00:00
04ea8c0ee8
remove the pointer from BLI_bitmap's typedef,
...
hides that an arg passed is really an array which may be modified by other functions.
2013-07-22 23:20:48 +00:00
b7bf20d950
optimization: only calculate the normals for passing into derivedMesh foreachMappedVert/foreachMappedFaceCenter when needed,
...
this means in editmode with wire draw, face and vertex normals don't have to be calculated at all.
in most cases the normals are not used so add a flag that makes calculating them only for functions that need them.
also fix face normal calculation for CDDM, was using quad calculation for ngons too.
2013-07-22 22:59:47 +00:00
e590abfb87
optimization:
...
- halve the number of allocs in layerInterp_mdeformvert list creation.
- use direct loop access in emDM_copyLoopArray
2013-07-22 18:01:27 +00:00
90fdaa8219
optimization: lazy initialize EditDerivedBMesh members vertexNos, polyNos.
...
also add polyCos array which cache's face centers, gives overall ~20% speedup to drawing on a high-poly mesh in face-editmode.
2013-07-22 16:49:37 +00:00
3daa153d74
code cleanup: use boolean for derived mesh face test function
2013-07-19 10:40:52 +00:00
c3c84521f1
fix [ #36055 ] Edge/Face Info display on wrong position with key frames
...
display editmesh stats with deform modifiers.
2013-07-09 12:59:31 +00:00
e6830300b7
Fix incorrect GLSL bump mapping in editmode when the UV coordinates are
...
flipped, was not passing sign on to GLSL shader.
2013-07-01 14:49:08 +00:00
09e11ad6ef
modifier stack: lazy initialize normals
...
many modifiers were calculating normals, when those normals were ignored by the next modifier.
now flag normals as dirty and recalculate for modifiers that set use `dependsOnNormals()` callback.
Quick test on mesh with 12 modifiers (mostly build type), calculated normals 6 times, now it only runs once - so this will give some speedup too.
2013-05-30 17:36:43 +00:00
083115c5e7
bmesh optimization: use offsets for deform-vert lookups to avoid customdata layer lookups within loops.
2013-05-27 12:42:48 +00:00
7a547e441b
avoid customdata lookups for selection test/enable disable.
...
also add uvedit_face_select_set, uvedit_edge_select_set, uvedit_uv_select_set - since quite a few areas where setting based on a boolean.
2013-05-10 06:46:32 +00:00
34c28e3a0e
fix [ #35259 ] Crash when enabling mesh analysis intersect.
2013-05-08 12:40:23 +00:00
f2f113fbd3
tweak for epsilon of intersection check, was too small for some cases.
2013-04-28 22:35:08 +00:00
46b40e112b
skip checks in statvis_calc_thickness(). also remove paranoid NULL checks in smallhash.c
2013-04-20 16:49:02 +00:00
106d41699a
fix [ #35025 ] Mesh Debug samples strange behavior
2013-04-20 16:29:37 +00:00
5502c74a1a
fix for problem with too low epsilon when calculating thickness, also increase limits.
2013-04-18 17:23:02 +00:00
5c72a19c09
add display mode for sharp edges.
2013-04-18 17:09:56 +00:00
5f613886ef
fix range for face distortion and display for concave ngons.
2013-04-18 09:12:06 +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
4a7feafa49
Support object scale for mesh display options. (currently only uniform scale for thickness test)
2013-04-17 23:30:19 +00:00
14f9f167b2
display options to help with 3d printing.
...
editmesh debug info,
- overhang (with axis angle options)
- wall thickness (with min/max distance)
- self-intersections.
access below 'Mesh Display' panel.
2013-04-17 09:27:23 +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
77da6b3662
move editmesh functions out editderivedmesh.c into editmesh.c
2013-04-16 05:46:17 +00:00
81cfbaacb0
code cleanup: edit-derived-mesh, define 'BMesh *bm' as local variable, avoid 'bmdm->em->bm' within functions.
2013-04-13 20:58:49 +00:00
5996242291
fix for error in editmesh derived callbacks, emDM_getVert(), emDM_getEdge(), emDM_getTessFace().
...
Currently the functions aren't used since they would fail have failed immediately.
2013-04-13 20:40: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
31c375b97a
Mesh Drawing:
...
Option to draw mesh vertex-weights in editmode, available from the 'Mesh Display' panel.
TODO: get this to work when modifiers are applied in solid mode (texface-solidmode is working).
2013-04-13 20:20:21 +00:00
e1c9353c94
code cleanup: more minor changes for editmesh face drawing.
2013-04-13 18:11:27 +00:00
4d1e8cec1a
code cleanup: editmesh draw functions, make face drawing more consistent.
2013-04-13 17:57:11 +00:00
375c0144c8
fix [ #34378 ] GLSL materials using multiple UV layers fail in editmode
...
regression since BMesh merge.
2013-02-23 06:56:10 +00:00
0c53fb3a92
code cleanup: make editmode PASSATTRIB into static functions.
2013-02-23 05:36:15 +00:00
296444e1dc
style cleanup: some warnigs & spelling.
2013-02-06 14:02:19 +00:00
88dd983f3c
fix regression in own recent commit, vertex flags were left uninitialized.
2013-01-21 09:54:33 +00:00
b27854bd47
use booleans for bmesh api.
2013-01-14 16:42:43 +00:00
0c3e570868
remove CustomData_get_active_offset(), use CustomData_get_offset to return the active layer, matching CustomData_get()
2013-01-11 01:41:27 +00:00
c3c3df3aec
editmesh texface drawing, reuse customdata offset rather then looking up each UV and vertex color, gives overall ~9.5% drawing speedup in my tests.
...
was also doing NULL checks on UV's which are never NULL in this case.
2013-01-10 12:07:01 +00:00
ceb9701507
don't store bevel weights or edge crease customdata layers in editmode unless they are needed.
...
configurable in 'Geometry Data' panel, will be added when running crease edges transform for example.
2013-01-10 04:43:31 +00:00
97d1abfe95
speedup for editmesh getVert and getEdge, were doing 2x customdata layer lookups for crease and bevel weight, also make use of the existing meshdata array for lookups.
2013-01-09 18:20:11 +00:00
f0c1bc830c
add option to BLI_scanfill_calc() - BLI_SCANFILL_CALC_HOLES, gives some speedup for BMesh ngons which never have holes and ensures predictable triangle count (totvert - 2), which is needed for pre-calculating array size.
2012-12-27 06:39:27 +00:00
89364fd0fa
remove realloc's during BMEdit_RecalcTessellation(), instead use poly_to_tri_count() to calculate how many triangles are needed.
2012-12-27 04:18:22 +00:00
f576c281ba
speedup for face tessellation:
...
- quads, tris now use direct pointer access rather then iterators.
- for ngons also avoid iterator, just loop over the loops.
also minor change, use floorf rather then floor for ED_view3d_project_short_ex, ED_view3d_project_int_ex
2012-12-21 07:24:31 +00:00
a6bee579e9
move pbvh into BKE, it used many BKE bad level includes.
...
now blenlib/BLI doesn't depend on any blenkern/BKE functions,
there are still some bad level includes but these are only to access G.background and the blender version define.
2012-12-15 15:59:25 +00:00
cf723e5e7c
use htype flags as arguments to EDBM_index_arrays_init(), no functional changes.
2012-12-12 05:27:52 +00:00
0526fcf13f
revert part of r52720, Id rather leave these as-is, even if they give warnings under some configurations.
2012-12-03 08:11:04 +00:00
818a345be3
Silent a bunch of gcc warnings (usually dummy, but noisy!).
2012-12-02 16:01:06 +00:00
f9e339ef00
fix/workaround [ #33281 ] script goes into not responding
...
scanfill remove-doubles pass assumes ordered edges (as with curves), otherwise it can hang.
workaround this problem by skipping removing-doubles for mesh ngons, since this isnt such a common case as it is with curves and we can just not support it.
2012-11-26 23:18:04 +00:00