Blender Git Loki

Git Commits -> Revision 2ac555f

Revision 2ac555f by Bastien Montagne (master)
January 4, 2016, 19:17 (GMT)
ID: Sanitize handling of 'USER_ONE' (ensure_user) case.

Note that this has little impact on current master - yet it allows to fix the 'Image Editor' bug
(open image in editor, use same image in texture, delete image from texture, image us is 0 and
red in image editor...) and probably a few other similar cases.

But that change is mandatory to get a proper handling of ID deletion/reamapping/reloading/etc. as done in id-remap branch.

Instead of just adding a user if none already present, new code use two new ID tags to get a three-states status:
- Normal: nothing changes.
- Needs extra user: we know that ID needs an extra user, so we take of never going down to 0 in 'real' usercount handling.
- Has extra user: we do have increased that ID usercount to get our needed extrauser.

Reviewers: sergey, campbellbarton

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

Commit Details:

Full Hash: 2ac555fe47f575e37d0feb89c6ba23fe684ed44b
Parent Commit: c35ad8d
Lines Changed: +32, -2

2 Modified Paths:

/source/blender/blenkernel/intern/library.c (+27, -2) (Diff)
/source/blender/makesdna/DNA_ID.h (+5, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021