Python API

----------
Bugfix #14425.  Particle.Get() could return a list of invalid items.  The API
still needs more work, but for now throw an NotImplemented exception.
This commit is contained in:
Ken Hughes
2008-09-09 20:52:18 +00:00
parent f198acd5dd
commit fede495c07

View File

@@ -526,15 +526,18 @@ throws NameError if name not found
PyObject *M_ParticleSys_Get( PyObject * self, PyObject * args )
{
#if 1
return EXPP_ReturnPyObjError( PyExc_NotImplementedError,
"Particle.Get() not implemented" );
#else
ParticleSettings *psys_iter;
char *name = NULL;
#if 0
ParticleSystem *blparticlesys = 0;
Object *ob;
PyObject *partsyslist,*current;
#endif
if( !PyArg_ParseTuple( args, "|s", &name ) )
return EXPP_ReturnPyObjError( PyExc_TypeError,
"expected string argument" );
@@ -577,7 +580,6 @@ PyObject *M_ParticleSys_Get( PyObject * self, PyObject * args )
}
while( psys_iter ){
#if 0
pyobj = ParticleSystem_CreatePyObject( psys_iter);
if( !pyobj){
Py_DECREF( pylist );
@@ -586,7 +588,6 @@ PyObject *M_ParticleSys_Get( PyObject * self, PyObject * args )
"could not create ParticleSystem PyObject");
}
PyList_SET_ITEM( pylist, index, pyobj);
#endif
printf("name is %s\n", psys_iter->id.name+2);
psys_iter = psys_iter->id.next;
index++;
@@ -596,10 +597,6 @@ PyObject *M_ParticleSys_Get( PyObject * self, PyObject * args )
}
#if 0
for( ob = G.main->particlesystem.first; ob; ob = ob->id.next )
if( !strcmp( name, ob->id.name + 2 ) )
break;
@@ -626,7 +623,6 @@ PyObject *M_ParticleSys_Get( PyObject * self, PyObject * args )
}
return partsyslist;
#endif
}