diff options
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 375837437d8..8b41c618c99 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -1497,8 +1497,7 @@ static void *newlibadr_us(FileData *fd, void *lib, void *adr) /* increases user { ID *id = newlibadr(fd, lib, adr); - if (id) - id->us++; + id_us_plus_no_lib(id); return id; } @@ -4640,7 +4639,7 @@ static void lib_link_modifiers__linkModifiers( *idpoin = newlibadr(fd, ob->id.lib, *idpoin); if (*idpoin != NULL && (cd_flag & IDWALK_USER) != 0) { - (*idpoin)->us++; + id_us_plus_no_lib(*idpoin); } } static void lib_link_modifiers(FileData *fd, Object *ob) @@ -5638,7 +5637,7 @@ static void lib_link_scene(FileData *fd, Main *main) seq->sound = newlibadr(fd, sce->id.lib, seq->sound); } if (seq->sound) { - seq->sound->id.us++; + id_us_plus_no_lib((ID *)seq->sound); seq->scene_sound = BKE_sound_add_scene_sound_defaults(sce, seq); } } @@ -9580,7 +9579,7 @@ static void give_base_to_objects(Main *mainvar, Scene *scene, View3D *v3d, Libra base->flag = ob->flag; CLAMP_MIN(ob->id.us, 0); - ob->id.us += 1; + id_us_plus_no_lib((ID *)ob); ob->id.tag &= ~LIB_TAG_INDIRECT; ob->id.tag |= LIB_TAG_EXTERN; @@ -9704,7 +9703,7 @@ static void link_object_postprocess(ID *id, Scene *scene, View3D *v3d, const sho base->lay = ob->lay; base->object = ob; base->flag = ob->flag; - ob->id.us++; + id_us_plus_no_lib((ID *)ob); if (flag & FILE_AUTOSELECT) { base->flag |= SELECT; |