Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillian Padovani Germano <wpgermano@gmail.com>2005-02-09 18:53:35 +0300
committerWillian Padovani Germano <wpgermano@gmail.com>2005-02-09 18:53:35 +0300
commit34977b8937e7e990b35d3795dc35740e8991fb9c (patch)
treebcac546da525d593763fc49396e739bc34c5dc6e /source/blender/python/api2_2x/Bone.c
parent05bf482f6a50bd711fc6bb7ad986919741d478ae (diff)
BPython:
- applied Campbell Barton's patch for access to Oops location and selection of materials, mesh data and objects, slightly modified. Thanks, Campbell; - got rid of warnings in many files, hopefully not introducing any other during the process. Mostly this was done: 1) new EXPP_incr_ret_True/False functions were added and used instead of "Py_INCREF(Py_True/False); return Py_True/False;". Currently at least the functions use the fact that PyTrue/False == 1/0 and use 1 and 0 to avoid the warnings. 2) Filling of certain types structs got 0's added for all not defined data and methods. This is surely Python version specific, since these structs can change size and content at each major version number Python update.
Diffstat (limited to 'source/blender/python/api2_2x/Bone.c')
-rw-r--r--source/blender/python/api2_2x/Bone.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/source/blender/python/api2_2x/Bone.c b/source/blender/python/api2_2x/Bone.c
index e8c0613d220..5a3a2d014e1 100644
--- a/source/blender/python/api2_2x/Bone.c
+++ b/source/blender/python/api2_2x/Bone.c
@@ -195,6 +195,7 @@ PyTypeObject Bone_Type = {
0, 0, 0, 0, 0, 0,
BPy_Bone_methods, /* tp_methods */
0, /* tp_members */
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
};
//--------------- Bone Module Init-----------------------------
@@ -901,20 +902,16 @@ static PyObject *Bone_hasParent( BPy_Bone * self )
if( !self->bone ) { //test to see if linked to armature
//use python vars
if( BLI_streq( self->parent, parent_str ) ) {
- Py_INCREF( Py_False );
- return Py_False;
+ return EXPP_incr_ret_False();
} else {
- Py_INCREF( Py_True );
- return Py_True;
+ return EXPP_incr_ret_True();
}
} else {
//use bone datastruct
if( self->bone->parent ) {
- Py_INCREF( Py_True );
- return Py_True;
+ return EXPP_incr_ret_True();
} else {
- Py_INCREF( Py_False );
- return Py_False;
+ return EXPP_incr_ret_False();
}
}
}
@@ -1653,20 +1650,16 @@ static PyObject *Bone_hasIK( BPy_Bone * self )
if( !self->bone ) { //test to see if linked to armature
//use python vars
if( self->flag & BONE_IK_TOPARENT ) {
- Py_INCREF( Py_True );
- return Py_True;
+ return EXPP_incr_ret_True();
} else {
- Py_INCREF( Py_False );
- return Py_False;
+ return EXPP_incr_ret_False();
}
} else {
//use bone datastruct
if( self->bone->flag & BONE_IK_TOPARENT ) {
- Py_INCREF( Py_True );
- return Py_True;
+ return EXPP_incr_ret_True();
} else {
- Py_INCREF( Py_False );
- return Py_False;
+ return EXPP_incr_ret_False();
}
}
return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,