Blender Git Commit Log

Git Commits -> Revision d0e2872

Revision d0e2872 by Bastien Montagne (master)
March 18, 2019, 10:36 (GMT)
Cleanup: Main id looping: add FOREACH_MAIN_LISTBASE macro.

We don't want to use flow control like `break` statement into the basic
`FOREACH_MAIN_ID` macro, as this is a nested loop.

When refined behavior is needed (like breaking whole iteration, or just
skipping to next ID type), FOREACH_MAIN_LISTBASE and
FOREACH_MAIN_LISTBASE_ID macros should be used instead.

Based on D4382 by @campbellbarton
(Other potential solution, using flow control macros: D4384).

Commit Details:

Full Hash: d0e28721b04a0235d4f6bfbe42f43672ff923444
Parent Commit: 66932a2
Lines Changed: +72, -67

4 Modified Paths:

/source/blender/blenkernel/BKE_main.h (+13, -15) (Diff)
/source/blender/blenkernel/intern/blendfile.c (+10, -5) (Diff)
/source/blender/blenkernel/intern/library_query.c (+3, -6) (Diff)
/source/blender/python/intern/bpy_rna_id_collection.c (+46, -41) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021