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:
authorCampbell Barton <ideasman42@gmail.com>2007-03-08 09:35:01 +0300
committerCampbell Barton <ideasman42@gmail.com>2007-03-08 09:35:01 +0300
commit8e0704f59a40d9dd89b0c9cf92ec3484a106fa78 (patch)
tree0ef91cc93c518ed3ec286279a5bff53e21055f04 /source/blender/python/api2_2x/gen_utils.c
parent4bd5ab628bbbdb23b1aeb074bc66f1133cb3af29 (diff)
Added python access to material and texture colorbands.
mat.colorbandDiffuse mat.colorbandSpecular tex.colorband gen_utils - removed unused func
Diffstat (limited to 'source/blender/python/api2_2x/gen_utils.c')
-rw-r--r--source/blender/python/api2_2x/gen_utils.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/source/blender/python/api2_2x/gen_utils.c b/source/blender/python/api2_2x/gen_utils.c
index e4da9b30a34..46fb1e40961 100644
--- a/source/blender/python/api2_2x/gen_utils.c
+++ b/source/blender/python/api2_2x/gen_utils.c
@@ -165,18 +165,6 @@ ID *GetIdFromList( ListBase * list, char *name )
}
/*****************************************************************************/
-/* Description: This function sets the fake user status of the ID */
-/* returns an int error, so from getsetattrs */
-/*****************************************************************************/
-PyObject *EXPP_GetIdLib( ID * id )
-{
- if (id->lib)
- return PyString_FromString(id->lib->name);
- else
- return EXPP_incr_ret( Py_None );
-}
-
-/*****************************************************************************/
/* Description: These functions set an internal string with the given type */
/* and error_msg arguments. */
/*****************************************************************************/
@@ -1024,7 +1012,11 @@ PyObject *GenericLib_getLib( void *self )
{
ID *id = ((BPy_GenericLib *)self)->id;
if (!id) return ( EXPP_ReturnPyObjError( PyExc_RuntimeError, "data has been removed" ) );
- return EXPP_GetIdLib(id);
+
+ if (id->lib)
+ return PyString_FromString(id->lib->name);
+ else
+ return EXPP_incr_ret( Py_None );
}
PyObject *GenericLib_getUsers( void *self )