diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-11-11 22:18:50 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-11-11 22:21:37 +0300 |
commit | d75bca1842fcea6af3f8b398b498d3e4ab91dbc5 (patch) | |
tree | 023a296cfa67c73346d813fff9b5a3e8f8e7aab2 /source/blender/blenkernel/intern/image.c | |
parent | 9cff20e5c6ee9675087bc847964c11a4d565f803 (diff) |
Cleanup: replace more direct id->us handling by calls to BKE_library API.
Diffstat (limited to 'source/blender/blenkernel/intern/image.c')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 9dabe6ba56b..5f2629b3f67 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -585,9 +585,7 @@ void BKE_image_make_local(struct Image *ima) for (a = 0; a < me->totface; a++, tface++) { if (tface->tpage == ima) { tface->tpage = ima_new; - if (ima_new->id.us == 0) { - tface->tpage->id.us = 1; - } + id_us_ensure_real((ID *)ima_new); id_lib_extern((ID *)ima_new); } } @@ -606,9 +604,7 @@ void BKE_image_make_local(struct Image *ima) for (a = 0; a < me->totpoly; a++, mtpoly++) { if (mtpoly->tpage == ima) { mtpoly->tpage = ima_new; - if (ima_new->id.us == 0) { - mtpoly->tpage->id.us = 1; - } + id_us_ensure_real((ID *)ima_new); id_lib_extern((ID *)ima_new); } } |