Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Hughes <khughes@pacific.edu>2008-09-10 00:52:18 +0400
committerKen Hughes <khughes@pacific.edu>2008-09-10 00:52:18 +0400
commitfede495c073a7369a61e668dae95cf8c7b99a068 (patch)
treed9032c30a69cfb17c7ecef2baeb4e4823f8f266e
parentf198acd5dd6867401e5517f8a919aaf53af85e84 (diff)
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.
-rw-r--r--source/blender/python/api2_2x/Particle.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/source/blender/python/api2_2x/Particle.c b/source/blender/python/api2_2x/Particle.c
index bc65426e16c..893ee077d67 100644
--- a/source/blender/python/api2_2x/Particle.c
+++ b/source/blender/python/api2_2x/Particle.c
@@ -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
}