Blender Git Loki
Git Commits -> Revision 5f02998
Revision 5f02998 by Bastien Montagne (asset-engine, asset-engine--archived, asset-experiments, id-remap) November 10, 2015, 15:56 (GMT) |
Hopefully fix the 'real user' nightmare. Idea is to add two new flags, one saying 'we need to ensure a real user exists', the other 'we had to increment user count to ensure we have a real user'. This allows us to easily control the extra user in release/delete/remap cases, and also fixes the infamous 'add new image to texture, open image in ImageEditor, delete image from texture, have a zero-user red image in Image Editor' issue. There is still much to be done here, more places where we can use those flags, also clear them when we force usercount to zero, etc. All this allows us to fix unsolvable issues (like Group being ensure_user'ed in loading code, but only if they do have objects in them), and to avoid returning ugly bool from editors' callbacks (this is still to be cleaned up in the branch too). Bad news - this means we cannot use short ID->flag anymore (not enough flags), for now added a new int ID->flag2 (replacing pad int), not sure how to best manage change here, maybe for 2.8 we can totally wipe ID->flag? But this would totally break forward compat. |
Commit Details:
Full Hash: 5f0299898dd7556553bb5be0f2c2279b71cdef86
Parent Commit: 9ddc60b
Lines Changed: +43, -22