Commit Graph

72 Commits

Author SHA1 Message Date
ca8fd669a4 bmesh shape key conversion.
- remove print for impossible error.
- add NULL check incase bmesh and mesh get out of sync (would crash if Basis key-block couldn't be found).
2012-04-12 11:27:50 +00:00
115e762556 bmesh exit editmode: when a mesh shape-key customdata layer exists but the shape-key-block isnt found, creating a shape key was allocated and inline - it didnt set the name or uid, Now use add_keyblock() as every other function does. 2012-04-12 11:11:31 +00:00
30888ac25c doxygen docs explaining whats going on with shape-key conversion. 2012-04-12 06:52:50 +00:00
c8b19b7b7f fix [#30771] Shapekeys: Basis shapekey is not kept in sync with "RealMesh"
behave the same as in 2.4x.

- merge BMesh / Pre-BMesh code shape key conversion code, old code was called as a fallback but merge instead.
- fix possible crash - new bmesh code was clamping the vertex index for the oldverts array by the new total number of verts.
2012-04-11 15:59:50 +00:00
1f6369fd41 bmesh shape key conversion on exiting editmode.
there were 2 blocks of code (both calculating the offset array), now move the fallback method into the main key conversions block.
2012-04-11 15:24:13 +00:00
e7b7bc1272 bmesh exit editmode shape key conversion - split out 'keyblock --> customdata layer index' into its own function, makes code easier to follow. 2012-04-11 14:59:35 +00:00
1eff051461 bmesh shape key conversion when exiting editmode.
- avoid running old conversion code if its not needed.
- de-duplicate functionality which gets offsets from edits made in editmode.
2012-04-11 14:42:44 +00:00
a8226cbcb2 code cleanup: mselect conversion when creating a bmesh from a bmesh was overly verbose. 2012-04-11 11:22:19 +00:00
ea1539ce43 fix for memory leak when using the bmesh python api - would allocate customdata layers and overwrite them when converting a mesh to a bmesh (without freeing). 2012-04-05 12:51:17 +00:00
1246a0d88b Changed BM_mesh_bm_from_me to copy customdata layout for empty meshes. 2012-04-04 01:35:27 +00:00
5f46fdadfd fix [#30797] Shape keys on linked duplicate get corrupted 2012-04-04 00:45:40 +00:00
3bb72e33df fix for reconstructing shape keys (found when looking into bug [#30797], but not a fix for this bug). 2012-04-04 00:02:48 +00:00
b1951ac1ba fix for [#30738] Shading smooth/flat instability
Committing patch from Francisco De La Cruz ([#30753] Shade smooth not preserved when toggling editmode)
Thanks for researching this and providing fix.
2012-04-01 10:36:54 +00:00
e0d94b7244 minor speedup converting a BMesh to a Mesh - avoid loop over all faces to count how many loops to use, since BMesh stores totloop.
also use camel case for UndoMesh (convention)
2012-03-30 06:45:13 +00:00
bf21f02ad0 fix [#30718] Selecting vertices, edges, faces and undoing - results in wrong header status info
converting mesh to bmesh resulted in incorrect stats.
2012-03-30 00:23:22 +00:00
3c11379e26 code cleanup: move bmesh inline funcs to headers (avoids compiling the C files). 2012-03-24 01:24:58 +00:00
d76c05cd36 style cleanup: bmesh 2012-03-21 09:10:08 +00:00
9dd0c4c232 rename define BM_INLINE -> BLI_INLINE to avoid confusion with bmesh defines. 2012-03-20 08:42:26 +00:00
4f19c1a995 spelling cleanup 2012-03-18 07:38:51 +00:00
b330abc290 remove Object member from BMesh struct - was only used for undo and BMEditMesh already stores an object pointer.
also fix for own mistake with mesh conversion refactor, shape key index was off by 1 when switching editmode.
2012-03-11 19:58:56 +00:00
050439fd9d bmesh py api - correct class references in docs and rename mesh conversion funcs to ne less confusing. 2012-03-11 04:07:22 +00:00
e09ab8883c bmesh:
- moved mesh conversion functions into their own file.

bmesh py api:
- can now create a new empty bmesh without first creating mesh data.
- added function to copy bmesh data back to a mesh.
- bmesh.from_mesh() can now get a mesh which isnt in editmode.
2012-03-10 20:41:19 +00:00