- add allowShared argument to DerivedMesh.convertToDispListMesh to allow returned

DLM to share data from DerivedMesh (reduces some copying/memory allocation)
 - added displistmesh_copyShared function to copy a DLM but not duplicate any
   internal data
 - changed crease drawing to use DerivedMesh functions... this means varying
   edge width style of creases had to go, I replaced by using varying color to
   show crease weight instead. Don't think this is a big loss since the subsurf
   result gives you a much better indication of the crease weight anyway.
 - bug fix in mirror modifier, didn't copy edge creases from editmesh correctly
This commit is contained in:
2005-08-07 02:30:29 +00:00
parent f17a9a1d3d
commit 8da5df8887
13 changed files with 72 additions and 61 deletions

View File

@@ -2470,11 +2470,11 @@ static PyObject *M_NMesh_GetRawFromObject( PyObject * self, PyObject * args )
{
int needsFree;
DerivedMesh *dm = mesh_get_derived_final(ob, &needsFree);
DispListMesh *dlm = dm->convertToDispListMesh(dm);
DispListMesh *dlm = dm->convertToDispListMesh(dm, 1);
nmesh = new_NMesh_internal(ob->data, dlm );
displistmesh_free(dlm);
if (needsFree)
dm->release(dm);
displistmesh_free(dlm);
}
break;
default: