forked from bartvdbraak/blender
clean up some warnings in bpy code
This commit is contained in:
parent
c5819fe03f
commit
14cc1192a3
@ -1706,8 +1706,9 @@ static PyObject *reimportText( PyObject *module )
|
|||||||
|
|
||||||
/* if previously compiled, free the object */
|
/* if previously compiled, free the object */
|
||||||
/* (can't see how could be NULL, but check just in case) */
|
/* (can't see how could be NULL, but check just in case) */
|
||||||
if( text->compiled )
|
if( text->compiled ){
|
||||||
Py_DECREF( (PyObject *)text->compiled );
|
Py_DECREF( (PyObject *)text->compiled );
|
||||||
|
}
|
||||||
|
|
||||||
/* compile the buffer */
|
/* compile the buffer */
|
||||||
buf = txt_to_buf( text );
|
buf = txt_to_buf( text );
|
||||||
|
@ -648,7 +648,7 @@ static PyMethodDef BPy_EditBone_methods[] = {
|
|||||||
"() - True/False - Bone has a parent"},
|
"() - True/False - Bone has a parent"},
|
||||||
{"clearParent", (PyCFunction) EditBone_clearParent, METH_NOARGS,
|
{"clearParent", (PyCFunction) EditBone_clearParent, METH_NOARGS,
|
||||||
"() - sets the parent to None"},
|
"() - sets the parent to None"},
|
||||||
{NULL}
|
{NULL, NULL, 0, NULL}
|
||||||
};
|
};
|
||||||
///------------------------tp_getset
|
///------------------------tp_getset
|
||||||
//This contains methods for attributes that require checking
|
//This contains methods for attributes that require checking
|
||||||
@ -675,7 +675,7 @@ static PyGetSetDef BPy_EditBone_getset[] = {
|
|||||||
"The parent bone of this bone", NULL},
|
"The parent bone of this bone", NULL},
|
||||||
{"length", (getter)EditBone_getLength, (setter)EditBone_setLength,
|
{"length", (getter)EditBone_getLength, (setter)EditBone_setLength,
|
||||||
"The length of this bone", NULL},
|
"The length of this bone", NULL},
|
||||||
{NULL}
|
{NULL, NULL, NULL, NULL,NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
//------------------------tp_repr
|
//------------------------tp_repr
|
||||||
@ -1067,7 +1067,7 @@ static PyMethodDef BPy_Bone_methods[] = {
|
|||||||
"() - True/False - Bone has 1 or more children"},
|
"() - True/False - Bone has 1 or more children"},
|
||||||
{"getAllChildren", (PyCFunction) Bone_getAllChildren, METH_NOARGS,
|
{"getAllChildren", (PyCFunction) Bone_getAllChildren, METH_NOARGS,
|
||||||
"() - All the children for this bone - including children's children"},
|
"() - All the children for this bone - including children's children"},
|
||||||
{NULL}
|
{NULL, NULL, 0, NULL}
|
||||||
};
|
};
|
||||||
//------------------------tp_getset
|
//------------------------tp_getset
|
||||||
//This contains methods for attributes that require checking
|
//This contains methods for attributes that require checking
|
||||||
@ -1096,7 +1096,7 @@ static PyGetSetDef BPy_Bone_getset[] = {
|
|||||||
"The child bones of this bone", NULL},
|
"The child bones of this bone", NULL},
|
||||||
{"length", (getter)Bone_getLength, (setter)Bone_setLength,
|
{"length", (getter)Bone_getLength, (setter)Bone_setLength,
|
||||||
"The length of this bone", NULL},
|
"The length of this bone", NULL},
|
||||||
{NULL}
|
{NULL, NULL, NULL, NULL,NULL}
|
||||||
};
|
};
|
||||||
//------------------------tp_repr
|
//------------------------tp_repr
|
||||||
//This is the string representation of the object
|
//This is the string representation of the object
|
||||||
|
@ -1420,7 +1420,7 @@ static PyObject *MVertSeq_item( BPy_MVertSeq * self, int i )
|
|||||||
"array index out of range" );
|
"array index out of range" );
|
||||||
|
|
||||||
return MVert_CreatePyObject( self->mesh, i );
|
return MVert_CreatePyObject( self->mesh, i );
|
||||||
};
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* retrieve a slice of the vertex list (as a Python list)
|
* retrieve a slice of the vertex list (as a Python list)
|
||||||
@ -1487,7 +1487,7 @@ static int MVertSeq_assign_item( BPy_MVertSeq * self, int i,
|
|||||||
memcpy( dst, src, sizeof(MVert) );
|
memcpy( dst, src, sizeof(MVert) );
|
||||||
// mesh_update( self->mesh );
|
// mesh_update( self->mesh );
|
||||||
return 0;
|
return 0;
|
||||||
};
|
}
|
||||||
|
|
||||||
static int MVertSeq_assign_slice( BPy_MVertSeq *self, int low, int high,
|
static int MVertSeq_assign_slice( BPy_MVertSeq *self, int low, int high,
|
||||||
PyObject *args )
|
PyObject *args )
|
||||||
|
@ -104,7 +104,7 @@ static PyMethodDef BPy_PoseBonesDict_methods[] = {
|
|||||||
"() - Returns the keys the dictionary"},
|
"() - Returns the keys the dictionary"},
|
||||||
{"values", (PyCFunction) PoseBonesDict_values, METH_NOARGS,
|
{"values", (PyCFunction) PoseBonesDict_values, METH_NOARGS,
|
||||||
"() - Returns the values from the dictionary"},
|
"() - Returns the values from the dictionary"},
|
||||||
{NULL}
|
{NULL, NULL, 0, NULL}
|
||||||
};
|
};
|
||||||
//-----------------(internal)
|
//-----------------(internal)
|
||||||
static int PoseBoneMapping_Init(PyObject *dictionary, ListBase *posechannels){
|
static int PoseBoneMapping_Init(PyObject *dictionary, ListBase *posechannels){
|
||||||
@ -293,7 +293,7 @@ static PyObject *Pose_update(BPy_Pose *self)
|
|||||||
static PyMethodDef BPy_Pose_methods[] = {
|
static PyMethodDef BPy_Pose_methods[] = {
|
||||||
{"update", (PyCFunction) Pose_update, METH_NOARGS,
|
{"update", (PyCFunction) Pose_update, METH_NOARGS,
|
||||||
"() - Rebuilds the pose with new values"},
|
"() - Rebuilds the pose with new values"},
|
||||||
{NULL}
|
{NULL, NULL, 0, NULL}
|
||||||
};
|
};
|
||||||
//------------------ATTRIBUTE IMPLEMENTATIONS---------------------------
|
//------------------ATTRIBUTE IMPLEMENTATIONS---------------------------
|
||||||
//------------------------Pose.bones (getter)
|
//------------------------Pose.bones (getter)
|
||||||
@ -318,7 +318,7 @@ AttributeError:
|
|||||||
static PyGetSetDef BPy_Pose_getset[] = {
|
static PyGetSetDef BPy_Pose_getset[] = {
|
||||||
{"bones", (getter)Pose_getBoneDict, (setter)Pose_setBoneDict,
|
{"bones", (getter)Pose_getBoneDict, (setter)Pose_setBoneDict,
|
||||||
"The pose's Bone dictionary", NULL},
|
"The pose's Bone dictionary", NULL},
|
||||||
{NULL}
|
{NULL, NULL, NULL, NULL, NULL}
|
||||||
};
|
};
|
||||||
//------------------------tp_dealloc
|
//------------------------tp_dealloc
|
||||||
//This tells how to 'tear-down' our object when ref count hits 0
|
//This tells how to 'tear-down' our object when ref count hits 0
|
||||||
@ -527,7 +527,7 @@ AttributeError5:
|
|||||||
static PyMethodDef BPy_PoseBone_methods[] = {
|
static PyMethodDef BPy_PoseBone_methods[] = {
|
||||||
{"insertKey", (PyCFunction) PoseBone_insertKey, METH_VARARGS,
|
{"insertKey", (PyCFunction) PoseBone_insertKey, METH_VARARGS,
|
||||||
"() - insert a key for this pose into an action"},
|
"() - insert a key for this pose into an action"},
|
||||||
{NULL}
|
{NULL, NULL, 0, NULL}
|
||||||
};
|
};
|
||||||
//------------------ATTRIBUTE IMPLEMENTATIONS---------------------------
|
//------------------ATTRIBUTE IMPLEMENTATIONS---------------------------
|
||||||
//------------------------PoseBone.name (getter)
|
//------------------------PoseBone.name (getter)
|
||||||
@ -784,7 +784,7 @@ static PyGetSetDef BPy_PoseBone_getset[] = {
|
|||||||
"The pose bone's tail positon", NULL},
|
"The pose bone's tail positon", NULL},
|
||||||
//{"constraints", (getter)PoseBone_getConstraints, (setter)PoseBone_setConstraints,
|
//{"constraints", (getter)PoseBone_getConstraints, (setter)PoseBone_setConstraints,
|
||||||
// "The list of contraints that pertain to this pose bone", NULL},
|
// "The list of contraints that pertain to this pose bone", NULL},
|
||||||
{NULL}
|
{NULL, NULL, NULL, NULL, NULL}
|
||||||
};
|
};
|
||||||
//------------------------tp_dealloc
|
//------------------------tp_dealloc
|
||||||
//This tells how to 'tear-down' our object when ref count hits 0
|
//This tells how to 'tear-down' our object when ref count hits 0
|
||||||
@ -856,7 +856,7 @@ PyTypeObject PoseBone_Type = {
|
|||||||
//-------------------MODULE METHODS IMPLEMENTATION------------------------
|
//-------------------MODULE METHODS IMPLEMENTATION------------------------
|
||||||
//-------------------MODULE METHODS DEFINITION-----------------------------
|
//-------------------MODULE METHODS DEFINITION-----------------------------
|
||||||
struct PyMethodDef M_Pose_methods[] = {
|
struct PyMethodDef M_Pose_methods[] = {
|
||||||
{NULL}
|
{NULL, NULL, 0, NULL}
|
||||||
};
|
};
|
||||||
//-------------------MODULE INITIALIZATION--------------------------------
|
//-------------------MODULE INITIALIZATION--------------------------------
|
||||||
PyObject *Pose_Init(void)
|
PyObject *Pose_Init(void)
|
||||||
|
@ -90,7 +90,7 @@ static PyMethodDef BPy_constant_methods[] = {
|
|||||||
"() - Returns the keys the dictionary"},
|
"() - Returns the keys the dictionary"},
|
||||||
{"values", (PyCFunction) constant_values, METH_NOARGS,
|
{"values", (PyCFunction) constant_values, METH_NOARGS,
|
||||||
"() - Returns the values from the dictionary"},
|
"() - Returns the values from the dictionary"},
|
||||||
{NULL}
|
{NULL, NULL, 0, NULL}
|
||||||
};
|
};
|
||||||
//------------------------mp_length
|
//------------------------mp_length
|
||||||
static int constantLength(BPy_constant *self)
|
static int constantLength(BPy_constant *self)
|
||||||
|
Loading…
Reference in New Issue
Block a user