[Bf-blender-cvs] [1c84174] particles_refactor: Add particle sequence as a state attribute in the API.

Lukas Tönne noreply at git.blender.org
Tue Apr 22 12:06:20 CEST 2014


Commit: 1c84174ae90bfe5a95dbaa0947203e2cfe9d2056
Author: Lukas Tönne
Date:   Fri Dec 20 16:02:54 2013 +0100
https://developer.blender.org/rB1c84174ae90bfe5a95dbaa0947203e2cfe9d2056

Add particle sequence as a state attribute in the API.

===================================================================

M	source/blender/python/bparticles/bparticles_py_types.c

===================================================================

diff --git a/source/blender/python/bparticles/bparticles_py_types.c b/source/blender/python/bparticles/bparticles_py_types.c
index 7a3a54e..1b517de 100644
--- a/source/blender/python/bparticles/bparticles_py_types.c
+++ b/source/blender/python/bparticles/bparticles_py_types.c
@@ -82,6 +82,14 @@ static PyObject *bpy_bpar_state_attributes_get(BPy_NParticleState *self, void *U
 	return BPy_NParticleAttributeStateSeq_CreatePyObject(self->state);
 }
 
+PyDoc_STRVAR(bpy_bpar_state_particles_doc,
+"Particles.\n\n:type: :class:`NParticleParticleSeq`"
+);
+static PyObject *bpy_bpar_state_particles_get(BPy_NParticleState *self, void *UNUSED(closure))
+{
+	return BPy_NParticleParticleSeq_CreatePyObject(self->state);
+}
+
 PyDoc_STRVAR(bpy_bpar_attrstate_name_doc,
 "Attribute name\n"
 );
@@ -131,6 +139,7 @@ static PyObject *bpy_bpar_particle_repr(BPy_NParticleParticle *self)
 
 static PyGetSetDef bpy_bpar_state_getseters[] = {
 	{(char *)"attributes", (getter)bpy_bpar_state_attributes_get, (setter)NULL, (char *)bpy_bpar_state_attributes_doc, NULL},
+	{(char *)"particles", (getter)bpy_bpar_state_particles_get, (setter)NULL, (char *)bpy_bpar_state_particles_doc, NULL},
 	{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
 };




More information about the Bf-blender-cvs mailing list