diff options
Diffstat (limited to 'source/blender/blenkernel/intern/image.c')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 69384a70969..790b6c6854b 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -457,7 +457,7 @@ Image *BKE_image_copy(Main *bmain, Image *ima) nima->stereo3d_format = MEM_dupallocN(ima->stereo3d_format); BLI_duplicatelist(&nima->views, &ima->views); - if (ima->id.lib) { + if (ID_IS_LINKED_DATABLOCK(ima)) { BKE_id_lib_local_paths(bmain, ima->id.lib, &nima->id); } @@ -483,7 +483,7 @@ void BKE_image_make_local(struct Image *ima) * - mixed: make copy */ - if (ima->id.lib == NULL) return; + if (!ID_IS_LINKED_DATABLOCK(ima)) return; /* Can't take short cut here: must check meshes at least because of bogus * texface ID refs. - z0r */ @@ -497,13 +497,13 @@ void BKE_image_make_local(struct Image *ima) for (tex = bmain->tex.first; tex; tex = tex->id.next) { if (tex->ima == ima) { - if (tex->id.lib) is_lib = true; + if (ID_IS_LINKED_DATABLOCK(tex)) is_lib = true; else is_local = true; } } for (brush = bmain->brush.first; brush; brush = brush->id.next) { if (brush->clone.image == ima) { - if (brush->id.lib) is_lib = true; + if (ID_IS_LINKED_DATABLOCK(brush)) is_lib = true; else is_local = true; } } @@ -518,7 +518,7 @@ void BKE_image_make_local(struct Image *ima) for (a = 0; a < me->totface; a++, tface++) { if (tface->tpage == ima) { - if (me->id.lib) is_lib = true; + if (ID_IS_LINKED_DATABLOCK(me)) is_lib = true; else is_local = true; } } @@ -536,7 +536,7 @@ void BKE_image_make_local(struct Image *ima) for (a = 0; a < me->totpoly; a++, mtpoly++) { if (mtpoly->tpage == ima) { - if (me->id.lib) is_lib = true; + if (ID_IS_LINKED_DATABLOCK(me)) is_lib = true; else is_local = true; } } @@ -560,7 +560,7 @@ void BKE_image_make_local(struct Image *ima) tex = bmain->tex.first; while (tex) { - if (tex->id.lib == NULL) { + if (!ID_IS_LINKED_DATABLOCK(tex)) { if (tex->ima == ima) { tex->ima = ima_new; id_us_plus(&ima_new->id); @@ -571,7 +571,7 @@ void BKE_image_make_local(struct Image *ima) } brush = bmain->brush.first; while (brush) { - if (brush->id.lib == NULL) { + if (!ID_IS_LINKED_DATABLOCK(brush)) { if (brush->clone.image == ima) { brush->clone.image = ima_new; id_us_plus(&ima_new->id); |