diff options
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 5 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index fe867ae0dc5..587b1e29c60 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -5024,6 +5024,11 @@ static void direct_link_object(FileData *fd, Object *ob) MEM_freeN(hook); } + ob->iuser = newdataadr(fd, ob->iuser); + if (ob->type == OB_EMPTY && ob->empty_drawtype == OB_EMPTY_IMAGE && !ob->iuser) { + BKE_object_empty_draw_type_set(ob, ob->empty_drawtype); + } + ob->customdata_mask = 0; ob->bb = NULL; ob->derivedDeform = NULL; diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index beb8d584e41..b60459e2477 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -1535,6 +1535,10 @@ static void write_objects(WriteData *wd, ListBase *idbase) writestruct(wd, DATA, "RigidBodyCon", 1, ob->rigidbody_constraint); } + if (ob->type == OB_EMPTY && ob->empty_drawtype == OB_EMPTY_IMAGE) { + writestruct(wd, DATA, "ImageUser", 1, ob->iuser); + } + write_particlesystems(wd, &ob->particlesystem); write_modifiers(wd, &ob->modifiers); |