Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2009-02-04 20:40:50 +0300
committerTon Roosendaal <ton@blender.org>2009-02-04 20:40:50 +0300
commit1b27cd70e573118580bc83a5a8ca2bdc31616414 (patch)
tree4fe31ffb6091c86864bde870d4a3aa6b93687f34 /source/blender/editors/space_info
parentdf7e7660325611847721768fb7d082e7d5f2736c (diff)
2.5
Render back! And not only back, even full threaded now. :) Current state is unfinished, but too much fun to not to commit for review and test! WARNING: because render is in a threaded job, it will use data as can be edited in the UI. That'll crash in many cases of course... the idea is to limit UI usage to viewing stuff, especially for the Image Window to inspect layers or zoom in/out. What works now; - F12 render (no anim) - ESC from render - ESC pushes back temporary Image Window - Render to ImageWindow or full-screen. - Executing composites, and edit composites after render. Note that the UI is 100% responsive in a render, you can switch screens, slide area dividers around, or even load a new file during render. :) It's quite stable even. I'll collect all crash reports especially to get a good picture of where the protection is required at least. Also added: XKey "Delete Objects", to get things crash... unfortunately it didn't for me.
Diffstat (limited to 'source/blender/editors/space_info')
-rw-r--r--source/blender/editors/space_info/info_header.c14
-rw-r--r--source/blender/editors/space_info/space_info.c13
2 files changed, 22 insertions, 5 deletions
diff --git a/source/blender/editors/space_info/info_header.c b/source/blender/editors/space_info/info_header.c
index 0a6ff9e0b3e..59e30d87407 100644
--- a/source/blender/editors/space_info/info_header.c
+++ b/source/blender/editors/space_info/info_header.c
@@ -39,6 +39,7 @@
#include "BLI_blenlib.h"
#include "BKE_context.h"
+#include "BKE_global.h"
#include "BKE_screen.h"
#include "ED_screen.h"
@@ -60,9 +61,10 @@
/* ************************ header area region *********************** */
+#define B_STOPRENDER 1
+
static void do_viewmenu(bContext *C, void *arg, int event)
{
-
}
static uiBlock *dummy_viewmenu(bContext *C, ARegion *ar, void *arg_unused)
@@ -95,6 +97,9 @@ static uiBlock *dummy_viewmenu(bContext *C, ARegion *ar, void *arg_unused)
static void do_info_buttons(bContext *C, void *arg, int event)
{
switch(event) {
+ case B_STOPRENDER:
+ G.afbreek= 1;
+ break;
}
}
@@ -139,13 +144,14 @@ void info_header_buttons(const bContext *C, ARegion *ar)
xmax= GetButStringLength("Help");
uiDefPulldownBut(block, dummy_viewmenu, NULL, "Help", xco, yco, xmax-3, 22, "");
xco+= xmax;
-
-
-
}
uiBlockSetEmboss(block, UI_EMBOSS);
+ if(WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C))) {
+ uiDefIconTextBut(block, BUT, B_STOPRENDER, ICON_REC, "Render", xco+5,yco,75,19, NULL, 0.0f, 0.0f, 0, 0, "Stop rendering");
+ }
+
/* always as last */
UI_view2d_totRect_set(&ar->v2d, xco+XIC+80, ar->v2d.tot.ymax-ar->v2d.tot.ymin);
diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c
index 7ee6d67f7a8..8b01080495b 100644
--- a/source/blender/editors/space_info/space_info.c
+++ b/source/blender/editors/space_info/space_info.c
@@ -192,6 +192,17 @@ static void info_main_area_listener(ARegion *ar, wmNotifier *wmn)
/* context changes */
}
+static void info_header_listener(ARegion *ar, wmNotifier *wmn)
+{
+ /* context changes */
+ switch(wmn->category) {
+ case NC_SCENE:
+ if(wmn->data==ND_RENDER_RESULT)
+ ED_region_tag_redraw(ar);
+ }
+
+}
+
/* only called once, from space/spacetypes.c */
void ED_spacetype_info(void)
{
@@ -222,7 +233,7 @@ void ED_spacetype_info(void)
art->regionid = RGN_TYPE_HEADER;
art->minsizey= HEADERY;
art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D;
-
+ art->listener= info_header_listener;
art->init= info_header_area_init;
art->draw= info_header_area_draw;