From fb6133264ad8146816a28eceebd5f5a4c83b200a Mon Sep 17 00:00:00 2001 From: Joseph Gilbert <ascotan@gmail.com> Date: Fri, 16 Jan 2004 01:19:36 +0000 Subject: [PATCH] -reimplement OB_Surf support for curves --- source/blender/python/api2_2x/Object.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/source/blender/python/api2_2x/Object.c b/source/blender/python/api2_2x/Object.c index 25a05d29b6a..88123c002b6 100644 --- a/source/blender/python/api2_2x/Object.c +++ b/source/blender/python/api2_2x/Object.c @@ -271,7 +271,7 @@ PyObject *M_Object_New(PyObject *self, PyObject *args) else if (strcmp (str_type, "Lattice") == 0) type = OB_LATTICE; /* else if (strcmp (str_type, "Mball") == 0) type = OB_MBALL; */ else if (strcmp (str_type, "Mesh") == 0) type = OB_MESH; -/* else if (strcmp (str_type, "Surf") == 0) type = OB_SURF; */ + else if (strcmp (str_type, "Surf") == 0) type = OB_SURF; /* else if (strcmp (str_type, "Wave") == 0) type = OB_WAVE; */ else if (strcmp (str_type, "Empty") == 0) type = OB_EMPTY; else @@ -741,6 +741,7 @@ static PyObject *Object_getInverseMatrix (BPy_Object *self) Mat4Invert (inverse->mem, self->object->obmat); return ((PyObject *)inverse); + } static PyObject *Object_getIpo(BPy_Object *self) @@ -1336,20 +1337,16 @@ static PyObject *Object_shareFrom (BPy_Object *self, PyObject *args) case OB_CAMERA: /* we can probably add the other types, too */ case OB_ARMATURE: case OB_CURVE: + case OB_SURF: case OB_LATTICE: oldid = (ID*) self->object->data; id = (ID*) object->object->data; self->object->data = object->object->data; - //-- balagi 01/14/2004 - /* - if a mesh is shared the self->object material list must be setup properly ! - */ - if ( self->object->type == OB_MESH && id ) - { + //if a mesh is shared the self->object material list must be setup properly ! - balagi + if ( self->object->type == OB_MESH && id ){ EXPP_synchronizeMaterialLists(self->object, id); } - //-- balagi end id_us_plus (id); if (oldid) -- GitLab