forked from bartvdbraak/blender
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.
This commit is contained in:
parent
a1495366af
commit
9a0fb589f7
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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 */
|
||||
|
@ -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);
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
|
@ -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...
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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.
|
||||
|
@ -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; \
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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 */
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user