Commit Graph

59 Commits

Author SHA1 Message Date
3264461598 move bmesh array lookup data and utility functions from editmesh into bmesh,
since enough bmesh operations can also take advantage of direct index lookups on verts/edges/faces.

developers note:
- EDBM_index_arrays_init/ensure/free -> BM_mesh_elem_table_ensure/init/free
- EDBM_vert/edge/face_at_index -> BM_vert/edge/face_at_index
- EDBM_uv_element_map_create/free -> BM_uv_element_map_create/free
- ED_uv_element_get -> BM_uv_element_get
2013-10-28 02:05:33 +00:00
8beb565c59 code cleanup: headers - doxy comments. 2013-09-12 03:02:50 +00:00
8937a8b839 use BM_CREATE_NOP arg rather then zero, with pointer and bool args in either side in some cases it gets a bit confusing.
also correct edge-rotate where bool->flag conversion worked by accident.
2013-08-21 05:39:46 +00:00
00b39c4e5b code cleanup: more confusion with 0/NULL/false 2013-08-07 03:55:21 +00:00
a7e7b69a65 Fix #35902: build navigation mesh crash with multiple meshes selected. 2013-06-28 14:15:14 +00:00
781184562b add api calls for BM_mesh_active_vert/edge_get.
inspecting the edit-selection inline was cumbersome.
2013-06-24 04:51:56 +00:00
37e73aa368 code cleanup: use BKE naming conventions for functions in BKE_editmesh.h and BKE_editmesh_bvh.h 2013-04-16 05:59:48 +00:00
6da961775f code cleanup: rename BKE_tessmesh -> BKE_editmesh, rename EditDerivedBMesh.tc -> em. ('tc' is odd name which isn't used elsewhere). 2013-04-13 20:31:52 +00:00
6d8e25dfdc code cleanup: split editmesh_tools.c, into inset, bevel (both modal operators) and moved extrude operators into their own file.
also move some selection operators from editmesh_tools.c into editmesh_select.c
2013-04-01 10:18:01 +00:00
790374d07d code cleanup: rename editmode functions so we have ED_object_editmode_load/enter/exit 2013-03-21 14:18:17 +00:00
e7c15beaf6 code cleanup: use booleans for mesh and selection code. 2013-03-19 23:17:44 +00:00
7f9b650ced fix for usability issue - navmesh would create the new object on the first layer, rather then the layer of the source object(s). 2013-01-28 06:34:13 +00:00
Dalai Felinto
236bc27484 Operators name "cleanup"
The operator names all show up in the Search button. As such is nicer if they
can all have the main words capitalized.

e.g. "Snap strips" should be "Snap Strips"
     "Copy to clipboard" should be "Copy to Clipboard"

This was done with a mix of bash tools, regex, and manual work because I'm too rushed into regex :)

+ fix bge stereo eye separation tooltip
2013-01-27 07:23:58 +00:00
5b72578a13 Tsst... "faled"... :p 2013-01-05 11:50:36 +00:00
ab913fe15d add length average option to 'Follow Active Quads' unwrap, gives nicer results. 2013-01-04 07:57:33 +00:00
6fabbcb4dd fix [#33758] Blender crashes when user goes to choose "build navigation mesh"
Give useful reports when the 'MESH_OT_navmesh_make' fails too.
2013-01-04 05:43:26 +00:00
1f3e3b0d68 include cleanup 2012-12-19 04:49:32 +00:00
44b634bcb1 make EDBM_index_arrays's stay in memory, blender was allocating an array and filling it for verts/edges/faces on every redraw.
this may introduce bugs which I didn't catch, but they are very easy to identify in a debug build which has asserts to ensure the arrays are valid before use.

in my own test drawing ~98,304 quads - this gave an overall ~16% drawing speedup.
2012-12-12 06:53:39 +00:00
cf723e5e7c use htype flags as arguments to EDBM_index_arrays_init(), no functional changes. 2012-12-12 05:27:52 +00:00
7d62e6d94a Fix navmesh after recent bmsh api changes. 2012-11-29 16:34:09 +00:00
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
fe9b1c644f Fix #32458: changing UV image in image editor not working when the active face
was not selected. Now changed it so that the active face must also have its
UVs shown in the image editor to be used as the source of the image shown.
2012-08-31 15:01:40 +00:00
299ff91ea1 code cleanup: BKE_scene api naming.
also stop numpy from being found in /usr/include with cmake.
2012-05-05 14:33:36 +00:00
b075765edd Fix #31258: collada now selects newly added objects after import. 2012-05-03 21:32:49 +00:00
a5af5e8f50 style cleanup: re - http://wiki.blender.org/index.php/Dev:Doc/CodeStyle#Braces_with_Macros 2012-04-30 16:22:40 +00:00
e2c453b5f9 style cleanup: editors / mesh & object 2012-04-28 15:42:27 +00:00
ef054e165c style cleanup: format 'for' loop macros the same as for loops, some renaming to BLI_array macros. 2012-04-28 15:14:16 +00:00
475ecbb0ce remove BM_ITER, BM_ITER_INDEX macros, use ELEM or MESH variants only (the maceros had unused args in both cases). 2012-04-19 13:47:58 +00:00
75b869e428 style cleanup: BM_ITER / BM_ITER_INDEX / BMO_ITER 2012-04-19 11:44:12 +00:00
caafc8184b Fix #30720: Creating Navmesh crashes blender
In fact there were several issues fixed (all of them regressions since bmesh merge):

- Creating navmesh crashed because creating new faces for mesh was trying to set
  default values for all customdata layers in this face. This requires memory
  pool created for this datablock.
  Usually this pool is creating on creating datablock if there're some elements
  to be stored in this block. In cases of regular primitive creating it wasn't
  an issue because they doesn't create customdata layers, they only creates
  geometry.
  Navigation mesh creates geometry and customdata layers (CD_RECAST layer)
  which used to confuse a bit custom data functions. Solved by ensuring there's
  memory pool created for polygons datablock after adding new custom data layer.
  Most probably it's better to be resolved on CD level (like smarter track on
  changed amount of stored data and so) but prefer not to make such global changes
  so close to the release.
- Toggling edit mode lead to loosing recast datalayer. Solved by adding recast
  layer to bmesh mask so it'll be copied to/from edit mesh.
- Some part of code assumed raycast layer is in face datablock, some that it's in
  polygon datablock. Made it to be in polygons datablock.
  Kind of temporary solution to make navmesh working, probably it'll fail if one
  will want to edit navmesh by hand after it was generated.
  Proper way would be to ensure the whole navmesh things are using ngons.
2012-04-16 13:53:30 +00:00
09f29c0b70 style/name cleanup: have EDBM_* functions match our style guide and also match BM_ function naming conventions 2012-03-27 04:46:52 +00:00
48f0444760 style cleanup: editors/mesh - mostly whitespace around operators 2012-03-26 02:56:48 +00:00
ab4a2aaf4a style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:38:07 +00:00
2f348d8b5d style cleanup: mainly for mesh code, also some WM function use. 2012-03-24 02:51:46 +00:00
88d0918fe2 code cleanup: more consistent naming for mesh operator functions. 2012-03-23 21:25:07 +00:00
4c3bb77012 style cleanup: spaces aroudn operators for operator definitions. 2012-03-22 07:26:09 +00:00
622ac0dd16 code cleanup:
replace casts: '((Mesh *)ob->data)->edit_btmesh' with 'BMEdit_FromObject(ob)'

also minor style edits.
2012-03-02 12:09:49 +00:00
47c373c7a9 style cleanup (mostly whitespace) 2012-02-27 10:35:39 +00:00
40c59b1a3d minor edits to have the game engine and player building. 2012-02-19 23:36:10 +00:00
a368e6771a - remove some unused editmesh functions.
- copy & rename EditMesh stricts for use with scanfill (remove unused members)
2012-02-19 22:17:30 +00:00
cf0aeddfc9 marked navmesh as BMESH_TODO, mixed mface/mpoly functions were being used for navmesh too, now editing funcs use polygons only. 2012-02-13 04:52:41 +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
2dda20a96e Style Edits only: use TRUE/FALSE rather then 1/0 2012-02-10 06:50:16 +00:00
051cf6abf8 Style Cleanup:
replace 0/1 with TRUE/FALSE define.
2012-02-07 17:42:46 +00:00
5c6ee6b523 svn merge ^/trunk/blender -r42670:42680 2011-12-17 02:41:53 +00:00
ad96dacbc5 style edit only - move parenthesis onto second line of function definition (in keeping with most of blenders code)
also split some long lines in own code.
2011-12-17 00:52:36 +00:00
143a654e6f formatting and minor refactor of some bmesh functions.
* BM_Make_Quadtriangle --> BM_Make_Face_QuadTri_v
* BM_Make_QuadTri      --> BM_Make_Face_QuadTri
2011-12-13 06:56:10 +00:00
aea95c7860 bmesh: fixed merge issues with navmesh (though I've not tested if it works yet).
also fixed a small crasher in bridge.
2011-11-08 00:20:50 +00:00
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00