diff options
author | Matt Ebb <matt@mke3.net> | 2010-04-06 06:05:54 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-04-06 06:05:54 +0400 |
commit | bfe248b3d629d28fed3798e9f6a42bccb5d40f9e (patch) | |
tree | d4b75ad54067d790cdabaa7e843624b1d423a5af /source/blender/blenloader | |
parent | ea7fdb55a3e8f088161b218b96220c1cba9380a1 (diff) |
Patch [#21750] Add luma waveform and vectorscope to image view
by Xavier Thomas
This adds the waveform monitor and vectorscope to the image editor 'scopes'
region, bringing it inline (plus a bit more) with sequence editor functionality,
and a big step closer to the end goal of unifying the display code for image/
comp/sequence editor. It's non-intrusive, using the same code paths as
the histogram.
There's still room for more tweaks - I modified the original patch, changing
the openGL immediate mode drawing of the waveform display to vertex arrays for
speed optimisation. Xavier can look at doing this for the vectorscope now too.
Thanks very much Xavier!
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 1f6d36dc957..6dcfb7f0ec7 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -4836,6 +4836,9 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene) SpaceImage *sima= (SpaceImage *)sl; sima->image= restore_pointer_by_name(newmain, (ID *)sima->image, 1); + + sima->scopes.samples_ibuf = NULL; + sima->scopes.ok = 0; /* NOTE: pre-2.5, this was local data not lib data, but now we need this as lib data * so assume that here we're doing for undo only... @@ -5108,6 +5111,8 @@ static void direct_link_screen(FileData *fd, bScreen *sc) sima->iuser.scene= NULL; sima->iuser.ok= 1; + sima->scopes.samples_ibuf = NULL; + sima->scopes.ok = 0; /* WARNING: gpencil data is no longer stored directly in sima after 2.5 * so sacrifice a few old files for now to avoid crashes with new files! @@ -10731,7 +10736,26 @@ static void do_versions(FileData *fd, Library *lib, Main *main) /* put 2.50 compatibility code here until next subversion bump */ { + bScreen *sc; + /* Image editor scopes */ + 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_IMAGE) { + SpaceImage *sima = (SpaceImage *)sl; + sima->scopes.accuracy = 30.0; + sima->scopes.hist.mode=HISTO_MODE_RGB; + sima->scopes.wavefrm_alpha=0.3; + sima->scopes.vecscope_alpha=0.3; + sima->scopes.wavefrm_height= 100; + sima->scopes.hist.height= 100; + } + } + } + } } /* WATCH IT!!!: pointers from libdata have not been converted yet here! */ |