diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-02-21 02:23:54 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-02-21 02:23:54 +0300 |
commit | 6831c0453371f7b90428686e74b485f76620cf9d (patch) | |
tree | 628b48bed36a1783fda7b0d7dd1ff2b36a5001c7 /source/blender/python/api2_2x/MTex.c | |
parent | 64231d19bf72d0315c30fc0ef9412db473a17579 (diff) |
* added MTex uvlayer string attribute
* added Pose attribute "ik" True/False depending on the pose bones IK.
limitX/Y/Z bool's
lockX/Y/ZRot bool's
stiffX/Y/Z floats
stretch (ikstretch) float
Diffstat (limited to 'source/blender/python/api2_2x/MTex.c')
-rw-r--r-- | source/blender/python/api2_2x/MTex.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/MTex.c b/source/blender/python/api2_2x/MTex.c index 7e9671dfd62..71e60c9ec3f 100644 --- a/source/blender/python/api2_2x/MTex.c +++ b/source/blender/python/api2_2x/MTex.c @@ -32,6 +32,7 @@ #include "MTex.h" /*This must come first*/ #include "BKE_utildefines.h" +#include "BLI_blenlib.h" #include "Texture.h" #include "Object.h" #include "gen_utils.h" @@ -78,6 +79,7 @@ static PyObject *MTex_repr( BPy_MTex * self ); MTEXGETSET(Tex) MTEXGETSET(TexCo) MTEXGETSET(Object) +MTEXGETSET(UVLayer) MTEXGETSET(MapTo) MTEXGETSET(Col) MTEXGETSET(DVar) @@ -107,6 +109,8 @@ static PyGetSetDef MTex_getseters[] = { "Texture coordinate space (UV, Global, etc.)", NULL }, { "object", (getter) MTex_getObject, (setter) MTex_setObject, "Object whose space to use when texco is Object", NULL }, + { "uvlayer", (getter) MTex_getUVLayer, (setter) MTex_setUVLayer, + "Name of the UV layer to use", NULL }, { "mapto", (getter) MTex_getMapTo, (setter) MTex_setMapTo, "What values the texture affects", NULL }, { "col", (getter) MTex_getCol, (setter) MTex_setCol, @@ -416,6 +420,20 @@ static int MTex_setObject( BPy_MTex *self, PyObject *value, void *closure) return 0; } +static PyObject *MTex_getUVLayer( BPy_MTex *self, void *closure ) +{ + return PyString_FromString(self->mtex->uvname); +} + +static int MTex_setUVLayer( BPy_MTex *self, PyObject *value, void *closure) +{ + if ( !PyString_Check(value) ) + return EXPP_ReturnIntError( PyExc_TypeError, + "expected string value" ); + BLI_strncpy(self->mtex->uvname, PyString_AsString(value), 31); + return 0; +} + static PyObject *MTex_getMapTo( BPy_MTex *self, void *closure ) { return PyInt_FromLong( self->mtex->mapto ); |