Blender Git Loki

Git Commits -> Revision 2601501

Revision 2601501 by Sybren A. Stüvel (master)
December 22, 2020, 13:05 (GMT)
RNA: make `bpy.data.orphans_purge()` return number of deleted datablocks

Sometimes multiple calls to `bpy.data.orphans_purge()` are needed to
delete all orphans, because a call can turn previously-used datablocks
into orphans. Returning the number of deleted datablocks makes it
possible to keep looping until nothing can be deleted any more.

This patch keeps track of deletions in `id_delete()` so that it can be
returned up the call stack.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D9918

Commit Details:

Full Hash: 2601501fce554290d9245fdbcb536c7c87c73f11
Parent Commit: 512a23c
Lines Changed: +12, -8

3 Modified Paths:

/source/blender/blenkernel/BKE_lib_id.h (+1, -1) (Diff)
/source/blender/blenkernel/intern/lib_id_delete.c (+7, -3) (Diff)
/source/blender/python/intern/bpy_rna_id_collection.c (+4, -4) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021