Commit Graph

14 Commits

Author SHA1 Message Date
3d01f13c43 fix for 3 issues when applying a deform modifier in editmode.
- drawing face normals was broken (using wrong index).
- drawing flat faces in solid mode would display ugly tesselation normals (as if the model was made of triangles).
- drawing smooth faces in solid mode would show vertex normals based on tesselation (heavily slant in 1 direction).

now the normals are calculated and stored per polygon (will save some memory too for non tri meshes).
2012-01-24 19:37:18 +00:00
b320e3ee5b remove redundant casts. 2012-01-24 18:24:19 +00:00
ab52d677bc simplify editmesh mapping lookups.
this really has no effect since they were not created or used, however if we want to use emDM_getEdge or emDM_getTessFace this will need to be called.
2012-01-24 18:20:33 +00:00
f4b9e83741 improve editmode triangulation by re-using the loop array when
possiblem, this has to guess when the size is too big so as to re-
well.

If this isnt done, then the number of faces is used to allocate the
initial array to at least avoid many small allocs.

added BLI_array_reserve() to reserve elements and avoid reallocing many
small arrays when the loop starts.
2012-01-23 13:25:06 +00:00
61a5cc28be disable re-tesselation for modifiers that use bmesh, array/bevel/edge split - were tesselating 2 times and didnt need to.
also comment array modifier from flushing selection flags.
2012-01-22 21:12:18 +00:00
4de28741c8 - disable re-tesselating derived meshes in BMEdit_RecalcTesselation() have modifier stack do this.
- made editbmesh_calc_modifiers() ensure tessfaces, this has the advantage that if the tessfaces are already created they wont get re-made as was happening before.
2012-01-20 13:53:47 +00:00
705f23064e svn merge ^/trunk/blender -r43294:43338 2012-01-13 01:39:57 +00:00
8c521496dd save 4 bytes per BMLoop, added some comments on index use. 2011-12-13 05:20:02 +00:00
65f3b93f14 svn merge ^/trunk/blender -r42521:42550 2011-12-10 05:38:00 +00:00
9d807eb6dd Mesh drawing optimization and fixes:
- Pass MFace, MTface and OrigIndex arrays via userData to compareDrawParams callback
  rather than looking up for this layers for each face
- This allowed to avoid massing DM to compare callback which seems like a bad-level pass
- Fixed crashes on some video cards when assigning different materials to different
  faces in edit mode. Both of intel and nvidia cards in my laptop were affected by
  this error
2011-12-09 11:46:48 +00:00
2a35e8f9c1 remove BMEMSET define, use memset instead 2011-12-07 04:27:40 +00:00
2bdd4c570f changes to derived mesh editmode functions to be in closer sync with trunk. 2011-12-02 03:18:34 +00:00
0cff8e6c9c move editmesh derived mesh functions into their own file to match bmesh, without this all merges in this area have to be done manually. 2011-12-02 03:16:06 +00:00
583b118217 file rename, will do the same in trunk to make merges less of a hassle 2011-12-02 02:18:29 +00:00