diff options
Diffstat (limited to 'source/blender/blenloader/intern/versioning_legacy.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_legacy.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c index 8a56e3c2ab8..c6856d8b71d 100644 --- a/source/blender/blenloader/intern/versioning_legacy.c +++ b/source/blender/blenloader/intern/versioning_legacy.c @@ -289,11 +289,10 @@ static void ntree_version_245(FileData *fd, Library *lib, bNodeTree *ntree) iuser = node->storage; if (iuser->flag & IMA_OLD_PREMUL) { iuser->flag &= ~IMA_OLD_PREMUL; - iuser->flag |= IMA_DO_PREMUL; } if (iuser->flag & IMA_DO_PREMUL) { image->flag &= ~IMA_OLD_PREMUL; - image->flag |= IMA_DO_PREMUL; + image->alpha_mode = IMA_ALPHA_STRAIGHT; } } } @@ -454,7 +453,7 @@ static void customdata_version_242(Mesh *me) } } - mesh_update_customdata_pointers(me, TRUE); + BKE_mesh_update_customdata_pointers(me, true); } /*only copy render texface layer from active*/ @@ -545,7 +544,7 @@ void blo_do_version_old_trackto_to_constraints(Object *ob) { /* create new trackto constraint from the relationship */ if (ob->track) { - bConstraint *con = add_ob_constraint(ob, "AutoTrack", CONSTRAINT_TYPE_TRACKTO); + bConstraint *con = BKE_add_ob_constraint(ob, "AutoTrack", CONSTRAINT_TYPE_TRACKTO); bTrackToConstraint *data = con->data; /* copy tracking settings from the object */ @@ -1548,7 +1547,9 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main) else if (sbuts->mainb == BUTS_EDIT) { sbuts->mainb = CONTEXT_EDITING; } - else sbuts->mainb = CONTEXT_SCENE; + else { + sbuts->mainb = CONTEXT_SCENE; + } } } } @@ -1840,7 +1841,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main) SEQ_BEGIN (sce->ed, seq) { if (seq->type == SEQ_TYPE_IMAGE || seq->type == SEQ_TYPE_MOVIE) - seq->flag |= SEQ_MAKE_PREMUL; + seq->alpha_mode = SEQ_ALPHA_STRAIGHT; } SEQ_END } @@ -2305,7 +2306,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main) Image *ima; for (ima = main->image.first; ima; ima = ima->id.next) if (strcmp(ima->name, "Compositor") == 0) { - strcpy(ima->id.name+2, "Viewer Node"); + strcpy(ima->id.name + 2, "Viewer Node"); strcpy(ima->name, "Viewer Node"); } } @@ -2494,11 +2495,11 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main) ima->gen_x = 256; ima->gen_y = 256; ima->gen_type = 1; - if (0 == strncmp(ima->id.name+2, "Viewer Node", sizeof(ima->id.name) - 2)) { + if (0 == strncmp(ima->id.name + 2, "Viewer Node", sizeof(ima->id.name) - 2)) { ima->source = IMA_SRC_VIEWER; ima->type = IMA_TYPE_COMPOSITE; } - if (0 == strncmp(ima->id.name+2, "Render Result", sizeof(ima->id.name) - 2)) { + if (0 == strncmp(ima->id.name + 2, "Render Result", sizeof(ima->id.name) - 2)) { ima->source = IMA_SRC_VIEWER; ima->type = IMA_TYPE_R_RESULT; } @@ -2551,7 +2552,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main) if (main->subversionfile < 4) { for (sce = main->scene.first; sce; sce = sce->id.next) { sce->r.bake_mode = 1; /* prevent to include render stuff here */ - sce->r.bake_filter = 2; + sce->r.bake_filter = 16; sce->r.bake_osa = 5; sce->r.bake_flag = R_BAKE_CLEAR; } @@ -2901,20 +2902,19 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main) for (ima = main->image.first; ima; ima = ima->id.next) { if (ima->flag & IMA_OLD_PREMUL) { ima->flag &= ~IMA_OLD_PREMUL; - ima->flag |= IMA_DO_PREMUL; + ima->alpha_mode = IMA_ALPHA_STRAIGHT; } } for (tex = main->tex.first; tex; tex = tex->id.next) { if (tex->iuser.flag & IMA_OLD_PREMUL) { tex->iuser.flag &= ~IMA_OLD_PREMUL; - tex->iuser.flag |= IMA_DO_PREMUL; } ima = blo_do_versions_newlibadr(fd, lib, tex->ima); if (ima && (tex->iuser.flag & IMA_DO_PREMUL)) { ima->flag &= ~IMA_OLD_PREMUL; - ima->flag |= IMA_DO_PREMUL; + ima->alpha_mode = IMA_ALPHA_STRAIGHT; } } } |