[Bf-blender-cvs] [4684f2c] particles_refactor: Added missing support for quaternion attributes in the bparticles API.
Lukas Tönne
noreply at git.blender.org
Tue Apr 22 12:07:15 CEST 2014
Commit: 4684f2c70d897f2efbd69becc5a890e0fb7c89bf
Author: Lukas Tönne
Date: Fri Apr 4 12:39:16 2014 +0200
https://developer.blender.org/rB4684f2c70d897f2efbd69becc5a890e0fb7c89bf
Added missing support for quaternion attributes in the bparticles 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 23f9cbb..041ffb5 100644
--- a/source/blender/python/bparticles/bparticles_py_types.c
+++ b/source/blender/python/bparticles/bparticles_py_types.c
@@ -468,6 +468,8 @@ static PyObject *bpy_bpar_particle_data_read(NParticleAttributeDescription *desc
case PAR_ATTR_DATATYPE_POINT:
case PAR_ATTR_DATATYPE_NORMAL:
return Vector_CreatePyObject((float*)data, 3, Py_WRAP, NULL);
+ case PAR_ATTR_DATATYPE_QUATERNION:
+ return Quaternion_CreatePyObject((float*)data, Py_WRAP, NULL);
case PAR_ATTR_DATATYPE_COLOR:
return Color_CreatePyObject((float*)data, Py_WRAP, NULL);
case PAR_ATTR_DATATYPE_MATRIX:
@@ -524,6 +526,11 @@ static int bpy_bpar_particle_data_write(NParticleAttributeDescription *desc, voi
return -1;
break;
}
+ case PAR_ATTR_DATATYPE_QUATERNION: {
+ if (mathutils_array_parse((float*)data, 4, 4, value, "NParticleParticle") == -1)
+ return -1;
+ break;
+ }
case PAR_ATTR_DATATYPE_COLOR: {
if (mathutils_array_parse((float*)data, 3, 3, value, "NParticleParticle") == -1)
return -1;
More information about the Bf-blender-cvs
mailing list