Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/writefile.c
| Show First 20 Lines • Show All 148 Lines • ▼ Show 20 Lines | |||||
| #include "BKE_bpath.h" | #include "BKE_bpath.h" | ||||
| #include "BKE_collection.h" | #include "BKE_collection.h" | ||||
| #include "BKE_constraint.h" | #include "BKE_constraint.h" | ||||
| #include "BKE_curve.h" | #include "BKE_curve.h" | ||||
| #include "BKE_fcurve.h" | #include "BKE_fcurve.h" | ||||
| #include "BKE_global.h" // for G | #include "BKE_global.h" // for G | ||||
| #include "BKE_gpencil_modifier.h" | #include "BKE_gpencil_modifier.h" | ||||
| #include "BKE_idcode.h" | #include "BKE_idcode.h" | ||||
| #include "BKE_image.h" | |||||
| #include "BKE_layer.h" | #include "BKE_layer.h" | ||||
| #include "BKE_library_override.h" | #include "BKE_library_override.h" | ||||
| #include "BKE_main.h" | #include "BKE_main.h" | ||||
| #include "BKE_mesh.h" | #include "BKE_mesh.h" | ||||
| #include "BKE_modifier.h" | #include "BKE_modifier.h" | ||||
| #include "BKE_node.h" | #include "BKE_node.h" | ||||
| #include "BKE_pointcache.h" | #include "BKE_pointcache.h" | ||||
| #include "BKE_report.h" | #include "BKE_report.h" | ||||
| ▲ Show 20 Lines • Show All 2,049 Lines • ▼ Show 20 Lines | if (lt->id.us > 0 || wd->use_memfile) { | ||||
| write_dverts(wd, lt->pntsu * lt->pntsv * lt->pntsw, lt->dvert); | write_dverts(wd, lt->pntsu * lt->pntsv * lt->pntsw, lt->dvert); | ||||
| } | } | ||||
| } | } | ||||
| static void write_image(WriteData *wd, Image *ima) | static void write_image(WriteData *wd, Image *ima) | ||||
| { | { | ||||
| if (ima->id.us > 0 || wd->use_memfile) { | if (ima->id.us > 0 || wd->use_memfile) { | ||||
| ImagePackedFile *imapf; | /* Ensure any modifications are written into packed images. For undo | ||||
| * we track changes separately in texture paint. */ | |||||
| if (!wd->use_memfile) { | |||||
| BKE_image_packed_update(ima); | |||||
| } | |||||
| /* Some trickery to keep forward compatibility of packed images. */ | /* Some trickery to keep forward compatibility of packed images. */ | ||||
| ImagePackedFile *imapf; | |||||
| BLI_assert(ima->packedfile == NULL); | BLI_assert(ima->packedfile == NULL); | ||||
| if (ima->packedfiles.first != NULL) { | if (ima->packedfiles.first != NULL) { | ||||
| imapf = ima->packedfiles.first; | imapf = ima->packedfiles.first; | ||||
| ima->packedfile = imapf->packedfile; | ima->packedfile = imapf->packedfile; | ||||
| } | } | ||||
| /* write LibData */ | /* write LibData */ | ||||
| writestruct(wd, ID_IM, Image, 1, ima); | writestruct(wd, ID_IM, Image, 1, ima); | ||||
| ▲ Show 20 Lines • Show All 1,908 Lines • Show Last 20 Lines | |||||