Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/versioning_280.c
| Show First 20 Lines • Show All 992 Lines • ▼ Show 20 Lines | |||||
| ToolSettings *ts = scene->toolsettings; | ToolSettings *ts = scene->toolsettings; | ||||
| ts->particle.flag &= ~PE_UNUSED_6; | ts->particle.flag &= ~PE_UNUSED_6; | ||||
| if (ts->sculpt != NULL) { | if (ts->sculpt != NULL) { | ||||
| ts->sculpt->flags &= ~SCULPT_FLAG_UNUSED_6; | ts->sculpt->flags &= ~SCULPT_FLAG_UNUSED_6; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| if (!MAIN_VERSION_ATLEAST(bmain, 280, 45)) { | |||||
| for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { | |||||
| for (ScrArea *area = screen->areabase.first; area; area = area->next) { | |||||
| for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { | |||||
| if (sl->spacetype == SPACE_SEQ) { | |||||
| SpaceSeq *sseq = (SpaceSeq *)sl; | |||||
| sseq->flag |= SEQ_SHOW_MARKER_LINES; | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| if (!MAIN_VERSION_ATLEAST(bmain, 280, 46)) { | if (!MAIN_VERSION_ATLEAST(bmain, 280, 46)) { | ||||
| /* Add wireframe color. */ | /* Add wireframe color. */ | ||||
| if (!DNA_struct_elem_find(fd->filesdna, "View3DShading", "char", "wire_color_type")) { | if (!DNA_struct_elem_find(fd->filesdna, "View3DShading", "char", "wire_color_type")) { | ||||
| for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { | for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { | ||||
| for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { | for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { | ||||
| for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) { | for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) { | ||||
| if (sl->spacetype == SPACE_VIEW3D) { | if (sl->spacetype == SPACE_VIEW3D) { | ||||
| View3D *v3d = (View3D *)sl; | View3D *v3d = (View3D *)sl; | ||||
| ▲ Show 20 Lines • Show All 518 Lines • ▼ Show 20 Lines | |||||
| /* Now datatransfer's mix factor is multiplied with weights when any, | /* Now datatransfer's mix factor is multiplied with weights when any, | ||||
| * instead of being ignored, | * instead of being ignored, | ||||
| * we need to take care of that to keep 'old' files compatible. */ | * we need to take care of that to keep 'old' files compatible. */ | ||||
| DataTransferModifierData *dtmd = (DataTransferModifierData *)md; | DataTransferModifierData *dtmd = (DataTransferModifierData *)md; | ||||
| if (dtmd->defgrp_name[0] != '\0') { | if (dtmd->defgrp_name[0] != '\0') { | ||||
| dtmd->mix_factor = 1.0f; | dtmd->mix_factor = 1.0f; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
JacquesLucke: `break` should be inside the braces.
https://wiki.blender.org/wiki/Style_Guide/C_Cpp | |||||
| } | } | ||||
| } | } | ||||
| if (!MAIN_VERSION_ATLEAST(bmain, 281, 3)) { | if (!MAIN_VERSION_ATLEAST(bmain, 281, 3)) { | ||||
| for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { | for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { | ||||
| for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { | for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { | ||||
| for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) { | for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) { | ||||
| if (sl->spacetype == SPACE_TEXT) { | if (sl->spacetype == SPACE_TEXT) { | ||||
| ▲ Show 20 Lines • Show All 264 Lines • ▼ Show 20 Lines | |||||
| ClothModifierData *clmd = (ClothModifierData *)md; | ClothModifierData *clmd = (ClothModifierData *)md; | ||||
| clmd->sim_parms->pressure_factor = 1; | clmd->sim_parms->pressure_factor = 1; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| { | if (!MAIN_VERSION_ATLEAST(bmain, 282, 3)) { | ||||
| /* Versioning code until next subversion bump goes here. */ | |||||
| /* Remove Unified pressure/size and pressure/alpha */ | /* Remove Unified pressure/size and pressure/alpha */ | ||||
| for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) { | for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) { | ||||
| ToolSettings *ts = scene->toolsettings; | ToolSettings *ts = scene->toolsettings; | ||||
| UnifiedPaintSettings *ups = &ts->unified_paint_settings; | UnifiedPaintSettings *ups = &ts->unified_paint_settings; | ||||
| ups->flag &= ~(UNIFIED_PAINT_FLAG_UNUSED_0 | UNIFIED_PAINT_FLAG_UNUSED_1); | ups->flag &= ~(UNIFIED_PAINT_FLAG_UNUSED_0 | UNIFIED_PAINT_FLAG_UNUSED_1); | ||||
| } | } | ||||
| /* Set the default render pass in the viewport to Combined. */ | /* Set the default render pass in the viewport to Combined. */ | ||||
| if (!DNA_struct_elem_find(fd->filesdna, "View3DShading", "int", "render_pass")) { | if (!DNA_struct_elem_find(fd->filesdna, "View3DShading", "int", "render_pass")) { | ||||
| for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) { | for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) { | ||||
| scene->display.shading.render_pass = SCE_PASS_COMBINED; | scene->display.shading.render_pass = SCE_PASS_COMBINED; | ||||
| } | } | ||||
| for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { | for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { | ||||
| for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { | for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { | ||||
| for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) { | for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) { | ||||
| if (sl->spacetype == SPACE_VIEW3D) { | if (sl->spacetype == SPACE_VIEW3D) { | ||||
| View3D *v3d = (View3D *)sl; | View3D *v3d = (View3D *)sl; | ||||
| v3d->shading.render_pass = SCE_PASS_COMBINED; | v3d->shading.render_pass = SCE_PASS_COMBINED; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /* Make markers region visible by default. */ | |||||
| for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { | |||||
| for (ScrArea *area = screen->areabase.first; area; area = area->next) { | |||||
| for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { | |||||
| switch (sl->spacetype) { | |||||
| case SPACE_SEQ: { | |||||
| SpaceSeq *sseq = (SpaceSeq *)sl; | |||||
| sseq->flag |= SEQ_SHOW_MARKERS; | |||||
| break; | |||||
| } | |||||
| case SPACE_ACTION: { | |||||
| SpaceAction *saction = (SpaceAction *)sl; | |||||
| saction->flag |= SACTION_SHOW_MARKERS; | |||||
| break; | |||||
| } | |||||
| case SPACE_GRAPH: { | |||||
| SpaceGraph *sipo = (SpaceGraph *)sl; | |||||
| sipo->flag |= SIPO_SHOW_MARKERS; | |||||
| break; | |||||
| } | |||||
| case SPACE_NLA: { | |||||
| SpaceNla *snla = (SpaceNla *)sl; | |||||
| snla->flag |= SNLA_SHOW_MARKERS; | |||||
| break; | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| { | |||||
| /* Versioning code until next subversion bump goes here. */ | |||||
| } | } | ||||
| } | } | ||||
| Context not available. | |||||
break should be inside the braces.
https://wiki.blender.org/wiki/Style_Guide/C_Cpp