Cleanup: avoid incrementing/decrementing id->us outside of BKE_library.

We have callbacks for that, they also do some checks and help ensure things are done
correctly. Only place where this is assumed not true is blenloader (since here we
may affect refcount of library IDs as well...).
This commit is contained in:
2015-11-09 19:47:10 +01:00
parent cf959a879e
commit 865796375b
59 changed files with 278 additions and 228 deletions

View File

@@ -73,6 +73,7 @@
#include "BKE_depsgraph.h"
#include "BKE_fcurve.h"
#include "BKE_lattice.h"
#include "BKE_library.h"
#include "BKE_nla.h"
#include "BKE_context.h"
#include "BKE_paint.h"
@@ -278,7 +279,7 @@ static void animrecord_check_state(Scene *scene, ID *id, wmTimer *animtimer)
NlaStrip *strip = add_nlastrip_to_stack(adt, adt->action);
/* clear reference to action now that we've pushed it onto the stack */
adt->action->id.us--;
id_us_min(&adt->action->id);
adt->action = NULL;
/* adjust blending + extend so that they will behave correctly */