Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/versioning_270.c
| Show First 20 Lines • Show All 550 Lines • ▼ Show 20 Lines | for (ob = bmain->objects.first; ob; ob = ob->id.next) { | ||||
| for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { | for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { | ||||
| do_version_constraints_radians_degrees_270_5(&pchan->constraints); | do_version_constraints_radians_degrees_270_5(&pchan->constraints); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| if (!MAIN_VERSION_ATLEAST(bmain, 271, 0)) { | if (!MAIN_VERSION_ATLEAST(bmain, 271, 0)) { | ||||
| if (!DNA_struct_elem_find(fd->filesdna, "RenderData", "BakeData", "bake")) { | |||||
| Scene *sce; | |||||
| for (sce = bmain->scenes.first; sce; sce = sce->id.next) { | |||||
| sce->r.bake.flag = R_BAKE_CLEAR; | |||||
| sce->r.bake.width = 512; | |||||
| sce->r.bake.height = 512; | |||||
| sce->r.bake.margin = 16; | |||||
| sce->r.bake.normal_space = R_BAKE_SPACE_TANGENT; | |||||
| sce->r.bake.normal_swizzle[0] = R_BAKE_POSX; | |||||
| sce->r.bake.normal_swizzle[1] = R_BAKE_POSY; | |||||
| sce->r.bake.normal_swizzle[2] = R_BAKE_POSZ; | |||||
| BLI_strncpy(sce->r.bake.filepath, U.renderdir, sizeof(sce->r.bake.filepath)); | |||||
| sce->r.bake.im_format.planes = R_IMF_PLANES_RGBA; | |||||
| sce->r.bake.im_format.imtype = R_IMF_IMTYPE_PNG; | |||||
| sce->r.bake.im_format.depth = R_IMF_CHAN_DEPTH_8; | |||||
| sce->r.bake.im_format.quality = 90; | |||||
| sce->r.bake.im_format.compress = 15; | |||||
| } | |||||
| } | |||||
| if (!DNA_struct_elem_find(fd->filesdna, "FreestyleLineStyle", "float", "texstep")) { | if (!DNA_struct_elem_find(fd->filesdna, "FreestyleLineStyle", "float", "texstep")) { | ||||
| FreestyleLineStyle *linestyle; | FreestyleLineStyle *linestyle; | ||||
| for (linestyle = bmain->linestyles.first; linestyle; linestyle = linestyle->id.next) { | for (linestyle = bmain->linestyles.first; linestyle; linestyle = linestyle->id.next) { | ||||
| linestyle->flag |= LS_TEXTURE; | linestyle->flag |= LS_TEXTURE; | ||||
| linestyle->texstep = 1.0; | linestyle->texstep = 1.0; | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 564 Lines • ▼ Show 20 Lines | if (!MAIN_VERSION_ATLEAST(bmain, 276, 5)) { | ||||
| a = set_listbasepointers(bmain, lbarray); | a = set_listbasepointers(bmain, lbarray); | ||||
| while (a--) { | while (a--) { | ||||
| for (ID *id = lbarray[a]->first; id; id = id->next) { | for (ID *id = lbarray[a]->first; id; id = id->next) { | ||||
| id->flag &= LIB_FAKEUSER; | id->flag &= LIB_FAKEUSER; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| if (!MAIN_VERSION_ATLEAST(bmain, 276, 7)) { | |||||
| Scene *scene; | |||||
| for (scene = bmain->scenes.first; scene != NULL; scene = scene->id.next) { | |||||
| scene->r.bake.pass_filter = R_BAKE_PASS_FILTER_ALL; | |||||
| } | |||||
| } | |||||
| if (!MAIN_VERSION_ATLEAST(bmain, 277, 1)) { | if (!MAIN_VERSION_ATLEAST(bmain, 277, 1)) { | ||||
| for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) { | for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) { | ||||
| ParticleEditSettings *pset = &scene->toolsettings->particle; | ParticleEditSettings *pset = &scene->toolsettings->particle; | ||||
| for (int a = 0; a < ARRAY_SIZE(pset->brush); a++) { | for (int a = 0; a < ARRAY_SIZE(pset->brush); a++) { | ||||
| if (pset->brush[a].strength > 1.0f) { | if (pset->brush[a].strength > 1.0f) { | ||||
| pset->brush[a].strength *= 0.01f; | pset->brush[a].strength *= 0.01f; | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 572 Lines • Show Last 20 Lines | |||||