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:
authorBastien Montagne <montagne29@wanadoo.fr>2016-03-24 14:28:41 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-03-24 18:10:39 +0300
commitc08924bf94f2dffaae7b3ef2fad3c49cb8043c89 (patch)
treeee01dfd8f137667c39be7e3ed894236a64464751 /source/blender/editors/object/object_relations.c
parent60cf62ff4b08e310208dca9e35bd75131833e1aa (diff)
Rework library_query foreach looper - add optional recursivity.
This commit: * Fixes bad handling of 'stop iteration' (by adding a status flag, so that we can actually stop in helper functions too, and jumping to a finalize label instead of raw return, to allow propper clean up). * Adds optional recursion into 'ID tree' - callback can also decide to exclude current id_pp from recursion. Note that this implies 'readonly', modifying IDs while recursing is not something we want to support! * Changes callback signature/expected behavior: return behavior is now handled through flags, and 'parent' ID of id_pp is also passed (since it may not always be root id anymore). Reviewers: sergey, campbellbarton Differential Revision: https://developer.blender.org/D1869
Diffstat (limited to 'source/blender/editors/object/object_relations.c')
-rw-r--r--source/blender/editors/object/object_relations.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 1a3209a8ca8..84cf97ecb7c 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -2123,12 +2123,14 @@ enum {
MAKE_LOCAL_ALL = 4,
};
-static bool tag_localizable_looper(void *UNUSED(user_data), ID **id_pointer, const int UNUSED(cd_flag))
+static int tag_localizable_looper(
+ void *UNUSED(user_data), ID *UNUSED(self_id), ID **id_pointer, const int UNUSED(cd_flag))
{
if (*id_pointer) {
(*id_pointer)->tag &= ~LIB_TAG_DOIT;
}
- return true;
+
+ return IDWALK_RET_NOP;
}
static void tag_localizable_objects(bContext *C, const int mode)