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:
authorJeroen Bakker <j.bakker@atmind.nl>2013-06-14 17:56:00 +0400
committerJeroen Bakker <j.bakker@atmind.nl>2013-06-14 17:56:00 +0400
commitcc3476b07eacae29ab34c2f2bdbca8af63b10e78 (patch)
tree8cd328c823fe343da8d6f9b350b552a0b3ce201c /source/blender/blenloader
parent05ad8c2dc9c708580540e7aadb67b900a52e442e (diff)
Fix for
* [#35724] Backdrop zoom can be set to a very small value, making the backdrop disapear. There were checks in the drawnode that needed to be placed in the readfile. The checks checked if the zoomlevel was 0.0, then it was defaulted to 1.0, but the zoomvalue had a minimum limit of 0.01, hence it did not work. Moved the check to the readfile and checked for all values smaller then 0.02. These values are then reset to 1.0 Jeroen & Monique - At Mind -
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index dc1bab7870e..44dd3926777 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -9476,6 +9476,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
{
+ bScreen *sc;
Object *ob;
for (ob = main->object.first; ob; ob = ob->id.next) {
@@ -9491,6 +9492,28 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
}
+
+ /*
+ * FIX some files have a zoom level of 0, and was checked during the drawing of the node space
+ *
+ * We moved this check to the do versions to be sure the value makes any sense.
+ */
+ for (sc = main->screen.first; sc; sc = sc->id.next) {
+ ScrArea *sa;
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
+ SpaceLink *sl;
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_NODE)
+ {
+ SpaceNode *snode = (SpaceNode *)sl;
+ if (snode->zoom < 0.02)
+ {
+ snode->zoom = 1.0;
+ }
+ }
+ }
+ }
+ }
}
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */