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:
authorStephen Swaney <sswaney@centurytel.net>2006-07-01 20:59:10 +0400
committerStephen Swaney <sswaney@centurytel.net>2006-07-01 20:59:10 +0400
commit1eb2724983b7f92fdd38a8dc40b469de5b670cfd (patch)
tree5de0e4f0aee8e102a44af5fc14ccea1d48c1cc57 /source/blender/python
parent7809809e8abe422c929f86ea88a422602ef5dd29 (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."
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/api2_2x/Text3d.c29
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 );
}