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>2007-06-22 17:38:15 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-06-22 17:38:15 +0400
commit62ac9cba9cf27921db32c9c7ccac8f74668744ed (patch)
tree8f8762e880f45e1c82f360a21a8c2c87fd42d4a6 /source/blender/python/api2_2x/Object.c
parent188e3ede4fceb1187fe06800542e2b4123355a9c (diff)
(Python Object API)
setting object layers didnt break once the base of an object was found. DAG update and countall ran even when the object wasnt in the scene.
Diffstat (limited to 'source/blender/python/api2_2x/Object.c')
-rw-r--r--source/blender/python/api2_2x/Object.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/source/blender/python/api2_2x/Object.c b/source/blender/python/api2_2x/Object.c
index 73859bedcdd..8170aeb6a76 100644
--- a/source/blender/python/api2_2x/Object.c
+++ b/source/blender/python/api2_2x/Object.c
@@ -1230,7 +1230,9 @@ static int Object_setSelect( BPy_Object * self, PyObject * value )
}
base = base->next;
}
- countall( );
+ if (base) { /* was the object selected? */
+ countall( );
+ }
return 0;
}
@@ -4297,13 +4299,16 @@ static int Object_setLayers( BPy_Object * self, PyObject *value )
local = base->lay;
base->lay = local | layers;
self->object->lay = base->lay;
+ break;
}
base = base->next;
}
/* these to calls here are overkill! (ton) */
- countall();
- DAG_scene_sort( G.scene );
+ if (base) { /* The object was found? */
+ countall();
+ DAG_scene_sort( G.scene );
+ }
return 0;
}
@@ -4333,11 +4338,14 @@ static int Object_setLayersMask( BPy_Object *self, PyObject *value )
local = base->lay;
base->lay = local | layers;
self->object->lay = base->lay;
+ break;
}
base = base->next;
}
- countall();
- DAG_scene_sort( G.scene );
+ if (base) { /* The object was found? */
+ countall();
+ DAG_scene_sort( G.scene );
+ }
return 0;
}