Campbell Barton
5446dc0bf3
fix for various asserts running operator tests - not likely any of these would cause real user bugs though.
2012-11-30 16:41:43 +00:00
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
Campbell Barton
cac253a502
fix for minor annoyance - when extruding a circle there would always be one face flipped, now edges are all ordered in the same direction.
2012-11-28 14:15:54 +00:00
Nicholas Bishop
71e7f9028f
Copy face attributes when creating new faces in BMO_symmetrize
...
Fixes bug [#33269 ] Symmetrize doesnt honor shadesmooth
projects.blender.org/tracker/index.php?func=detail&aid=33269&group_id=9&atid=498
2012-11-28 05:07:04 +00:00
Campbell Barton
c5a8bd498d
use radians for 'spin' bmesh operator (since the rest of the py api uses radians). also rename BMO_OP_SLOT_SUBTYPE_MAP_FLOAT -> BMO_OP_SLOT_SUBTYPE_MAP_FLT for consistency.
2012-11-28 00:47:33 +00:00
Campbell Barton
8ecce451ab
bmesh operator naming - use clearer names for args eg: (mat -> matrix, use_singleedge -> use_single_edge)
...
also remove duplicate docs for operator arg formatting.
2012-11-28 00:16:06 +00:00
Campbell Barton
c00a1b7493
use clearer names for 'single' bmesh operator args & add '%e' to BMO_op_vinitf comments.
2012-11-27 09:41:08 +00:00
Campbell Barton
a9855c227e
py/bmesh api - add support for single item buffers (odd feature but used quite a bit with bmesh operators).
...
also add utility functions BMO_slot_buffer_from_single(), BMO_slot_buffer_get_single()
2012-11-27 09:21:57 +00:00
Campbell Barton
90666d3436
code cleanup: bmesh operator comments, readying for doc-generation.
2012-11-27 06:53:26 +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
Campbell Barton
f8bc346eff
bmesh/py operator api:
...
add type checking for element buffers, there was nothing stopping python from passing any element type into an argument when in some cases only verts/edges/faces were expected.
now operator args define which types they support.
2012-11-27 00:50:59 +00:00
Campbell Barton
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
Campbell Barton
a91814e94d
style cleanup
2012-11-26 11:03:14 +00:00
Brecht Van Lommel
cf2c459325
Fix #33285 : loop cut is not supposed to cut through triangles/ngons, but it
...
still happened when the loop would go all the way around the mesh with just one
triangle/ngon inbetween to close the loop.
2012-11-26 06:59:59 +00:00
Campbell Barton
3d64381e4d
use more rigid type checking for bmesh slot subtypes.
2012-11-26 03:16:29 +00:00
Campbell Barton
0446e2571f
fix for inset getting bad UV's/VCols at face boundaries.
2012-11-23 05:49:00 +00:00
Campbell Barton
55535b21fe
fix own error - remove doubles slot name.
2012-11-22 01:00:40 +00:00
Campbell Barton
ebaf1306b8
bmesh operator api:
...
avoid per vert/edge/face string lookups in BMO_slot_map_* functions --- used in array modifier, subdivide, remove doubles and other tools.
2012-11-20 13:29:27 +00:00
Campbell Barton
dbdc76c9d0
code cleanup: make bmesh operator names more consistant since python has access to these as input arguments and return values.
...
all output values currently have ".out" suffix, this may go in the future, but for now it makes it clear in C code what are inputs and outputs.
2012-11-20 05:50:19 +00:00
Campbell Barton
e8667421ed
bmesh operator api edits, add macros and NULL the buffer if BMO_slot_buffer_alloc()'s len is zero.
2012-11-20 03:29:12 +00:00
Campbell Barton
7cafd45f2b
fix for crash in wireframe tool with verts that only have one boundary edge (degenerate cases - edge with 3+ faces using it).
2012-11-20 00:33:11 +00:00
Campbell Barton
48639af5f8
use input and output slots for bmesh operators, needed for the python api to get return values.
2012-11-19 14:58:31 +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
cdc4037f0d
bmesh: BM_verts_in_face was using bmesh operator flag which is no longer ensured to be available,
...
use internal apiflag instead, Thanks to Nicholas Bishop for spotting.
also quiet some warnings.
2012-11-19 00:54:55 +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
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
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
c3c14f862b
use quad-strip for filling even when no segments are being added, this gives quad-loops along the bevel whereas before it made ngons.
2012-11-16 21:25:11 +00:00
Campbell Barton
6de13de7ab
more straightforward way to implement quad-strip face filling suggested by Howard Trickey,
...
also some other changes - no need to check the new loops face is larger and no longer split up the ngon more times then there are subdivisions in the face strip (now ngons will remain on both sides).
2012-11-16 21:05:27 +00:00
Campbell Barton
dc06523622
rework the bevel quad strip logic to work with ngons correctly, previously it only worked properly with triangles.
2012-11-16 14:28:37 +00:00
Campbell Barton
8928344bf7
fix for own bug in quad-stip fill method, quad strips were skewed.
2012-11-16 13:41:21 +00:00
Campbell Barton
b7dbf83d19
more minor improvements to bevel use of math functions
2012-11-16 12:33:24 +00:00
Campbell Barton
6b0c200403
code cleanup: remove unneeded normalize (face normal), and unneeded call to len_v3v3
2012-11-16 12:25:15 +00:00
Campbell Barton
3edbd1d0e2
bevel: save some memory by aligning struct members.
2012-11-16 10:15:25 +00:00
Campbell Barton
f5b356bf18
wip - alternate bevel curve calculation (still disabled)
...
now USE_ALTERNATE_ADJ works, giving more stable corners that don't flicker and glitch out as the offset changes.
The shape is not a circle though and doesnt look quite as nice as the existing method.
2012-11-16 08:12:06 +00:00
Campbell Barton
b3f6c12136
bevel: wip ifdef'd code to test an alternative method of placing corner vertices.
2012-11-15 23:21:21 +00:00
Campbell Barton
8270592fa4
code cleanup: some renaming to avoid confusion.
2012-11-15 22:32:29 +00:00
Campbell Barton
987f6a7d4f
code cleanup: move local math functions into math_geom.c, math_vector.c, no functional changes.
2012-11-15 13:24:14 +00:00
Campbell Barton
283ee53085
fix for deleting lines hanging the text editor when no markers are used, presence of markers still hangs.
...
also compiler warnings and some style edits.
2012-11-15 02:11:40 +00:00
Howard Trickey
cd8584aad5
Fix 'polygon eating' problem in bevel (bug #33141 )
...
which was due to almost-parallel lines.
2012-11-15 02:05:32 +00:00
Campbell Barton
a286afe75d
use memarena for bevel allocs
2012-11-14 11:06:58 +00:00
Campbell Barton
7295d98e07
use ghash for bevel verts, saves list lookups when getting a BMVert's BevVert
2012-11-14 10:23:38 +00:00
Campbell Barton
0163ae1701
speedup bevel by tagging verts and edges to bevel, this avoids a loop over all bevel edges for each bevel vert (can use edges-of-vert instead)
2012-11-14 10:08:39 +00:00
Campbell Barton
7c3db355b1
remove ifdef'd bevel code, current bevel works better then the previous code.
...
reduce strlen check in texttool_suggest_add()
use 'del list[:]' rather then 'list[:] = []' in python scripts which clear lists.
2012-11-14 09:45:15 +00:00
Campbell Barton
66aa7e9192
add simple quad-strip filling to bevel, use to bevel edges when 2 bevel-edges share a vertex.
...
this gives more useful topology, eg:
http://www.graphicall.org/ftp/ideasman42/bevel_strip_fill.png
2012-11-12 16:08:02 +00:00
Campbell Barton
0364a83771
fan filling didnt always work well, now only apply this when its going to work properly.
2012-11-12 12:30:58 +00:00
Campbell Barton
fbdae9ca0a
change bevel do/while loops to step the pointer in the while check, no functional changes.
2012-11-12 12:16:21 +00:00
Campbell Barton
08ec3ab64e
bevel fan fill edges meeting non selected geometry rather then making ngons which often dont triangulate nicely to follow rounded corners: http://www.graphicall.org/ftp/ideasman42/bevel_fan_fill.png
2012-11-12 11:59:28 +00:00
Campbell Barton
cf6994b910
code cleanup: spelling,
...
also initialize bmesh-bevel settings struct to zero to avoid possible uninitialized memory later.
2012-11-12 07:33:01 +00:00