Page MenuHome

Fix T93548: Appended (material) assets don't have a fake user
ClosedPublic

Authored by Julian Eisel (Severin) on Dec 1 2021, 7:42 PM.

Details

Summary

Since our design is to always keep data-blocks marked as assets on exit,
and our technical design for this is to do this via fake users, ensure
the fake user is set for an appended asset.

Diff Detail

Repository
rB Blender
Branch
temp-fix-T93548 (branched from master)
Build Status
Buildable 19132
Build 19132: arc lint + arc unit

Event Timeline

Julian Eisel (Severin) requested review of this revision.Dec 1 2021, 7:42 PM
Julian Eisel (Severin) created this revision.
Julian Eisel (Severin) updated this revision to Diff 45541.EditedDec 1 2021, 8:06 PM
  • Move logic from append code to make local code

Earlier this was done in BKE_blendfile_append(), since I wanted to keep this append specific. However we also unset the fake user on a regular "Make Local", so you would still end up with an asset that has no fake user set.

Question: Appending (and some other code) never sets the fake user for objects and collections. I think for assets we should still always set it though?

Patch LGTM, indeed better do that here than in BKE_blendfile_append() since linked assets can also be made local from other codepaths than append.

This revision is now accepted and ready to land.Dec 2 2021, 9:19 AM