Commit Graph

184 Commits

Author SHA1 Message Date
2fd4877c76 minor bmesh api changes.
- use SMOOTH flag for edges (removed sharp flag and inverted), gives us an extra flag slot available.
- rename BM_edge_is_nonmanifold --> BM_edge_is_manifold and invert result, BM_vert_is_nonmanifold too.
2012-02-18 11:44:30 +00:00
a677e016d6 remove function for testing selection (was only used in a few places) 2012-02-17 21:49:24 +00:00
3e78832dea remove OBJ export, better rely on the python exporter. 2012-02-17 21:37:16 +00:00
1eb48de199 fix [#30186] Crash in execute the "Operator Cheat Sheet" 2012-02-15 12:39:18 +00:00
cde2f11244 new bmesh tool - limited dissolve.
This is a kind of simplification/cleanup tool which joins adjacent faces and edges based on the angle.

I've written this as an exercise (since I havnt written a bmesh operator before), and because quite a few users were asking for the dissolve operator to be extended, but I think this kind of functionality needs its own operator.

access from specials menu and mesh menu.

notes
* this exposed a bug in angle_v3v3v3(). will merge fix into trunk after release.
* added utility function BM_vert_edge_angle(), to get the angle between 2 connecting edges of a vert.
2012-02-13 14:37:07 +00:00
db173f6ef8 Minor API Edits.
added BM_mesh_elem_flag_enable_all (only had disable function), and add
argunt for vert/edge/face type.

use these functions from EDBM_flag_enable/disable_all (had duplicate
code).
2012-02-13 06:59:25 +00:00
7be1cd733d more bmesh minor api cleanup
* remove BMO_elem_flag_* functions, since there are already defines for this.
* ifdef unused bevel functions.
* rename defines BMOP_ --> BMO_OP_
2012-02-13 02:42:50 +00:00
5b2ea6f8a4 remove bm_get_cd_float, use CustomData_bmesh_get instead, this function only casts to a float, and doesnt simplify args. 2012-02-12 18:49:56 +00:00
37ff2a291f BMesh api function naming.
`_set` suffix was used in two ways (confusing)
* to set a flag to be enabled.
* to set a value passed as an argument.

now use enable/disable rather then set/clear for functions which change flags.

also remove BME_weld.c, the file didnt contain much code and the current extrude works well
2012-02-12 18:43:59 +00:00
9a92cd8008 bmesh minor refactor
* add DM_to_bmesh_ex, DM_to_bmesh for converting a derived mesh to a BMesh (rather than a BMEditMesh)
* have a generic variable for allocsize: bm_mesh_allocsize_default, rather than copying the values about.
2012-02-12 17:44:10 +00:00
b6dcdb065d code refactor, function renaming for bmesh.
These changes are to make the bmesh api more consistent and easier to learn, grouping similar functions which is convenient for autocomplete.
This uses similar convention to RNA. 

* use face/loop/edge/vert as a prefix for functions.
* use 'elem' as a prefix too for functions that can take any type with a BMHeader.
* changed from camel case to underscore separated (like RNA).
2012-02-12 10:51:45 +00:00
8b43813b69 rename BM_ flags for BMHeader->hflag to BM_ELEM_ to be more clear that these flags apply to bmesh elements. 2012-02-12 06:24:12 +00:00
1dc3536268 mode bmesh include cleanup, remove unused file too. 2012-02-11 10:15:11 +00:00
acd568d751 include cleanup 2012-02-11 08:46:56 +00:00
91390b712a GPL Header Cleanup 2012-02-11 04:16:17 +00:00
c1070b863b Style Cleanup 2012-02-10 18:09:19 +00:00
e25b59923b fix for smooth not working with mirror clip. 2012-02-10 15:25:12 +00:00
2dda20a96e Style Edits only: use TRUE/FALSE rather then 1/0 2012-02-10 06:50:16 +00:00
3453ec8fae reviewed selection flushing code, some of this was incorrect, checked all uses against trunk.
loop select also was incorrectly calling EDBM_select_flush() rather then EDBM_store_selection(), tsk tsk. (and strange nobody noticed this).
2012-02-10 06:16:21 +00:00
d7b8e7e9bc Code Cleanup: use less confusing names for selection flushing. 2012-02-10 03:03:42 +00:00
0e89e2d6fb add option to dissolve resulting verts with 2 edges after dissolving faces/edges.
in some cases you want these, but many times they end up neededing dissolving too.
2012-02-10 01:40:37 +00:00
1fd6088729 Code Cleanup:
- use 'oflag' for operator flag arguments.
- use TRUE/FALSE for some bool args
2012-02-07 13:54:16 +00:00
0adcdbc77d Code Cleanup: comment, remove or use unused functions. 2012-02-06 09:39:47 +00:00
e80c80dc51 replace some hard coded limits with defines 2012-02-06 05:18:08 +00:00
18763fd9c8 Minor Improvements...
- more efficient array growing
- use BM_NGON_STACK_SIZE for more static arrays
- dont use BLI_array for bevel code where size is known.
2012-02-05 23:09:07 +00:00
11d5a2d2eb Code Cleanup: style change only 2012-02-05 15:55:28 +00:00
2ea8a3b8ca remove CDDM_copy second argument, added CDDM_copy_from_tessface instead.
this function caused too many conflicts and in most cases was zero anyway.
2012-01-29 21:59:47 +00:00
d3090a32f2 svn merge ^/trunk/blender -r43664:43676 2012-01-24 20:19:09 +00:00
705f23064e svn merge ^/trunk/blender -r43294:43338 2012-01-13 01:39:57 +00:00
8a8cb2c3ef minor formatting edits 2011-12-21 04:56:04 +00:00
57e6ac47a0 use TRUE/FALSE rather then 1/0, no functional changes. 2011-12-21 03:33:32 +00:00
45b9a5a3e1 more mirror cleanup
- remove BMBVH_FindClosestVertTop
- update select mirror operator to EDBM_CacheMirrorVerts
2011-12-21 00:09:44 +00:00
db6cb30941 svn merge ^/trunk/blender -r42669:42670 2011-12-16 23:50:55 +00:00
6254cc1c70 2 new bevel options for the operator and the modifier.
* even offset, uses same shell distance method as solidify to give even with beveled faces.
* distance offset, this is mostly for compatibility with the modifier in trunk which uses the bevel width as a distance rather then a percentage. at the moment this is awkward for the operator since it makes percent act differently where the 0-1 range doesnt make sense.

still need to bring back more options from trunks bevel modifier.
2011-12-13 09:57:19 +00:00
8115753fd2 svn merge ^/trunk/blender -r42564:42586 2011-12-12 21:01:39 +00:00
35e80c5544 svn merge ^/trunk/blender -r42439:42466 2011-12-06 18:50:45 +00:00
0b805fcb5d remove double lookus in BM_GetCDf/BM_SetCDf, also remove bm_cdata_get_single_float which was a duplicate of BM_GetCDf. 2011-12-06 08:07:12 +00:00
a6756b6863 Hook up mesh select_all properties added in previous commit 2011-12-02 19:43:53 +00:00
397aad23c8 Reverse default direction of "rotate colors" to match the (only rotation direction) of rotate colors in trunk 2011-12-02 16:57:22 +00:00
6bdd65ca73 Add missing properties to mesh select_all operator 2011-12-01 14:12:43 +00:00
063dd4f60a svn merge ^/trunk/blender -r42197:42221 2011-11-28 17:09:13 +00:00
a89071333e per type restrict masks for walkers
- vert/edge/loop/face each get their own restrict masks
- any invalid restrict masks (which are not supported by the walkers) raise an error.
2011-11-24 01:07:36 +00:00
052d892207 small changes to iterator, preparing for bigger changes.
- renamed flag to layer
- added define to make dummy layer args easier to tell apart from flags
2011-11-24 00:14:13 +00:00
9089d72f06 Various typo cleanups, remove unnecessary code etc, found during recent work and separated to a cleanup change 2011-11-20 16:21:13 +00:00
42c0250b28 fix [#28676] Tris to Quads: "Max Angle" is not interpreted correctly 2011-11-18 09:41:39 +00:00
707fcc42a3 replace macros with math functions 2011-11-16 17:37:20 +00:00
9087cb91d4 quiet compiler warnings for BLI_array defines, split BLI_array_append into BLI_array_append / BLI_array_append_r, the latter returning the new array location. 2011-11-16 17:09:41 +00:00
0c017bf146 tag index arrays as dirty when any element is removed, also check validity on operator init/exit (check was missed in some cases before) 2011-11-16 14:36:23 +00:00
b0a21add8a replace bmesh specific macros with math functions, also some pedantic formatting edits. 2011-11-07 09:02:10 +00:00
9a52069524 ctrl+click mesh extrude wasnt re-tesselating the mesh 2011-11-01 23:38:34 +00:00