forked from bartvdbraak/blender
warnings cleanup for the python project on windows
This commit is contained in:
parent
4bfb0e30ec
commit
87949e5c67
@ -570,7 +570,7 @@ static int Armature_setLayers(BPy_Armature *self, PyObject *value, void *closure
|
||||
}
|
||||
|
||||
/* update any bases pointing to our object */
|
||||
self->armature->layer = layers;
|
||||
self->armature->layer = (short)layers;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -125,12 +125,14 @@ static int M_Group_setObjects( BPy_Group * self, PyObject * args )
|
||||
"expected a list of objects, This iterator cannot be used." );
|
||||
}
|
||||
free_group(group); /* unlink all objects from this group, keep the group */
|
||||
while ((item = PyIter_Next(iterator))) {
|
||||
item = PyIter_Next(iterator);
|
||||
while (item) {
|
||||
if ( PyObject_TypeCheck(item, &Object_Type) ) {
|
||||
blen_ob= ((BPy_Object *)item)->object;
|
||||
add_to_group_wraper(group, blen_ob);
|
||||
}
|
||||
Py_DECREF(item);
|
||||
item = PyIter_Next(iterator);
|
||||
}
|
||||
|
||||
Py_DECREF(iterator);
|
||||
|
@ -533,7 +533,7 @@ static short lookup_curve_name( char *str, int blocktype, int channel )
|
||||
else {
|
||||
int param = (short)*adrcodes & ~MA_MAP1;
|
||||
param |= texchannel_to_adrcode( channel );
|
||||
return param;
|
||||
return (short)param;
|
||||
}
|
||||
}
|
||||
++adrcodes;
|
||||
@ -630,13 +630,13 @@ static short lookup_curve_adrcode( int code, int blocktype, int channel )
|
||||
|
||||
/* if not a texture channel, just return the adrcode */
|
||||
if( channel == -1 || *adrcodes < MA_MAP1 )
|
||||
return *adrcodes;
|
||||
return (short)*adrcodes;
|
||||
|
||||
/* otherwise adjust adrcode to include current channel */
|
||||
else {
|
||||
int param = *adrcodes & ~MA_MAP1;
|
||||
param |= texchannel_to_adrcode( channel );
|
||||
return param;
|
||||
return (short)param;
|
||||
}
|
||||
}
|
||||
++adrcodes;
|
||||
@ -1057,7 +1057,7 @@ static PyObject *Ipo_getCurveNames( BPy_Ipo * self )
|
||||
PyObject *dict;
|
||||
int *vals = NULL;
|
||||
char name[32];
|
||||
PyObject *attr;
|
||||
PyObject *attr = Py_None;
|
||||
|
||||
/* determine what type of Ipo we are */
|
||||
|
||||
@ -1163,7 +1163,7 @@ static PyObject *Ipo_getCurveNames( BPy_Ipo * self )
|
||||
char *ptr = name+3;
|
||||
strcpy( name+3, lookup_name( *vals ) );
|
||||
while( *ptr ) {
|
||||
*ptr = toupper( *ptr );
|
||||
*ptr = (char)toupper( *ptr );
|
||||
++ptr;
|
||||
}
|
||||
PyConstant_Insert( (BPy_constant *)attr, name,
|
||||
@ -1175,8 +1175,8 @@ static PyObject *Ipo_getCurveNames( BPy_Ipo * self )
|
||||
|
||||
void generate_curveconsts( PyObject* module )
|
||||
{
|
||||
namefunc lookup_name;
|
||||
int size;
|
||||
namefunc lookup_name = NULL;
|
||||
int size = 0;
|
||||
int *vals = NULL;
|
||||
char name[32];
|
||||
|
||||
@ -1253,7 +1253,7 @@ void generate_curveconsts( PyObject* module )
|
||||
char *ptr = name+3;
|
||||
strcpy( name+3, lookup_name( *vals ) );
|
||||
while( *ptr ) {
|
||||
*ptr = toupper( *ptr );
|
||||
*ptr = (char)toupper( *ptr );
|
||||
++ptr;
|
||||
}
|
||||
PyModule_AddIntConstant( module, name, *vals );
|
||||
@ -1498,8 +1498,8 @@ static int Ipo_setIpoCurveByName( BPy_Ipo * self, PyObject * key,
|
||||
if( !flt || !val )
|
||||
goto AttrError;
|
||||
|
||||
time = PyFloat_AS_DOUBLE( flt );
|
||||
curval = PyFloat_AS_DOUBLE( val );
|
||||
time = (float)PyFloat_AS_DOUBLE( flt );
|
||||
curval = (float)PyFloat_AS_DOUBLE( val );
|
||||
Py_DECREF( flt );
|
||||
Py_DECREF( val );
|
||||
|
||||
|
@ -6828,7 +6828,7 @@ static PyObject *M_Mesh_Modes( PyObject * self, PyObject * args )
|
||||
"value out of range" );
|
||||
|
||||
if( modes > 0 )
|
||||
G.scene->selectmode = modes;
|
||||
G.scene->selectmode = (short)modes;
|
||||
|
||||
return PyInt_FromLong( G.scene->selectmode );
|
||||
}
|
||||
|
@ -2366,7 +2366,7 @@ static PyObject *Object_insertPoseKey( BPy_Object * self, PyObject * args )
|
||||
printf("%s\n", ob->action->id.name);
|
||||
|
||||
/* */
|
||||
extract_pose_from_action(ob->pose, sourceact->action, actframe);
|
||||
extract_pose_from_action(ob->pose, sourceact->action, (float)actframe);
|
||||
|
||||
oldframe = G.scene->r.cfra;
|
||||
G.scene->r.cfra = curframe;
|
||||
@ -2458,7 +2458,7 @@ static PyObject *Object_insertCurrentPoseKey( BPy_Object * self, PyObject * args
|
||||
EXPP_allqueue(REDRAWNLA, 0);
|
||||
|
||||
/* restore */
|
||||
extract_pose_from_action(ob->pose, ob->action, G.scene->r.cfra);
|
||||
extract_pose_from_action(ob->pose, ob->action, (float)G.scene->r.cfra);
|
||||
where_is_pose(ob);
|
||||
|
||||
allqueue(REDRAWACTION, 1);
|
||||
@ -2519,7 +2519,7 @@ static PyObject *Object_insertMatrixKey( BPy_Object * self, PyObject * args )
|
||||
G.scene->r.cfra = oldframe;
|
||||
|
||||
/* restore, but now with the new action in place */
|
||||
extract_pose_from_action(ob->pose, ob->action, G.scene->r.cfra);
|
||||
extract_pose_from_action(ob->pose, ob->action, (float)G.scene->r.cfra);
|
||||
where_is_pose(ob);
|
||||
|
||||
allqueue(REDRAWACTION, 1);
|
||||
@ -2557,7 +2557,7 @@ static PyObject *Object_setConstraintInfluenceForBone( BPy_Object * self, PyObje
|
||||
return ( EXPP_ReturnPyObjError( PyExc_AttributeError, "expects: bonename, constraintname, influenceval" ) );
|
||||
|
||||
icu = verify_ipocurve((ID *)self->object, ID_CO, boneName, constName, CO_ENFORCE);
|
||||
insert_vert_ipo(icu, CFRA, influence);
|
||||
insert_vert_ipo(icu, (float)CFRA, influence);
|
||||
|
||||
Py_INCREF( Py_None );
|
||||
return ( Py_None );
|
||||
|
@ -972,7 +972,8 @@ PyObject *M_Text3d_LoadFont( PyObject * self, PyObject * args )
|
||||
if( file || !strcmp (fontfile, "<builtin>") ) {
|
||||
load_vfont( fontfile );
|
||||
if(file) fclose( file );
|
||||
if( (vf = exist_vfont( fontfile )) )
|
||||
vf = exist_vfont( fontfile );
|
||||
if(vf)
|
||||
return Font_CreatePyObject( vf );
|
||||
return EXPP_incr_ret( Py_None );
|
||||
}
|
||||
|
@ -917,10 +917,10 @@ PyObject *RenderData_SaveRenderedImage ( BPy_RenderData * self, PyObject *args )
|
||||
BLI_strncpy( filepath, self->renderContext->pic, sizeof(filepath) );
|
||||
strcat(filepath, name_str);
|
||||
|
||||
if(0) {//!R.rectot) {
|
||||
return EXPP_ReturnPyObjError (PyExc_RuntimeError,
|
||||
"No image rendered");
|
||||
} else {
|
||||
//if(0) {//!R.rectot) {
|
||||
// return EXPP_ReturnPyObjError (PyExc_RuntimeError,
|
||||
// "No image rendered");
|
||||
//} else {
|
||||
if(G.ima[0]==0) {
|
||||
strcpy(dir, G.sce);
|
||||
BLI_splitdirstring(dir, str);
|
||||
@ -942,7 +942,7 @@ PyObject *RenderData_SaveRenderedImage ( BPy_RenderData * self, PyObject *args )
|
||||
// schrijfplaatje(strn);
|
||||
strcpy(G.ima, filepath);
|
||||
waitcursor(0);
|
||||
}
|
||||
//}
|
||||
|
||||
return EXPP_incr_ret(Py_None);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user