diff options
author | Willian Padovani Germano <wpgermano@gmail.com> | 2003-06-12 08:51:50 +0400 |
---|---|---|
committer | Willian Padovani Germano <wpgermano@gmail.com> | 2003-06-12 08:51:50 +0400 |
commit | 6cc45538efefe1062aa0bc0909903af3db5d338d (patch) | |
tree | 64cb07ec5761c70f06ac15c2d4633dd9602cbcb0 /source/blender/python/api2_2x/Scene.c | |
parent | ed6885d72891c63c39bb63a0eb936b454fef753c (diff) |
* Small changes in many files:
- Trying to fix linking problems in OSX;
- Making module .Get functions behave like the ones in Blender 2.25 - 2.27
(Guignot pointed the incompatibility);
- Included more types to Blender.Types;
- Found by luck and corrected two bugs that were making Blender crash;
- Added/updated some simple functions.
Diffstat (limited to 'source/blender/python/api2_2x/Scene.c')
-rw-r--r-- | source/blender/python/api2_2x/Scene.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/python/api2_2x/Scene.c b/source/blender/python/api2_2x/Scene.c index 273a512c232..b1be2647874 100644 --- a/source/blender/python/api2_2x/Scene.c +++ b/source/blender/python/api2_2x/Scene.c @@ -295,30 +295,30 @@ static PyObject *M_Scene_Get(PyObject *self, PyObject *args) return wanted_scene; } - else { /* () - return a list of all scenes in Blender */ + else { /* () - return a list with wrappers for all scenes in Blender */ int index = 0; - PyObject *scenelist, *pystr; + PyObject *sce_pylist, *pyobj; - scenelist = PyList_New (BLI_countlist (&(G.main->scene))); + sce_pylist = PyList_New (BLI_countlist (&(G.main->scene))); - if (scenelist == NULL) + if (sce_pylist == NULL) return (PythonReturnErrorObject (PyExc_MemoryError, "couldn't create PyList")); while (scene_iter) { - pystr = PyString_FromString (scene_iter->id.name+2); + pyobj = Scene_CreatePyObject (scene_iter); - if (!pystr) + if (!pyobj) return (PythonReturnErrorObject (PyExc_MemoryError, "couldn't create PyString")); - PyList_SET_ITEM (scenelist, index, pystr); + PyList_SET_ITEM (sce_pylist, index, pyobj); scene_iter = scene_iter->id.next; index++; } - return scenelist; + return sce_pylist; } } |