Material Node trees needed support in IpoWindow still, it was only showing
the Ipo for the (defunct) base material. Now it follows the active Node.
This commit is contained in:
Ton Roosendaal 2006-06-26 11:01:09 +00:00
parent e5818d46ef
commit 3ffdc5a83b
4 changed files with 9 additions and 2 deletions

@ -2569,6 +2569,7 @@ void do_matbuts(unsigned short event)
BIF_preview_changed(ID_MA); BIF_preview_changed(ID_MA);
allqueue(REDRAWNODE, 0); allqueue(REDRAWNODE, 0);
allqueue(REDRAWBUTSSHADING, 0); allqueue(REDRAWBUTSSHADING, 0);
allqueue(REDRAWIPO, 0);
} }
break; break;
} }

@ -108,6 +108,7 @@
#include "BSE_edit.h" #include "BSE_edit.h"
#include "BSE_drawview.h" #include "BSE_drawview.h"
#include "BSE_headerbuttons.h" #include "BSE_headerbuttons.h"
#include "BSE_node.h"
#include "blendef.h" #include "blendef.h"
#include "mydevice.h" #include "mydevice.h"
@ -1032,6 +1033,7 @@ static void get_ipo_context(short blocktype, ID **from, Ipo **ipo, char *actname
else if(blocktype==ID_MA) { else if(blocktype==ID_MA) {
if(ob) { if(ob) {
Material *ma= give_current_material(ob, ob->actcol); Material *ma= give_current_material(ob, ob->actcol);
ma= editnode_get_active_material(ma);
*from= (ID *)ma; *from= (ID *)ma;
if(ma) *ipo= ma->ipo; if(ma) *ipo= ma->ipo;
} }
@ -2196,8 +2198,10 @@ void common_insertkey(void)
int tab= G.buts->tab[CONTEXT_SHADING]; int tab= G.buts->tab[CONTEXT_SHADING];
if(tab==TAB_SHADING_MAT) { if(tab==TAB_SHADING_MAT) {
id= G.buts->lockpoin;
ma = G.buts->lockpoin; ma = G.buts->lockpoin;
ma = editnode_get_active_material(ma);
id = (ID *)ma;
if(id) { if(id) {
event= pupmenu("Insert Key %t|RGB%x0|Alpha%x1|Halo Size%x2|Mode %x3|All Color%x10|All Mirror%x14|Ofs%x12|Size%x13|All Mapping%x11"); event= pupmenu("Insert Key %t|RGB%x0|Alpha%x1|Halo Size%x2|Mode %x3|All Color%x10|All Mirror%x14|Ofs%x12|Size%x13|All Mapping%x11");
if(event== -1) return; if(event== -1) return;

@ -420,6 +420,7 @@ static void node_set_active(SpaceNode *snode, bNode *node)
BIF_preview_changed(-1); /* temp hack to force texture preview to update */ BIF_preview_changed(-1); /* temp hack to force texture preview to update */
allqueue(REDRAWBUTSSHADING, 1); allqueue(REDRAWBUTSSHADING, 1);
allqueue(REDRAWIPO, 0);
} }
else if(snode->treetype==NTREE_COMPOSIT) { else if(snode->treetype==NTREE_COMPOSIT) {
/* make active viewer, currently only 1 supported... */ /* make active viewer, currently only 1 supported... */

@ -80,6 +80,7 @@ void do_node_buttons(ScrArea *sa, unsigned short event)
BIF_preview_changed(ID_MA); BIF_preview_changed(ID_MA);
allqueue(REDRAWNODE, 0); allqueue(REDRAWNODE, 0);
allqueue(REDRAWBUTSSHADING, 0); allqueue(REDRAWBUTSSHADING, 0);
allqueue(REDRAWIPO, 0);
} }
break; break;