diff options
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_material_types.h | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h index 5ef327502e1..395c438c6e3 100644 --- a/source/blender/makesdna/DNA_material_types.h +++ b/source/blender/makesdna/DNA_material_types.h @@ -34,10 +34,9 @@ #ifndef DNA_MATERIAL_TYPES_H #define DNA_MATERIAL_TYPES_H -/* #include "BLI_listBase.h" */ - #include "DNA_ID.h" #include "DNA_scriptlink_types.h" +#include "DNA_listBase.h" #ifndef MAX_MTEX #define MAX_MTEX 10 @@ -48,20 +47,32 @@ struct Ipo; struct Material; struct ColorBand; +typedef struct MaterialLayer { + struct MaterialLayer *next, *prev; + + struct Material *mat; + float blendfac; + short flag, blendmethod, menunr, pad; + int pad2; + +} MaterialLayer; + /* WATCH IT: change type? also make changes in ipo.h */ typedef struct Material { ID id; short colormodel, lay; /* lay: for dynamics (old engine, until 2.04) */ + /* note, keep this below synced with render_types.h */ float r, g, b; float specr, specg, specb; float mirr, mirg, mirb; float ambr, ambb, ambg; - float amb, emit, ang, spectra, ray_mirror; float alpha, ref, spec, zoffs, add; float translucency; + /* end synced with render_types.h */ + float fresnel_mir, fresnel_mir_i; float fresnel_tra, fresnel_tra_i; float filter; /* filter added, for raytrace transparency */ @@ -69,16 +80,15 @@ typedef struct Material { short har; char seed1, seed2; - int mode; - int mode2; /* even more material settings :) */ + int mode, mode_l; /* mode_l is the or-ed result of all layer modes */ short flarec, starc, linec, ringc; float hasize, flaresize, subsize, flareboost; float strand_sta, strand_end, strand_ease; + float pad1; /* for buttons and render*/ char rgbsel, texact, pr_type, pad; - short pr_back, pr_lamp, septex, pad4; - int pad5; + short pr_back, pr_lamp, septex, ml_flag; /* ml_flag is for disable base material */ /* shaders */ short diff_shader, spec_shader; @@ -97,6 +107,7 @@ typedef struct Material { float rampfac_col, rampfac_spec; struct MTex *mtex[10]; + ListBase layers; struct Ipo *ipo; /* dynamic properties */ @@ -107,7 +118,7 @@ typedef struct Material { /* yafray: absorption color, dispersion parameters and material preset menu */ float YF_ar, YF_ag, YF_ab, YF_dscale, YF_dpwr; int YF_dsmp, YF_preset, YF_djit; - + ScriptLink scriptlink; } Material; @@ -161,7 +172,7 @@ typedef struct Material { #define MA_DIFF_LAMBERT 0 #define MA_DIFF_ORENNAYAR 1 #define MA_DIFF_TOON 2 -#define MA_DIFF_MINNAERT 3 +#define MA_DIFF_MINNAERT 3 /* spec_shader */ #define MA_SPEC_COOKTORR 0 @@ -224,6 +235,7 @@ typedef struct Material { #define MAP_AMB 2048 #define MAP_DISPLACE 4096 #define MAP_WARP 8192 +#define MAP_LAYER 16384 /* pr_type */ #define MA_FLAT 0 @@ -233,5 +245,13 @@ typedef struct Material { /* pr_back */ #define MA_DARK 1 +/* MaterialLayer flag */ +#define ML_ACTIVE 1 +#define ML_RENDER 2 +#define ML_NEG_NORMAL 4 +#define ML_DIFFUSE 8 +#define ML_SPECULAR 16 +#define ML_ALPHA 32 + #endif |