* Applied a small fix to a bug reported by Guignot:
When a script that used setAttr for Camera Data objs (the bug also affected some other modules) was executed multiple times, Blender would crash after, let's say, the first 5 or 6 tries. Problem, as Guignot pointed, was with reference counting. Should be ok now, all affected modules were fixed. * The Scene module is now "complete" (= 2.25). * Made some necessary updates to Object and NMesh.
This commit is contained in:
@@ -761,7 +761,7 @@ PyObject *NMesh_link(PyObject *self, PyObject *args)
|
||||
{/*
|
||||
C_Object *bl_obj;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "O!", &Object_Type, bl_obj))
|
||||
if (!PyArg_ParseTuple(args, "O!", &Object_Type, &bl_obj))
|
||||
return EXPP_ReturnPyErrorObj (PyExc_TypeError,
|
||||
"NMesh can only be linked to Objects");
|
||||
|
||||
@@ -982,7 +982,7 @@ static int get_active_faceindex(Mesh *me)
|
||||
static PyObject *new_NMesh_internal(Mesh *oldmesh,
|
||||
DispListMesh *dlm, float *extverts)
|
||||
{
|
||||
C_NMesh *me = PyObject_NEW(C_NMesh, &NMesh_Type);
|
||||
C_NMesh *me = PyObject_NEW (C_NMesh, &NMesh_Type);
|
||||
me->flags = 0;
|
||||
|
||||
if (!oldmesh) {
|
||||
@@ -1682,3 +1682,20 @@ PyObject *M_NMesh_Init (void)
|
||||
g_nmeshmodule = submodule;
|
||||
return submodule;
|
||||
}
|
||||
|
||||
/* These are needed by Object.c */
|
||||
|
||||
PyObject *NMesh_CreatePyObject (Mesh *me)
|
||||
{
|
||||
return new_NMesh (me);
|
||||
}
|
||||
|
||||
int NMesh_CheckPyObject (PyObject *pyobj)
|
||||
{
|
||||
return (pyobj->ob_type == &NMesh_Type);
|
||||
}
|
||||
|
||||
Mesh *NMesh_FromPyObject (PyObject *pyobj)
|
||||
{
|
||||
return ((C_NMesh *)pyobj)->mesh;
|
||||
}
|
||||
|
Reference in New Issue
Block a user