Path: blob/main/cad/freecad/files/patch-src_Mod_Raytracing_App_LuxFeature.cpp
16151 views
--- src/Mod/Raytracing/App/LuxFeature.cpp.orig 2019-10-04 10:45:53 UTC1+++ src/Mod/Raytracing/App/LuxFeature.cpp2@@ -88,23 +88,23 @@ App::DocumentObjectExecReturn *LuxFeature::execute(voi3const App::Color& c = Color.getValue();4long t = Transparency.getValue();5if (t == 0) {6- result << "MakeNamedMaterial \"FreeCADMaterial_" << Name << "\"" << endl7- << " \"color Kd\" [" << c.r << " " << c.g << " " << c.b << "]" << endl8- << " \"float sigma\" [0.000000000000000]" << endl9- << " \"string type\" [\"matte\"]" << endl << endl;10+ result << "MakeNamedMaterial \"FreeCADMaterial_" << Name << "\"" << std::endl11+ << " \"color Kd\" [" << c.r << " " << c.g << " " << c.b << "]" << std::endl12+ << " \"float sigma\" [0.000000000000000]" << std::endl13+ << " \"string type\" [\"matte\"]" << std::endl << std::endl;14} else {15float trans = t/100.0f;16- result << "MakeNamedMaterial \"FreeCADMaterial_Base_" << Name << "\"" << endl17- << " \"color Kd\" [" << c.r << " " << c.g << " " << c.b << "]" << endl18- << " \"float sigma\" [0.000000000000000]" << endl19- << " \"string type\" [\"matte\"]" << endl << endl20- << "MakeNamedMaterial \"FreeCADMaterial_Null_" << Name << "\"" << endl21- << " \"string type\" [\"null\"]" << endl << endl22- << "MakeNamedMaterial \"FreeCADMaterial_" << Name << "\"" << endl23- << " \"string namedmaterial1\" [\"FreeCADMaterial_Null_" << Name << "\"]" << endl24- << " \"string namedmaterial2\" [\"FreeCADMaterial_Base_" << Name << "\"]" << endl25- << " \"float amount\" [" << trans << "]" << endl26- << " \"string type\" [\"mix\"]" << endl << endl;27+ result << "MakeNamedMaterial \"FreeCADMaterial_Base_" << Name << "\"" << std::endl28+ << " \"color Kd\" [" << c.r << " " << c.g << " " << c.b << "]" << std::endl29+ << " \"float sigma\" [0.000000000000000]" << std::endl30+ << " \"string type\" [\"matte\"]" << std::endl << std::endl31+ << "MakeNamedMaterial \"FreeCADMaterial_Null_" << Name << "\"" << std::endl32+ << " \"string type\" [\"null\"]" << std::endl << std::endl33+ << "MakeNamedMaterial \"FreeCADMaterial_" << Name << "\"" << std::endl34+ << " \"string namedmaterial1\" [\"FreeCADMaterial_Null_" << Name << "\"]" << std::endl35+ << " \"string namedmaterial2\" [\"FreeCADMaterial_Base_" << Name << "\"]" << std::endl36+ << " \"float amount\" [" << trans << "]" << std::endl37+ << " \"string type\" [\"mix\"]" << std::endl << std::endl;38}3940LuxTools::writeShape(result,Name.c_str(),shape);414243