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>2004-10-20 09:51:24 +0400
committerWillian Padovani Germano <wpgermano@gmail.com>2004-10-20 09:51:24 +0400
commitfa9135385a38c9289a2dfa2320c20b68d782c1e4 (patch)
treef011e964789f9d9c37f18dfc72de661a525ecf3c /source/blender/python/api2_2x/World.c
parentf2f004af2df9733761cf9d4888e883a8c5f0d3e9 (diff)
BPython:
- Blender.Window: added function GetPerspMatrix() (Tom Musgrave's patch, thanks); - added Chris Want's patch to tell argc, argv to the Python interpreter (thanks, Hos); - Blender.Image: added image.glFree() to free textures bound by the recently added image.glLoad() (both suggested by Campbell Barton -- thanks, with these Blender can be used to load textures for scripts); - Blender.Sound: removed for now at least a few get/set methods of vars that can't be accessed via interface; - renamed Get/makeActive to Get/setCurrent in Blender.World (actually added alias for now), same in Blender.Sound: renamed makeActive to setCurrent. Stephen Swaney pointed this some weeks ago, we should stick to one naming convention. - added documentation for Sound and Window.Theme modules and the other added functions, made other small updates. - Blender.Object: made 'worldspace' become the default output of .getMatrix and .mat/.matrix: after reading a discussion on blender.org's Python forum where eeshlo mentioned the pre 2.34 default was worldspace, I took a better look at Blender's relevant code, confirmed, talked to Theeth about this and as he suggested am changing the default back to 'worldspace'.
Diffstat (limited to 'source/blender/python/api2_2x/World.c')
-rw-r--r--source/blender/python/api2_2x/World.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/source/blender/python/api2_2x/World.c b/source/blender/python/api2_2x/World.c
index 89af766c354..d35dbef5145 100644
--- a/source/blender/python/api2_2x/World.c
+++ b/source/blender/python/api2_2x/World.c
@@ -85,7 +85,7 @@ 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 );
-static PyObject *World_makeActive( BPy_World * self );
+static PyObject *World_setCurrent( BPy_World * self );
/*****************************************************************************/
@@ -94,7 +94,7 @@ static PyObject *World_makeActive( BPy_World * self );
static PyObject *M_World_New( PyObject * self, PyObject * args,
PyObject * keywords );
static PyObject *M_World_Get( PyObject * self, PyObject * args );
-static PyObject *M_World_GetActive( PyObject * self );
+static PyObject *M_World_GetCurrent( PyObject * self );
/*****************************************************************************/
@@ -123,7 +123,7 @@ static char M_World_Get_doc[] =
"(name) - return the world with the name 'name', \
returns None if not found.\n If 'name' is not specified, \
it returns a list of all worlds in the\ncurrent scene.";
-static char M_World_GetActive_doc[] = "() - returns the current world, or \
+static char M_World_GetCurrent_doc[] = "() - returns the current world, or \
None if the Scene has no world";
@@ -135,8 +135,10 @@ struct PyMethodDef M_World_methods[] = {
{"New", ( PyCFunction ) M_World_New, METH_VARARGS | METH_KEYWORDS,
M_World_New_doc},
{"Get", M_World_Get, METH_VARARGS, M_World_Get_doc},
- {"GetActive", ( PyCFunction ) M_World_GetActive, METH_NOARGS,
- M_World_GetActive_doc},
+ {"GetActive", ( PyCFunction ) M_World_GetCurrent, METH_NOARGS,
+ M_World_GetCurrent_doc},
+ {"GetCurrent", ( PyCFunction ) M_World_GetCurrent, METH_NOARGS,
+ M_World_GetCurrent_doc},
{"get", M_World_Get, METH_VARARGS, M_World_Get_doc},
{NULL, NULL, 0, NULL}
};
@@ -200,8 +202,10 @@ static PyMethodDef BPy_World_methods[] = {
{"clearScriptLinks", ( PyCFunction ) World_clearScriptLinks,
METH_NOARGS,
"() - Delete all scriptlinks from this world :)."},
- {"makeActive", ( PyCFunction ) World_makeActive, METH_NOARGS,
+ {"setCurrent", ( PyCFunction ) World_setCurrent, METH_NOARGS,
"() - Makes this world the active world for the current scene."},
+ {"makeActive", ( PyCFunction ) World_setCurrent, METH_NOARGS,
+ "please use setCurrent instead, this alias will be removed."},
{NULL, NULL, 0, NULL}
};
@@ -357,7 +361,7 @@ static PyObject *M_World_Get( PyObject * self, PyObject * args )
-static PyObject *M_World_GetActive( PyObject * self )
+static PyObject *M_World_GetCurrent( PyObject * self )
{
BPy_World *w = NULL;
if( !G.scene->world ) {
@@ -864,8 +868,8 @@ static PyObject *World_getScriptLinks( BPy_World * self, PyObject * args )
-/* world.makeActive */
-static PyObject *World_makeActive( BPy_World * self )
+/* world.setCurrent */
+static PyObject *World_setCurrent( BPy_World * self )
{
World *world = self->world;
/* If there is a world then it now has one less user */