Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/versioning_290.c
| Show First 20 Lines • Show All 1,238 Lines • ▼ Show 20 Lines | if (!MAIN_VERSION_ATLEAST(bmain, 291, 8)) { | ||||
| /* Ensure that particle systems generated by fluid modifier have correct phystype. */ | /* Ensure that particle systems generated by fluid modifier have correct phystype. */ | ||||
| LISTBASE_FOREACH (ParticleSettings *, part, &bmain->particles) { | LISTBASE_FOREACH (ParticleSettings *, part, &bmain->particles) { | ||||
| if (ELEM( | if (ELEM( | ||||
| part->type, PART_FLUID_FLIP, PART_FLUID_SPRAY, PART_FLUID_BUBBLE, PART_FLUID_FOAM)) { | part->type, PART_FLUID_FLIP, PART_FLUID_SPRAY, PART_FLUID_BUBBLE, PART_FLUID_FOAM)) { | ||||
| part->phystype = PART_PHYS_NO; | part->phystype = PART_PHYS_NO; | ||||
| } | } | ||||
| } | } | ||||
| /* Init grease pencil default curve resolution. */ | |||||
| if (!DNA_struct_elem_find(fd->filesdna, "bGPdata", "int", "curve_edit_resolution")) { | |||||
| LISTBASE_FOREACH (bGPdata *, gpd, &bmain->gpencils) { | |||||
| gpd->curve_edit_resolution = GP_DEFAULT_CURVE_RESOLUTION; | |||||
| gpd->flag |= GP_DATA_CURVE_ADAPTIVE_RESOLUTION; | |||||
| } | |||||
| } | |||||
| /* Init grease pencil curve editing error threshold. */ | |||||
| if (!DNA_struct_elem_find(fd->filesdna, "bGPdata", "float", "curve_edit_threshold")) { | |||||
| LISTBASE_FOREACH (bGPdata *, gpd, &bmain->gpencils) { | |||||
| gpd->curve_edit_threshold = GP_DEFAULT_CURVE_ERROR; | |||||
| gpd->curve_edit_corner_angle = GP_DEFAULT_CURVE_EDIT_CORNER_ANGLE; | |||||
| } | |||||
| } | |||||
| } | } | ||||
| if (!MAIN_VERSION_ATLEAST(bmain, 291, 9)) { | if (!MAIN_VERSION_ATLEAST(bmain, 291, 9)) { | ||||
| /* Remove options of legacy UV/Image editor */ | /* Remove options of legacy UV/Image editor */ | ||||
| for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { | for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { | ||||
| LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { | LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { | ||||
| LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { | LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { | ||||
| switch (sl->spacetype) { | switch (sl->spacetype) { | ||||
| ▲ Show 20 Lines • Show All 295 Lines • ▼ Show 20 Lines | void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain) | ||||
| if (!MAIN_VERSION_ATLEAST(bmain, 292, 13)) { | if (!MAIN_VERSION_ATLEAST(bmain, 292, 13)) { | ||||
| FOREACH_NODETREE_BEGIN (bmain, ntree, id) { | FOREACH_NODETREE_BEGIN (bmain, ntree, id) { | ||||
| if (ntree->type == NTREE_GEOMETRY) { | if (ntree->type == NTREE_GEOMETRY) { | ||||
| version_node_socket_name(ntree, GEO_NODE_BOOLEAN, "Geometry A", "Geometry 1"); | version_node_socket_name(ntree, GEO_NODE_BOOLEAN, "Geometry A", "Geometry 1"); | ||||
| version_node_socket_name(ntree, GEO_NODE_BOOLEAN, "Geometry B", "Geometry 2"); | version_node_socket_name(ntree, GEO_NODE_BOOLEAN, "Geometry B", "Geometry 2"); | ||||
| } | } | ||||
| } | } | ||||
| FOREACH_NODETREE_END; | FOREACH_NODETREE_END; | ||||
| /* Init grease pencil default curve resolution. */ | |||||
| if (!DNA_struct_elem_find(fd->filesdna, "bGPdata", "int", "curve_edit_resolution")) { | |||||
| LISTBASE_FOREACH (bGPdata *, gpd, &bmain->gpencils) { | |||||
| gpd->curve_edit_resolution = GP_DEFAULT_CURVE_RESOLUTION; | |||||
| gpd->flag |= GP_DATA_CURVE_ADAPTIVE_RESOLUTION; | |||||
| } | |||||
| } | |||||
| /* Init grease pencil curve editing error threshold. */ | |||||
| if (!DNA_struct_elem_find(fd->filesdna, "bGPdata", "float", "curve_edit_threshold")) { | |||||
| LISTBASE_FOREACH (bGPdata *, gpd, &bmain->gpencils) { | |||||
| gpd->curve_edit_threshold = GP_DEFAULT_CURVE_ERROR; | |||||
| gpd->curve_edit_corner_angle = GP_DEFAULT_CURVE_EDIT_CORNER_ANGLE; | |||||
| } | |||||
| } | |||||
| } | } | ||||
| /** | /** | ||||
| * Versioning code until next subversion bump goes here. | * Versioning code until next subversion bump goes here. | ||||
| * | * | ||||
| * \note Be sure to check when bumping the version: | * \note Be sure to check when bumping the version: | ||||
| * - "versioning_userdef.c", #blo_do_versions_userdef | * - "versioning_userdef.c", #blo_do_versions_userdef | ||||
| * - "versioning_userdef.c", #do_versions_theme | * - "versioning_userdef.c", #do_versions_theme | ||||
| * | * | ||||
| * \note Keep this message at the bottom of the function. | * \note Keep this message at the bottom of the function. | ||||
| */ | */ | ||||
| { | { | ||||
| /* Keep this block, even when empty. */ | /* Keep this block, even when empty. */ | ||||
| } | } | ||||
| } | } | ||||