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:
authorWillian Padovani Germano <wpgermano@gmail.com>2005-04-21 23:44:52 +0400
committerWillian Padovani Germano <wpgermano@gmail.com>2005-04-21 23:44:52 +0400
commit589ce4a005ce16c5a628cd51819e20623a23c891 (patch)
tree111a9dc91ad3f1843694d47aaf8eb66c1358820d /source/blender/python/api2_2x/Camera.c
parentc5214c15716715cd513e1d2b61433784eb64b617 (diff)
BPython:
- based on a request by Campbell (he also provided a patch for scene.Layer) access to layers was improved a little, keeping the old method (ob.Layers is a bitmask) and adding the nicer one (ob.layers is a list of ints). Done for objects and scenes. House-cleaning: .Layer was renamed to .Layers (actually just using strncmp instead of strcmp, so both work, same done for Window.ViewLayers). - finally committing patch by Ken Hughes to let .clearScriptLinks() accept a parameter (list of strings) to clear only specified texts. - doc updates and fixes (JMS reported a problem in nmesh.transform() example code). Thanks all who contributed.
Diffstat (limited to 'source/blender/python/api2_2x/Camera.c')
-rw-r--r--source/blender/python/api2_2x/Camera.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/source/blender/python/api2_2x/Camera.c b/source/blender/python/api2_2x/Camera.c
index a6d06512ecb..b3e71fdda17 100644
--- a/source/blender/python/api2_2x/Camera.c
+++ b/source/blender/python/api2_2x/Camera.c
@@ -25,7 +25,7 @@
*
* This is a new part of Blender.
*
- * Contributor(s): Willian P. Germano, Johnny Matthews
+ * Contributor(s): Willian P. Germano, Johnny Matthews, Ken Hughes
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
@@ -125,7 +125,7 @@ static PyObject *Camera_setDrawSize( BPy_Camera * self, PyObject * args );
static PyObject *Camera_setScale( BPy_Camera * self, PyObject * args );
static PyObject *Camera_getScriptLinks( BPy_Camera * self, PyObject * args );
static PyObject *Camera_addScriptLink( BPy_Camera * self, PyObject * args );
-static PyObject *Camera_clearScriptLinks( BPy_Camera * self );
+static PyObject *Camera_clearScriptLinks( BPy_Camera * self, PyObject * args );
static PyObject *Camera_insertIpoKey( BPy_Camera * self, PyObject * args );
Camera *GetCameraByName( char *name );
@@ -187,7 +187,8 @@ static PyMethodDef BPy_Camera_methods[] = {
"(evt) string: FrameChanged or Redraw."},
{"clearScriptLinks", ( PyCFunction ) Camera_clearScriptLinks,
METH_NOARGS,
- "() - Delete all scriptlinks from this camera."},
+ "() - Delete all scriptlinks from this camera.\n"
+ "([s1<,s2,s3...>]) - Delete specified scriptlinks from this camera."},
{NULL, NULL, 0, NULL}
};
@@ -784,22 +785,18 @@ static PyObject *Camera_addScriptLink( BPy_Camera * self, PyObject * args )
slink = &( cam )->scriptlink;
- if( !EXPP_addScriptLink( slink, args, 0 ) )
- return EXPP_incr_ret( Py_None );
- else
- return NULL;
+ return EXPP_addScriptLink( slink, args, 0 );
}
/* cam.clearScriptLinks */
-static PyObject *Camera_clearScriptLinks( BPy_Camera * self )
+static PyObject *Camera_clearScriptLinks( BPy_Camera * self, PyObject * args )
{
Camera *cam = self->camera;
ScriptLink *slink = NULL;
slink = &( cam )->scriptlink;
- return EXPP_incr_ret( Py_BuildValue
- ( "i", EXPP_clearScriptLinks( slink ) ) );
+ return EXPP_clearScriptLinks( slink, args );
}
/* cam.getScriptLinks */