diff options
author | Ton Roosendaal <ton@blender.org> | 2007-01-18 00:07:10 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2007-01-18 00:07:10 +0300 |
commit | 4d4447554365c26b455ead5387664a92514c425b (patch) | |
tree | 708048e2c42f9e818512d5de374559bcfa2baf1f /source/blender/python/api2_2x/Object.c | |
parent | b9039611c673e5c9e6954bf5474bdb2b023a8a99 (diff) |
Bugfix #5732
Python scripts: when setting a layer for an object, the function assumed
the object had to be in the current scene, thus ignoring layers for other
objects.
Now the object->lay value is set always.
Diffstat (limited to 'source/blender/python/api2_2x/Object.c')
-rw-r--r-- | source/blender/python/api2_2x/Object.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/Object.c b/source/blender/python/api2_2x/Object.c index 24895e0d886..5f1de87c55f 100644 --- a/source/blender/python/api2_2x/Object.c +++ b/source/blender/python/api2_2x/Object.c @@ -4290,8 +4290,10 @@ static int Object_setLayers( BPy_Object * self, PyObject *value ) layers |= 1 << ( val - 1 ); } + /* do this, to ensure layers are set for objects not in current scene */ + self->object->lay= layers; + /* update any bases pointing to our object */ - base = FIRSTBASE; /* first base in current scene */ while( base ) { if( base->object == self->object ) { @@ -4302,6 +4304,8 @@ static int Object_setLayers( BPy_Object * self, PyObject *value ) } base = base->next; } + + /* these to calls here are overkill! (ton) */ countall(); DAG_scene_sort( G.scene ); return 0; |