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."
This commit is contained in:
Stephen Swaney 2006-07-01 16:59:10 +00:00
parent 7809809e8a
commit 1eb2724983

@ -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 );
}