Blender Git Commit Log

Git Commits -> Revision c08924b

Revision c08924b by Bastien Montagne (master)
March 24, 2016, 15:10 (GMT)
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

Commit Details:

Full Hash: c08924bf94f2dffaae7b3ef2fad3c49cb8043c89
Parent Commit: 60cf62f
Lines Changed: +472, -399

6 Modified Paths:

/source/blender/blenkernel/BKE_library_query.h (+11, -3) (Diff)
/source/blender/blenkernel/intern/library.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/library_query.c (+448, -386) (Diff)
/source/blender/editors/object/object_relations.c (+4, -2) (Diff)
/source/blender/python/intern/bpy_rna_id_collection.c (+5, -4) (Diff)
/source/blender/windowmanager/intern/wm_operators.c (+2, -2) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021