From 77833847eee49b1810d650d3c94ebfbdb96602be Mon Sep 17 00:00:00 2001 From: Matt Ebb Date: Fri, 9 Apr 2010 00:44:35 +0000 Subject: Patch from Xavier Thomas: Use vertex arrays for drawing image editor vector scope too, making it a lot more efficient. Also fixed issue with scopes height not being stored in file properly. --- source/blender/blenloader/intern/readfile.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 689faac505a..3196de4243c 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -4834,10 +4834,10 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene) sima->image= restore_pointer_by_name(newmain, (ID *)sima->image, 1); - sima->scopes.samples_ibuf = NULL; sima->scopes.waveform_1 = NULL; sima->scopes.waveform_2 = NULL; sima->scopes.waveform_3 = NULL; + sima->scopes.vecscope = NULL; sima->scopes.ok = 0; /* NOTE: pre-2.5, this was local data not lib data, but now we need this as lib data @@ -5111,10 +5111,10 @@ static void direct_link_screen(FileData *fd, bScreen *sc) sima->iuser.scene= NULL; sima->iuser.ok= 1; - sima->scopes.samples_ibuf = NULL; sima->scopes.waveform_1 = NULL; sima->scopes.waveform_2 = NULL; sima->scopes.waveform_3 = NULL; + sima->scopes.vecscope = NULL; sima->scopes.ok = 0; /* WARNING: gpencil data is no longer stored directly in sima after 2.5 @@ -10737,8 +10737,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) do_version_old_trackto_to_constraints(ob); } - /* put 2.50 compatibility code here until next subversion bump */ - { + if (main->versionfile < 252 || (main->versionfile == 252 && main->subversionfile < 5)) { bScreen *sc; /* Image editor scopes */ @@ -10754,12 +10753,18 @@ static void do_versions(FileData *fd, Library *lib, Main *main) sima->scopes.wavefrm_alpha=0.3; sima->scopes.vecscope_alpha=0.3; sima->scopes.wavefrm_height= 100; + sima->scopes.vecscope_height= 100; sima->scopes.hist.height= 100; } } } } } + + /* put 2.50 compatibility code here until next subversion bump */ + { + + } /* WATCH IT!!!: pointers from libdata have not been converted yet here! */ /* WATCH IT 2!: Userdef struct init has to be in editors/interface/resources.c! */ -- cgit v1.2.3