forked from bartvdbraak/blender
Bugfix #4497
When using Node Shaders, the OpenGL color (solid drawmode) in 3d window was still using the base Material only. That's a bit counter-intuitive yes... i've replaced this with a function that checks for the active material node color. Not perfect, but at least interactive.
This commit is contained in:
parent
8d2f04ac74
commit
4d45723dd1
@ -108,9 +108,10 @@
|
|||||||
#include "BDR_editobject.h"
|
#include "BDR_editobject.h"
|
||||||
#include "BDR_vpaint.h"
|
#include "BDR_vpaint.h"
|
||||||
|
|
||||||
#include "BSE_view.h"
|
|
||||||
#include "BSE_drawview.h"
|
#include "BSE_drawview.h"
|
||||||
|
#include "BSE_node.h"
|
||||||
#include "BSE_trans_types.h"
|
#include "BSE_trans_types.h"
|
||||||
|
#include "BSE_view.h"
|
||||||
|
|
||||||
#include "blendef.h"
|
#include "blendef.h"
|
||||||
#include "mydevice.h"
|
#include "mydevice.h"
|
||||||
@ -189,6 +190,7 @@ static int init_gl_materials(Object *ob, int check_alpha)
|
|||||||
|
|
||||||
for(a=1; a<=ob->totcol; a++) {
|
for(a=1; a<=ob->totcol; a++) {
|
||||||
ma= give_current_material(ob, a);
|
ma= give_current_material(ob, a);
|
||||||
|
ma= editnode_get_active_material(ma);
|
||||||
if(ma==NULL) ma= &defmaterial;
|
if(ma==NULL) ma= &defmaterial;
|
||||||
if(a<MAXMATBUF) {
|
if(a<MAXMATBUF) {
|
||||||
matbuf[a][0][0]= (ma->ref+ma->emit)*ma->r;
|
matbuf[a][0][0]= (ma->ref+ma->emit)*ma->r;
|
||||||
|
Loading…
Reference in New Issue
Block a user