Commit Graph

331 Commits

Author SHA1 Message Date
3fc2fbc333 style cleanup, use { on newline after function definition.
spelling 'impliment' -> 'implement'
2012-02-25 16:49:59 +00:00
6ca7d82932 code cleanup: white space, spelling & ';;' end of lines. 2012-02-25 16:04:03 +00:00
53fece44cf style cleanup for blenkernel, no functional changes. 2012-02-23 02:17:50 +00:00
3c38830013 fix [#30264] B-Mesh: Crash when unwrapping ngon mesh with Smart UV project 2012-02-21 03:43:57 +00:00
1953f042e6 added boolean type for bmesh operators, will make python wrapping clearer and also makes existing calls more obvious.
also corrected some error reports.
2012-02-20 01:52:35 +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
576ce5928f * correct bad pointer check in expand_local_mesh()
* check total polygons rather then faces in draw_mesh_object()
2012-02-15 14:40:45 +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
59d45d0ea6 * remove the MFace parts of join (we only need polygon data)
* other minor cleanups
2012-02-12 19:11:09 +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
b228685e92 fix [#30101] Vertex colors disappear after leaving edit mode
this commit makes vertex paint check if it needs to rebuild the modifier stack when painting.
- when painting with no modifiers, do partial updates from polys to tessfaces while painting, skip re-tesselation.
- when painting onto a modified mesh, dont bother adjusting tessface colors - since the modifier stack will do this anyway.

both cases should be faster then before.
2012-02-08 11:52:44 +00:00
76ccd3d5ed Code Cleanup:
macro for copying polygon settings
2012-02-08 09:02:10 +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
baa843d0d3 Code Cleanup: use vector functions for copying / adding UV's 2012-02-05 13:25:42 +00:00
543fb27fd0 support for 'origspace' data layer - used for hair on subsurf mesh.
currently only works for 3/4 sided faces.
2012-02-05 11:30:26 +00:00
1d21e2386e ensure tessface's are available while sculpting. 2012-02-05 07:12:46 +00:00
776ec0ec61 add function for getting a polygon map: dm->getPolyMap(ob, dm).
polygon version of dm->getFaceMap(ob, dm)

sculpt uses this for checking connectivity.
2012-02-05 06:20:51 +00:00
db785d1656 fix for crash converting a curve into a mesh (Alt+C conversion), this would crash on entering editmode.
now curves convert to polygons directly, rather then faces, and polygons after.
2012-02-03 04:58:55 +00:00
5f2e1b8f1a avoid storing over allocated arrays in tesselated custom data, was reserving initial arrays wrong the wrong array length. 2012-01-25 23:59:28 +00:00
288ed10fbf fix for own error in tesselating as quad 2012-01-25 22:55:12 +00:00
e80f265c55 enable tesselating 4 sided faces to quads.
will help for particles and tangents
2012-01-25 21:33:37 +00:00
c7e8af13d4 remove cellalloc, from my tests jemalloc beats cellalloc, so we better just use a better malloc replacement.
See Details:

http://wiki.blender.org/index.php/User:Ideasman42/BMeshBranchReview#Update_43694
2012-01-25 20:18:12 +00:00
4fae6cd38d svn merge ^/trunk/blender -r43685:43693 2012-01-25 18:13:58 +00:00
3f31145d29 define to enable tesselate to quads, this way files from trunk tesselate back into their original geometry with the same face order.
this will be needed for tangents and most likely hair if its to load correctly from trunk.

disabled for now until this is working correctly - hair still needs more work.
2012-01-24 20:58:43 +00:00
644e44e7b6 remove unneeded re-tessellation converting metaball to mesh. 2012-01-24 00:52:26 +00:00
2d3b3f9bf1 minor refactor to main tesselation function
- reserve the array sizes to avoid re-allocing (even though its a lower limit it still helps)
- increase array size in larger steps then 1 by 1.
- avoid a few array lookups.
- use more obvious variable naming to make the function more readable.
2012-01-23 13:36:11 +00:00
4966982a5a svn merge ^/trunk/blender -r43564:43609 2012-01-22 18:04:35 +00:00
a98a75346c quiet warnings and possible NULL checking crash fix for indentation functions. 2012-01-20 23:03:41 +00:00
fe71f40f88 misc changes from bmesh, syncing across to trunk, no functional changes 2012-01-20 02:24:01 +00:00
20d0205d99 error in last fix, used negate to check it was working. 2012-01-19 22:04:13 +00:00
3fdf33f7d9 fix for error copying face normals from poly normals in mesh_recalcTesselation() 2012-01-19 21:58:20 +00:00
bc745a32d3 argument to mesh_recalcTesselation to skip copying normals from polygons. 2012-01-19 17:51:52 +00:00
8541510a2b svn merge ^/trunk/blender -r43436:43443 2012-01-17 05:25:11 +00:00
62f440a0b2 fix own error in bmesh -> mesh versioning 2012-01-17 04:54:57 +00:00
cce23a732a Fix broken normals with mirror modifier 2012-01-07 20:53:11 +00:00
2b2c1007f6 rename normal calc functions.
comparing bmesh to trunk, mesh_calc_normals() in bmesh is a much more comprehensive function, calculating mpoly,mface normals, where trunk only calculated vertex normals.

renamed:
* mesh_calc_normals() --> mesh_calc_normals_mapping_ex
* mesh_calc_tessface_normals --> mesh_calc_normals_tessface() - only calculates normals from tessface
* added mesh_calc_normals() - only calculates normals from poltys

this way we can have mesh_calc_normals() remain fast for parts of the code which only need vertex normals to be updated.

only refactor, no func changes- didnt replace mesh_calc_normals_mapping_ex() with mesh_calc_normals() anywhere yet.
2012-01-06 00:08:37 +00:00
2c9f08302c svn merge ^/trunk/blender -r43160:43183 2012-01-05 22:30:08 +00:00
a46feb5b8f no need to recalculate normals after setting smooth flags, for a short time the flag was used for vertex normals but not anymore. 2012-01-05 15:45:57 +00:00
570b13fbba update UV project modifier to use MLoopUV's rather then tessface UV's 2012-01-04 14:42:11 +00:00
c4d9f9e9cf skip sorting loop indices when tesselating if the original poly is a quad or a tri. 2011-12-29 03:24:28 +00:00
948a76c8d0 this missed merging from trunk somehow (mesh make local edits) 2011-12-28 22:47:55 +00:00
1297f72f78 sync changes from bmesh r42951 + some other minor edits. 2011-12-28 22:46:10 +00:00
59457e0184 cache customdata checks to avoid looking up on each call to mesh_loops_to_mface_corners() 2011-12-28 22:37:09 +00:00
74b3584181 correct define 2011-12-28 15:07:00 +00:00
5b88e16306 WIP loading bmesh in trunk, some conversion functions for this purpose. 2011-12-28 13:50:33 +00:00
dab41e0499 macro for getting next/previous MPoly loops 2011-12-28 07:10:27 +00:00
de14457abf option to save bmesh files in older mesh format so they can load in older versoons of blender.
- saves UV's and VCols
- skips NGons
- resulting files load in both BMesh and Trunk.

TODO - add an option in the UI to access this.
2011-12-27 08:39:55 +00:00
dab71f9b12 svn merge ^/trunk/blender -r42882:42886 2011-12-27 04:08:21 +00:00
397d7d949f remove unneeded casts from 'unsigned int' to 'int' 2011-12-27 03:54:23 +00:00