From ea2f7c907c5de85b34c2c0a87bf4dd0a347004d3 Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Tue, 1 Nov 2011 19:48:45 +0000 Subject: == Removal of SpaceSound == * Removed old, unused Space Sound space * Removed data struct and Theme settings * Old files with an open Audio window will be loaded as Info Space --- source/blender/blenloader/intern/readfile.c | 26 +-- source/blender/blenloader/intern/writefile.c | 3 - source/blender/editors/CMakeLists.txt | 1 - source/blender/editors/SConscript | 1 - source/blender/editors/animation/anim_markers.c | 6 +- source/blender/editors/include/ED_space_api.h | 1 - source/blender/editors/interface/resources.c | 25 +- source/blender/editors/screen/screen_ops.c | 2 +- source/blender/editors/space_api/spacetypes.c | 1 - source/blender/editors/space_sound/CMakeLists.txt | 43 ---- source/blender/editors/space_sound/SConscript | 9 - source/blender/editors/space_sound/sound_header.c | 127 ----------- source/blender/editors/space_sound/sound_intern.h | 42 ---- source/blender/editors/space_sound/space_sound.c | 266 ---------------------- source/blender/makesdna/DNA_space_types.h | 18 +- source/blender/makesdna/DNA_userdef_types.h | 3 +- source/blender/makesrna/intern/rna_space.c | 3 - source/blender/makesrna/intern/rna_userdef.c | 32 --- source/blender/python/simple_enum_gen.py | 2 +- 19 files changed, 23 insertions(+), 588 deletions(-) delete mode 100644 source/blender/editors/space_sound/CMakeLists.txt delete mode 100644 source/blender/editors/space_sound/SConscript delete mode 100644 source/blender/editors/space_sound/sound_header.c delete mode 100644 source/blender/editors/space_sound/sound_intern.h delete mode 100644 source/blender/editors/space_sound/space_sound.c (limited to 'source/blender') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index bb068ac80eb..4700a41d003 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -4990,11 +4990,6 @@ static void lib_link_screen(FileData *fd, Main *main) } } } - else if(sl->spacetype==SPACE_SOUND) { - SpaceSound *ssound= (SpaceSound *)sl; - - ssound->sound= newlibadr_us(fd, sc->id.lib, ssound->sound); - } else if(sl->spacetype==SPACE_NODE) { SpaceNode *snode= (SpaceNode *)sl; @@ -5217,11 +5212,6 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene) } } } - else if(sl->spacetype==SPACE_SOUND) { - SpaceSound *ssound= (SpaceSound *)sl; - - ssound->sound= restore_pointer_by_name(newmain, (ID *)ssound->sound, 1); - } else if(sl->spacetype==SPACE_NODE) { SpaceNode *snode= (SpaceNode *)sl; @@ -6609,16 +6599,6 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb) //ar->v2d.flag |= V2D_IS_INITIALISED; break; } - case SPACE_SOUND: - { - SpaceSound *ssound= (SpaceSound *)sl; - memcpy(&ar->v2d, &ssound->v2d, sizeof(View2D)); - - ar->v2d.scroll |= (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL); - ar->v2d.scroll |= (V2D_SCROLL_LEFT); - //ar->v2d.flag |= V2D_IS_INITIALISED; - break; - } case SPACE_NLA: { SpaceNla *snla= (SpaceNla *)sl; @@ -6740,6 +6720,12 @@ static void do_versions_windowmanager_2_50(bScreen *screen) sl->spacetype= SPACE_EMPTY; /* spacedata then matches */ } + /* space sound is deprecated */ + for(sl= sa->spacedata.first; sl; sl= sl->next) { + if(sl->spacetype==SPACE_SOUND) + sl->spacetype= SPACE_EMPTY; /* spacedata then matches */ + } + /* it seems to be possible in 2.5 to have this saved, filewindow probably */ sa->butspacetype= sa->spacetype; diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 18807f911ed..4640fa0fe04 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -2216,9 +2216,6 @@ static void write_screens(WriteData *wd, ListBase *scrbase) else if(sl->spacetype==SPACE_ACTION) { writestruct(wd, DATA, "SpaceAction", 1, sl); } - else if(sl->spacetype==SPACE_SOUND) { - writestruct(wd, DATA, "SpaceSound", 1, sl); - } else if(sl->spacetype==SPACE_NLA){ SpaceNla *snla= (SpaceNla *)sl; diff --git a/source/blender/editors/CMakeLists.txt b/source/blender/editors/CMakeLists.txt index 16c0d4a2c79..7b7d11bd487 100644 --- a/source/blender/editors/CMakeLists.txt +++ b/source/blender/editors/CMakeLists.txt @@ -46,7 +46,6 @@ if(WITH_BLENDER) add_subdirectory(space_outliner) add_subdirectory(space_script) add_subdirectory(space_sequencer) - add_subdirectory(space_sound) add_subdirectory(space_text) add_subdirectory(space_time) add_subdirectory(space_userpref) diff --git a/source/blender/editors/SConscript b/source/blender/editors/SConscript index e8159bdf03f..a1b766ec2be 100644 --- a/source/blender/editors/SConscript +++ b/source/blender/editors/SConscript @@ -25,7 +25,6 @@ SConscript(['datafiles/SConscript', 'space_outliner/SConscript', 'space_time/SConscript', 'space_view3d/SConscript', - 'space_sound/SConscript', 'space_action/SConscript', 'space_nla/SConscript', 'space_script/SConscript', diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index 5345fcd756d..4a359acabd9 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -777,7 +777,7 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt) fac= ((float)(evt->x - mm->firstx)*dx); - if (ELEM(mm->slink->spacetype, SPACE_TIME, SPACE_SOUND)) + if (mm->slink->spacetype == SPACE_TIME) apply_keyb_grid(evt->shift, evt->ctrl, &fac, 0.0, FPS, 0.1*FPS, 0); else apply_keyb_grid(evt->shift, evt->ctrl, &fac, 0.0, 1.0, 0.1, 0 /*was: U.flag & USER_AUTOGRABGRID*/); @@ -796,7 +796,7 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt) if (totmark==1) { /* we print current marker value */ - if (ELEM(mm->slink->spacetype, SPACE_TIME, SPACE_SOUND)) { + if (mm->slink->spacetype == SPACE_TIME) { SpaceTime *stime= (SpaceTime *)mm->slink; if (stime->flag & TIME_DRAWFRAMES) BLI_snprintf(str, sizeof(str), "Marker %d offset %d", selmarker->frame, offs); @@ -816,7 +816,7 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt) } else { /* we only print the offset */ - if (ELEM(mm->slink->spacetype, SPACE_TIME, SPACE_SOUND)) { + if (mm->slink->spacetype == SPACE_TIME) { SpaceTime *stime= (SpaceTime *)mm->slink; if (stime->flag & TIME_DRAWFRAMES) BLI_snprintf(str, sizeof(str), "Marker offset %d ", offs); diff --git a/source/blender/editors/include/ED_space_api.h b/source/blender/editors/include/ED_space_api.h index 5c42dfc5d05..8e445ab1cee 100644 --- a/source/blender/editors/include/ED_space_api.h +++ b/source/blender/editors/include/ED_space_api.h @@ -46,7 +46,6 @@ void ED_spacetype_node(void); void ED_spacetype_buttons(void); void ED_spacetype_info(void); void ED_spacetype_file(void); -void ED_spacetype_sound(void); void ED_spacetype_action(void); void ED_spacetype_nla(void); void ED_spacetype_script(void); diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 4318feca737..921a1879bb7 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -135,9 +135,6 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo case SPACE_OUTLINER: ts= &btheme->toops; break; - case SPACE_SOUND: - ts= &btheme->tsnd; - break; case SPACE_INFO: ts= &btheme->tinfo; break; @@ -525,7 +522,6 @@ static void ui_theme_init_new(bTheme *btheme) ui_theme_init_new_do(&btheme->tfile); ui_theme_init_new_do(&btheme->tipo); ui_theme_init_new_do(&btheme->tinfo); - ui_theme_init_new_do(&btheme->tsnd); ui_theme_init_new_do(&btheme->tact); ui_theme_init_new_do(&btheme->tnla); ui_theme_init_new_do(&btheme->tseq); @@ -762,15 +758,11 @@ void ui_theme_init_default(void) SETCOL(btheme->tconsole.console_error, 220, 96, 96, 255); SETCOL(btheme->tconsole.console_cursor, 220, 96, 96, 255); - - /* space sound */ - btheme->tsnd= btheme->tv3d; - SETCOLF(btheme->tsnd.back, 0.45, 0.45, 0.45, 1.0); - SETCOLF(btheme->tsnd.grid, 0.36, 0.36, 0.36, 1.0); - SETCOL(btheme->tsnd.shade1, 173, 173, 173, 255); // sliders - /* space time */ - btheme->ttime= btheme->tsnd; // same as sound space + btheme->ttime= btheme->tv3d; + SETCOLF(btheme->ttime.back, 0.45, 0.45, 0.45, 1.0); + SETCOLF(btheme->ttime.grid, 0.36, 0.36, 0.36, 1.0); + SETCOL(btheme->ttime.shade1, 173, 173, 173, 255); // sliders /* space node, re-uses syntax color storage */ btheme->tnode= btheme->tv3d; @@ -785,7 +777,6 @@ void ui_theme_init_default(void) /* space logic */ btheme->tlogic= btheme->tv3d; SETCOL(btheme->tlogic.back, 100, 100, 100, 255); - } @@ -1177,7 +1168,11 @@ void init_userdef_do_versions(void) for(btheme= U.themes.first; btheme; btheme= btheme->next) { /* check for alpha==0 is safe, then color was never set */ if(btheme->ttime.back[3]==0) { - btheme->ttime = btheme->tsnd; // copy from sound + // copied from ui_theme_init_default + btheme->ttime= btheme->tv3d; + SETCOLF(btheme->ttime.back, 0.45, 0.45, 0.45, 1.0); + SETCOLF(btheme->ttime.grid, 0.36, 0.36, 0.36, 1.0); + SETCOL(btheme->ttime.shade1, 173, 173, 173, 255); // sliders } if(btheme->text.syntaxn[3]==0) { SETCOL(btheme->text.syntaxn, 0, 0, 200, 255); /* Numbers Blue*/ @@ -1304,7 +1299,7 @@ void init_userdef_do_versions(void) SETCOL(btheme->tact.cframe, 0x60, 0xc0, 0x40, 255); SETCOL(btheme->tnla.cframe, 0x60, 0xc0, 0x40, 255); SETCOL(btheme->tseq.cframe, 0x60, 0xc0, 0x40, 255); - SETCOL(btheme->tsnd.cframe, 0x60, 0xc0, 0x40, 255); + //SETCOL(btheme->tsnd.cframe, 0x60, 0xc0, 0x40, 255); Not needed anymore SETCOL(btheme->ttime.cframe, 0x60, 0xc0, 0x40, 255); } } diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 171adc8d89a..e86dd8dbde3 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -192,7 +192,7 @@ int ED_operator_animview_active(bContext *C) { if(ED_operator_areaactive(C)) { SpaceLink *sl= (SpaceLink *)CTX_wm_space_data(C); - if (sl && (ELEM6(sl->spacetype, SPACE_SEQ, SPACE_SOUND, SPACE_ACTION, SPACE_NLA, SPACE_IPO, SPACE_TIME))) + if (sl && (ELEM5(sl->spacetype, SPACE_SEQ, SPACE_ACTION, SPACE_NLA, SPACE_IPO, SPACE_TIME))) return TRUE; } diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c index 99ab356ac5f..905f7bc80b6 100644 --- a/source/blender/editors/space_api/spacetypes.c +++ b/source/blender/editors/space_api/spacetypes.c @@ -81,7 +81,6 @@ void ED_spacetypes_init(void) ED_spacetype_buttons(); ED_spacetype_info(); ED_spacetype_file(); - ED_spacetype_sound(); ED_spacetype_action(); ED_spacetype_nla(); ED_spacetype_script(); diff --git a/source/blender/editors/space_sound/CMakeLists.txt b/source/blender/editors/space_sound/CMakeLists.txt deleted file mode 100644 index ae605760975..00000000000 --- a/source/blender/editors/space_sound/CMakeLists.txt +++ /dev/null @@ -1,43 +0,0 @@ -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Contributor(s): Jacques Beaurain. -# -# ***** END GPL LICENSE BLOCK ***** - -set(INC - ../include - ../../blenkernel - ../../blenlib - ../../blenloader - ../../makesdna - ../../makesrna - ../../windowmanager - ../../../../intern/guardedalloc -) - -set(INC_SYS - ${GLEW_INCLUDE_PATH} -) - -set(SRC - sound_header.c - space_sound.c - - sound_intern.h -) - -blender_add_lib(bf_editor_space_sound "${SRC}" "${INC}" "${INC_SYS}") diff --git a/source/blender/editors/space_sound/SConscript b/source/blender/editors/space_sound/SConscript deleted file mode 100644 index d76fb7939ea..00000000000 --- a/source/blender/editors/space_sound/SConscript +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/python -Import ('env') - -sources = env.Glob('*.c') - -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../makesrna ../../imbuf' -incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include ../../blenloader' - -env.BlenderLib ( 'bf_editors_space_sound', sources, Split(incs), [], libtype=['core'], priority=[75] ) diff --git a/source/blender/editors/space_sound/sound_header.c b/source/blender/editors/space_sound/sound_header.c deleted file mode 100644 index 6e2010c0c63..00000000000 --- a/source/blender/editors/space_sound/sound_header.c +++ /dev/null @@ -1,127 +0,0 @@ -/* - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2008 Blender Foundation. - * All rights reserved. - * - * - * Contributor(s): Blender Foundation - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/editors/space_sound/sound_header.c - * \ingroup spsnd - */ - - -#include -#include - - -#include "MEM_guardedalloc.h" - -#include "BLI_blenlib.h" -#include "BLI_utildefines.h" - - -#include "BKE_context.h" - -#include "ED_screen.h" -#include "ED_types.h" -#include "ED_util.h" - -#include "BIF_gl.h" -#include "BIF_glutil.h" - -#include "UI_interface.h" -#include "UI_resources.h" -#include "UI_view2d.h" - -#include "sound_intern.h" - - -/* ************************ header area region *********************** */ - -static void do_viewmenu(bContext *UNUSED(C), void *UNUSED(arg), int UNUSED(event)) -{ - -} - -static uiBlock *dummy_viewmenu(bContext *C, ARegion *ar, void *UNUSED(arg)) -{ - ScrArea *curarea= CTX_wm_area(C); - uiBlock *block; - short yco= 0, menuwidth=120; - - block= uiBeginBlock(C, ar, "dummy_viewmenu", UI_EMBOSSP); - uiBlockSetButmFunc(block, do_viewmenu, NULL); - - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Nothing yet", 0, yco-=20, - menuwidth, 19, NULL, 0.0, 0.0, 1, 3, ""); - - if(curarea->headertype==HEADERTOP) { - uiBlockSetDirection(block, UI_DOWN); - } - else { - uiBlockSetDirection(block, UI_TOP); - uiBlockFlipOrder(block); - } - - uiTextBoundsBlock(block, 50); - uiEndBlock(C, block); - - return block; -} - -static void do_sound_buttons(bContext *UNUSED(C), void *UNUSED(arg), int event) -{ - switch(event) { - } -} - - -void sound_header_buttons(const bContext *C, ARegion *ar) -{ - ScrArea *sa= CTX_wm_area(C); - uiBlock *block; - int xco, yco= 3; - - block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS); - uiBlockSetHandleFunc(block, do_sound_buttons, NULL); - - xco= ED_area_header_standardbuttons(C, block, yco); - - if((sa->flag & HEADER_NO_PULLDOWN)==0) { - int xmax; - - xmax= GetButStringLength("View"); - uiDefPulldownBut(block, dummy_viewmenu, CTX_wm_area(C), - "View", xco, yco-2, xmax-3, UI_UNIT_Y, ""); - xco+=UI_UNIT_X+xmax; - } - - uiBlockSetEmboss(block, UI_EMBOSS); - - /* always as last */ - UI_view2d_totRect_set(&ar->v2d, xco+UI_UNIT_X+80, ar->v2d.tot.ymax-ar->v2d.tot.ymin); - - uiEndBlock(C, block); - uiDrawBlock(C, block); -} - - diff --git a/source/blender/editors/space_sound/sound_intern.h b/source/blender/editors/space_sound/sound_intern.h deleted file mode 100644 index 88891ff4913..00000000000 --- a/source/blender/editors/space_sound/sound_intern.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2008 Blender Foundation. - * All rights reserved. - * - * - * Contributor(s): Blender Foundation - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/editors/space_sound/sound_intern.h - * \ingroup spsnd - */ - -#ifndef ED_SOUND_INTERN_H -#define ED_SOUND_INTERN_H - -/* internal exports only */ - - -/* sound_header.c */ -void sound_header_buttons(const bContext *C, ARegion *ar); - - -#endif /* ED_SOUND_INTERN_H */ - diff --git a/source/blender/editors/space_sound/space_sound.c b/source/blender/editors/space_sound/space_sound.c deleted file mode 100644 index 83d1b5b06c2..00000000000 --- a/source/blender/editors/space_sound/space_sound.c +++ /dev/null @@ -1,266 +0,0 @@ -/* - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2008 Blender Foundation. - * All rights reserved. - * - * - * Contributor(s): Blender Foundation - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/editors/space_sound/space_sound.c - * \ingroup spsnd - */ - - -#include -#include - -#include "DNA_scene_types.h" - -#include "MEM_guardedalloc.h" - -#include "BLI_blenlib.h" -#include "BLI_math.h" -#include "BLI_rand.h" -#include "BLI_utildefines.h" - -#include "BKE_context.h" -#include "BKE_screen.h" - -#include "ED_space_api.h" -#include "ED_screen.h" - -#include "BIF_gl.h" - -#include "WM_api.h" -#include "WM_types.h" - -#include "UI_resources.h" -#include "UI_view2d.h" - - -#include "sound_intern.h" // own include - -/* ******************** default callbacks for sound space ***************** */ - -static SpaceLink *sound_new(const bContext *UNUSED(C)) -{ - ARegion *ar; - SpaceSound *ssound; - - ssound= MEM_callocN(sizeof(SpaceSound), "initsound"); - ssound->spacetype= SPACE_SOUND; - - /* header */ - ar= MEM_callocN(sizeof(ARegion), "header for sound"); - - BLI_addtail(&ssound->regionbase, ar); - ar->regiontype= RGN_TYPE_HEADER; - ar->alignment= RGN_ALIGN_BOTTOM; - - /* main area */ - ar= MEM_callocN(sizeof(ARegion), "main area for sound"); - - BLI_addtail(&ssound->regionbase, ar); - ar->regiontype= RGN_TYPE_WINDOW; - - ar->v2d.tot.xmin= -4.0f; - ar->v2d.tot.ymin= -4.0f; - ar->v2d.tot.xmax= 250.0f; - ar->v2d.tot.ymax= 255.0f; - - ar->v2d.cur.xmin= -4.0f; - ar->v2d.cur.ymin= -4.0f; - ar->v2d.cur.xmax= 50.0f; - ar->v2d.cur.ymax= 255.0f; - - ar->v2d.min[0]= 1.0f; - ar->v2d.min[1]= 259.0f; - - ar->v2d.max[0]= MAXFRAMEF; - ar->v2d.max[1]= 259.0f; - - ar->v2d.minzoom= 0.1f; - ar->v2d.maxzoom= 10.0f; - - ar->v2d.scroll = (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL); - ar->v2d.scroll |= (V2D_SCROLL_LEFT); - ar->v2d.keepzoom= 0; - ar->v2d.keeptot= 0; - ar->v2d.keepzoom = V2D_LOCKZOOM_Y; - - - return (SpaceLink *)ssound; -} - -/* not spacelink itself */ -static void sound_free(SpaceLink *UNUSED(sl)) -{ -// SpaceSound *ssound= (SpaceSound*) sl; - - -} - - -/* spacetype; init callback */ -static void sound_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(sa)) -{ - -} - -static SpaceLink *sound_duplicate(SpaceLink *sl) -{ - SpaceSound *ssoundn= MEM_dupallocN(sl); - - /* clear or remove stuff from old */ - - return (SpaceLink *)ssoundn; -} - - - -/* add handlers, stuff you only do once or on area/region changes */ -static void sound_main_area_init(wmWindowManager *wm, ARegion *ar) -{ - wmKeyMap *keymap; - - UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy); - - /* own keymap */ - keymap= WM_keymap_find(wm->defaultconf, "Sound", SPACE_SOUND, 0); - WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); -} - -static void sound_main_area_draw(const bContext *C, ARegion *ar) -{ - /* draw entirely, view changes should be handled here */ - // SpaceSound *ssound= (SpaceSound*)CTX_wm_space_data(C); - View2D *v2d= &ar->v2d; - - /* clear and setup matrix */ - UI_ThemeClearColor(TH_BACK); - glClear(GL_COLOR_BUFFER_BIT); - - UI_view2d_view_ortho(v2d); - - /* data... */ - - - /* reset view matrix */ - UI_view2d_view_restore(C); - - /* scrollers? */ -} - -static void sound_operatortypes(void) -{ - -} - -static void sound_keymap(struct wmKeyConfig *UNUSED(keyconf)) -{ - -} - -/* add handlers, stuff you only do once or on area/region changes */ -static void sound_header_area_init(wmWindowManager *UNUSED(wm), ARegion *ar) -{ - UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_HEADER, ar->winx, ar->winy); -} - -static void sound_header_area_draw(const bContext *C, ARegion *ar) -{ - float col[3]; - - /* clear */ - if(ED_screen_area_active(C)) - UI_GetThemeColor3fv(TH_HEADER, col); - else - UI_GetThemeColor3fv(TH_HEADERDESEL, col); - - glClearColor(col[0], col[1], col[2], 0.0); - glClear(GL_COLOR_BUFFER_BIT); - - /* set view2d view matrix for scrolling (without scrollers) */ - UI_view2d_view_ortho(&ar->v2d); - - sound_header_buttons(C, ar); - - /* restore view matrix? */ - UI_view2d_view_restore(C); -} - -static void sound_main_area_listener(ARegion *UNUSED(ar), wmNotifier *UNUSED(wmn)) -{ - /* context changes */ -} - -/* only called once, from space/spacetypes.c */ -void ED_spacetype_sound(void) -{ - SpaceType *st= MEM_callocN(sizeof(SpaceType), "spacetype sound"); - ARegionType *art; - - st->spaceid= SPACE_SOUND; - strncpy(st->name, "Sound", BKE_ST_MAXNAME); - - st->new= sound_new; - st->free= sound_free; - st->init= sound_init; - st->duplicate= sound_duplicate; - st->operatortypes= sound_operatortypes; - st->keymap= sound_keymap; - - /* regions: main window */ - art= MEM_callocN(sizeof(ARegionType), "spacetype sound region"); - art->regionid = RGN_TYPE_WINDOW; - art->init= sound_main_area_init; - art->draw= sound_main_area_draw; - art->listener= sound_main_area_listener; - art->keymapflag= ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES; - - BLI_addhead(&st->regiontypes, art); - - /* regions: header */ - art= MEM_callocN(sizeof(ARegionType), "spacetype sound region"); - art->regionid = RGN_TYPE_HEADER; - art->prefsizey= HEADERY; - art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_HEADER; - - art->init= sound_header_area_init; - art->draw= sound_header_area_draw; - - BLI_addhead(&st->regiontypes, art); - - /* regions: channels */ - art= MEM_callocN(sizeof(ARegionType), "spacetype sound region"); - art->regionid = RGN_TYPE_CHANNELS; - art->prefsizex= 80; - art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D; - -// art->init= sound_channel_area_init; -// art->draw= sound_channel_area_draw; - - BLI_addhead(&st->regiontypes, art); - - - BKE_spacetype_register(st); -} - diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index d21db85b1f3..a92075c32e3 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -483,22 +483,6 @@ typedef struct SpaceUserPref { } SpaceUserPref; -typedef struct SpaceSound { - struct SpaceLink *next, *prev; - ListBase regionbase; /* storage of regions for inactive spaces */ - int spacetype; - float blockscale; - struct ScrArea *area; - - View2D v2d; - - struct bSound *sound; - short mode, sndnr; - short xof, yof; - short flag, lock; - int pad2; -} SpaceSound; - /* view3d Now in DNA_view3d_types.h */ @@ -886,7 +870,7 @@ enum { SPACE_SEQ, SPACE_TEXT, SPACE_IMASEL, /* deprecated */ - SPACE_SOUND, + SPACE_SOUND, /* Deprecated */ SPACE_ACTION, SPACE_NLA, SPACE_SCRIPT, diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 4859268d477..8dd00f4ac08 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -267,8 +267,7 @@ typedef struct bTheme { ThemeSpace tv3d; ThemeSpace tfile; ThemeSpace tipo; - ThemeSpace tinfo; - ThemeSpace tsnd; + ThemeSpace tinfo; ThemeSpace tact; ThemeSpace tnla; ThemeSpace tseq; diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 58ed9c50df5..19acc51feed 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -60,7 +60,6 @@ EnumPropertyItem space_type_items[] = { {SPACE_INFO, "INFO", 0, "Info", ""}, {SPACE_SEQ, "SEQUENCE_EDITOR", 0, "Sequence Editor", ""}, {SPACE_TEXT, "TEXT_EDITOR", 0, "Text Editor", ""}, - {SPACE_SOUND, "AUDIO_WINDOW", 0, "Audio Window", ""}, {SPACE_ACTION, "DOPESHEET_EDITOR", 0, "DopeSheet Editor", ""}, {SPACE_NLA, "NLA_EDITOR", 0, "NLA Editor", ""}, {SPACE_SCRIPT, "SCRIPTS_WINDOW", 0, "Scripts Window", ""}, @@ -151,8 +150,6 @@ static StructRNA* rna_Space_refine(struct PointerRNA *ptr) return &RNA_SpaceSequenceEditor; case SPACE_TEXT: return &RNA_SpaceTextEditor; - /*case SPACE_SOUND: - return &RNA_SpaceAudioWindow;*/ case SPACE_ACTION: return &RNA_SpaceDopeSheetEditor; case SPACE_NLA: diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 898ee2b2623..5c4838c8842 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -1451,37 +1451,6 @@ static void rna_def_userdef_theme_space_time(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_userdef_update"); } -static void rna_def_userdef_theme_space_sound(BlenderRNA *brna) -{ - StructRNA *srna; - PropertyRNA *prop; - - /* space_sound */ - - srna= RNA_def_struct(brna, "ThemeAudioWindow", NULL); - RNA_def_struct_sdna(srna, "ThemeSpace"); - RNA_def_struct_ui_text(srna, "Theme Audio Window", "Theme settings for the Audio Window"); - - rna_def_userdef_theme_spaces_main(srna, SPACE_SOUND); - - prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Grid", ""); - RNA_def_property_update(prop, 0, "rna_userdef_update"); - - prop= RNA_def_property(srna, "window_sliders", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, NULL, "shade1"); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Window Sliders", ""); - RNA_def_property_update(prop, 0, "rna_userdef_update"); - - prop= RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, NULL, "cframe"); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Current Frame", ""); - RNA_def_property_update(prop, 0, "rna_userdef_update"); -} - static void rna_def_userdef_theme_space_image(BlenderRNA *brna) { StructRNA *srna; @@ -1956,7 +1925,6 @@ static void rna_def_userdef_dothemes(BlenderRNA *brna) rna_def_userdef_theme_space_info(brna); rna_def_userdef_theme_space_userpref(brna); rna_def_userdef_theme_space_console(brna); - rna_def_userdef_theme_space_sound(brna); rna_def_userdef_theme_space_logic(brna); rna_def_userdef_theme_colorset(brna); rna_def_userdef_themes(brna); diff --git a/source/blender/python/simple_enum_gen.py b/source/blender/python/simple_enum_gen.py index 1455747cdbb..f01b7011e4f 100644 --- a/source/blender/python/simple_enum_gen.py +++ b/source/blender/python/simple_enum_gen.py @@ -30,7 +30,7 @@ defs = """ SPACE_SEQ, SPACE_TEXT, SPACE_IMASEL, #Deprecated - SPACE_SOUND, + SPACE_SOUND, #Deprecated SPACE_ACTION, SPACE_NLA, SPACE_SCRIPT, -- cgit v1.2.3