/** * $Id:$ * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** * * The contents of this file may be used under the terms of either the GNU * General Public License Version 2 or later (the "GPL", see * http://www.gnu.org/licenses/gpl.html ), or the Blender License 1.0 or * later (the "BL", see http://www.blender.org/BL/ ) which has to be * bought from the Blender Foundation to become active, in which case the * above mentioned GPL option does not apply. * * The Original Code is Copyright (C) 2002 by NaN Holding BV. * All rights reserved. * * The Original Code is: all of this file. * * Contributor(s): none yet. * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ /* python.c MIXED MODEL * * june 99 * Version: $Id: py_interface.c,v 1.3 2000/07/21 09:05:28 nzc Exp $ */ #include "blender.h" #include "py_blender.h" #include "graphics.h" #include "screen.h" /* GUI interface routinges */ static PyObject *PyI_Error (PyObject *self, PyObject *args) { char *name; Py_Try(PyArg_ParseTuple(args, "s", &name)); error(name); Py_INCREF(Py_None); return Py_None; } static PyObject *PyI_Okay (PyObject *self, PyObject *args) { char *name; Py_Try(PyArg_ParseTuple(args, "s", &name)); return Py_BuildValue("i", okee(name)); } static PyObject *PyI_Confirm (PyObject *self, PyObject *args) { char *name, *title; Py_Try(PyArg_ParseTuple(args, "ss", &title, &name)); return Py_BuildValue("i", confirm(title, name)); } static PyObject *PyI_Dialog (PyObject *self, PyObject *args) { float f1, f2, f3; PyObject *ret; PyObject *buttons; PyObject *butrec; char *name, *title, *tip; void **data; int i, len; short type, but; float min, max; PyFloatObject *fl_tmp; Py_Try(PyArg_ParseTuple(args, "sO", &title, &buttons)); len= PyList_Size(buttons); data= mallocN(sizeof(void*)*len, "numbut data"); for (i=0; i