Bugfix: yafray export crash if new hsv texture blend types were
used, the code here needed to be updated.
This commit is contained in:
@@ -367,6 +367,7 @@ typedef struct TexMapping {
|
||||
#define MTEX_BLEND_SAT 11
|
||||
#define MTEX_BLEND_VAL 12
|
||||
#define MTEX_BLEND_COLOR 13
|
||||
#define MTEX_NUM_BLENDTYPES 14
|
||||
|
||||
/* **************** EnvMap ********************* */
|
||||
|
||||
|
||||
@@ -881,7 +881,7 @@ void yafrayFileRender_t::writeShader(const string &shader_name, Material* matr,
|
||||
ostr << "\t\t<input value=\"" << shader_name << "_map" << m2 << "\" />\n";
|
||||
|
||||
// blendtype, would have been nice if the order would have been the same as for ramps...
|
||||
const string blendtype[9] = {"mix", "mul", "add", "sub", "divide", "darken", "difference", "lighten", "screen"};
|
||||
const string blendtype[MTEX_NUM_BLENDTYPES] = {"mix", "mul", "add", "sub", "divide", "darken", "difference", "lighten", "screen", "hue", "sat", "val", "color"};
|
||||
ostr << "\t\t<mode value=\"" << blendtype[(int)mtex->blendtype] << "\" />\n";
|
||||
|
||||
// texture color (for use with MUL and/or no_rgb etc..)
|
||||
|
||||
@@ -782,7 +782,7 @@ void yafrayPluginRender_t::writeShader(const string &shader_name, Material* matr
|
||||
mparams["input"] = yafray::parameter_t(shader_name + temp);
|
||||
|
||||
// blendtype, would have been nice if the order would have been the same as for ramps...
|
||||
const string blendtype[9] = {"mix", "mul", "add", "sub", "divide", "darken", "difference", "lighten", "screen"};
|
||||
const string blendtype[MTEX_NUM_BLENDTYPES] = {"mix", "mul", "add", "sub", "divide", "darken", "difference", "lighten", "screen", "hue", "sat", "val", "color"};
|
||||
mparams["mode"] = yafray::parameter_t(blendtype[(int)mtex->blendtype]);
|
||||
|
||||
// texture color (for use with MUL and/or no_rgb etc..)
|
||||
|
||||
Reference in New Issue
Block a user