- Pontus Lidman contributed a new module: Blender.Key + access to key objects from NMesh, Lattice and Curve + docs (thanks and sorry for taking so long to check/commit the patch!)

- Allowing EVENT spacehandlers to call the file selector (scriptlinks in general are not allowed, but this special case should be able to). Requested by Paolo Colombo (thanks!)

- tiny doc update (Ken Hughes pointed an error in the space handlers example)

I didn't have time to update the Key module to follow the current bpython design, will do that later and also test it better than I did.
This commit is contained in:
2005-09-09 01:31:10 +00:00
parent 34ae14778c
commit 039a8c95f3
13 changed files with 704 additions and 34 deletions

View File

@@ -78,7 +78,7 @@
*support for packages here e.g. import `package.module` */
static struct _inittab BPy_Inittab_Modules[] = {
{"Blender", M_Blender_Init},
{NULL}
{NULL, NULL}
};
/*************************************************************************
@@ -1271,9 +1271,13 @@ int BPY_do_spacehandlers( ScrArea *sa, unsigned short event,
/* tell we're running a scriptlink. The sum also tells if this script
* is running nested inside another. Blender.Load needs this info to
* avoid trouble with invalid slink pointers. */
during_slink++;
disable_where_scriptlink( (short)during_slink );
* avoid trouble with invalid slink pointers.
* Update (test): allow EVENT space handlers to call file/image selectors,
* still disabled for DRAW space handlers: */
if (event == 0) { /* event = 0: DRAW space handler */
during_slink++;
disable_where_scriptlink( (short)during_slink );
}
/* set globals in Blender module to identify space handler scriptlink */
PyDict_SetItemString(g_blenderdict, "bylink", EXPP_incr_ret_True());
@@ -1331,12 +1335,11 @@ int BPY_do_spacehandlers( ScrArea *sa, unsigned short event,
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
glPopAttrib();
disable_where_scriptlink( (short)(during_slink - 1) );
}
}
disable_where_scriptlink( (short)(during_slink - 1) );
PyDict_SetItemString(g_blenderdict, "bylink", EXPP_incr_ret_False());
PyDict_SetItemString(g_blenderdict, "link", EXPP_incr_ret(Py_None));
PyDict_SetItemString(g_blenderdict, "event", PyString_FromString(""));