diff options
author | Willian Padovani Germano <wpgermano@gmail.com> | 2004-01-17 02:40:14 +0300 |
---|---|---|
committer | Willian Padovani Germano <wpgermano@gmail.com> | 2004-01-17 02:40:14 +0300 |
commit | f3c5206b717a9b2d6b78344e92277f6f58f24229 (patch) | |
tree | 6b0f3d73370366946eb8b5741c53355d68d8af0a /source/blender/python/api2_2x/NMesh.c | |
parent | 24c43b835d48de0c02ced5160d0d0831bc5cb55e (diff) |
Scripts menus:
-- added re-eval entry to Scripts Win -> Scripts menu
-- added it also as a button at Info Win -> File Paths, Python path
-- updated bpymenus code:
added 'Blender' tag, for version;
made a .Bpymenus file be written only if there's actual data to save
made file->export menu open a scriptspace only if none is available already
-- bug fixes (bugs 866 and 879, related) for linking and sharing mesh data:
http://projects.blender.org/tracker/?func=detail&atid=125&aid=866&group_id=9
http://projects.blender.org/tracker/?func=detail&atid=125&aid=879&group_id=9
Diffstat (limited to 'source/blender/python/api2_2x/NMesh.c')
-rw-r--r-- | source/blender/python/api2_2x/NMesh.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/python/api2_2x/NMesh.c b/source/blender/python/api2_2x/NMesh.c index 14d3e47876c..473ae7666d3 100644 --- a/source/blender/python/api2_2x/NMesh.c +++ b/source/blender/python/api2_2x/NMesh.c @@ -24,7 +24,8 @@ * * This is a new part of Blender. * - * Contributor(s): Willian P. Germano, Jordi Rovira i Bonet, Joseph Gilbert + * Contributor(s): Willian P. Germano, Jordi Rovira i Bonet, Joseph Gilbert, + * Bala Gi * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ @@ -845,12 +846,6 @@ static PyObject *NMesh_update(PyObject *self, PyObject *args) mesh_update(mesh); nmesh_updateMaterials(nmesh); -/**@ This is another ugly fix due to the weird material handling of blender. - * it makes sure that object material lists get updated (by their length) - * according to their data material lists, otherwise blender crashes. - * It just stupidly runs through all objects...BAD BAD BAD. - */ - test_object_materials((ID *)mesh); if (nmesh->name && nmesh->name != Py_None) new_id(&(G.main->mesh), &mesh->id, PyString_AsString(nmesh->name)); @@ -1775,6 +1770,14 @@ Material **nmesh_updateMaterials(BPy_NMesh *nmesh) matlist = 0; } mesh->totcol = len; + +/**@ This is another ugly fix due to the weird material handling of blender. + * it makes sure that object material lists get updated (by their length) + * according to their data material lists, otherwise blender crashes. + * It just stupidly runs through all objects...BAD BAD BAD. + */ + test_object_materials((ID *)mesh); + return matlist; } @@ -1950,12 +1953,6 @@ static int convert_NMeshToMesh (Mesh *mesh, BPy_NMesh *nmesh) } } - //-- balagi 01/14/2004 , fix supplied by ascotan - if(nmesh->materials){ - mesh->mat = EXPP_newMaterialList_fromPyList (nmesh->materials); - } - //-- balagi end - return 1; } @@ -2213,6 +2210,9 @@ Mesh *Mesh_FromPyObject (PyObject *pyobj, Object *ob) new_id(&(G.main->mesh), &mesh->id, PyString_AsString(nmesh->name)); mesh_update(mesh); + + nmesh_updateMaterials(nmesh); + return mesh; } |