[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22624] branches/blender2.5/blender/source /blender/editors/space_time: 2.5 Timeline:
Thomas Dinges
dingto at gmx.de
Wed Aug 19 11:12:21 CEST 2009
Revision: 22624
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22624
Author: dingto
Date: 2009-08-19 11:12:21 +0200 (Wed, 19 Aug 2009)
Log Message:
-----------
2.5 Timeline:
* Removed timeline_header.c with old Buttons code.
Modified Paths:
--------------
branches/blender2.5/blender/source/blender/editors/space_time/space_time.c
Removed Paths:
-------------
branches/blender2.5/blender/source/blender/editors/space_time/time_header.c
Modified: branches/blender2.5/blender/source/blender/editors/space_time/space_time.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/space_time/space_time.c 2009-08-19 09:04:49 UTC (rev 22623)
+++ branches/blender2.5/blender/source/blender/editors/space_time/space_time.c 2009-08-19 09:12:21 UTC (rev 22624)
@@ -270,42 +270,15 @@
/* ************************ header time area region *********************** */
-#define PY_HEADER
/* add handlers, stuff you only do once or on area/region changes */
static void time_header_area_init(wmWindowManager *wm, ARegion *ar)
{
-#ifdef PY_HEADER
ED_region_header_init(ar);
-#else
- UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_HEADER, ar->winx, ar->winy);
-#endif
}
static void time_header_area_draw(const bContext *C, ARegion *ar)
{
-#ifdef PY_HEADER
ED_region_header(C, ar);
-#else
-
- 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(C, &ar->v2d);
-
- time_header_buttons(C, ar);
-#endif
-
- /* restore view matrix? */
- UI_view2d_view_restore(C);
}
static void time_header_area_listener(ARegion *ar, wmNotifier *wmn)
@@ -382,8 +355,6 @@
static void time_free(SpaceLink *sl)
{
}
-
-
/* spacetype; init callback in ED_area_initialize() */
/* init is called to (re)initialize an existing editor (file read, screen changes) */
/* validate spacedata, add own area level handlers */
Deleted: branches/blender2.5/blender/source/blender/editors/space_time/time_header.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/space_time/time_header.c 2009-08-19 09:04:49 UTC (rev 22623)
+++ branches/blender2.5/blender/source/blender/editors/space_time/time_header.c 2009-08-19 09:12:21 UTC (rev 22624)
@@ -1,476 +0,0 @@
-/**
- * $Id$
- *
- * ***** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * The Original Code is Copyright (C) 2008 Blender Foundation.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include <string.h>
-#include <stdio.h>
-
-#include "DNA_space_types.h"
-#include "DNA_scene_types.h"
-#include "DNA_screen_types.h"
-#include "DNA_windowmanager_types.h"
-#include "DNA_userdef_types.h"
-
-#include "MEM_guardedalloc.h"
-
-#include "BLI_blenlib.h"
-
-#include "BKE_context.h"
-#include "BKE_global.h"
-#include "BKE_screen.h"
-
-#include "ED_keyframing.h"
-#include "ED_screen.h"
-#include "ED_screen_types.h"
-#include "ED_types.h"
-#include "ED_util.h"
-
-#include "WM_api.h"
-#include "WM_types.h"
-
-#include "RNA_access.h"
-
-#include "BIF_gl.h"
-#include "BIF_glutil.h"
-
-#include "UI_interface.h"
-#include "UI_resources.h"
-#include "UI_view2d.h"
-
-#include "ED_markers.h"
-
-#include "time_intern.h"
-
-
-/* ************************ header time area region *********************** */
-
-static void do_time_viewmenu(bContext *C, void *arg, int event)
-{
- ScrArea *curarea= CTX_wm_area(C);
- SpaceTime *stime= CTX_wm_space_time(C);
- View2D *v2d= UI_view2d_fromcontext_rwin(C);
- Scene *scene= CTX_data_scene(C);
- int first;
-
- switch(event) {
- case 2: /* Play Back Animation */
- //if(!has_screenhandler(G.curscreen, SCREEN_HANDLER_ANIM))
- // start_animated_screen(stime);
- break;
- case 3: /* View All */
- if(v2d) {
- first= scene->r.sfra;
- if(first >= scene->r.efra) first= scene->r.efra;
- v2d->cur.xmin=v2d->tot.xmin= (float)first-2;
- v2d->cur.xmax=v2d->tot.xmax= (float)scene->r.efra+2;
-
- ED_area_tag_redraw(curarea);
- }
- break;
- case 4: /* Maximize Window */
- /* using event B_FULL */
- break;
- case 5: /* show time or frames */
- stime->flag ^= TIME_DRAWFRAMES;
- ED_area_tag_redraw(curarea);
- break;
- case 6:
- //nextprev_marker(1);
- break;
- case 7:
- //nextprev_marker(-1);
- break;
- case 10:
- //timeline_frame_to_center();
- break;
- case 11:
- if(v2d) {
- v2d->flag ^= V2D_VIEWSYNC_SCREEN_TIME;
- UI_view2d_sync(CTX_wm_screen(C), CTX_wm_area(C), v2d, V2D_LOCK_SET);
- }
- break;
- case 12: /* only show keyframes from selected data */
- stime->flag ^= TIME_ONLYACTSEL;
- ED_area_tag_redraw(curarea);
- break;
- }
-}
-
-static uiBlock *time_viewmenu(bContext *C, ARegion *ar, void *arg_unused)
-{
- ScrArea *curarea= CTX_wm_area(C);
- SpaceTime *stime= CTX_wm_space_time(C);
- View2D *v2d= UI_view2d_fromcontext_rwin(C);
- uiBlock *block;
- short yco= 0, menuwidth=120;
-
- block= uiBeginBlock(C, ar, "time_viewmenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_time_viewmenu, NULL);
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Play Back Animation", 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- if(stime->flag & TIME_DRAWFRAMES)
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Seconds|Ctrl T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
- else
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Frames|Ctrl T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
-
- uiDefIconTextBut(block, BUTM, 1, (stime->flag & TIME_ONLYACTSEL)?ICON_CHECKBOX_HLT:ICON_CHECKBOX_DEHLT,
- "Only Selected Data Keys|", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 12, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Jump To Next Marker|PageUp", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 6, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Jump To Prev Marker|PageDown", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 7, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Jump To Next Key|Ctrl PageUp", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 8, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Jump To Prev Key|Ctrl PageDown", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 9, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Center View|C", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 10, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "View All|Home", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
- uiDefIconTextBut(block, BUTM, 1, (v2d->flag & V2D_VIEWSYNC_SCREEN_TIME)?ICON_CHECKBOX_HLT:ICON_CHECKBOX_DEHLT,
- "Lock Time to Other Windows|", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 11, "");
-
-// if (!curarea->full)
-// uiDefIconTextBut(block, BUTM, B_FULL, ICON_BLANK1, "Maximize Window|Ctrl UpArrow", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 4, "");
-// else
-// uiDefIconTextBut(block, BUTM, B_FULL, ICON_BLANK1, "Tile Window|Ctrl DownArrow", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 4, "");
-
- 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_time_framemenu(bContext *C, void *arg, int event)
-{
- Scene *scene= CTX_data_scene(C);
-
- switch(event) {
- case 1: /*Set as Start */
- if (scene->r.psfra) {
- if (scene->r.pefra < scene->r.cfra)
- scene->r.pefra= scene->r.cfra;
- scene->r.psfra= scene->r.cfra;
- }
- else
- scene->r.sfra = scene->r.cfra;
- WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene);
- break;
- case 2: /* Set as End */
- if (scene->r.psfra) {
- if (scene->r.cfra < scene->r.psfra)
- scene->r.psfra= scene->r.cfra;
- scene->r.pefra= scene->r.cfra;
- }
- else
- scene->r.efra = scene->r.cfra;
- WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene);
- break;
- case 3: /* Rename Marker */
- //rename_marker();
- break;
- }
-}
-
-static uiBlock *time_framemenu(bContext *C, ARegion *ar, void *arg_unused)
-{
- ScrArea *curarea= CTX_wm_area(C);
- uiBlock *block;
- short yco= 0, menuwidth=120;
-
- block= uiBeginBlock(C, ar, "time_framemenu", UI_EMBOSSP);
- uiBlockSetButmFunc(block, do_time_framemenu, NULL);
-
- uiDefIconTextButO(block, BUTM, "MARKER_OT_add", WM_OP_EXEC_REGION_WIN, ICON_BLANK1, "Add Marker",
- 0, yco-=2, menuwidth, 19, "");
- uiDefIconTextButO(block, BUTM, "MARKER_OT_duplicate", WM_OP_EXEC_REGION_WIN, ICON_BLANK1, "Duplicate Marker",
- 0, yco-=20, menuwidth, 19, "");
- uiDefIconTextButO(block, BUTM, "MARKER_OT_delete", WM_OP_EXEC_REGION_WIN, ICON_BLANK1, "Delete Marker",
- 0, yco-=20, menuwidth, 19, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Name Marker|Ctrl M",
- 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
- uiDefIconTextButO(block, BUTM, "MARKER_OT_move", WM_OP_INVOKE_REGION_WIN, ICON_BLANK1, "Grab/Move Marker",
- 0, yco-=20, menuwidth, 19, "");
-
- uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Set as Start|S",
- 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Set as End|E",
- 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
-
- if(curarea->headertype==HEADERTOP) {
- uiBlockSetDirection(block, UI_DOWN);
- }
- else {
- uiBlockSetDirection(block, UI_TOP);
- uiBlockFlipOrder(block);
- }
-
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list