Campbell Barton
a1e6e75add
fix [ #30936 ] Face Inset gives bad UV's
2012-04-13 10:37:33 +00:00
Campbell Barton
e9358a3806
bmesh api changes:
...
- remove recently added BM_mesh_select_flush_strip(), functions purpose wasn't clear.
- add BM_mesh_elem_hflag_disable_test(), BM_mesh_elem_hflag_enable_test()
to match existing BM_mesh_elem_hflag_enable/disable_all(), these take a hflag to test before editing each element.
This replaces the need for BM_mesh_select_flush_strip().
2012-04-13 04:02:26 +00:00
Campbell Barton
8c70caf966
fix for UV reveal (wasnt selecting all verts because check for unselected vert was incorrect after selecting the first face).
2012-04-13 03:41:07 +00:00
Antony Riakiotakis
b3bca9d252
Minor code cleanup: Don't reference previous BMwEdgeringWalker after BMW_state_remove. Its memory is freed on that call.
2012-04-12 12:11:21 +00:00
Antony Riakiotakis
7004f929b9
Fix: loopcut didn't stop on hidden faces
2012-04-12 12:03:12 +00:00
Campbell Barton
405c9d9a95
code cleanup: remove unused KeyBlock.adrcode
2012-04-12 11:50:43 +00:00
Campbell Barton
ca8fd669a4
bmesh shape key conversion.
...
- remove print for impossible error.
- add NULL check incase bmesh and mesh get out of sync (would crash if Basis key-block couldn't be found).
2012-04-12 11:27:50 +00:00
Campbell Barton
115e762556
bmesh exit editmode: when a mesh shape-key customdata layer exists but the shape-key-block isnt found, creating a shape key was allocated and inline - it didnt set the name or uid, Now use add_keyblock() as every other function does.
2012-04-12 11:11:31 +00:00
Campbell Barton
c74ace03e0
fix [ #30907 ] Inset tool with Select Outer disabled does not allow translation of new faces
...
inset with select-inner faces gave invalid selection.
also correct spelling in some comments.
2012-04-12 07:40:47 +00:00
Campbell Barton
30888ac25c
doxygen docs explaining whats going on with shape-key conversion.
2012-04-12 06:52:50 +00:00
Campbell Barton
c8b19b7b7f
fix [ #30771 ] Shapekeys: Basis shapekey is not kept in sync with "RealMesh"
...
behave the same as in 2.4x.
- merge BMesh / Pre-BMesh code shape key conversion code, old code was called as a fallback but merge instead.
- fix possible crash - new bmesh code was clamping the vertex index for the oldverts array by the new total number of verts.
2012-04-11 15:59:50 +00:00
Campbell Barton
1f6369fd41
bmesh shape key conversion on exiting editmode.
...
there were 2 blocks of code (both calculating the offset array), now move the fallback method into the main key conversions block.
2012-04-11 15:24:13 +00:00
Campbell Barton
e7b7bc1272
bmesh exit editmode shape key conversion - split out 'keyblock --> customdata layer index' into its own function, makes code easier to follow.
2012-04-11 14:59:35 +00:00
Campbell Barton
1eff051461
bmesh shape key conversion when exiting editmode.
...
- avoid running old conversion code if its not needed.
- de-duplicate functionality which gets offsets from edits made in editmode.
2012-04-11 14:42:44 +00:00
Campbell Barton
a8226cbcb2
code cleanup: mselect conversion when creating a bmesh from a bmesh was overly verbose.
2012-04-11 11:22:19 +00:00
Campbell Barton
b4a0152e76
code cleanup: float formatting was confusing in some cases - eg: (0.,0.,0.)
2012-04-11 08:15:13 +00:00
Joseph Eagar
f8cef0b6a0
Fix related to #30859 : bmesh face splitting would set the first loop of the new
...
faces to a loop quite different than the original first loop. This makes e.g.
duplifaces give rotated results after subdivide or loopcut.
Now it tries to find a first loop that is similar to the old one, to try to keep
the rotations the same.
2012-04-10 11:07:02 +00:00
Campbell Barton
f5bb4635c6
fix [ #30852 ] Wrong Material ID applied for the new faces
2012-04-09 05:17:07 +00:00
Campbell Barton
4fc6ef1cf5
style cleanup: pep8 some C/style
2012-04-08 08:09:37 +00:00
Campbell Barton
c1e475e527
code cleanup:
...
- remove unused vars
- no need to hard code version number for collada.
- cleanup some typos in comments.
- movieclip_calc_length was passing arg which should be unsigned to BLI_stringdec()
2012-04-08 07:34:09 +00:00
Campbell Barton
8fa17c5362
code cleanup: no functional changes
...
- memset(..., -1) is used incorrectly even though it worked: MOD_solidify.c - thanks Halley from IRC for noticing this. use fill_vn_i() instead.
- quiet warnings in editmesh_slide.c
- cleanup comments in bmesh and some other minor comment additions.
2012-04-07 12:37:15 +00:00
Francisco De La Cruz
6482351ed9
Added Vertex Slide: Slides a vertex along a selected and connected edge (Shift+Ctrl+V)
...
-
BMop: "vertslide vert=%e edge=%hfev distance_t=%f"
2012-04-07 03:15:20 +00:00
Campbell Barton
ea1539ce43
fix for memory leak when using the bmesh python api - would allocate customdata layers and overwrite them when converting a mesh to a bmesh (without freeing).
2012-04-05 12:51:17 +00:00
Campbell Barton
784beb4338
adjust limited dissolve to take face angle into account when dissolving vertices between manifold edges.
...
stops artifact with zig-zag patterns between _almost_ planer faces.
2012-04-05 01:20:32 +00:00
Campbell Barton
4f2fb41fb6
fix [ #30809 ] Limited dissolve leaves edges behind
2012-04-04 15:10:20 +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
Joseph Eagar
1246a0d88b
Changed BM_mesh_bm_from_me to copy customdata layout for empty meshes.
2012-04-04 01:35:27 +00:00
Campbell Barton
5f46fdadfd
fix [ #30797 ] Shape keys on linked duplicate get corrupted
2012-04-04 00:45:40 +00:00
Campbell Barton
3bb72e33df
fix for reconstructing shape keys (found when looking into bug [ #30797 ], but not a fix for this bug).
2012-04-04 00:02:48 +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
285970753e
fix/workaround an error related to [ #30735 ]
...
when a single face in a loop is hidden, loop cut will subdivide edges on both sides.
creating an edge between the hidden faces.
without this workaround the edge ends up hidden and selected.
added a check in BM_mesh_validate() for hidden/selected elements.
2012-04-03 07:31:11 +00:00
Campbell Barton
db9c9f6c64
fix [ #30772 ] No more than two subdivions give correct result when adding an icosphere
...
bug was introduced in r45297, which inadvertently broke testing for multiple flags at once.
added BM_elem_flag_test_bool() and BMO_elem_flag_test_bool() to get TRUE/FALSE results rather then the flag value.
2012-04-03 02:38:27 +00:00
Campbell Barton
3f3b88ff42
bmesh iterators were passing the BMesh as data argument to BM_iter_new(), harmless but incorrect.
...
replace these cases with iterator macro.
2012-04-03 00:28:38 +00:00
Campbell Barton
9fff51e83d
code cleanup: BM_select_mode_set had loops over verts and edges but did nothing (set 0 flags), turns out setting any flags isnt needed since flushing manages this so '#if 0' for now.
2012-04-02 23:17:56 +00:00
Campbell Barton
c56bc8cb0f
style cleanup: multi-line if's & whitespace.
2012-04-02 22:40:02 +00:00
Campbell Barton
3c1b5b5632
stule cleanup: edits for files which were recently cleaned up.
2012-04-02 22:26:00 +00:00
Campbell Barton
4253e52771
fix [ #30768 ] Project from View UV map tool includes hidden geometry r45323
...
select all could select hidden faces, now BM_mesh_elem_flag_enable/disable_all takes an argument to skip hidden elements.
2012-04-02 04:45:44 +00:00
Andrea Weikert
b1951ac1ba
fix for [ #30738 ] Shading smooth/flat instability
...
Committing patch from Francisco De La Cruz ([#30753 ] Shade smooth not preserved when toggling editmode)
Thanks for researching this and providing fix.
2012-04-01 10:36:54 +00:00
Nicholas Bishop
c7aed8b2af
For BMesh functions that test flags, add enabled/disabled variants.
2012-03-30 17:30:49 +00:00
Nicholas Bishop
bbbbe1b00e
Add BMO function to append to a buffer slot.
2012-03-30 17:30:24 +00:00
Nicholas Bishop
83ec6dd1bd
Fix out-of-date slot type sizes.
...
The BMO_OPSLOT_TYPEINFO array was out of date, the last two entries
were off by one. Updated with correct values and added comments to
make it easier to match up in future.
Also changed the alloc string for mapping slot's ghash to something
more descriptive than "bemsh op".
2012-03-30 13:49:32 +00:00
Campbell Barton
28889a3500
fix [ #30732 ] bmesh: loop select continues through hidden sections.
2012-03-30 09:27:54 +00:00
Campbell Barton
0e972b6293
partial fix for [ #30732 ] bmesh: loop select continues through hidden sections.
...
loop cut and edge ring select still need to be fixed.
2012-03-30 08:43:47 +00:00
Campbell Barton
e0d94b7244
minor speedup converting a BMesh to a Mesh - avoid loop over all faces to count how many loops to use, since BMesh stores totloop.
...
also use camel case for UndoMesh (convention)
2012-03-30 06:45:13 +00:00
Campbell Barton
bf21f02ad0
fix [ #30718 ] Selecting vertices, edges, faces and undoing - results in wrong header status info
...
converting mesh to bmesh resulted in incorrect stats.
2012-03-30 00:23:22 +00:00
Nicholas Bishop
9c5907cc79
Small code cleanups related to arrays.
...
* Added helpful comment on 'keepverts' slot of bmop finddoubles.
* Removed unused macro 'E' from MOD_array.
2012-03-29 23:13:44 +00:00
Campbell Barton
f87c5b3453
fix [ #30715 ] bmesh: select linked not ignoring hidden verts/edges/faces
...
add optional flag to ignore hidden elements.
also remove loop mask flag - since it wasnt used and vert/edge/face is enough.
2012-03-29 13:09:07 +00:00
Campbell Barton
30d128c7a7
bmesh: be more strict with operator string formatting, no tabs and only accept slot=%x style.
2012-03-28 08:42:19 +00:00
Campbell Barton
274e243a67
own error r45225
...
- move defines to the top of the func.
- rename T -> EPS
- undefine at the end.
2012-03-28 03:17:22 +00:00
Campbell Barton
c9e1ced4dd
code cleanup: (dont include ';' in defines), last commit also missed changes to paint_image.c
2012-03-28 01:06:43 +00:00