[Bf-blender-cvs] [335ff93] particles_refactor: Include the standard type attributes in the dir function for particles.

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


Commit: 335ff9331a114c1c0ef8027a68a047b1c90dbb36
Author: Lukas Tönne
Date:   Sat Dec 21 11:28:28 2013 +0100
https://developer.blender.org/rB335ff9331a114c1c0ef8027a68a047b1c90dbb36

Include the standard type attributes in the dir function for particles.

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

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 a9f2032..23f9cbb 100644
--- a/source/blender/python/bparticles/bparticles_py_types.c
+++ b/source/blender/python/bparticles/bparticles_py_types.c
@@ -101,13 +101,18 @@ static PyObject *bpy_bpar_attrstate_name_get(BPy_NParticleAttributeState *self)
 static PyObject *bpy_bpar_particle_dir(BPy_NParticleParticle *self)
 {
 	NParticleAttributeStateIterator iter;
+	PyObject *dict;
 	PyObject *ret;
 	PyObject *pystring;
-
+	
 //	PYRNA_STRUCT_CHECK_OBJ(self);
-
-	ret = PyList_New(0);
-
+	
+	dict = BPy_NParticleParticle_Type.tp_dict;
+	if (dict)
+		ret = PyDict_Keys(dict);
+	else
+		ret = PyList_New(0);
+	
 	for (BKE_nparticle_state_attributes_begin(self->state, &iter);
 	     BKE_nparticle_state_attribute_iter_valid(&iter);
 	     BKE_nparticle_state_attribute_iter_next(&iter)) {
@@ -115,7 +120,7 @@ static PyObject *bpy_bpar_particle_dir(BPy_NParticleParticle *self)
 		PyList_Append(ret, pystring);
 		Py_DECREF(pystring);
 	}
-
+	
 	return ret;
 }




More information about the Bf-blender-cvs mailing list