Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/versioning_280.c
| Show All 34 Lines | |||||
| #include "DNA_anim_types.h" | #include "DNA_anim_types.h" | ||||
| #include "DNA_armature_types.h" | #include "DNA_armature_types.h" | ||||
| #include "DNA_camera_types.h" | #include "DNA_camera_types.h" | ||||
| #include "DNA_cloth_types.h" | #include "DNA_cloth_types.h" | ||||
| #include "DNA_collection_types.h" | #include "DNA_collection_types.h" | ||||
| #include "DNA_constraint_types.h" | #include "DNA_constraint_types.h" | ||||
| #include "DNA_curve_types.h" | #include "DNA_curve_types.h" | ||||
| #include "DNA_curveprofile_types.h" | #include "DNA_curveprofile_types.h" | ||||
| #include "DNA_fluid_types.h" | |||||
| #include "DNA_freestyle_types.h" | #include "DNA_freestyle_types.h" | ||||
| #include "DNA_genfile.h" | #include "DNA_genfile.h" | ||||
| #include "DNA_gpencil_modifier_types.h" | #include "DNA_gpencil_modifier_types.h" | ||||
| #include "DNA_gpencil_types.h" | #include "DNA_gpencil_types.h" | ||||
| #include "DNA_gpu_types.h" | #include "DNA_gpu_types.h" | ||||
| #include "DNA_key_types.h" | #include "DNA_key_types.h" | ||||
| #include "DNA_layer_types.h" | #include "DNA_layer_types.h" | ||||
| #include "DNA_light_types.h" | #include "DNA_light_types.h" | ||||
| ▲ Show 20 Lines • Show All 4,942 Lines • ▼ Show 20 Lines | if (!DNA_struct_elem_find(fd->filesdna, "RemeshModifierData", "float", "voxel_size")) { | ||||
| rmd->voxel_size = 0.1f; | rmd->voxel_size = 0.1f; | ||||
| rmd->adaptivity = 0.0f; | rmd->adaptivity = 0.0f; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /** | |||||
| * Versioning code until next subversion bump goes here. | |||||
| * | |||||
| * \note Be sure to check when bumping the version: | |||||
| * - #do_versions_after_linking_280 in this file. | |||||
| * - "versioning_userdef.c", #BLO_version_defaults_userpref_blend | |||||
| * - "versioning_userdef.c", #do_versions_theme | |||||
| * | |||||
| * \note Keep this message at the bottom of the function. | |||||
| */ | |||||
| { | |||||
| /* Keep this block, even when empty. */ | |||||
| /* Solidify modifier merge tolerance. */ | /* Solidify modifier merge tolerance. */ | ||||
| if (!DNA_struct_elem_find(fd->filesdna, "SolidifyModifierData", "float", "merge_tolerance")) { | if (!DNA_struct_elem_find(fd->filesdna, "SolidifyModifierData", "float", "merge_tolerance")) { | ||||
| for (Object *ob = bmain->objects.first; ob; ob = ob->id.next) { | for (Object *ob = bmain->objects.first; ob; ob = ob->id.next) { | ||||
| for (ModifierData *md = ob->modifiers.first; md; md = md->next) { | for (ModifierData *md = ob->modifiers.first; md; md = md->next) { | ||||
| if (md->type == eModifierType_Solidify) { | if (md->type == eModifierType_Solidify) { | ||||
| SolidifyModifierData *smd = (SolidifyModifierData *)md; | SolidifyModifierData *smd = (SolidifyModifierData *)md; | ||||
| /* set to 0.0003 since that is what was used before, default now is 0.0001 */ | /* set to 0.0003 since that is what was used before, default now is 0.0001 */ | ||||
| smd->merge_tolerance = 0.0003f; | smd->merge_tolerance = 0.0003f; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /* Match scale of fluid modifier gravity with scene gravity. */ | |||||
| if (!MAIN_VERSION_ATLEAST(bmain, 283, 14)) { | |||||
| for (Object *ob = bmain->objects.first; ob; ob = ob->id.next) { | |||||
| for (ModifierData *md = ob->modifiers.first; md; md = md->next) { | |||||
| if (md->type == eModifierType_Fluid) { | |||||
| FluidModifierData *fmd = (FluidModifierData *)md; | |||||
| if (fmd->domain != NULL) { | |||||
| mul_v3_fl(fmd->domain->gravity, 9.81f); | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| /** | |||||
| * Versioning code until next subversion bump goes here. | |||||
| * | |||||
| * \note Be sure to check when bumping the version: | |||||
| * - #do_versions_after_linking_280 in this file. | |||||
| * - "versioning_userdef.c", #BLO_version_defaults_userpref_blend | |||||
| * - "versioning_userdef.c", #do_versions_theme | |||||
| * | |||||
| * \note Keep this message at the bottom of the function. | |||||
| */ | |||||
| { | |||||
| /* Keep this block, even when empty. */ | |||||
| } | } | ||||
| } | } | ||||