Skip to content

Commit

Permalink
CE-NONE: always initialize blendmode correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
mlippEsriCom committed Jun 12, 2019
1 parent 0f573d8 commit d826284
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/client/node/PRTMaterialNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,9 @@ MStatus PRTMaterialNode::compute(const MPlug& plug, MDataBlock& block)
mShadingCmd += "setAttr ($shName+\".initgraph\") true;\n";
mShadingCmd += "connectAttr -force ($shName + \".outColor\") ($sgName + \".surfaceShader\");\n";

if (matInfo.opacityMap.size() == 0 && matInfo.opacity >= 1.0) {
mShadingCmd += "$shadingNodeIndex = `shaderfx -sfxnode $shName -getNodeIDByName \"Standard_Base\"`;\n";
mShadingCmd += "shaderfx - sfxnode $shName - edit_stringlist $shadingNodeIndex blendmode 0;\n";
}
MString blendMode = (matInfo.opacityMap.size() == 0 && matInfo.opacity >= 1.0) ? "0": "1";
mShadingCmd += "$shadingNodeIndex = `shaderfx -sfxnode $shName -getNodeIDByName \"Standard_Base\"`;\n";
mShadingCmd += "shaderfx - sfxnode $shName - edit_stringlist $shadingNodeIndex blendmode "+ blendMode +";\n";

//ignored: ambientColor, specularColor
setAttribute(mShadingCmd, matInfo.diffuseColor, 3, "diffuse_color");
Expand Down

0 comments on commit d826284

Please sign in to comment.