Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-11-30 01:13:37 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-30 01:13:37 +0400
commit6403858ad961935e4b60f044b6fef05eeaaff7d9 (patch)
tree97f7eef2869e8de07544f7ef5538485225e6fb7a /source/blender/blenloader
parent5763e6ce8518bf878aa9212b5196fd0503f466d2 (diff)
fix [#29111] Wrong application of delta scale
apply delta scale as a multiplier & do-versions on existing files. - bumps subversion to 2.60.6
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c32
1 files changed, 25 insertions, 7 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 61d023d7fc0..7ebdff546e2 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -11967,7 +11967,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
- /* put compatibility code here until next subversion bump */
if (main->versionfile < 255 || (main->versionfile == 255 && main->subversionfile < 3)) {
Object *ob;
@@ -11984,8 +11983,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
- /* put compatibility code here until next subversion bump */
-
if (main->versionfile < 256) {
bScreen *sc;
ScrArea *sa;
@@ -12604,16 +12601,14 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
- /* put compatibility code here until next subversion bump */
+ if (main->versionfile < 260 || (main->versionfile == 260 && main->subversionfile < 6))
{
Scene *sce;
MovieClip *clip;
bScreen *sc;
for(sce = main->scene.first; sce; sce = sce->id.next) {
- if (sce->r.im_format.depth == 0) {
- do_versions_image_settings_2_60(sce);
- }
+ do_versions_image_settings_2_60(sce);
}
for (clip= main->movieclip.first; clip; clip= clip->id.next) {
@@ -12640,6 +12635,29 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
}
+
+ {
+ Object *ob;
+ for (ob= main->object.first; ob; ob= ob->id.next) {
+ /* convert delta addition into delta scale */
+ int i;
+ for (i= 0; i < 3; i++) {
+ if ( (ob->dsize[i] == 0.0f) || /* simple case, user never touched dsize */
+ (ob->size[i] == 0.0f)) /* cant scale the dsize to give a non zero result, so fallback to 1.0f */
+ {
+ ob->dsize[i]= 1.0f;
+ }
+ else {
+ ob->size[i]= (ob->size[i] + ob->dsize[i]) / ob->size[i];
+ }
+ }
+ }
+ }
+ }
+
+ /* put compatibility code here until next subversion bump */
+ {
+ /* nothing! */
}
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */