diff options
author | Stephen Swaney <sswaney@centurytel.net> | 2006-07-01 20:59:10 +0400 |
---|---|---|
committer | Stephen Swaney <sswaney@centurytel.net> | 2006-07-01 20:59:10 +0400 |
commit | 1eb2724983b7f92fdd38a8dc40b469de5b670cfd (patch) | |
tree | 5de0e4f0aee8e102a44af5fc14ccea1d48c1cc57 | |
parent | 7809809e8abe422c929f86ea88a422602ef5dd29 (diff) |
bugfix for #4533 Text3d.Get() fails in retrieving Text3d objects
The objects were returned properly, however the repr() method was
printing "" making it look like the Get() failed."
-rw-r--r-- | source/blender/python/api2_2x/Text3d.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/source/blender/python/api2_2x/Text3d.c b/source/blender/python/api2_2x/Text3d.c index 9cc334080bc..e77fae4d96f 100644 --- a/source/blender/python/api2_2x/Text3d.c +++ b/source/blender/python/api2_2x/Text3d.c @@ -415,26 +415,31 @@ static PyObject *Text3dGetAttr( BPy_Text3d * self, char *name ) return Py_FindMethod( BPy_Text3d_methods, ( PyObject * ) self, name ); } -/*****************************************************************************/ -/* Function: EffectSetAttr */ -/* Description: This is a callback function for the BPy_Effect type. It */ -/* sets Effect Data attributes (member variables). */ -/*****************************************************************************/ +/***************************************************************************** + * Function: Text3dSetAttr + * Description: Callback function for the BPy_Effect type to + * sets Text3d Data attributes (member variables). + * + ****************************************************************************/ + static int Text3dSetAttr( BPy_Text3d * self, char *name, PyObject * value ) { return 0; /* normal exit */ } -/*****************************************************************************/ -/* Function: Text3dRepr */ -/* Description: This is a callback function for the BPy_Effect type. It */ -/* builds a meaninful string to represent effcte objects. */ -/*****************************************************************************/ + +/**************************************************************************** + * Function: Text3dRepr + * Description: Callback function for the BPy_Text3d type to It + * build a meaninful string to represent Text3d objects. + * + ***************************************************************************/ static PyObject *Text3dRepr( BPy_Text3d * self ) { - char *str = ""; - return PyString_FromString( str ); + /* skip over CU in idname. CUTEXT */ + return PyString_FromFormat( "[Text3d \"%s\"]", + self->curve->id.name + 2 ); } |