add missing changes.

pull/2370/head
Kim Kulling 2019-03-13 19:35:36 +01:00
parent 0a731a0bff
commit 145c3d1589
2 changed files with 8 additions and 6 deletions

View File

@ -320,13 +320,10 @@ void LWOImporter::ConvertMaterial(const LWO::Surface& surf,aiMaterial* pcMat)
// opacity ... either additive or default-blended, please // opacity ... either additive or default-blended, please
if (0.0 != surf.mAdditiveTransparency) { if (0.0 != surf.mAdditiveTransparency) {
const int add = aiBlendMode_Additive; const int add = aiBlendMode_Additive;
pcMat->AddProperty(&surf.mAdditiveTransparency,1,AI_MATKEY_OPACITY); pcMat->AddProperty(&surf.mAdditiveTransparency,1,AI_MATKEY_OPACITY);
pcMat->AddProperty(&add,1,AI_MATKEY_BLEND_FUNC); pcMat->AddProperty(&add,1,AI_MATKEY_BLEND_FUNC);
} } else if (10e10f != surf.mTransparency) {
else if (10e10f != surf.mTransparency) {
const int def = aiBlendMode_Default; const int def = aiBlendMode_Default;
const float f = 1.0f-surf.mTransparency; const float f = 1.0f-surf.mTransparency;
pcMat->AddProperty(&f,1,AI_MATKEY_OPACITY); pcMat->AddProperty(&f,1,AI_MATKEY_OPACITY);

View File

@ -912,6 +912,13 @@ extern "C" {
#define AI_MATKEY_COLOR_TRANSPARENT "$clr.transparent",0,0 #define AI_MATKEY_COLOR_TRANSPARENT "$clr.transparent",0,0
#define AI_MATKEY_COLOR_REFLECTIVE "$clr.reflective",0,0 #define AI_MATKEY_COLOR_REFLECTIVE "$clr.reflective",0,0
#define AI_MATKEY_GLOBAL_BACKGROUND_IMAGE "?bg.global",0,0 #define AI_MATKEY_GLOBAL_BACKGROUND_IMAGE "?bg.global",0,0
#define AI_MATKEY_GLOBAL_SHADERLANG "?sh.lang",0,0
#define AI_MATKEY_SHADER_VERTEX "?sh.vs",0,0
#define AI_MATKEY_SHADER_FRAGMENT "?sh.fs",0,0
#define AI_MATKEY_SHADER_GEO "?sh.gs",0,0
#define AI_MATKEY_SHADER_TESSELATION "?sh.ts",0,0
#define AI_MATKEY_SHADER_PRIMITIVE "?sh.ps",0,0
#define AI_MATKEY_SHADER_COMPUTE "?sh.cs",0,0
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Pure key names for all texture-related properties // Pure key names for all texture-related properties
@ -1455,8 +1462,6 @@ inline aiReturn aiGetMaterialInteger(const C_STRUCT aiMaterial* pMat,
#endif //!__cplusplus #endif //!__cplusplus
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @brief Retrieve a color value from the material property table /** @brief Retrieve a color value from the material property table
* *