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>2005-03-26 21:14:29 +0300
committerStephen Swaney <sswaney@centurytel.net>2005-03-26 21:14:29 +0300
commit9465bf6881ba3d9e17dc62b328bdadb448d7a2e8 (patch)
tree1f3d486c3e243718b90a18c2f58b376ab9e2583d /source/blender/python/api2_2x/Text3d.c
parent24e52b703e319bc10e90b1b1717dcf9ded28b683 (diff)
Updated Bpy method Object.getData() now supports new Text3d type.
Contributed by Johnny Matthews.
Diffstat (limited to 'source/blender/python/api2_2x/Text3d.c')
-rw-r--r--source/blender/python/api2_2x/Text3d.c29
1 files changed, 25 insertions, 4 deletions
diff --git a/source/blender/python/api2_2x/Text3d.c b/source/blender/python/api2_2x/Text3d.c
index c8f834852a2..a086ceaf166 100644
--- a/source/blender/python/api2_2x/Text3d.c
+++ b/source/blender/python/api2_2x/Text3d.c
@@ -56,9 +56,9 @@ extern void freedisplist(struct ListBase *lb);
static PyObject *M_Text3d_New( PyObject * self, PyObject * args );
static PyObject *M_Text3d_Get( PyObject * self, PyObject * args );
-/*****************************************************************************/
-/* Python callback function prototypes for the Text3D module.
-/*****************************************************************************/
+/*****************************************************************************
+ * Python callback function prototypes for the Text3D module.
+ *****************************************************************************/
static PyObject *return_ModuleConstant( char *constant_name);
static PyObject *generate_ModuleIntConstant(char *name, int value);
@@ -558,7 +558,6 @@ static PyObject* Text3d_setDrawMode(BPy_Text3d* self,PyObject* args)
//parse and set bits
for (i = 0; i < size; i++) {
PyObject *v;
- BPy_constant *constant;
int value;
v = PySequence_GetItem(listObject, i);
@@ -852,3 +851,25 @@ static PyObject *Text3d_setAlignment( BPy_Text3d * self, PyObject * args )
return EXPP_incr_ret( Py_None );
}
+
+
+/*****************************************************************************
+ * Function: Text3d_CreatePyObject
+ * Description: This function will create a new BPy_Text3d from an existing
+ * Blender structure.
+ *****************************************************************************/
+
+PyObject *Text3d_CreatePyObject( Text3d * text3d )
+{
+ BPy_Text3d *pytext3d;
+
+ pytext3d = ( BPy_Text3d * ) PyObject_NEW( BPy_Text3d, &Text3d_Type );
+
+ if( !pytext3d )
+ return EXPP_ReturnPyObjError( PyExc_MemoryError,
+ "couldn't create BPy_Text3d object" );
+
+ pytext3d->curve = text3d;
+
+ return ( PyObject * ) pytext3d;
+}