Campbell Barton
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
Campbell Barton
671b871e7f
fix [ #33392 ] In-dev freeway generation addon crashes on recent builds.
2012-12-03 05:40:48 +00:00
Campbell Barton
48aa356b7b
use const for bm_mesh_allocsize_default, bm_mesh_chunksize_default
2012-12-03 05:38:28 +00:00
Campbell Barton
17c2621fd1
bridge tool - simple optimization, break early if edge loop length comparisons are worse then existing best loop test.
2012-12-03 05:02:32 +00:00
Campbell Barton
a490f4f7c4
fix [ #33391 ] Bridge two Edgeloops fails in simple case
2012-12-03 04:53:30 +00:00
Howard Trickey
11e87d118e
Bevel: fix for bulging part of bug 33280.
...
Bulging still happens, but fixed the cases where it was obvious
because it destroys an otherwise straight 'pipe' by snapping
the vertex mesh points to that pipe.
2012-12-03 01:46:37 +00:00
Bastien Montagne
818a345be3
Silent a bunch of gcc warnings (usually dummy, but noisy!).
2012-12-02 16:01:06 +00:00
Bastien Montagne
1d09d0a9c5
Silent some warnings (the one in bmesh_operator.c was even preventing build in -Werror mode).
2012-12-02 13:35:33 +00:00
Howard Trickey
c324895136
Bevel: fix crash bug 33362, when beveling one edge at valence 2 vertex.
...
That special case should have been tested before - the code was wrong
in about three different ways.
2012-12-01 14:23:44 +00:00
Howard Trickey
eb490f3aae
Bevel: fix spike in suzanne, bug 33354.
...
Non-planar faces made some of the meet point code not work well,
so now calculate local face norms.
2012-12-01 03:26:57 +00:00
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
d72a6c3018
fix for another error in my own recent commit, beauty fill crashed.
2012-11-30 16:15:49 +00:00
Campbell Barton
ca64979236
fix own mistake in recent commit - entering editmode with a shape key crashed.
2012-11-30 14:27:25 +00:00
Campbell Barton
ce3ea8942c
remove unneeded mesh->bmesh conversion code that copied BMLoop data in a separate loop (since there is no longer pre-allocated loop data on the new BMLoops).
2012-11-29 16:36:16 +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
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
858149d7c7
bmesh py api: add bmesh.update_edit_mode(), there was no way to redraw the 3d view or re-calculate face tessellation from python.
...
add py template for editing meshes in editmode.
also remove double call to CTX_wm_region which does a string lookup.
2012-11-29 05:02:06 +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
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
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
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
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
69948150ad
improve docstring for BMO_op_vinitf().
2012-11-27 23:37:02 +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
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
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
Campbell Barton
42c54bcd93
py/bmesh api - support for converting from/to BMO_OP_SLOT_MAPPING type.
2012-11-26 08:44:37 +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
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
e77e1f183a
fix for uninitialized memory use with numeric input:
...
bevel/inset/marker-move would use uninitialized memory when used as modal operators and pressing backspace after entering values.
2012-11-26 03:47:20 +00:00
Campbell Barton
3d64381e4d
use more rigid type checking for bmesh slot subtypes.
2012-11-26 03:16:29 +00:00
Campbell Barton
3fe8134d6d
add subtypes to bmesh operators (needed for python api to know how to convert return values).
2012-11-26 02:24:03 +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
0446e2571f
fix for inset getting bad UV's/VCols at face boundaries.
2012-11-23 05:49:00 +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
Campbell Barton
55535b21fe
fix own error - remove doubles slot name.
2012-11-22 01:00:40 +00:00
Antony Riakiotakis
031230265c
Fix: Normal maps and triangulate modifier will give incorrect result on
...
rectangular faces after applying rotation, reported by Metalliandi
This issue is caused by floating point precision error. After applying
rotation, the edge lengths change slightly and on rectangular faces the
length comparison can be flipped. Solved by giving a slight offset to
the length calculation for the diagonal during triangulation
calculation. (Same as done during uv unwrapping)
2012-11-21 21:42:07 +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
2fd1f38fbc
enable edge draw by default for new edges,
...
alternate fix for [#33217 ] Mirror Modifier not showing "Shadow" mesh in wireframe view
2012-11-21 10:57:45 +00:00
Campbell Barton
68e9fdeb81
code cleanup: comment unused members of bmesh operator slots and some osl style edits.
2012-11-20 14:31:58 +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