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>2010-01-07 19:19:38 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-01-07 19:19:38 +0300
commitbce42d6b5eb37bcb93cf2f7352c78058dc1b13ae (patch)
treeaf8dd40f3761cd35d2fff66d4a7c680b81fd1eb6 /source/blender/windowmanager
parent0983aae01959c2819dcc9fa3ce32f0a558cfa338 (diff)
group instance still didnt work in some cases, now tag ID flag when linking as well as appending so its easy to know if an ID is newly added or not.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 8078c9f6e95..4bef0faeea8 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -1240,9 +1240,6 @@ static void wm_link_make_library_local(Main *main, const char *libname)
/* make local */
if(lib) {
all_local(lib, 1);
- /* important we unset, otherwise these object wont
- * link into other scenes from this blend file */
- flag_all_listbases_ids(LIB_APPEND_TAG, 0);
}
}
@@ -1300,9 +1297,11 @@ static int wm_link_append_exec(bContext *C, wmOperator *op)
flag = wm_link_append_flag(op);
- /* tag everything, all untagged data can be made local */
- if((flag & FILE_LINK)==0)
- flag_all_listbases_ids(LIB_APPEND_TAG, 1);
+ /* tag everything, all untagged data can be made local
+ * its also generally useful to know what is new
+ *
+ * take extra care flag_all_listbases_ids(LIB_LINK_TAG, 0) is called after! */
+ flag_all_listbases_ids(LIB_PRE_EXISTING, 1);
/* here appending/linking starts */
mainl = BLO_library_append_begin(C, &bh, libname);
@@ -1325,6 +1324,10 @@ static int wm_link_append_exec(bContext *C, wmOperator *op)
if((flag & FILE_LINK)==0)
wm_link_make_library_local(bmain, libname);
+ /* important we unset, otherwise these object wont
+ * link into other scenes from this blend file */
+ flag_all_listbases_ids(LIB_PRE_EXISTING, 0);
+
/* recreate dependency graph to include new objects */
DAG_scene_sort(scene);
DAG_ids_flush_update(0);