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:
authorTon Roosendaal <ton@blender.org>2007-01-18 00:07:10 +0300
committerTon Roosendaal <ton@blender.org>2007-01-18 00:07:10 +0300
commit4d4447554365c26b455ead5387664a92514c425b (patch)
tree708048e2c42f9e818512d5de374559bcfa2baf1f /source/blender/python/api2_2x/Object.c
parentb9039611c673e5c9e6954bf5474bdb2b023a8a99 (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.c6
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;