sculpt shape key switch. All cases that called this function needed parameter
only_face_normals set to false, so changed it now.
Also fixed wrong user count for imported mesh from collada and simplified
previous fix for tesselated faces to polygons conversion.
- Make sure functions are named in way BKE_<object>_<action> (same way as RNA callbacks)
- Make functions which are used by mball.c only static and remove their prototypes
from public header file.
Further cleanup is coming.
- updating normals in py/api's mesh.transform() wasn't working and gave annoying print, disable this, script authors can call calc_normals explicitly if they need.
* When converting mfaces to mpolys, load external MDisp data in, add
CustomDataExternal struct to loopdata if needed.
* Fix multires modifier's filepath RNA functions to use ldata rather
than fdata.
versioning code called a customdata update function which ended up clearing tessfaces - before converting polygons to tessfaces.
Added check so tessfaces aren't cleared when there are no polygons.
old mesh MCol 'r' was blue, 'b' was red, but theres no reason to keep this for bmesh with MLoopCol.
Loading old files works, saving legacy format works too.
What wont work is loading a file after this revision and loading it in an older revision since the bmesh merge.
(it wont crash but the blue and red will be swapped on vertex color layers).
Changed the create_vert_poly_map function to return a more compact
structure. Memory saved will vary depending on the mesh, but typically
it should be about one third of the old size.
Everything seems to work well (many tests making random changes over various meshes went good), but the code is a bit complex and hard to follow, due to the various possibilities of invalid poly/loop combinations… Code also makes more operations than previous tri/quad faces version (hence is a bit slower), but I don’t think we can do otherwise, it’s just the price for bmesh flexibility. ;)
Note: added the py script I used to make the tests, under source/tests/...
add the function to create new UV layers, this only works when there are no polygon layers already created (to prevent confusion since scripts with polygon layers should be adding MTexPoly and MLoopUV layers)
Issue was caused by incorrect resetting of tesselated fave data in copy_mesh:
- CustomData_free will free data from original mesh because layers in new mesh
are pointing to the same memory just after copy. So it's needed only to
set some pointers to NULL.
- It was incorrect filling fdata with zeroes because of incorrect structure size used.