Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/versioning_290.c
| Show All 17 Lines | |||||
| * \ingroup blenloader | * \ingroup blenloader | ||||
| */ | */ | ||||
| /* allow readfile to use deprecated functionality */ | /* allow readfile to use deprecated functionality */ | ||||
| #define DNA_DEPRECATED_ALLOW | #define DNA_DEPRECATED_ALLOW | ||||
| #include "BLI_listbase.h" | #include "BLI_listbase.h" | ||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "DNA_brush_types.h" | |||||
| #include "DNA_genfile.h" | #include "DNA_genfile.h" | ||||
| #include "DNA_screen_types.h" | #include "DNA_screen_types.h" | ||||
| #include "BKE_collection.h" | #include "BKE_collection.h" | ||||
| #include "BKE_colortools.h" | |||||
| #include "BKE_main.h" | #include "BKE_main.h" | ||||
| #include "BLO_readfile.h" | #include "BLO_readfile.h" | ||||
| #include "readfile.h" | #include "readfile.h" | ||||
| /* Make preferences read-only, use versioning_userdef.c. */ | /* Make preferences read-only, use versioning_userdef.c. */ | ||||
| #define U (*((const UserDef *)&U)) | #define U (*((const UserDef *)&U)) | ||||
| Show All 19 Lines | if (!DNA_struct_elem_find(fd->filesdna, "SpaceImage", "float", "uv_opacity")) { | ||||
| if (sl->spacetype == SPACE_IMAGE) { | if (sl->spacetype == SPACE_IMAGE) { | ||||
| SpaceImage *sima = (SpaceImage *)sl; | SpaceImage *sima = (SpaceImage *)sl; | ||||
| sima->uv_opacity = 1.0f; | sima->uv_opacity = 1.0f; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /* Init Grease Pencil new random curves. */ | |||||
| if (!DNA_struct_elem_find(fd->filesdna, "BrushGpencilSettings", "float", "random_hue")) { | |||||
| LISTBASE_FOREACH (Brush *, brush, &bmain->brushes) { | |||||
| if ((brush->gpencil_settings) && (brush->gpencil_settings->curve_rand_pressure == NULL)) { | |||||
| brush->gpencil_settings->curve_rand_pressure = BKE_curvemapping_add( | |||||
| 1, 0.0f, 0.0f, 1.0f, 1.0f); | |||||
| brush->gpencil_settings->curve_rand_strength = BKE_curvemapping_add( | |||||
| 1, 0.0f, 0.0f, 1.0f, 1.0f); | |||||
| brush->gpencil_settings->curve_rand_uv = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); | |||||
| brush->gpencil_settings->curve_rand_hue = BKE_curvemapping_add( | |||||
| 1, 0.0f, 0.0f, 1.0f, 1.0f); | |||||
| brush->gpencil_settings->curve_rand_saturation = BKE_curvemapping_add( | |||||
| 1, 0.0f, 0.0f, 1.0f, 1.0f); | |||||
| brush->gpencil_settings->curve_rand_value = BKE_curvemapping_add( | |||||
| 1, 0.0f, 0.0f, 1.0f, 1.0f); | |||||
| } | |||||
| } | |||||
| } | |||||
| } | } | ||||
| } | } | ||||