Optimization: pass Main to BKE_library_foreach_ID_link() and use its relations.
authorBastien Montagne <montagne29@wanadoo.fr>
Mon, 30 Jan 2017 20:41:44 +0000 (21:41 +0100)
committerBastien Montagne <montagne29@wanadoo.fr>
Mon, 30 Jan 2017 21:33:20 +0000 (22:33 +0100)
commiteadfd901ad7c3af4d85b05618352a96a9b4ca9de
treea577398a8d9ae19219e41372ff7c6e01a32b4642
parentfbd28d375a758d81b925867efef4d02482d414c6
Optimization: pass Main to BKE_library_foreach_ID_link() and use its relations.

Use Main->relations in BKE_library_foreach_ID_link(), when possible
(i.e. IDWALK_READONLY is set), and if the data is available of course.

This is quite minor optimization, no sensible improvements are expected,
but does not hurt either to avoid potentially tens of looping over e.g.
objects constraints and modifiers, or heap of drivers...
source/blender/blenkernel/BKE_library.h
source/blender/blenkernel/BKE_library_query.h
source/blender/blenkernel/intern/brush.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/library_query.c
source/blender/blenkernel/intern/library_remap.c
source/blender/blenkernel/intern/object.c
source/blender/editors/object/object_relations.c
source/blender/python/intern/bpy_rna_id_collection.c
source/blender/windowmanager/intern/wm_operators.c