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>2006-01-28 18:21:04 +0300
committerTon Roosendaal <ton@blender.org>2006-01-28 18:21:04 +0300
commit45c7b2c5c2bc20296a581e1b6a1cb3908f11732f (patch)
tree3c84b86ee52f12f5ae967791182ce71e003abee4 /source/blender/src/butspace.c
parent80bd3a1e9897044334d3384be27b52efc6541fef (diff)
Orange: made Compositing more interactive. It now has an event based
system tracking changes in nodes, making sure only these nodes and the ones that depend, are executed. Further the 'time cursor' now counts down to indicate which node is being done. Also: you now can disable the "use nodes" button in the header, edit all changes, and when you press that button again it nicely executes the changes. Still on the todo: - make compositing threaded - find a way to nicely exit compositing on input events... so the UI keeps being responsive - idea; a 'percentage' menu in header to enforce calculations on smaller images temporally
Diffstat (limited to 'source/blender/src/butspace.c')
-rw-r--r--source/blender/src/butspace.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/source/blender/src/butspace.c b/source/blender/src/butspace.c
index 93d97372ec5..e3f6a1d5515 100644
--- a/source/blender/src/butspace.c
+++ b/source/blender/src/butspace.c
@@ -42,6 +42,7 @@
#include "MEM_guardedalloc.h"
#include "DNA_color_types.h"
+#include "DNA_material_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
@@ -52,12 +53,14 @@
#include "BKE_colortools.h"
#include "BKE_global.h"
#include "BKE_main.h"
+#include "BKE_material.h"
#include "BKE_library.h"
#include "BKE_utildefines.h"
#include "BLI_blenlib.h"
#include "BSE_drawview.h" // for do_viewbuttons.c .... hurms
+#include "BSE_node.h"
#include "BIF_gl.h"
#include "BIF_graphics.h"
@@ -470,6 +473,26 @@ void curvemap_buttons(uiBlock *block, CurveMapping *cumap, char labeltype, short
/* --------------------------------- */
+/* nodes have button callbacks, that can draw in butspace too. need separate handling */
+static void do_node_buts(unsigned short event)
+{
+ Material *ma;
+
+ /* all operations default on active material layer here */
+ /* but this also gets called for lamp and world... */
+ ma= G.buts->lockpoin;
+ if(ma && GS(ma->id.name)==ID_MA)
+ ma = editnode_get_active_material(ma);
+ else
+ ma= NULL;
+
+ if(event>=B_NODE_EXEC) {
+ if(ma) end_render_material(ma); /// temporal... 3d preview
+ BIF_preview_changed(ID_MA);
+ allqueue(REDRAWNODE, 0);
+ allqueue(REDRAWBUTSSHADING, 0);
+ }
+}
void do_butspace(unsigned short event)
{
@@ -566,6 +589,9 @@ void do_butspace(unsigned short event)
extern void do_modifier_panels(unsigned short event);
do_modifier_panels(event);
}
+ else if(event<=B_NODE_BUTS) {
+ do_node_buts(event);
+ }
else if(event==REDRAWVIEW3D) allqueue(event, 1); // 1=do header too
else if(event>REDRAWVIEW3D) allqueue(event, 0);
}