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>2012-07-19 14:23:25 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-19 14:23:25 +0400
commit9c8edae7d4ef799b19f6487feb21ce7fbcf5ee07 (patch)
treea20adf41c460849638c52874fa292b68eafc9f39 /source/blender/editors/object/object_add.c
parent4bc46b18d1e3d3e72a27e7f721cd0800b8ff3a4f (diff)
fix for separate loose parts doing full depsgraph rebuild for every object split off.
Diffstat (limited to 'source/blender/editors/object/object_add.c')
-rw-r--r--source/blender/editors/object/object_add.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 7ab20033239..21eab5bd4dc 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -1854,7 +1854,9 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
/* single object duplicate, if dupflag==0, fully linked, else it uses the flags given */
/* leaves selection of base/object unaltered.
- * note: don't call this within a loop since clear_* funcs loop over the entire database. */
+ * note: don't call this within a loop since clear_* funcs loop over the entire database.
+ * note: caller must do DAG_scene_sort(bmain, scene);
+ * this is not done automatic since we may duplicate many objects in a batch */
Base *ED_object_add_duplicate(Main *bmain, Scene *scene, Base *base, int dupflag)
{
Base *basen;
@@ -1874,7 +1876,8 @@ Base *ED_object_add_duplicate(Main *bmain, Scene *scene, Base *base, int dupflag
BKE_object_relink(ob);
set_sca_new_poins_ob(ob);
- DAG_scene_sort(bmain, scene);
+ /* DAG_scene_sort(bmain, scene); */ /* caller must do */
+
if (ob->data) {
ED_render_id_flush_update(bmain, ob->data);
}