Commit Graph

248 Commits

Author SHA1 Message Date
Campbell Barton c3deb16c16 BMesh: add ability not to delete vertex when collapsing 2014-06-27 20:28:02 +10:00
Campbell Barton 4ca67869cc Code cleanup: remove unused includes
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-05-01 04:47:51 +10:00
Campbell Barton e73d0f57a3 Code cleanup: use 'const' for arrays (python) 2014-04-27 00:25:15 +10:00
Bastien Montagne 0b7f581397 Split Normals I (2/5): Add basic BMesh support of split normals.
* Merely a re-implementation of core split algorithm for BMesh, taking advantage of topological data available.
* This code needs valid loop indices, so added BM_LOOP support to BM_mesh_elem_index_ensure() & co.

Reviewers: campbellbarton

Reviewed By: campbellbarton

CC: brecht

Differential Revision: https://developer.blender.org/D366
2014-04-13 12:25:54 +02:00
Campbell Barton 5873160242 Code cleanup: strict flags for bmesh_log 2014-04-03 17:13:31 +11:00
Campbell Barton 2097e621ed Code cleanup: use r_ prefix for return args 2014-03-16 03:26:23 +11:00
Campbell Barton 13ea967cce Code cleanup: correct abs use and quiet warnings 2014-03-01 14:26:18 +11:00
Campbell Barton bd697dd4d7 Fix T38402: invalid message for bad type assignments (Quat, Vector) 2014-01-30 16:45:20 +11:00
Campbell Barton 5aa006bc1c Fix incorrect extern 2014-01-28 01:50:09 +11:00
Bastien Montagne 18db6c58ec Fix T38150: implementation mismatch in bmesh python
Hopefully this time all mismatches are fixed (quickly checked the whole BMesh API files,
found a few others in addition to those reported in T38150).
2014-01-23 20:17:54 +01:00
Campbell Barton 62aa004c25 Style Cleanup: whitespace 2014-01-12 22:05:24 +11:00
Campbell Barton c2508b6e1b Fix T38150: correct fix this time
also use fixed size lists for list creation.
2014-01-11 21:03:21 +11:00
Campbell Barton ee15db9db5 Fix T38150: BMLayerCollection.items/values docs switched 2014-01-10 22:18:34 +11:00
Campbell Barton c5cb42f402 Code Cleanup: use bool for bmesh operator boolean mapping functions 2014-01-03 21:35:29 +11:00
Campbell Barton 04a902965e BMesh optimize face splitting by taking loops rather then verts
- add BM_vert_pair_share_face
- add BM_loop_is_adjacent
- remove BM_verts_connect
2013-12-24 11:13:58 +11:00
Campbell Barton 75212f4677 BMesh Py API: add bmesh.geometry.intersect_face_point()
patch originally by mont29 with some edits.
2013-12-06 21:15:56 +11:00
Campbell Barton 85bbef0f4e python api internals: no need to set the stop-iter exception string. 2013-11-17 15:09:57 +11:00
Campbell Barton 712c8f3cae code cleanup: warnings 2013-10-31 03:30:20 +00:00
Campbell Barton 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
Andrew Hale 7be81ffaf5 Expose MVertSkin customdata layer in Python. This allows scripts to change parameters which are used by the skin modifier (such as radius) 2013-10-27 12:16:45 +00:00
Campbell Barton d6b21df2e6 correct include guards and add checks in check_style_c.py for them. 2013-09-19 23:17:52 +00:00
Campbell Barton 890cafface fix for error in bmesh api, selection setting needs to go via BM_elem_select_set else the total selected elements count isn't mantained. 2013-09-05 08:38:06 +00:00
Campbell Barton 54310b8086 bmesh: internal api change, remove BMOElemMapping, its not needed since the values can be stored in the ghash directly.
saves 24 bytes per element (per vertex/edge/face on a 64bit system), for bmesh operators.
2013-09-02 03:13:51 +00:00
Campbell Barton 79f7a78637 fix [#36528] crash when reinitializing bmesh from mesh 2013-08-27 00:39:51 +00:00
Campbell Barton 9470754fd3 bmesh api cleanup, face creation args now accept an example face (as with vertex and edge),
also replace BM_face_create_quad_tri_v with BM_face_create_verts
2013-08-21 07:51:47 +00:00
Campbell Barton 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
Campbell Barton 57f8a252d6 fix own regression [#36443] Vertex to UV index doesn't match with 2.68a
add BM_face_create_verts wrapper for BM_face_create which creates its own edge array.
2013-08-21 05:11:11 +00:00
Campbell Barton 38338a51c9 add is_finite_v# functions, use bool's 2013-08-20 09:34:52 +00:00
Campbell Barton 880a86230f bmesh_vert_separate: remove unused return value 2013-08-12 23:49:56 +00:00
Campbell Barton 4f29aeeff2 code cleanup: some structs were declaring data when only typedef's were intended, make local vars and functions static. 2013-08-07 03:44:05 +00:00
Campbell Barton 7db1d6556d code cleanup: add break statements in switch ()'s, (even at the last case). 2013-07-21 08:16:37 +00:00
Campbell Barton a2492e0603 style cleanup: braces/indentation 2013-07-19 16:44:17 +00:00
Campbell Barton 7fec23ae0a fix for problem with edge slide where it would stop shapekey modifier from being applied (because of added vertices),
now, instead of making hidden copies of faces, the faces are copied into a temp bmesh.

also remove a hash that was being created and not used (old code).
2013-07-11 04:24:36 +00:00
Campbell Barton c0c9f5386b fix [#35507] BMesh module: Crash on to_mesh() if faces.layers.tex is used but no loops.layers.uv 2013-06-26 04:17:41 +00:00
Campbell Barton dfad9b0c09 fix [#35555] Collada: export destroys mesh in some cases
add arguments to calculate normals when converting to bmesh:
  BM_mesh_bm_from_me, DM_to_bmesh

This gives some speedup to undo (which didnt need to re-calculate vertex normals), and array modifier which doesnt need to calculate face normals at all
2013-06-02 23:20:49 +00:00
Campbell Barton 88d1067f58 code cleanup: use BM_elem_flag_test rather then accessing 'ele->head.hflag' 2013-05-17 12:43:58 +00:00
Campbell Barton c838b2d2a7 bmesh api: add 'is_boundary' attribute to verts. 2013-05-14 02:56:24 +00:00
Campbell Barton c6702a3b91 use BM_face_create_ngon_verts for python api face creation
(avoid doing it inline).
2013-05-08 12:59:46 +00:00
Campbell Barton 0ffde4fae3 expose bmesh volume calculation to python api (use for print toolbox addon). 2013-05-07 00:00:32 +00:00
Campbell Barton 998b9241be correct bmesh api crossref and update uv-operator template. 2013-05-05 05:54:29 +00:00
Bastien Montagne 4a8663d66e A bit more clear error message... 2013-05-02 14:03:56 +00:00
Campbell Barton edd6327455 remove direct freestyle data access from bmesh, was crashing and this should really only be done via customdata layer support. 2013-04-30 22:27:52 +00:00
Campbell Barton 1edf56e7a5 fix [#35150] Crash when bmesh operation called from within a Panel draw()
accessing a bmesh from python would reallocate all customdata layers.

add an assert to BM_data_layer_free(), when its called unnecessarily since its reallocating all layers.
2013-04-29 20:21:19 +00:00
Campbell Barton 245a175a00 fix [#34657] Smoothing will not be updated in object mode, when hiding faces in edit mode and changing shape.
remove the option to skip hidden faces in BM_mesh_normals_update, use openmp to speedup recalculation for high poly meshes.
2013-04-24 12:07:13 +00:00
Campbell Barton be71c46b24 code cleanup: minor BMESH_TODO's, some were left in even though they were done/invalid. 2013-04-15 04:34:14 +00:00
Campbell Barton 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
Campbell Barton c68ae745b6 interpolate verts as well as loops for inset.
- add vertex option to BM_face_interp_from_face, also expose via python.
2013-04-10 23:25:44 +00:00
Thomas Dinges 858ff6b696 Fix for [#34898] Typo in error message of mathutils.Vector
* Also fixed some more cases of "more then" -> "more than".
2013-04-07 15:09:06 +00:00
Campbell Barton 63d523336f freestyle lineset tag attribute was defined but not used, also some code cleanup. 2013-04-07 01:38:03 +00:00
Sergey Sharybin acfc0ea511 svn merge ^/trunk/blender -r55815:55840 2013-04-06 13:24:34 +00:00