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:
authorCampbell Barton <ideasman42@gmail.com>2006-09-24 12:30:38 +0400
committerCampbell Barton <ideasman42@gmail.com>2006-09-24 12:30:38 +0400
commite8495d1fdd7623cbd42cac1b30406dc6dbc0ee06 (patch)
treedbd207a21edfb748c872d3672517f2f97e6f383c /source/blender/python/api2_2x/Scene.h
parente136fe0acb5d9e5d39fddec7dba4f49f807ffc7c (diff)
Extra generic errors for Scene, Groups and Metaballs to raise errors when trying to do anything with a python objects thats had its data removed in Blender.
Added to existing scn.objects scn.objects.active (get/set the active object for the scene) scn.objects.selected - an iterator that only uses selected objects scn.objects.context - an iterator on objects in the user context (visible in the current 3d views layer and selected) These are the same type as scn.objects but .add() .remove() .new() .active etc raise errors. so scn.objects.selected.add() will raise an error. Made nested loops possible with scn.objects, metaball.elements and ob.modifiers, by initializing the iter value as NULL and creating copys of the pyobject when _getIter() is called if ->iter is not NULL. This is how pythons xrange() works.
Diffstat (limited to 'source/blender/python/api2_2x/Scene.h')
-rw-r--r--source/blender/python/api2_2x/Scene.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/Scene.h b/source/blender/python/api2_2x/Scene.h
index 6967a569859..bdf0977b075 100644
--- a/source/blender/python/api2_2x/Scene.h
+++ b/source/blender/python/api2_2x/Scene.h
@@ -57,6 +57,7 @@ typedef struct {
PyObject_VAR_HEAD /* required python macro */
BPy_Scene *bpyscene; /* link to the python scene so we can know if its been removed */
Base *iter; /* so we can iterate over the objects */
+ int mode; /*0:all objects, 1:selected objects, 2:user context*/
} BPy_SceneObSeq;