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
933e3af883
avoid looping through the polygons to find the maxium loop size by using BLI_array_declare, tested on optimized build and its slighly faster though IMHO this is easier to follow.
2011-12-07 00:25:21 +00:00
cead1e1977
added mesh_calc_normals_ex() which is mesh_calc_normals() with an option to skip recalculating the vertex normals (only calculate poly/face normals instead).
...
also removed unneeded allocation of face normals.
otherwise no functional change.
2011-12-06 22:55:41 +00:00
26db98293f
Quiet annoying warning:
...
Warning! Tesselation uvs or vcol data got out of sync, "had to reset!
This would happen on every editmode edit with UV's and wasn't too reassuring that blender was handling uvs/vcols correctly.
From looking into the problem I found that creating the undo mesh would act as if it was tessellating the existing mesh each time and complain that the data was out of sync, when infact the mesh was just created and being filled in.
Also, allocating uv and vcol customdata arrats for tessfaces isn't needed for undo mesh, so save some memory and dont allocate these in the first place.
2011-12-06 09:28:25 +00:00
3267a619f1
svn merge ^/trunk/blender -r42416:42422
2011-12-04 20:05:50 +00:00
bf77a177d4
remove mesh PartialVisibility, it wasnt being version patches or used anywhere, other then save/load/free.
2011-12-04 19:49:35 +00:00
22a1ad61f9
svn merge ^/trunk/blender -r42372:42416
2011-12-04 18:39:19 +00:00
cbd5b492b1
remove use of deprecated struct members
...
- editmesh smooth & subdivide were using old mirror axis flag still.
- removed colbits from outliner and object code.
- commented some other parts of the code which access deprecated members and aren't called anywhere.
2011-12-04 06:39:35 +00:00
15ad39e684
svn merge ^/trunk/blender -r42303:42329
2011-12-02 01:01:07 +00:00
56da69fd03
Fix for [ #29467 ] Selection of active vertex color layer doesn't work
...
Need to push active layer indices from loops & polys to faces again after tesselations
2011-12-01 09:49:27 +00:00
9e5b28cd42
svn merge ^/trunk/blender -r42261:42290
2011-11-30 09:31:11 +00:00
9b2df014d2
fix [ #29459 ] Crash making a linked object group local
...
was an error with make-local refactor & path updating.
2011-11-30 00:32:13 +00:00
e3c6e47a38
macro for defining a fixed size array which may be heap or stack allocated, replaces inline code.
...
BLI_array_fixedstack_declare()
BLI_array_fixedstack_free()
2011-11-29 06:06:59 +00:00
f2551ff799
- add BM_NGON_STACK_SIZE define to use wherever ngon stack arrays are used.
...
- renamed BM_Compute_Face_Center() to BM_Compute_Face_CenterBounds() and added BM_Compute_Face_CenterMean() since there was code inline to find the mean center in transform.
2011-11-29 04:11:17 +00:00