diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-11-30 17:25:54 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-11-30 17:27:59 +0300 |
commit | df63195d2a7bc374398b0b6dfa389db3b40f5a70 (patch) | |
tree | 46ebb08ce49ff609125f696467c4696abcae46b9 /source/blender/makesrna/intern/rna_ID.c | |
parent | 2f6f75613fc0845604b205a85203134cca3b1034 (diff) |
Cleanup id->newid usage, initial work.
This aims at always ensuring that ID.newid (and relevant LIB_TAG_NEW)
stay in clean (i.e. cleared) state by default.
To achieve this, instead of clearing after all id copy call (would be
horribly noisy, and bad for performances), we try to completely remove
the setting of id->newid by default when copying a new ID.
This implies that areas actually needing that info (mainly, object editing
area (make single user...) and make local area) have to ensure they set
it themselves as needed.
This is far from simple change, many complex code paths to consider, so
will need some serious testing. :/
Diffstat (limited to 'source/blender/makesrna/intern/rna_ID.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_ID.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index 87fb45a4419..896d4979089 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -358,7 +358,9 @@ static struct ID *rna_ID_make_local(struct ID *self, Main *bmain, int clear_prox id_make_local(bmain, self, false, false); } - return self->newid ? self->newid : self; + ID *ret_id = self->newid ? self->newid : self; + BKE_id_clear_newpoin(self); + return ret_id; } |