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
Sergey Sharybin
7d62e6d94a
Fix navmesh after recent bmsh api changes.
2012-11-29 16:34:09 +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
9653c929ed
skip recalculating tessface when adding objects if 'EnterEdit-mode' is disabled.
2012-11-29 02:37: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
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
7c36100930
new bevel was still referring to old property name (holding shift wasnt working while beveling).
2012-11-27 09:47:22 +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
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
Brecht Van Lommel
864c4112e9
Fix #33316 : mesh edge short path select was wrong on large/small objects.
2012-11-26 19:10:34 +00:00
Brecht Van Lommel
c91562d0ff
Fix #33310 : unnecessary redraw of outliner when editing materials and textures.
2012-11-26 08:52:07 +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
Brecht Van Lommel
7ecf054295
Bevel: allow page up / page down shortcuts for segments in addition to mousewheel.
2012-11-26 06:59:50 +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
8be86d3254
use a search popup for 'blend from shape' tool, suggested by Juan Pablo.
...
use standard operator panel, since the popup was too easy to cancel by accident, especially with a popup search menu.
2012-11-24 05:38:20 +00:00
Brecht Van Lommel
f5bf63dc96
Fix #33277 : vertex merge would merge UVs by default, disabled that now by again
...
like it did before bmesh.
Neither method is perfect, ideally it should do smart detection of UV islands
but without that it's better to disable because it is more difficult to recover
from incorrectly merged UVs than ones that were not merged.
2012-11-23 19:10:56 +00:00
Howard Trickey
7189a9db51
Fix bevel crash in OSX debug build.
...
Code to select from output slot moved before
EDBM_op_finish, which frees slot buffers.
2012-11-23 03:15:16 +00:00
Nathan Vegdahl
387bb73e43
Change edge loop select and edge ring select to be consistent with
...
other selection operators. Instead of having only a single "extend"
option which causes the selection to toggle, there are now
three options:
- extend: adds to selection
- deselect: removes from selection
- toggle: toggles the selection
The default keymap is adjusted to have identical behavior as before,
using these new options, so end-users shouldn't experience any
difference.
2012-11-21 01:51:31 +00:00
Campbell Barton
622196113a
fix for missing bmesh operator flags when selecting linked (caused by own recent commits)
2012-11-20 20:45:04 +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
Sergey Sharybin
0332698e02
Fix for add plane operator broken since recent code cleanup
2012-11-20 10:43:11 +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
5716762c02
fix for changes in own recent commit:
...
selected linked in face mode was crashing. (needs bmesh operator flags)
also some style edits, remove unused includes and change triangulate modifiers use_beauty to a flag.
2012-11-19 23:52:24 +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
4cd129bb50
fix for the update issue reported in [ #32452 ]
...
When blending shape key, opening the popup didnt execute anything - making it so pressing a button would update the result even if the value didnt change.
2012-11-14 06:13:42 +00:00
Campbell Barton
ebde2d579a
each different remove doubles function used a different property name, use 'threshold' for all now.
2012-11-14 03:13:51 +00:00
Ton Roosendaal
7abee9614a
Bugfix, IRC report:
...
The "Add Monkey" object name should be Suzanne - as it was until 2.50. :)
2012-11-13 15:47:22 +00:00
Campbell Barton
add5dd3797
add an operator for mesh mode switching,
...
this lets python menu for mode setting do mixed selection and extending the selection - just like the buttons in the header.
2012-11-13 05:44:49 +00:00
Campbell Barton
a7bee65d38
make smoothing value for ring select compatible with the operator.
...
also wrap long lines in noise.c
2012-11-13 02:45:42 +00:00
Campbell Barton
6335401a49
todo from 2.4x, add back smooth option to edge loop cut.
2012-11-13 02:28:07 +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
Campbell Barton
0bfc92ff8e
BM_iter_as_arrayN() can now take an optional existing array argument, useful to avoid many small malloc's by passing a fixes size stack variable instead.
...
Will give some speedup to edge-split modifier and bevel.
2012-11-12 05:53:43 +00:00
Campbell Barton
89845f280f
fix [ #33142 ] Ctrl LMB higher selection mode in edit mode sometimes selects extra elements
2012-11-11 23:33:59 +00:00
Howard Trickey
5ebe7d6a13
Bevel: patch from Thomas Beck fixes numeric offset input and adds wheel input for number of segments.
2012-11-10 13:59:45 +00:00
Campbell Barton
6cdb555e6e
bmesh refactor - rename some of the BM_****_share_****_count() functions to BM_***_share_check()
...
some of these were only returning a boolean, others returned a count even though only a boolean was needed.
split some of the functions in two as well where check/count are both needed.
2012-11-09 14:52:05 +00:00
Campbell Barton
2bb174cfa4
style cleanup: indentation
2012-11-09 09:33:28 +00:00
Howard Trickey
da4441f7c5
Merge gsoc Bevel (with rounding) into trunk.
2012-11-08 15:12:21 +00:00
Campbell Barton
617a73c573
code cleanup: unused defines & some formatting.
2012-11-08 06:46:10 +00:00
Campbell Barton
718550878b
minor cleanup to to selecting the shortest path, change some variable names and make edge/face modes share the cost calculation function.
2012-11-08 03:39:15 +00:00
Campbell Barton
9bdfb82f05
add mesh editmode Ctrl+RMB to select the shortest path between faces, works the same as for edges.
...
Request from Kjartan.
2012-11-08 03:19:21 +00:00
Campbell Barton
5b0ee040a3
further cleanup for selecting the shortest path, remove the need for EDBM_index_arrays_* functions.
2012-11-08 02:33:26 +00:00
Campbell Barton
374238b7ef
code improvements for selecting the shortest path for mesh editmode,
...
this will give some speedup but its mainly to simplify the function.
- use bmesh adjacency data, was building its own data, left over from pre-bmesh.
- use a flag to store visited edges rather then a hash.
- store edge pointers in the heap rather then index values (was converting back and fourth a lot).
2012-11-08 02:12:31 +00:00
Campbell Barton
fae6c35ca7
code cleanup: quiet -Wdouble-promotion, disabled this warnings for a few files since its done throughout the code in some places.
2012-11-04 07:18:29 +00:00