diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-06-23 04:41:55 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-06-23 04:41:55 +0400 |
commit | e2b6cea3b95ca41854661726ccea684421738c8f (patch) | |
tree | 8f0feed0ee4e3af460145984f183f24ef111d044 /source/blender/blenloader | |
parent | 272fac8fd6e8c64472c856b85994f841678f172c (diff) |
2.5: Tool Settings
* Moved proportional edit, snap, autokey mode, and a few others
from Scene to ToolSettings.
* RNA wrapped properties in ToolSettings for the UV editor:
proportional edit, snap settings, selection modes.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 89 |
1 files changed, 38 insertions, 51 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 48aa3f6a3b7..54caad7f35b 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -7102,22 +7102,14 @@ static void do_versions(FileData *fd, Library *lib, Main *main) if(main->versionfile <= 234) { - Scene *sce; World *wo; bScreen *sc; - int set_zbuf_sel=0; // force sumo engine to be active for (wo = main->world.first; wo; wo= wo->id.next) { if(wo->physicsEngine==0) wo->physicsEngine = 2; } - for (sce= main->scene.first; sce; sce= sce->id.next) { - if(sce->selectmode==0) { - sce->selectmode= SCE_SELECT_VERTEX; - set_zbuf_sel= 1; - } - } for (sc= main->screen.first; sc; sc= sc->id.next) { ScrArea *sa; for (sa= sc->areabase.first; sa; sa= sa->next) { @@ -7125,7 +7117,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) for (sl= sa->spacedata.first; sl; sl= sl->next) { if(sl->spacetype==SPACE_VIEW3D) { View3D *v3d= (View3D *)sl; - if(set_zbuf_sel) v3d->flag |= V3D_ZBUF_SELECT; + v3d->flag |= V3D_ZBUF_SELECT; } else if(sl->spacetype==SPACE_TEXT) { SpaceText *st= (SpaceText *)sl; @@ -7160,16 +7152,10 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } if(main->versionfile <= 236) { Object *ob; - Scene *sce= main->scene.first; Camera *cam= main->camera.first; Material *ma; bScreen *sc; - while(sce) { - if(sce->editbutsize==0.0) sce->editbutsize= 0.1f; - - sce= sce->id.next; - } while(cam) { if(cam->ortho_scale==0.0) { cam->ortho_scale= 256.0f/cam->lens; @@ -8795,15 +8781,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } } - /* autokey mode settings now used from scene, but need to be initialised off userprefs */ - if (main->versionfile < 247 || (main->versionfile == 247 && main->subversionfile < 8)) { - Scene *sce; - - for (sce= main->scene.first; sce; sce= sce->id.next) { - if (sce->autokey_mode == 0) - sce->autokey_mode= U.autokey_mode; - } - } if (main->versionfile < 247 || (main->versionfile == 247 && main->subversionfile < 9)) { Lamp *la= main->lamp.first; @@ -8996,6 +8973,34 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } + if (main->versionfile < 249 && main->subversionfile < 2) { + Scene *sce= main->scene.first; + Sequence *seq; + Editing *ed; + + while(sce) { + ed= sce->ed; + if(ed) { + SEQP_BEGIN(ed, seq) { + if (seq->strip && seq->strip->proxy){ + if (sce->r.size != 100.0) { + seq->strip->proxy->size + = sce->r.size; + } else { + seq->strip->proxy->size + = 25.0; + } + seq->strip->proxy->quality =90; + } + } + SEQ_END + } + + sce= sce->id.next; + } + + } + if (main->versionfile < 250) { bScreen *screen; Scene *scene; @@ -9081,6 +9086,8 @@ static void do_versions(FileData *fd, Library *lib, Main *main) { Object *ob; Material *ma; + Scene *sce; + ToolSettings *ts; int i; for(ob = main->object.first; ob; ob = ob->id.next) { @@ -9153,37 +9160,17 @@ static void do_versions(FileData *fd, Library *lib, Main *main) ma->mode &= ~MA_HALO; } } - } - - if (main->versionfile < 249 && main->subversionfile < 2) { - Scene *sce= main->scene.first; - Sequence *seq; - Editing *ed; - - while(sce) { - ed= sce->ed; - if(ed) { - SEQP_BEGIN(ed, seq) { - if (seq->strip && seq->strip->proxy){ - if (sce->r.size != 100.0) { - seq->strip->proxy->size - = sce->r.size; - } else { - seq->strip->proxy->size - = 25.0; - } - seq->strip->proxy->quality =90; - } - } - SEQ_END + + for(sce = main->scene.first; sce; sce = sce->id.next) { + ts= sce->toolsettings; + if(ts->normalsize == 0.0) { + ts->normalsize= 0.1f; + ts->selectmode= SCE_SELECT_VERTEX; + ts->autokey_mode= U.autokey_mode; } - - sce= sce->id.next; } - } - /* WATCH IT!!!: pointers from libdata have not been converted yet here! */ /* WATCH IT 2!: Userdef struct init has to be in src/usiblender.c! */ |