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
path: root/source
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2016-02-15 21:35:35 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-02-15 21:38:51 +0300
commit9a0fb589f70ce20618291b30ec45b230f8ff234d (patch)
treeee6f5c246ac7c911aedb072eaa1a5546d81e2994 /source
parenta1495366af1d53382e6f01e4c75c39dcd137217e (diff)
Cleanup: reorganize BKE ID tagging functions.
BKE_main_id_tag_/BKE_main_id_flag_ were horrible naming now that we split those into flags (for presistent one) and tags (for runtime ones). Got rid of previous 'tag_' functions behavior (those who were dedicated shortcuts to set/clear LIB_TAG_DOIT), so now '_tag_' functions affect tags, and '_flag_' functions affect flags.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/BKE_library.h6
-rw-r--r--source/blender/blenkernel/intern/blender.c8
-rw-r--r--source/blender/blenkernel/intern/depsgraph.c14
-rw-r--r--source/blender/blenkernel/intern/group.c2
-rw-r--r--source/blender/blenkernel/intern/library.c81
-rw-r--r--source/blender/blenkernel/intern/scene.c8
-rw-r--r--source/blender/blenkernel/intern/sequencer.c2
-rw-r--r--source/blender/blenloader/intern/readfile.c4
-rw-r--r--source/blender/depsgraph/intern/depsgraph_build_nodes.cc2
-rw-r--r--source/blender/depsgraph/intern/depsgraph_build_relations.cc2
-rw-r--r--source/blender/depsgraph/intern/depsgraph_tag.cc2
-rw-r--r--source/blender/editors/object/object_add.c2
-rw-r--r--source/blender/editors/object/object_bake_api.c4
-rw-r--r--source/blender/editors/object/object_relations.c2
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_scene.c2
-rw-r--r--source/blender/modifiers/intern/MOD_smoke.c8
-rw-r--r--source/blender/python/intern/bpy_library.c6
-rw-r--r--source/blender/render/intern/source/bake.c2
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c6
-rw-r--r--source/gameengine/Converter/KX_BlenderSceneConverter.cpp6
21 files changed, 91 insertions, 80 deletions
diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h
index 62c5fc952ad..4bd762a0ca3 100644
--- a/source/blender/blenkernel/BKE_library.h
+++ b/source/blender/blenkernel/BKE_library.h
@@ -103,9 +103,9 @@ struct BlendThumbnail *BKE_main_thumbnail_from_imbuf(struct Main *bmain, struct
struct ImBuf *BKE_main_thumbnail_to_imbuf(struct Main *bmain, struct BlendThumbnail *data);
void BKE_main_thumbnail_create(struct Main *bmain);
-void BKE_main_id_tag_idcode(struct Main *mainvar, const short type, const bool tag);
-void BKE_main_id_tag_listbase(struct ListBase *lb, const bool tag);
-void BKE_main_id_tag_all(struct Main *mainvar, const bool tag);
+void BKE_main_id_tag_idcode(struct Main *mainvar, const short type, const int tag, const bool value);
+void BKE_main_id_tag_listbase(struct ListBase *lb, const int tag, const bool value);
+void BKE_main_id_tag_all(struct Main *mainvar, const int tag, const bool value);
void BKE_main_id_flag_listbase(ListBase *lb, const int flag, const bool value);
void BKE_main_id_flag_all(struct Main *bmain, const int flag, const bool value);
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index 635fc1e7a66..b9cf21a7a3a 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -964,7 +964,7 @@ Main *BKE_undo_get_main(Scene **r_scene)
void BKE_copybuffer_begin(Main *bmain)
{
/* set all id flags to zero; */
- BKE_main_id_flag_all(bmain, LIB_TAG_NEED_EXPAND | LIB_TAG_DOIT, false);
+ BKE_main_id_tag_all(bmain, LIB_TAG_NEED_EXPAND | LIB_TAG_DOIT, false);
}
void BKE_copybuffer_tag_ID(ID *id)
@@ -1034,7 +1034,7 @@ int BKE_copybuffer_save(const char *filename, ReportList *reports)
MEM_freeN(mainb);
/* set id flag to zero; */
- BKE_main_id_flag_all(G.main, LIB_TAG_NEED_EXPAND | LIB_TAG_DOIT, false);
+ BKE_main_id_tag_all(G.main, LIB_TAG_NEED_EXPAND | LIB_TAG_DOIT, false);
if (path_list_backup) {
BKE_bpath_list_restore(G.main, path_list_flag, path_list_backup);
@@ -1067,7 +1067,7 @@ int BKE_copybuffer_paste(bContext *C, const char *libname, const short flag, Rep
* its also generally useful to know what is new
*
* take extra care BKE_main_id_flag_all(bmain, LIB_TAG_PRE_EXISTING, false) is called after! */
- BKE_main_id_flag_all(bmain, LIB_TAG_PRE_EXISTING, true);
+ BKE_main_id_tag_all(bmain, LIB_TAG_PRE_EXISTING, true);
/* here appending/linking starts */
mainl = BLO_library_link_begin(bmain, &bh, libname);
@@ -1086,7 +1086,7 @@ int BKE_copybuffer_paste(bContext *C, const char *libname, const short flag, Rep
/* important we unset, otherwise these object wont
* link into other scenes from this blend file */
- BKE_main_id_flag_all(bmain, LIB_TAG_PRE_EXISTING, false);
+ BKE_main_id_tag_all(bmain, LIB_TAG_PRE_EXISTING, false);
/* recreate dependency graph to include new objects */
DAG_relations_tag_update(bmain);
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index 8bd8b4ff94a..55c54cdac49 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -938,9 +938,9 @@ DagForest *build_dag(Main *bmain, Scene *sce, short mask)
dag->need_update = false;
/* clear "LIB_TAG_DOIT" flag from all materials, to prevent infinite recursion problems later [#32017] */
- BKE_main_id_tag_idcode(bmain, ID_MA, false);
- BKE_main_id_tag_idcode(bmain, ID_LA, false);
- BKE_main_id_tag_idcode(bmain, ID_GR, false);
+ BKE_main_id_tag_idcode(bmain, ID_MA, LIB_TAG_DOIT, false);
+ BKE_main_id_tag_idcode(bmain, ID_LA, LIB_TAG_DOIT, false);
+ BKE_main_id_tag_idcode(bmain, ID_GR, LIB_TAG_DOIT, false);
/* add base node for scene. scene is always the first node in DAG */
scenenode = dag_add_node(dag, sce);
@@ -956,7 +956,7 @@ DagForest *build_dag(Main *bmain, Scene *sce, short mask)
build_dag_group(dag, scenenode, bmain, sce, ob->dup_group, mask);
}
- BKE_main_id_tag_idcode(bmain, ID_GR, false);
+ BKE_main_id_tag_idcode(bmain, ID_GR, LIB_TAG_DOIT, false);
/* Now all relations were built, but we need to solve 1 exceptional case;
* When objects have multiple "parents" (for example parent + constraint working on same object)
@@ -2297,7 +2297,7 @@ void DAG_scene_update_flags(Main *bmain, Scene *scene, unsigned int lay, const b
GroupObject *go;
Scene *sce_iter;
- BKE_main_id_tag_idcode(bmain, ID_GR, false);
+ BKE_main_id_tag_idcode(bmain, ID_GR, LIB_TAG_DOIT, false);
/* set ob flags where animated systems are */
for (SETLOOPER(scene, sce_iter, base)) {
@@ -2476,7 +2476,7 @@ void DAG_on_visible_update(Main *bmain, const bool do_time)
for (sce_iter = scene; sce_iter; sce_iter = sce_iter->set)
dag_scene_flush_layers(sce_iter, lay);
- BKE_main_id_tag_idcode(bmain, ID_GR, false);
+ BKE_main_id_tag_idcode(bmain, ID_GR, LIB_TAG_DOIT, false);
for (SETLOOPER(scene, sce_iter, base)) {
ob = base->object;
@@ -2507,7 +2507,7 @@ void DAG_on_visible_update(Main *bmain, const bool do_time)
}
}
- BKE_main_id_tag_idcode(bmain, ID_GR, false);
+ BKE_main_id_tag_idcode(bmain, ID_GR, LIB_TAG_DOIT, false);
/* now tag update flags, to ensure deformers get calculated on redraw */
DAG_scene_update_flags(bmain, scene, lay, do_time, true);
diff --git a/source/blender/blenkernel/intern/group.c b/source/blender/blenkernel/intern/group.c
index 4506f932413..a44eb1df9fe 100644
--- a/source/blender/blenkernel/intern/group.c
+++ b/source/blender/blenkernel/intern/group.c
@@ -260,7 +260,7 @@ static bool group_object_cyclic_check_internal(Object *object, Group *group)
bool BKE_group_object_cyclic_check(Main *bmain, Object *object, Group *group)
{
/* first flag all groups */
- BKE_main_id_tag_listbase(&bmain->group, true);
+ BKE_main_id_tag_listbase(&bmain->group, LIB_TAG_DOIT, true);
return group_object_cyclic_check_internal(object, group);
}
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index c4603207062..811fbf5e5f0 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -575,7 +575,51 @@ ListBase *which_libbase(Main *mainlib, short type)
}
/**
- * Clear or set given flags for all ids in listbase (runtime flags only).
+ * Clear or set given tags for all ids in listbase (runtime tags).
+ */
+void BKE_main_id_tag_listbase(ListBase *lb, const int tag, const bool value)
+{
+ ID *id;
+ if (value) {
+ for (id = lb->first; id; id = id->next) {
+ id->tag |= tag;
+ }
+ }
+ else {
+ const int ntag = ~tag;
+ for (id = lb->first; id; id = id->next) {
+ id->tag &= ntag;
+ }
+ }
+}
+
+/**
+ * Clear or set given tags for all ids of given type in bmain (runtime tags).
+ */
+void BKE_main_id_tag_idcode(struct Main *mainvar, const short type, const int tag, const bool value)
+{
+ ListBase *lb = which_libbase(mainvar, type);
+
+ BKE_main_id_tag_listbase(lb, tag, value);
+}
+
+/**
+ * Clear or set given tags for all ids in bmain (runtime tags).
+ */
+void BKE_main_id_tag_all(struct Main *mainvar, const int tag, const bool value)
+{
+ ListBase *lbarray[MAX_LIBARRAY];
+ int a;
+
+ a = set_listbasepointers(mainvar, lbarray);
+ while (a--) {
+ BKE_main_id_tag_listbase(lbarray[a], tag, value);
+ }
+}
+
+
+/**
+ * Clear or set given flags for all ids in listbase (persistent flags).
*/
void BKE_main_id_flag_listbase(ListBase *lb, const int flag, const bool value)
{
@@ -592,7 +636,7 @@ void BKE_main_id_flag_listbase(ListBase *lb, const int flag, const bool value)
}
/**
- * Clear or set given flags for all ids in bmain (runtime flags only).
+ * Clear or set given flags for all ids in bmain (persistent flags).
*/
void BKE_main_id_flag_all(Main *bmain, const int flag, const bool value)
{
@@ -1756,39 +1800,6 @@ static void lib_indirect_test_id(ID *id, Library *lib)
#undef LIBTAG
}
-void BKE_main_id_tag_listbase(ListBase *lb, const bool tag)
-{
- ID *id;
- if (tag) {
- for (id = lb->first; id; id = id->next) {
- id->tag |= LIB_TAG_DOIT;
- }
- }
- else {
- for (id = lb->first; id; id = id->next) {
- id->tag &= ~LIB_TAG_DOIT;
- }
- }
-}
-
-void BKE_main_id_tag_idcode(struct Main *mainvar, const short type, const bool tag)
-{
- ListBase *lb = which_libbase(mainvar, type);
-
- BKE_main_id_tag_listbase(lb, tag);
-}
-
-void BKE_main_id_tag_all(struct Main *mainvar, const bool tag)
-{
- ListBase *lbarray[MAX_LIBARRAY];
- int a;
-
- a = set_listbasepointers(mainvar, lbarray);
- while (a--) {
- BKE_main_id_tag_listbase(lbarray[a], tag);
- }
-}
-
/* if lib!=NULL, only all from lib local
* bmain is almost certainly G.main */
void BKE_library_make_local(Main *bmain, Library *lib, bool untagged_only, bool set_fake)
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 2d4029bb105..48fd34e38f4 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -1810,8 +1810,8 @@ void BKE_scene_update_tagged(EvaluationContext *eval_ctx, Main *bmain, Scene *sc
/* clear "LIB_TAG_DOIT" flag from all materials, to prevent infinite recursion problems later
* when trying to find materials with drivers that need evaluating [#32017]
*/
- BKE_main_id_tag_idcode(bmain, ID_MA, false);
- BKE_main_id_tag_idcode(bmain, ID_LA, false);
+ BKE_main_id_tag_idcode(bmain, ID_MA, LIB_TAG_DOIT, false);
+ BKE_main_id_tag_idcode(bmain, ID_LA, LIB_TAG_DOIT, false);
/* update all objects: drivers, matrices, displists, etc. flags set
* by depgraph or manual, no layer check here, gets correct flushed
@@ -1969,8 +1969,8 @@ void BKE_scene_update_for_newframe_ex(EvaluationContext *eval_ctx, Main *bmain,
/* clear "LIB_TAG_DOIT" flag from all materials, to prevent infinite recursion problems later
* when trying to find materials with drivers that need evaluating [#32017]
*/
- BKE_main_id_tag_idcode(bmain, ID_MA, false);
- BKE_main_id_tag_idcode(bmain, ID_LA, false);
+ BKE_main_id_tag_idcode(bmain, ID_MA, LIB_TAG_DOIT, false);
+ BKE_main_id_tag_idcode(bmain, ID_LA, LIB_TAG_DOIT, false);
/* run rigidbody sim */
/* NOTE: current position is so that rigidbody sim affects other objects, might change in the future */
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index 32e7ad7799a..8da1ed24447 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -3799,7 +3799,7 @@ ImBuf *BKE_sequencer_give_ibuf(const SeqRenderData *context, float cfra, int cha
}
#ifdef USE_SCENE_RECURSIVE_HACK
- BKE_main_id_tag_idcode(context->bmain, ID_SCE, false);
+ BKE_main_id_tag_idcode(context->bmain, ID_SCE, LIB_TAG_DOIT, false);
#endif
return seq_render_strip_stack(context, seqbasep, cfra, chanshown);
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index cf4f18301b2..7b67035eb98 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -9851,7 +9851,7 @@ static Main *library_link_begin(Main *mainvar, FileData **fd, const char *filepa
(*fd)->mainlist = MEM_callocN(sizeof(ListBase), "FileData.mainlist");
/* clear for group instantiating tag */
- BKE_main_id_tag_listbase(&(mainvar->group), false);
+ BKE_main_id_tag_listbase(&(mainvar->group), LIB_TAG_DOIT, false);
/* make mains */
blo_split_main((*fd)->mainlist, mainvar);
@@ -9933,7 +9933,7 @@ static void library_link_end(Main *mainl, FileData **fd, const short flag, Scene
}
/* clear group instantiating tag */
- BKE_main_id_tag_listbase(&(mainvar->group), false);
+ BKE_main_id_tag_listbase(&(mainvar->group), LIB_TAG_DOIT, false);
/* patch to prevent switch_endian happens twice */
if ((*fd)->flags & FD_FLAGS_SWITCH_ENDIAN) {
diff --git a/source/blender/depsgraph/intern/depsgraph_build_nodes.cc b/source/blender/depsgraph/intern/depsgraph_build_nodes.cc
index 04b75f65c65..7457b43fd38 100644
--- a/source/blender/depsgraph/intern/depsgraph_build_nodes.cc
+++ b/source/blender/depsgraph/intern/depsgraph_build_nodes.cc
@@ -247,7 +247,7 @@ void DepsgraphNodeBuilder::build_scene(Main *bmain, Scene *scene)
* shouldn't bother with setting it, they only might query this flag when
* needed.
*/
- BKE_main_id_tag_all(bmain, false);
+ BKE_main_id_tag_all(bmain, LIB_TAG_DOIT, false);
/* scene ID block */
add_id_node(&scene->id);
diff --git a/source/blender/depsgraph/intern/depsgraph_build_relations.cc b/source/blender/depsgraph/intern/depsgraph_build_relations.cc
index 7e98eef4740..efeeff27430 100644
--- a/source/blender/depsgraph/intern/depsgraph_build_relations.cc
+++ b/source/blender/depsgraph/intern/depsgraph_build_relations.cc
@@ -243,7 +243,7 @@ void DepsgraphRelationBuilder::build_scene(Main *bmain, Scene *scene)
/* LIB_TAG_DOIT is used to indicate whether node for given ID was already
* created or not.
*/
- BKE_main_id_tag_all(bmain, false);
+ BKE_main_id_tag_all(bmain, LIB_TAG_DOIT, false);
if (scene->set) {
// TODO: link set to scene, especially our timesource...
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index 42399cce3a5..486526ed46c 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -412,7 +412,7 @@ void DEG_graph_on_visible_update(Main *bmain, Scene *scene)
wmWindowManager *wm = (wmWindowManager *)bmain->wm.first;
int old_layers = graph->layers;
if (wm != NULL) {
- BKE_main_id_flag_listbase(&bmain->scene, LIB_TAG_DOIT, true);
+ BKE_main_id_tag_listbase(&bmain->scene, LIB_TAG_DOIT, true);
graph->layers = 0;
for (wmWindow *win = (wmWindow *)wm->windows.first;
win != NULL;
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 1cab8918abc..57d16d3104b 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -1159,7 +1159,7 @@ static int object_delete_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
/* delete has to handle all open scenes */
- BKE_main_id_flag_listbase(&bmain->scene, LIB_TAG_DOIT, 1);
+ BKE_main_id_tag_listbase(&bmain->scene, LIB_TAG_DOIT, 1);
for (win = wm->windows.first; win; win = win->next) {
scene = win->screen->scene;
diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c
index f9ab0f45996..fd95d6129ad 100644
--- a/source/blender/editors/object/object_bake_api.c
+++ b/source/blender/editors/object/object_bake_api.c
@@ -497,7 +497,7 @@ static bool bake_objects_check(Main *bmain, Object *ob, ListBase *selected_objec
CollectionPointerLink *link;
/* error handling and tag (in case multiple materials share the same image) */
- BKE_main_id_tag_idcode(bmain, ID_IM, false);
+ BKE_main_id_tag_idcode(bmain, ID_IM, LIB_TAG_DOIT, false);
if (is_selected_to_active) {
int tot_objects = 0;
@@ -555,7 +555,7 @@ static void build_image_lookup(Main *bmain, Object *ob, BakeImages *bake_images)
int tot_images = 0;
/* error handling and tag (in case multiple materials share the same image) */
- BKE_main_id_tag_idcode(bmain, ID_IM, false);
+ BKE_main_id_tag_idcode(bmain, ID_IM, LIB_TAG_DOIT, false);
for (i = 0; i < tot_mat; i++) {
Image *image;
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index b390fc1bfea..41b9c95bc77 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -2135,7 +2135,7 @@ static void tag_localizable_objects(bContext *C, const int mode)
{
Main *bmain = CTX_data_main(C);
- BKE_main_id_tag_all(bmain, false);
+ BKE_main_id_tag_all(bmain, LIB_TAG_DOIT, false);
/* Set LIB_TAG_DOIT flag for all selected objects, so next we can check whether
* object is gonna to become local or not.
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index 5f7ff121742..4b7ce640a56 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -775,7 +775,7 @@ static void rna_Main_linestyles_remove(Main *bmain, ReportList *reports, Freesty
/* tag and is_updated functions, all the same */
#define RNA_MAIN_ID_TAG_FUNCS_DEF(_func_name, _listbase_name, _id_type) \
static void rna_Main_##_func_name##_tag(Main *bmain, int value) { \
- BKE_main_id_tag_listbase(&bmain->_listbase_name, value); \
+ BKE_main_id_tag_listbase(&bmain->_listbase_name, LIB_TAG_DOIT, value); \
} \
static int rna_Main_##_func_name##_is_updated_get(PointerRNA *ptr) { \
return DAG_id_type_tagged(ptr->data, _id_type) != 0; \
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 996cee03487..95433d32646 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -1582,7 +1582,7 @@ static void rna_Scene_use_simplify_update(Main *bmain, Scene *UNUSED(scene), Poi
Scene *sce_iter;
Base *base;
- BKE_main_id_tag_listbase(&bmain->object, true);
+ BKE_main_id_tag_listbase(&bmain->object, LIB_TAG_DOIT, true);
for (SETLOOPER(sce, sce_iter, base))
object_simplify_update(base->object);
diff --git a/source/blender/modifiers/intern/MOD_smoke.c b/source/blender/modifiers/intern/MOD_smoke.c
index aea688858de..237d4cc6718 100644
--- a/source/blender/modifiers/intern/MOD_smoke.c
+++ b/source/blender/modifiers/intern/MOD_smoke.c
@@ -213,7 +213,7 @@ static void updateDepgraph(ModifierData *md, DagForest *forest,
}
}
else {
- BKE_main_id_tag_listbase(&bmain->object, true);
+ BKE_main_id_tag_listbase(&bmain->object, LIB_TAG_DOIT, true);
base = scene->base.first;
for (; base; base = base->next) {
update_depsgraph_flow_coll_object(forest, obNode, base->object);
@@ -221,7 +221,7 @@ static void updateDepgraph(ModifierData *md, DagForest *forest,
}
/* add relation to all "smoke flow" force fields */
base = scene->base.first;
- BKE_main_id_tag_listbase(&bmain->object, true);
+ BKE_main_id_tag_listbase(&bmain->object, LIB_TAG_DOIT, true);
for (; base; base = base->next) {
update_depsgraph_field_source_object(forest, obNode, ob, base->object);
}
@@ -318,7 +318,7 @@ static void updateDepsgraph(ModifierData *md,
}
}
else {
- BKE_main_id_tag_listbase(&bmain->object, true);
+ BKE_main_id_tag_listbase(&bmain->object, LIB_TAG_DOIT, true);
base = scene->base.first;
for (; base; base = base->next) {
update_depsgraph_flow_coll_object_new(node, base->object);
@@ -326,7 +326,7 @@ static void updateDepsgraph(ModifierData *md,
}
/* add relation to all "smoke flow" force fields */
base = scene->base.first;
- BKE_main_id_tag_listbase(&bmain->object, true);
+ BKE_main_id_tag_listbase(&bmain->object, LIB_TAG_DOIT, true);
for (; base; base = base->next) {
update_depsgraph_field_source_object_new(node, ob, base->object);
}
diff --git a/source/blender/python/intern/bpy_library.c b/source/blender/python/intern/bpy_library.c
index 3561f2b2fbd..dd1be67946b 100644
--- a/source/blender/python/intern/bpy_library.c
+++ b/source/blender/python/intern/bpy_library.c
@@ -332,7 +332,7 @@ static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *UNUSED(args))
Main *mainl = NULL;
int err = 0;
- BKE_main_id_flag_all(bmain, LIB_TAG_PRE_EXISTING, true);
+ BKE_main_id_tag_all(bmain, LIB_TAG_PRE_EXISTING, true);
/* here appending/linking starts */
mainl = BLO_library_link_begin(bmain, &(self->blo_handle), self->relpath);
@@ -400,7 +400,7 @@ static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *UNUSED(args))
/* exception raised above, XXX, this leaks some memory */
BLO_blendhandle_close(self->blo_handle);
self->blo_handle = NULL;
- BKE_main_id_flag_all(bmain, LIB_TAG_PRE_EXISTING, false);
+ BKE_main_id_tag_all(bmain, LIB_TAG_PRE_EXISTING, false);
return NULL;
}
else {
@@ -420,7 +420,7 @@ static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *UNUSED(args))
}
}
- BKE_main_id_flag_all(bmain, LIB_TAG_PRE_EXISTING, false);
+ BKE_main_id_tag_all(bmain, LIB_TAG_PRE_EXISTING, false);
/* finally swap the capsules for real bpy objects
* important since BLO_library_append_end initializes NodeTree types used by srna->refine */
diff --git a/source/blender/render/intern/source/bake.c b/source/blender/render/intern/source/bake.c
index da553402ea3..b2f8c79c197 100644
--- a/source/blender/render/intern/source/bake.c
+++ b/source/blender/render/intern/source/bake.c
@@ -1037,7 +1037,7 @@ int RE_bake_shade_all_selected(Render *re, int type, Object *actob, short *do_up
if (R.r.bake_flag & R_BAKE_VCOL) {
/* untag all meshes */
- BKE_main_id_tag_listbase(&G.main->mesh, false);
+ BKE_main_id_tag_listbase(&G.main->mesh, LIB_TAG_DOIT, false);
}
BLI_init_threads(&threads, do_bake_thread, re->r.threads);
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 70557a0f2b1..8a9b069bdc3 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -2626,7 +2626,7 @@ static int wm_link_append_exec(bContext *C, wmOperator *op)
* its also generally useful to know what is new
*
* take extra care BKE_main_id_flag_all(bmain, LIB_TAG_PRE_EXISTING, false) is called after! */
- BKE_main_id_flag_all(bmain, LIB_TAG_PRE_EXISTING, true);
+ BKE_main_id_tag_all(bmain, LIB_TAG_PRE_EXISTING, true);
/* We define our working data...
* Note that here, each item 'uses' one library, and only one. */
@@ -2707,7 +2707,7 @@ static int wm_link_append_exec(bContext *C, wmOperator *op)
/* important we unset, otherwise these object wont
* link into other scenes from this blend file */
- BKE_main_id_flag_all(bmain, LIB_TAG_PRE_EXISTING, false);
+ BKE_main_id_tag_all(bmain, LIB_TAG_PRE_EXISTING, false);
/* recreate dependency graph to include new objects */
DAG_scene_relations_rebuild(bmain, scene);
@@ -4897,7 +4897,7 @@ static int previews_ensure_exec(bContext *C, wmOperator *UNUSED(op))
int i;
/* We use LIB_TAG_DOIT to check whether we have already handled a given ID or not. */
- BKE_main_id_flag_all(bmain, LIB_TAG_DOIT, true);
+ BKE_main_id_tag_all(bmain, LIB_TAG_DOIT, true);
BLI_LINKSTACK_INIT(preview_id_stack.id_stack);
diff --git a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
index ad1fdf2f06a..96328da60bd 100644
--- a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
+++ b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
@@ -126,7 +126,7 @@ KX_BlenderSceneConverter::KX_BlenderSceneConverter(
m_useglslmat(false),
m_use_mat_cache(true)
{
- BKE_main_id_tag_all(maggie, false); /* avoid re-tagging later on */
+ BKE_main_id_tag_all(maggie, LIB_TAG_DOIT, false); /* avoid re-tagging later on */
m_newfilename = "";
m_threadinfo = new ThreadInfo();
m_threadinfo->m_pool = BLI_task_pool_create(engine->GetTaskScheduler(), NULL);
@@ -1045,7 +1045,7 @@ bool KX_BlenderSceneConverter::FreeBlendFile(Main *maggie)
for (vector<Main *>::iterator it = m_DynamicMaggie.begin(); !(it == m_DynamicMaggie.end()); it++) {
Main *main = *it;
if (main != maggie) {
- BKE_main_id_tag_all(main, false);
+ BKE_main_id_tag_all(main, LIB_TAG_DOIT, false);
}
else {
maggie_index = i;
@@ -1058,7 +1058,7 @@ bool KX_BlenderSceneConverter::FreeBlendFile(Main *maggie)
return false;
m_DynamicMaggie.erase(m_DynamicMaggie.begin() + maggie_index);
- BKE_main_id_tag_all(maggie, true);
+ BKE_main_id_tag_all(maggie, LIB_TAG_DOIT, true);
/* free all tagged objects */
KX_SceneList *scenes = m_ketsjiEngine->CurrentScenes();