diff options
author | Joseph Gilbert <ascotan@gmail.com> | 2005-11-29 08:08:29 +0300 |
---|---|---|
committer | Joseph Gilbert <ascotan@gmail.com> | 2005-11-29 08:08:29 +0300 |
commit | 65ce2c2cee5d4d382ecef61f25f6abc348944290 (patch) | |
tree | 547d0574e956692530ac4083e440b292474a3ae9 /source/blender | |
parent | 9321e844bd144ea576755617780263935aef660c (diff) |
* warnings fixes
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/python/api2_2x/Effect.c | 4 | ||||
-rw-r--r-- | source/blender/python/api2_2x/MTex.c | 26 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Object.c | 2 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Particle.c | 2 |
4 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/python/api2_2x/Effect.c b/source/blender/python/api2_2x/Effect.c index 2bf63abe3b3..975770f2d3a 100644 --- a/source/blender/python/api2_2x/Effect.c +++ b/source/blender/python/api2_2x/Effect.c @@ -1339,7 +1339,7 @@ static int Effect_setVertGroup( BPy_Effect * self, PyObject * value ) dg = get_named_vertexgroup( self->object, self->effect->vgroupname ); if( dg ) - self->effect->vertgroup = get_defgroup_num( self->object, dg )+1; + self->effect->vertgroup = (short)get_defgroup_num( self->object, dg )+1; else self->effect->vertgroup = 0; @@ -1372,7 +1372,7 @@ static int Effect_setSpeedVertGroup( BPy_Effect * self, PyObject * value ) dg = get_named_vertexgroup( self->object, self->effect->vgroupname_v ); if( dg ) - self->effect->vertgroup_v = get_defgroup_num( self->object, dg )+1; + self->effect->vertgroup_v = (short)get_defgroup_num( self->object, dg )+1; else self->effect->vertgroup_v = 0; diff --git a/source/blender/python/api2_2x/MTex.c b/source/blender/python/api2_2x/MTex.c index 16900a15869..848d28edfa0 100644 --- a/source/blender/python/api2_2x/MTex.c +++ b/source/blender/python/api2_2x/MTex.c @@ -380,7 +380,7 @@ static int MTex_setTexCo( BPy_MTex *self, PyObject *value, void *closure) return EXPP_ReturnIntError( PyExc_ValueError, "Value must be a member of Texture.TexCo dictionary" ); - self->mtex->texco = texco; + self->mtex->texco = (short)texco; return 0; } @@ -442,7 +442,7 @@ static int MTex_setMapTo( BPy_MTex *self, PyObject *value, void *closure) "Value must be a sum of values from Texture.MapTo dictionary" ); } - self->mtex->mapto = mapto; + self->mtex->mapto = (short)mapto; return 0; } @@ -489,7 +489,7 @@ static int MTex_setDVar( BPy_MTex *self, PyObject *value, void *closure) return EXPP_ReturnIntError( PyExc_TypeError, "expected a float" ); - f = PyFloat_AsDouble(value); + f = (float)PyFloat_AsDouble(value); if (f < 0 || f > 1) return EXPP_ReturnIntError( PyExc_ValueError, @@ -524,7 +524,7 @@ static int MTex_setBlendMode( BPy_MTex *self, PyObject *value, void *closure) "Value must be member of Texture.BlendModes dictionary" ); } - self->mtex->blendtype = n; + self->mtex->blendtype = (short)n; return 0; } @@ -542,7 +542,7 @@ static int MTex_setColFac( BPy_MTex *self, PyObject *value, void *closure) return EXPP_ReturnIntError( PyExc_TypeError, "expected a float" ); - f = PyFloat_AsDouble(value); + f = (float)PyFloat_AsDouble(value); if (f < 0 || f > 1) return EXPP_ReturnIntError( PyExc_ValueError, @@ -566,7 +566,7 @@ static int MTex_setNorFac( BPy_MTex *self, PyObject *value, void *closure) return EXPP_ReturnIntError( PyExc_TypeError, "expected a float" ); - f = PyFloat_AsDouble(value); + f = (float)PyFloat_AsDouble(value); if (f < 0 || f > 25) return EXPP_ReturnIntError( PyExc_ValueError, @@ -590,7 +590,7 @@ static int MTex_setVarFac( BPy_MTex *self, PyObject *value, void *closure) return EXPP_ReturnIntError( PyExc_TypeError, "expected a float" ); - f = PyFloat_AsDouble(value); + f = (float)PyFloat_AsDouble(value); if (f < 0 || f > 1) return EXPP_ReturnIntError( PyExc_ValueError, @@ -614,7 +614,7 @@ static int MTex_setDispFac( BPy_MTex *self, PyObject *value, void *closure) return EXPP_ReturnIntError( PyExc_TypeError, "expected a float" ); - f = PyFloat_AsDouble(value); + f = (float)PyFloat_AsDouble(value); if (f < 0 || f > 1) return EXPP_ReturnIntError( PyExc_ValueError, @@ -638,7 +638,7 @@ static int MTex_setWarpFac( BPy_MTex *self, PyObject *value, void *closure) return EXPP_ReturnIntError( PyExc_TypeError, "expected a float" ); - f = PyFloat_AsDouble(value); + f = (float)PyFloat_AsDouble(value); if (f < 0 || f > 1) return EXPP_ReturnIntError( PyExc_ValueError, @@ -728,7 +728,7 @@ static int MTex_setMapping( BPy_MTex *self, PyObject *value, void *closure) "Value must be member of Texture.Mappings dictionary" ); } - self->mtex->mapping = n; + self->mtex->mapping = (char)n; return 0; } @@ -773,7 +773,7 @@ static int MTex_setProjX( BPy_MTex *self, PyObject *value, void *closure) return EXPP_ReturnIntError( PyExc_ValueError, "Value must be a member of Texture.Proj dictionary" ); - self->mtex->projx = proj; + self->mtex->projx = (char)proj; return 0; } @@ -799,7 +799,7 @@ static int MTex_setProjY( BPy_MTex *self, PyObject *value, void *closure ) return EXPP_ReturnIntError( PyExc_ValueError, "Value must be a member of Texture.Proj dictionary" ); - self->mtex->projy = proj; + self->mtex->projy = (char)proj; return 0; } @@ -825,7 +825,7 @@ static int MTex_setProjZ( BPy_MTex *self, PyObject *value, void *closure) return EXPP_ReturnIntError( PyExc_ValueError, "Value must be a member of Texture.Proj dictionary" ); - self->mtex->projz = proj; + self->mtex->projz = (char)proj; return 0; } diff --git a/source/blender/python/api2_2x/Object.c b/source/blender/python/api2_2x/Object.c index f88aa01aea6..9ed4768eede 100644 --- a/source/blender/python/api2_2x/Object.c +++ b/source/blender/python/api2_2x/Object.c @@ -3077,7 +3077,7 @@ static int Object_setAttr( BPy_Object * obj, char *name, PyObject * value ) OB_LOCK_ROTX | OB_LOCK_ROTY | OB_LOCK_ROTZ | OB_LOCK_SIZEX | OB_LOCK_SIZEY | OB_LOCK_SIZEZ; - object->protectflag = flag; + object->protectflag = (short)flag; return 0; } diff --git a/source/blender/python/api2_2x/Particle.c b/source/blender/python/api2_2x/Particle.c index ed448e2f631..d744204991b 100644 --- a/source/blender/python/api2_2x/Particle.c +++ b/source/blender/python/api2_2x/Particle.c @@ -298,7 +298,7 @@ PyObject *M_Particle_New( PyObject * self, PyObject * args ) "couldn't create Effect Data in Blender" ); } - pyeffect->effect = bleffect; + pyeffect->effect = (PartEff *)bleffect; BLI_addtail( &ob->effect, bleffect ); return ( PyObject * ) pyeffect; |