New scripts:

- hotkeys, obdatacopier and renameobjectbyblock, all from Jean-Michel Soler (jms);
- bevel_center by Loic Berthe, suggested for inclusion by jms;
- doc_browser, by Daniel Dunbar (Zr)

  Thanks to them for the new contributions!

  (I included doc_browser at 'Misc' because only users interested in script writing would actually use it, but it could also be under 'Help'.  Opinions?)

BPython related:
- Added scriptlink methods to object, lamp, camera and world.
- Object: added object.makeTrack and object.clearTrack (old track method).
- sys: made sys.exists(path) return 0 for not found; 1 for file, 2 for dir and -1 for neither.
- doc updates and fixes.
- made ONLOAD event work.  G.f's SCENESCRIPT bit was being zeroed in set_app_data.
- Blender: updated functions Load and Save to support the builtin importers and exporters besides .blend (dxf, videoscape, vrml 1.0, stl, ...)
- Draw: added mouse wheel events.
- Scene: added scene.play to play back animations (like ALT+A and SHIFT+ALT+A).  Makes a good counter, too, when the 'win' attribute is set to a space that doesn't "animate".

The scene.play() addition and the fix to ONLOAD scriptlinks is part of the work for a Blender demo mode.  It already works, but I'll still add support for Radiosity calculations and fix a thing in main(): it executes onload scripts too early (BIF_Init), giving funny results in alt+a animations and renderings when firing up Blender.  Loading after the program is up has no such problems.  When I finish I'll post examples of demo mode scripts.
This commit is contained in:
2004-07-03 05:17:04 +00:00
parent 90d4f7a3c1
commit 9282827720
34 changed files with 2780 additions and 478 deletions

View File

@@ -105,6 +105,9 @@ static PyObject *World_getStar(BPy_World *self);
static PyObject *World_setStar(BPy_World *self, PyObject *args );
static PyObject *World_getMist(BPy_World *self);
static PyObject *World_setMist(BPy_World *self, PyObject *args );
static PyObject *World_getScriptLinks(BPy_World *self, PyObject *args);
static PyObject *World_addScriptLink(BPy_World *self, PyObject *args);
static PyObject *World_clearScriptLinks(BPy_World *self);
/*****************************************************************************/
/* Python BPy_World methods table: */
@@ -152,6 +155,16 @@ static PyMethodDef BPy_World_methods[] = {
"() - Return World Data mist"},
{"setMist", (PyCFunction)World_setMist, METH_VARARGS,
"() - Return World Data mist"},
{"getScriptLinks", (PyCFunction)World_getScriptLinks, METH_VARARGS,
"(eventname) - Get a list of this world's scriptlinks (Text names) "
"of the given type\n"
"(eventname) - string: FrameChanged or Redraw."},
{"addScriptLink", (PyCFunction)World_addScriptLink, METH_VARARGS,
"(text, evt) - Add a new world scriptlink.\n"
"(text) - string: an existing Blender Text name;\n"
"(evt) string: FrameChanged or Redraw."},
{"clearScriptLinks", (PyCFunction)World_clearScriptLinks, METH_NOARGS,
"() - Delete all scriptlinks from this world :)."},
{NULL, NULL, 0, NULL}
};
@@ -160,7 +173,7 @@ static PyMethodDef BPy_World_methods[] = {
/* and Object modules. */
/*****************************************************************************/
PyObject *World_Init (void);
PyObject *World_CreatePyObject (World *cam);
PyObject *World_CreatePyObject (World *world);
World *World_FromPyObject (PyObject *pyobj);
int World_CheckPyObject (PyObject *pyobj);