From 1eb2724983b7f92fdd38a8dc40b469de5b670cfd Mon Sep 17 00:00:00 2001 From: Stephen Swaney Date: Sat, 1 Jul 2006 16:59:10 +0000 Subject: 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." --- source/blender/python/api2_2x/Text3d.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'source') 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 ); } -- cgit v1.2.3