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-09 19:52:33 +0300
committerTon Roosendaal <ton@blender.org>2009-02-09 19:52:33 +0300
commit8f712f86b9afd010aa24aea7bc6c686dd3ef43a1 (patch)
treefa1af1a08bda6dff2f6d9cb05056255d369107b4 /source/blender
parentf33309b0285079c14a8f9fc913157129ff6cbc81 (diff)
2.5
- Render: scene buttons RENDER and ANIM now work - Nodes: text drawing for socket names back
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/space_buttons/Makefile1
-rw-r--r--source/blender/editors/space_buttons/SConscript2
-rw-r--r--source/blender/editors/space_buttons/buttons_scene.c16
-rw-r--r--source/blender/editors/space_node/node_draw.c8
4 files changed, 17 insertions, 10 deletions
diff --git a/source/blender/editors/space_buttons/Makefile b/source/blender/editors/space_buttons/Makefile
index ff82f25ea55..b96d1cc5495 100644
--- a/source/blender/editors/space_buttons/Makefile
+++ b/source/blender/editors/space_buttons/Makefile
@@ -44,6 +44,7 @@ CPPFLAGS += -I../../blenloader
CPPFLAGS += -I../../blenkernel
CPPFLAGS += -I../../blenlib
CPPFLAGS += -I../../makesdna
+CPPFLAGS += -I../../makesrna
CPPFLAGS += -I../../imbuf
CPPFLAGS += -I../../python
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
diff --git a/source/blender/editors/space_buttons/SConscript b/source/blender/editors/space_buttons/SConscript
index 0bd5374c3ca..d36dd89b681 100644
--- a/source/blender/editors/space_buttons/SConscript
+++ b/source/blender/editors/space_buttons/SConscript
@@ -5,6 +5,6 @@ sources = env.Glob('*.c')
incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
-incs += ' ../../render/extern/include'
+incs += ' ../../makesrna ../../render/extern/include'
env.BlenderLib ( 'bf_editors_space_buttons', sources, Split(incs), [], libtype=['core'], priority=[120] )
diff --git a/source/blender/editors/space_buttons/buttons_scene.c b/source/blender/editors/space_buttons/buttons_scene.c
index f278b6379ab..e4cff2f4f06 100644
--- a/source/blender/editors/space_buttons/buttons_scene.c
+++ b/source/blender/editors/space_buttons/buttons_scene.c
@@ -40,9 +40,14 @@
#include "RE_pipeline.h"
+#include "RNA_access.h"
+#include "RNA_define.h"
+
#include "UI_interface.h"
#include "UI_resources.h"
+#include "WM_types.h"
+
#include "buttons_intern.h"
#define R_DISPLAYIMAGE 0
@@ -212,7 +217,8 @@ static void render_panel_render(const bContext *C, ARegion *ar)
if(uiNewPanel(C, ar, block, "Render", "Render", 320, 0, 318, 204)==0) return;
uiBlockBeginAlign(block);
- uiDefBut(block, BUT,0,"RENDER", 369, 164, 191,37, 0, 0, 0, 0, 0, "Render the current frame (F12)");
+ uiDefButO(block, BUT, "SCREEN_OT_render", WM_OP_INVOKE_DEFAULT, "RENDER", 369, 164, 191,37, "Render the current frame (F12)");
+
#ifndef DISABLE_YAFRAY
/* yafray: on request, render engine menu is back again, and moved to Render panel */
uiDefButS(block, MENU, 0, "Rendering Engine %t|Blender Internal %x0|YafRay %x1",
@@ -287,12 +293,14 @@ void render_panel_anim(const bContext *C, ARegion *ar)
{
Scene *scene= CTX_data_scene(C);
uiBlock *block;
-
+ uiBut *but;
+
block= uiBeginBlock(C, ar, "render_panel_anim", UI_EMBOSS, UI_HELV);
if(uiNewPanel(C, ar, block, "Anim", "Render", 640, 0, 318, 204) == 0) return;
- uiDefBut(block, BUT, 0, "ANIM", 692,142,192,47, 0, 0, 0, 0, 0, "Render the animation to disk from start to end frame, (Ctrl+F12)");
-
+ but= uiDefButO(block, BUT, "SCREEN_OT_render", WM_OP_INVOKE_DEFAULT, "ANIM", 692,142,192,47, "Render the animation to disk from start to end frame, (Ctrl+F12)");
+ RNA_boolean_set(uiButGetOperatorPtrRNA(but), "anim", 1);
+
uiBlockSetCol(block, TH_BUT_SETTING1);
uiBlockBeginAlign(block);
uiDefButBitI(block, TOG, R_DOSEQ, 0, "Do Sequence",692,114,192,20, &scene->r.scemode, 0, 0, 0, 0, "Enables sequence output rendering (Default: 3D rendering)");
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index ffb25339bc3..e9d865a371a 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -823,11 +823,9 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
}
}
else {
- /* XXX fix
UI_ThemeColor(TH_TEXT);
ui_rasterpos_safe(sock->locx+8.0f, sock->locy-5.0f, snode->aspect);
UI_DrawString(snode->curfont, sock->name, 0);
- */
}
}
}
@@ -835,11 +833,12 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
/* socket outputs */
for(sock= node->outputs.first; sock; sock= sock->next) {
if(!(sock->flag & (SOCK_HIDDEN|SOCK_UNAVAIL))) {
+ float slen;
+ int ofs= 0;
+
socket_circle_draw(sock, NODE_SOCKSIZE);
- /* XXX fix
UI_ThemeColor(TH_TEXT);
- ofs= 0;
slen= snode->aspect*UI_GetStringWidth(snode->curfont, sock->name, 0);
while(slen > node->width) {
ofs++;
@@ -847,7 +846,6 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
}
ui_rasterpos_safe(sock->locx-8.0f-slen, sock->locy-5.0f, snode->aspect);
UI_DrawString(snode->curfont, sock->name+ofs, 0);
- */
}
}