Campbell Barton
07ccd3ee3f
fix [ #33029 ] Applying modifier leaks memory
...
Thanks for Sergey for finding the bug & patching, This fix works a bit differently.
Theres no need to allocate the customdata in the first place - since its written into. So add a flag for vert/edge/face/loop creation functions so they can skip customdata creation.
2012-11-29 16:26:39 +00:00
Howard Trickey
fb27a69124
Bevel: partial fix for distortion (bug 33280).
...
Sometimes it is impossible to have same offset from
both edges that are on angled faces. The fix here
at least doesn't distort the non-beveled part of the
model, and looks much better than before on bug
example, but is still not perfect.
2012-11-29 13:54:39 +00:00
Campbell Barton
0b9be70591
typo's and some style cleanup, also added asserts into BLI_vsnprintf and BLI_sprintfN when invalid args are given.
2012-11-28 06:43:04 +00:00
Campbell Barton
e35b235925
fix [ #33320 ] Decimate modifer in collapse is inconsistent when limiting to a vertex group
2012-11-28 02:49:06 +00:00
Campbell Barton
9982b283e6
fix for asserts added in own recent commit with more strict type-checking
...
- BMO_slot_copy now only copies compatible elements.
other minor changes
- don't use text.format(...), convention for UI scripts is C style string formatting.
- rename bmo_edgenet_prepare --> bmo_edgenet_prepare_exec
- float/double warning in bevel.
2012-11-27 02:34:40 +00:00
Howard Trickey
33c92a02e4
Bevel: better round profile code.
...
Easier to understand, no touchy intersect code, and works
even when arms aren't equal length.
Old code ifdef'd for now, will remove soon.
2012-11-27 01:07:22 +00:00
Campbell Barton
e1dc420193
use slightly more efficient BLI_array_fixedstack_declare() instead of BLI_array_staticdeclare() for bevel code since the array size is known.
2012-11-26 05:06:33 +00:00
Campbell Barton
7ef78723b7
code cleanup: doxy comment corrections and correct own typo animation player docs.
2012-11-26 00:59:11 +00:00
Howard Trickey
3a7d4d661f
More fixes to parallel tests to make them less sensitive, prevents assert failures.
...
Also made bl_debug_draw_edge_add better (don't draw edges in one continuous line).
2012-11-25 13:52:13 +00:00
Campbell Barton
b688a79b30
skip some redundant looping in bevel code.
2012-11-23 06:09:03 +00:00
Campbell Barton
9682108113
minor speedup for bevel, avoid calling find_bevvert() when we know the edge isn't beveled.
2012-11-22 11:02:57 +00:00
Howard Trickey
0d27c16894
bevel: fix bug where constructed where parallel test
...
didn't work (angle check too sensitive). Caused some
(nan,nan,nan) results from offset_in_two_planes.
2012-11-21 13:07:03 +00:00
Campbell Barton
185cf6095e
improvements to bevel
...
- the resulting selection is now correct
internal details
- bev_rebuild_polygon() now only rebuilds polygons that are attached to a bevel vertex (was rebuilding ALL).
... need to take care we don't leave faces pointing to removed geometry, so far this works fine.
- bev_rebuild_polygon() uses stack memory for <32 size ngons to reduce allocs.
- skip hash lookup when removing bevel verts (use tag instead).
2012-11-19 02:26:59 +00:00
Campbell Barton
a9af563526
bmesh: lazy initialize bmesh tool flag pool, has the advantage that modifiers that dont use bmesh operators can skip allocating it.
2012-11-18 12:14:22 +00:00
Campbell Barton
42ebc9bc80
bmesh: move internal API flags out of BMFlagLayer, into BMHeader which was being padded up anyway, added static assert to make sure it stays <=16 bytes.
2012-11-18 10:17:07 +00:00
Campbell Barton
fd9dac77d1
bevel now only takes manifold edges (so it doesnt need to check for them)
2012-11-18 09:33:11 +00:00
Campbell Barton
b72c1ac33c
bmesh function was still using bmesh operator flags, use edge tags instead.
2012-11-18 09:25:57 +00:00
Campbell Barton
4401ac8c9e
finish moving bevel code out of the operator dir (it works again)
2012-11-18 08:35:27 +00:00
Campbell Barton
9a74fb5b05
moving bevel to tools dir as-is to keep svn history (breaks build, will fix next).
2012-11-18 08:20:02 +00:00
Campbell Barton
916039f520
move decimator into tools/ dir
2012-11-18 08:16:09 +00:00
Campbell Barton
2de2acc681
add CDDM_from_bmesh(), avoids using BMEditMesh in modifiers.
2012-10-24 07:24:11 +00:00
Campbell Barton
e75f5c8208
quiet -Wmissing-prototypes warnings, and enable this warning by default for C with gcc.
...
helps for finding unused functions and making functions static, also did some minor code cleanup.
2012-09-15 01:52:28 +00:00
Campbell Barton
aaafa0c2fe
code cleanup: move file string defines into BLI_path_utils.h, BKE_utildefines is now unused but keep incase we want to add defines there later.
2012-09-03 22:04:14 +00:00
Campbell Barton
ca7d1ec39d
style cleanup: use <pre> for doxygen ascii art
2012-08-13 15:17:15 +00:00
Campbell Barton
32cf7fcdb1
code cleanup: spelling
2012-07-16 23:23:33 +00:00
Campbell Barton
af3e348430
code cleanup: use TRUE/FALSE rather then 1/0 for better readability, also replace do prefix with do_ for bool vars.
2012-05-19 13:28:19 +00:00
Nicholas Bishop
ed33320e3f
Code cleanup: simplify standard GHash creation.
...
Added four new functions as shortcuts to creating GHashes that use the
standard ptr/str/int/pair hash and compare functions.
GHash *BLI_ghash_ptr_new(const char *info);
GHash *BLI_ghash_str_new(const char *info);
GHash *BLI_ghash_int_new(const char *info);
GHash *BLI_ghash_pair_new(const char *info);
Replaced almost all occurrences of BLI_ghash_new() with one of the
above functions.
2012-05-16 00:51:36 +00:00
Campbell Barton
145289ad95
code cleanup: minor improvements to float/vector usage.
2012-05-12 22:13:38 +00:00
Campbell Barton
2a1ba8c85b
style cleanup: formatting and some float/double promotion
2012-05-03 19:57:24 +00:00
Campbell Barton
ef0a4c0ba9
fix for bevel modifier creating invalid geometry - simply tell BM_face_split() to check for doubles.
2012-04-26 15:38:16 +00:00
Campbell Barton
a667492d0e
fix [ #30997 ] Bevel angle option is broken (bevel vertex only)
2012-04-24 05:38:11 +00:00
Campbell Barton
f02694f5a4
workaround for vertex bevel modifier failing since the BMesh update.
2012-04-24 05:02:53 +00:00
Campbell Barton
077cbaddf0
- remove unneeded len_v3v3 in bevel code
...
- remove dead assignments from vgroup-blend
2012-04-24 04:44:51 +00:00
Campbell Barton
16ff7e40e6
code cleanup: change C naming convention (so py and C api match), eg:
...
C: BM_face_calc_area(f), Py: BMFace.calc_area()
2012-04-23 01:19:50 +00:00
Campbell Barton
b40476455e
code cleanup: remove unused BMesh args.
2012-04-19 14:38:09 +00:00
Campbell Barton
475ecbb0ce
remove BM_ITER, BM_ITER_INDEX macros, use ELEM or MESH variants only (the maceros had unused args in both cases).
2012-04-19 13:47:58 +00:00
Campbell Barton
75b869e428
style cleanup: BM_ITER / BM_ITER_INDEX / BMO_ITER
2012-04-19 11:44:12 +00:00
Campbell Barton
84f3ade1e5
fix bevel edge angle (wasnt hooked up to new code), vertex-bevel angle isnt working still
2012-04-19 07:00:29 +00:00
Campbell Barton
d403722722
style cleanup: bevel code, also remove unneeded flag setting.
2012-04-19 06:10:21 +00:00
Campbell Barton
08478a10d1
fix [ #30921 ] Bevel modifier's is not work correctly with bevel weights
...
replace dissolve function with one from 2.62 (updated for the new bmesh api).
2012-04-18 07:29:12 +00:00
Campbell Barton
1f01d62d15
more replacement for BM_edge_face_count() use.
2012-04-18 06:57:28 +00:00
Campbell Barton
27696ddae1
fix error in last commit. Misunderstood BM_vert_is_manifold(), added some comments.
2012-04-18 06:36:47 +00:00
Campbell Barton
6389301eb5
fix for own error in recent scanfill updates, scanfill can hang if run on a polygon with no area.
2012-04-18 05:52:18 +00:00
Campbell Barton
1635d8e873
add option not to delete edges/verts when joining faces, needed so we can loop over edges and join them without having to check if they have been removed.
2012-04-04 14:48:10 +00:00
Brecht Van Lommel
b44ae0c387
Fix #30791 : BMEdge.is_manifold also returned true for edges with only one face
...
attached to it. A manifold edge should have exactly 2 faces attached to it,
sticking to the standard definition for "manifold".
2012-04-03 17:09:47 +00:00
Campbell Barton
ab4a2aaf4a
style cleanup: follow style guide for formatting of if/for/while loops, and else if's
2012-03-24 06:38:07 +00:00
Campbell Barton
3c11379e26
code cleanup: move bmesh inline funcs to headers (avoids compiling the C files).
2012-03-24 01:24:58 +00:00
Campbell Barton
7044d80639
code cleanup: remove BMesh * args from query functions which don't need it
2012-03-22 07:53:11 +00:00
Campbell Barton
be116242d4
style cleanup
2012-03-20 04:27:14 +00:00
Nicholas Bishop
ccbed13343
Quiet warnings about unused functions and variables.
...
Commented or '#if 0' these functions/variables and marked with
'UNUSED' comment so they can be restored in the future if needed.
2012-03-19 22:21:40 +00:00