diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-01-18 06:11:38 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-01-18 06:11:38 +0300 |
commit | e8452cf0bccea0b06a24b370e9ed2331abec3a3c (patch) | |
tree | 096305a009bb44c0c68fe07e9cb98f28fe60c4b9 /source/blender/blenloader | |
parent | 27dff3fbc1e74aa6613d68a0d9f9b0096fc86f6e (diff) | |
parent | 6880a549ba4bb4150c17df196a1d6d24e66d8486 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/blenloader')
4 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c index a2eea6cbe7a..7036470c8e4 100644 --- a/source/blender/blenloader/intern/versioning_250.c +++ b/source/blender/blenloader/intern/versioning_250.c @@ -1783,7 +1783,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *main) ParticleEditSettings *pset = &sce->toolsettings->particle; int a; - for (a = 0; a < PE_TOT_BRUSH; a++) + for (a = 0; a < ARRAY_SIZE(pset->brush); a++) pset->brush[a].strength /= 100.0f; } diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index 00b9f304570..0800437c3d2 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -1243,7 +1243,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) if (!MAIN_VERSION_ATLEAST(main, 277, 1)) { for (Scene *scene = main->scene.first; scene; scene = scene->id.next) { ParticleEditSettings *pset = &scene->toolsettings->particle; - for (int a = 0; a < PE_TOT_BRUSH; a++) { + for (int a = 0; a < ARRAY_SIZE(pset->brush); a++) { if (pset->brush[a].strength > 1.0f) { pset->brush[a].strength *= 0.01f; } @@ -1593,7 +1593,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) if (scene->toolsettings != NULL) { ToolSettings *ts = scene->toolsettings; ParticleEditSettings *pset = &ts->particle; - for (int a = 0; a < PE_TOT_BRUSH; a++) { + for (int a = 0; a < ARRAY_SIZE(pset->brush); a++) { if (pset->brush[a].count == 0) { pset->brush[a].count = 10; } diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c index b1113c7ac69..f5f6531754a 100644 --- a/source/blender/blenloader/intern/versioning_defaults.c +++ b/source/blender/blenloader/intern/versioning_defaults.c @@ -203,7 +203,7 @@ void BLO_update_defaults_startup_blend(Main *bmain) ts->gpencil_ima_align = GP_PROJECT_VIEWSPACE; ParticleEditSettings *pset = &ts->particle; - for (int a = 0; a < PE_TOT_BRUSH; a++) { + for (int a = 0; a < ARRAY_SIZE(pset->brush); a++) { pset->brush[a].strength = 0.5f; pset->brush[a].count = 10; } diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c index b263ab15853..0af1c3951ad 100644 --- a/source/blender/blenloader/intern/versioning_legacy.c +++ b/source/blender/blenloader/intern/versioning_legacy.c @@ -3068,7 +3068,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main) pset->totaddkey = 5; pset->brushtype = PE_BRUSH_NONE; - for (a = 0; a < PE_TOT_BRUSH; a++) { + for (a = 0; a < ARRAY_SIZE(pset->brush); a++) { pset->brush[a].strength = 50; pset->brush[a].size = 50; pset->brush[a].step = 10; |