- Fixes by Jean-Michel Soler: mod_ai2obj.py, mod_svg2obj.py;
- Fixes by Campbell Barton: obj_import.py;
- Small fix to mod_meshtools.py (fixes bug #1605: http://projects.blender.org/tracker/?func=detail&atid=125&aid=1605&group_id=9);
- Updates by Jean-Baptiste (Jiba) to his blender2cal3d.py;
- Updates to all his import / export scripts (added doc data) by Anthony D'Agostino;
- Update to off_import: support for uv data, by Arne Schmitz.

BPython:
- Removed Object.get and .getSelected (deprecated long ago, we use .Get and .GetSelected) -- fixes #1861: http://projects.blender.org/tracker/?func=detail&atid=125&aid=1861&group_id=9
- Applied patch by Michael Reimpell: quat.c - fix for wrong initialization with newQuaternionObject; Mathutils documentation improvements.
- Stani reported a wrong return msg in IpoCurve.Get (that is unimplemented).

Thanks to all coders mentioned above!
This commit is contained in:
2004-11-30 02:27:46 +00:00
parent e4562134d2
commit 6d9c02be4c
25 changed files with 1000 additions and 1096 deletions

View File

@@ -531,13 +531,17 @@ PyTypeObject quaternion_Type = {
&Quaternion_SeqMethods, /*tp_as_sequence */
};
/*
newQuaternionObject
if the quat arg is not null, this method allocates memory and copies *quat into it.
we will free the memory in the dealloc routine.
*/
/** Creates a new quaternion object.
*
* Memory for a new quaternion is allocated. The quaternion copies the given
* list of parameters or initializes to the identity, if a <code>NULL</code>
* pointer is given as parameter. The memory will be freed in the dealloc
* routine.
*
* @param quat Pointer to a list of floats for the quanternion parameters w, x, y, z.
* @return Quaternion Python object.
* @see Quaternion_Identity
*/
PyObject *newQuaternionObject( float *quat )
{
QuaternionObject *self;
@@ -550,10 +554,7 @@ PyObject *newQuaternionObject( float *quat )
self->quat = PyMem_Malloc( 4 * sizeof( float ) );
if( !quat ) {
for( x = 0; x < 4; x++ ) {
self->quat[x] = 0.0f;
}
self->quat[3] = 1.0f;
Quaternion_Identity(self);
} else {
for( x = 0; x < 4; x++ ) {
self->quat[x] = quat[x];