2003-02-26 19:22:24 +00:00
|
|
|
/*
|
|
|
|
|
*
|
|
|
|
|
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
|
* of the License, or (at your option) any later version. The Blender
|
|
|
|
|
* Foundation also sells licenses for use in proprietary software under
|
|
|
|
|
* the Blender License. See http://www.blender.org/BL/ for information
|
|
|
|
|
* about this.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
|
|
|
|
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
*
|
|
|
|
|
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
|
|
|
|
|
* All rights reserved.
|
|
|
|
|
*
|
|
|
|
|
* This is a new part of Blender.
|
|
|
|
|
*
|
2004-07-26 21:44:55 +00:00
|
|
|
* Contributor(s): Michel Selten, Willian P. Germano, Nathan Letwory
|
2003-02-26 19:22:24 +00:00
|
|
|
*
|
|
|
|
|
* ***** END GPL/BL DUAL LICENSE BLOCK *****
|
|
|
|
|
*/
|
2003-05-20 03:56:41 +00:00
|
|
|
|
|
|
|
|
#ifndef EXPP_modules_h
|
|
|
|
|
#define EXPP_modules_h
|
|
|
|
|
|
2003-02-26 19:22:24 +00:00
|
|
|
#include <Python.h>
|
|
|
|
|
|
2003-06-07 03:49:45 +00:00
|
|
|
#include <DNA_scene_types.h>
|
2003-03-15 19:14:16 +00:00
|
|
|
#include <DNA_object_types.h>
|
2003-07-01 05:19:14 +00:00
|
|
|
#include <DNA_mesh_types.h>
|
2003-04-08 19:54:14 +00:00
|
|
|
#include <DNA_camera_types.h>
|
|
|
|
|
#include <DNA_lamp_types.h>
|
2003-11-13 04:00:59 +00:00
|
|
|
#include <DNA_lattice_types.h>
|
2003-05-20 03:56:41 +00:00
|
|
|
#include <DNA_curve_types.h>
|
2003-05-29 04:00:35 +00:00
|
|
|
#include <DNA_armature_types.h>
|
2003-06-05 18:03:46 +00:00
|
|
|
#include <DNA_ipo_types.h>
|
|
|
|
|
#include <DNA_effect_types.h>
|
|
|
|
|
#include <DNA_meta_types.h>
|
2003-05-31 04:43:10 +00:00
|
|
|
#include <DNA_image_types.h>
|
2004-07-26 21:44:55 +00:00
|
|
|
#include <DNA_texture_types.h>
|
2003-06-26 02:03:51 +00:00
|
|
|
#include <DNA_text_types.h>
|
2003-07-27 15:56:32 +00:00
|
|
|
#include <DNA_world_types.h>
|
2004-07-26 21:44:55 +00:00
|
|
|
#include <DNA_key_types.h>
|
|
|
|
|
#include <DNA_sequence_types.h>
|
2004-04-19 06:57:41 +00:00
|
|
|
#include <DNA_action_types.h>
|
2004-07-26 21:44:55 +00:00
|
|
|
#include <DNA_constraint_types.h>
|
2003-03-15 19:14:16 +00:00
|
|
|
|
2003-03-08 18:10:20 +00:00
|
|
|
/*****************************************************************************/
|
|
|
|
|
/* Global variables */
|
|
|
|
|
/*****************************************************************************/
|
2003-04-21 20:33:06 +00:00
|
|
|
extern PyObject *g_blenderdict;
|
2003-03-08 18:10:20 +00:00
|
|
|
|
2003-05-20 03:56:41 +00:00
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
/* Module Init functions and Data Object helper functions (used by the */
|
|
|
|
|
/* Object module to work with its .data field for the various Data objs */
|
|
|
|
|
/*****************************************************************************/
|
2003-06-28 07:38:21 +00:00
|
|
|
void M_Blender_Init (void);
|
|
|
|
|
|
2004-04-23 13:11:48 +00:00
|
|
|
void types_InitAll(void); /* in Types.c */
|
|
|
|
|
|
2003-06-28 07:38:21 +00:00
|
|
|
/* sys */
|
|
|
|
|
PyObject * sys_Init (void);
|
2003-05-20 03:56:41 +00:00
|
|
|
|
2003-09-03 04:13:08 +00:00
|
|
|
/* Registry */
|
|
|
|
|
PyObject * Registry_Init (void);
|
|
|
|
|
|
2003-05-20 03:56:41 +00:00
|
|
|
/* Object itself */
|
2003-06-28 07:38:21 +00:00
|
|
|
PyObject * Object_Init (void);
|
|
|
|
|
PyObject * Object_CreatePyObject (struct Object *obj);
|
|
|
|
|
Object * Object_FromPyObject (PyObject *py_obj);
|
|
|
|
|
int Object_CheckPyObject (PyObject *py_obj);
|
2003-07-27 15:56:32 +00:00
|
|
|
Object * GetObjectByName (char * name);
|
2003-05-20 03:56:41 +00:00
|
|
|
|
2003-06-07 03:49:45 +00:00
|
|
|
/* Scene */
|
2003-06-24 07:21:17 +00:00
|
|
|
PyObject * Scene_Init (void);
|
2003-06-07 03:49:45 +00:00
|
|
|
PyObject * Scene_CreatePyObject (struct Scene *sce);
|
|
|
|
|
Scene * Scene_FromPyObject (PyObject *pyobj);
|
|
|
|
|
int Scene_CheckPyObject (PyObject *pyobj);
|
2003-07-27 15:56:32 +00:00
|
|
|
Scene * GetSceneByName (char * name);
|
2003-06-07 03:49:45 +00:00
|
|
|
|
2003-05-28 04:36:18 +00:00
|
|
|
/* Types */
|
2003-06-24 07:21:17 +00:00
|
|
|
PyObject * Types_Init (void);
|
2003-05-28 04:36:18 +00:00
|
|
|
|
2003-05-20 03:56:41 +00:00
|
|
|
/* NMesh Data */
|
2003-06-24 07:21:17 +00:00
|
|
|
PyObject * NMesh_Init (void);
|
2003-09-18 00:54:43 +00:00
|
|
|
PyObject * NMesh_CreatePyObject (Mesh *me, Object *ob);
|
2003-09-20 03:40:16 +00:00
|
|
|
Mesh * Mesh_FromPyObject (PyObject *pyobj, Object *ob);
|
2003-06-09 04:01:48 +00:00
|
|
|
int NMesh_CheckPyObject (PyObject *pyobj);
|
2003-05-20 03:56:41 +00:00
|
|
|
|
2003-05-28 04:36:18 +00:00
|
|
|
/* Material */
|
2003-06-24 07:21:17 +00:00
|
|
|
PyObject * Material_Init (void);
|
2003-06-29 16:49:21 +00:00
|
|
|
PyObject * Material_CreatePyObject (struct Material *mat);
|
|
|
|
|
int Material_CheckPyObject (PyObject *pyobj);
|
|
|
|
|
Material **EXPP_newMaterialList_fromPyList (PyObject *list);
|
|
|
|
|
Material **EXPP_newMaterialList(int len);
|
|
|
|
|
int EXPP_releaseMaterialList (Material **matlist, int len);
|
2004-07-20 08:16:46 +00:00
|
|
|
int EXPP_synchronizeMaterialLists (Object *object);
|
2003-07-01 05:19:14 +00:00
|
|
|
void EXPP_incr_mats_us (Material **matlist, int len);
|
2004-07-20 08:16:46 +00:00
|
|
|
PyObject * EXPP_PyList_fromMaterialList(Material **matlist, int len, int all);
|
2003-07-27 15:56:32 +00:00
|
|
|
Material * GetMaterialByName (char * name);
|
2003-05-28 04:36:18 +00:00
|
|
|
|
2003-11-23 17:46:06 +00:00
|
|
|
/* Texture */
|
|
|
|
|
PyObject * Texture_Init (void);
|
|
|
|
|
|
2003-05-20 03:56:41 +00:00
|
|
|
/* Camera Data */
|
2003-06-24 07:21:17 +00:00
|
|
|
PyObject * Camera_Init (void);
|
2003-06-05 16:21:44 +00:00
|
|
|
PyObject * Camera_CreatePyObject (struct Camera *cam);
|
|
|
|
|
Camera * Camera_FromPyObject (PyObject *pyobj);
|
|
|
|
|
int Camera_CheckPyObject (PyObject *pyobj);
|
2003-07-27 15:56:32 +00:00
|
|
|
Camera * GetCameraByName (char * name);
|
2003-05-20 03:56:41 +00:00
|
|
|
|
|
|
|
|
/* Lamp Data */
|
2003-06-24 07:21:17 +00:00
|
|
|
PyObject * Lamp_Init (void);
|
2003-06-05 18:03:46 +00:00
|
|
|
PyObject * Lamp_CreatePyObject (struct Lamp *lamp);
|
|
|
|
|
Lamp * Lamp_FromPyObject (PyObject *pyobj);
|
|
|
|
|
int Lamp_CheckPyObject (PyObject *pyobj);
|
2003-07-27 15:56:32 +00:00
|
|
|
Lamp * GetLampByName (char * name);
|
2003-05-20 03:56:41 +00:00
|
|
|
|
|
|
|
|
/* Curve Data */
|
2003-06-28 07:38:21 +00:00
|
|
|
PyObject * Curve_Init (void);
|
2003-07-09 23:19:18 +00:00
|
|
|
PyObject * Curve_CreatePyObject (struct Curve *curve);
|
|
|
|
|
Curve * Curve_FromPyObject (PyObject *py_obj);
|
|
|
|
|
int Curve_CheckPyObject (PyObject *py_obj);
|
2003-05-20 03:56:41 +00:00
|
|
|
|
2003-05-29 04:00:35 +00:00
|
|
|
/* Armature Data */
|
2003-06-28 07:38:21 +00:00
|
|
|
PyObject * Armature_Init (void);
|
|
|
|
|
PyObject * Armature_CreatePyObject (bArmature *armature);
|
|
|
|
|
bArmature * Armature_FromPyObject (PyObject *py_obj);
|
|
|
|
|
int Armature_CheckPyObject (PyObject *py_obj);
|
2003-05-29 04:00:35 +00:00
|
|
|
|
2003-06-05 18:03:46 +00:00
|
|
|
/* Ipo Data */
|
2003-07-20 18:06:06 +00:00
|
|
|
PyObject * BezTriple_CreatePyObject (BezTriple *bzt);
|
|
|
|
|
int BezTriple_CheckPyObject (PyObject *pyobj);
|
|
|
|
|
BezTriple* BezTriple_FromPyObject (PyObject *pyobj);
|
2003-07-19 20:44:25 +00:00
|
|
|
|
|
|
|
|
PyObject * IpoCurve_Init(void);
|
2003-07-20 18:06:06 +00:00
|
|
|
PyObject * IpoCurve_CreatePyObject (IpoCurve *ipo);
|
|
|
|
|
int IpoCurve_CheckPyObject (PyObject *pyobj);
|
|
|
|
|
IpoCurve * IpoCurve_FromPyObject (PyObject *pyobj);
|
|
|
|
|
|
2003-06-28 07:38:21 +00:00
|
|
|
PyObject * Ipo_Init (void);
|
|
|
|
|
PyObject * Ipo_CreatePyObject (struct Ipo *ipo);
|
|
|
|
|
Ipo * Ipo_FromPyObject (PyObject *py_obj);
|
|
|
|
|
int Ipo_CheckPyObject (PyObject *py_obj);
|
2003-06-05 18:03:46 +00:00
|
|
|
|
|
|
|
|
/* Metaball Data */
|
2003-06-28 07:38:21 +00:00
|
|
|
PyObject * Metaball_Init (void);
|
|
|
|
|
PyObject * Metaball_CreatePyObject (MetaBall *metaball);
|
|
|
|
|
MetaBall * Metaball_FromPyObject (PyObject *py_obj);
|
|
|
|
|
int Metaball_CheckPyObject (PyObject *py_obj);
|
2003-06-05 18:03:46 +00:00
|
|
|
|
2003-05-20 03:56:41 +00:00
|
|
|
/* Particle Effects Data */
|
2003-06-28 07:38:21 +00:00
|
|
|
PyObject * Effect_Init (void);
|
|
|
|
|
PyObject * Effect_CreatePyObject (struct Effect *effect);
|
|
|
|
|
Effect * Effect_FromPyObject (PyObject *py_obj);
|
|
|
|
|
int Effect_CheckPyObject (PyObject *py_obj);
|
2003-05-20 03:56:41 +00:00
|
|
|
|
2003-05-31 04:43:10 +00:00
|
|
|
/* Image */
|
2003-06-24 07:21:17 +00:00
|
|
|
PyObject * Image_Init (void);
|
2003-06-02 20:15:50 +00:00
|
|
|
PyObject * Image_CreatePyObject (Image *image);
|
|
|
|
|
int Image_CheckPyObject (PyObject *pyobj);
|
2003-05-31 04:43:10 +00:00
|
|
|
|
2003-06-26 02:03:51 +00:00
|
|
|
/* Text */
|
|
|
|
|
PyObject * Text_Init (void);
|
|
|
|
|
PyObject * Text_CreatePyObject (Text *txt);
|
|
|
|
|
|
2003-07-27 15:56:32 +00:00
|
|
|
/* World */
|
|
|
|
|
PyObject * World_Init (void);
|
|
|
|
|
PyObject * World_CreatePyObject (struct World *world);
|
|
|
|
|
int World_CheckPyObject (PyObject *py_obj);
|
|
|
|
|
World * World_FromPyObject (PyObject *py_obj);
|
|
|
|
|
World * GetWorldByName (char * name);
|
|
|
|
|
|
2003-11-13 04:00:59 +00:00
|
|
|
/* Lattice */
|
|
|
|
|
PyObject * Lattice_Init (void);
|
|
|
|
|
PyObject * Lattice_CreatePyObject (Lattice *lt);
|
|
|
|
|
Lattice * Lattice_FromPyObject (PyObject *pyobj);
|
|
|
|
|
int Lattice_CheckPyObject (PyObject *pyobj);
|
|
|
|
|
|
2004-04-03 13:59:27 +00:00
|
|
|
/* Noise */
|
|
|
|
|
PyObject * Noise_Init (void);
|
|
|
|
|
|
2004-07-21 21:01:15 +00:00
|
|
|
/* CurNurb */
|
|
|
|
|
PyObject * CurNurb_Init (void);
|
|
|
|
|
PyObject * CurNurb_CreatePyObject (Nurb *bzt);
|
|
|
|
|
int CurNurb_CheckPyObject (PyObject *pyobj);
|
|
|
|
|
Nurb * CurNurb_FromPyObject (PyObject *pyobj);
|
|
|
|
|
|
2003-05-20 03:56:41 +00:00
|
|
|
/* Init functions for other modules */
|
2003-06-24 07:21:17 +00:00
|
|
|
PyObject * Window_Init (void);
|
|
|
|
|
PyObject * Draw_Init (void);
|
|
|
|
|
PyObject * BGL_Init (void);
|
2004-02-29 13:20:34 +00:00
|
|
|
PyObject * Mathutils_Init (void);
|
2004-04-19 06:57:41 +00:00
|
|
|
PyObject * NLA_Init (void);
|
2004-04-24 20:04:37 +00:00
|
|
|
PyObject * Library_Init (void);
|
2004-08-17 04:26:00 +00:00
|
|
|
PyObject * Sound_Init (void);
|
- Blender: added option 'scriptsdir' to Blender.Get();
- small updates to the docs;
- Object: small fix to getMatrix: check during_script() to avoid undesired loops; added old behavior (pre 2.34) as option: .getMatrix('oldlocal');
- tentative fix for bug #1275: scene REDRAW scriptlinks were not being executed (the call to do so was missing):
http://projects.blender.org/tracker/index.php?func=detail&aid=1275&group_id=9&atid=125
added the call in drawview.c, in drawview3dspace(). This causes the scriptlink to be called for each visible view3d, but that's what happens with object redraw scriptlinks, too. Anyway, this is still a test. The place was chosen based on the idea that a scene redraw scriptlink is like an object redraw one, but for all objs in the scene at once.
- Window.Theme: new submodule, to get/set theme options in Blender;
- Added the script save_theme.py (Help menu for now), to save the current theme in Blender as an executable script (currently shown in the Scripts->Misc menu).
There's more work to do for themes, like defining a proper place for them in the interface, adding documentation (for now the added script and the ones it generates can give a pretty good idea of how to use the new module), probably extending themes to support SpaceScript and so on.
2004-09-21 05:28:17 +00:00
|
|
|
PyObject * Theme_Init (void); /* Window.Theme */
|
2003-05-20 03:56:41 +00:00
|
|
|
|
|
|
|
|
#endif /* EXPP_modules_h */
|