Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/writefile.c
| Show First 20 Lines • Show All 3,746 Lines • ▼ Show 20 Lines | if (found_one) { | ||||
| PackedFile *pf = main->curlib->packedfile; | PackedFile *pf = main->curlib->packedfile; | ||||
| writestruct(wd, DATA, PackedFile, 1, pf); | writestruct(wd, DATA, PackedFile, 1, pf); | ||||
| writedata(wd, DATA, pf->size, pf->data); | writedata(wd, DATA, pf->size, pf->data); | ||||
| if (wd->use_memfile == false) { | if (wd->use_memfile == false) { | ||||
| printf("write packed .blend: %s\n", main->curlib->name); | printf("write packed .blend: %s\n", main->curlib->name); | ||||
| } | } | ||||
| } | } | ||||
| /* Write link placeholders for all direct linked IDs. */ | |||||
| while (a--) { | while (a--) { | ||||
| for (id = lbarray[a]->first; id; id = id->next) { | for (id = lbarray[a]->first; id; id = id->next) { | ||||
| if (id->us > 0 && (id->tag & LIB_TAG_EXTERN)) { | if (id->us > 0 && (id->tag & LIB_TAG_EXTERN)) { | ||||
| if (!BKE_idcode_is_linkable(GS(id->name))) { | if (!BKE_idcode_is_linkable(GS(id->name))) { | ||||
| printf("ERROR: write file: data-block '%s' from lib '%s' is not linkable " | printf("ERROR: write file: data-block '%s' from lib '%s' is not linkable " | ||||
| "but is flagged as directly linked", id->name, main->curlib->filepath); | "but is flagged as directly linked", id->name, main->curlib->filepath); | ||||
| BLI_assert(0); | BLI_assert(0); | ||||
| } | } | ||||
| writestruct(wd, ID_ID, ID, 1, id); | writestruct(wd, ID_LINK_PLACEHOLDER, ID, 1, id); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| mywrite_flush(wd); | mywrite_flush(wd); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 474 Lines • Show Last 20 Lines | |||||