Page MenuHome

Rework library_query foreach looper - add optional recursivity.
ClosedPublic

Authored by Bastien Montagne (mont29) on Mar 23 2016, 1:15 PM.

Details

Summary

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).

Used this new recursive behavior in ID preview generation as an example, would obviously be committed separately.

Diff Detail

Repository
rB Blender

Event Timeline

Bastien Montagne (mont29) retitled this revision from to Rework library_query foreach looper - add optional recursivity..Mar 23 2016, 1:15 PM
Bastien Montagne (mont29) updated this object.
Bastien Montagne (mont29) updated this revision to Diff 6294.
This revision was automatically updated to reflect the committed changes.