fix datum plane transparency

one can not change the transparany type in the scene graph. Furthermore no normals are used, hence no normal binding is needed.
This commit is contained in:
Stefan Tröger 2015-05-03 10:44:33 +02:00
parent f357e045de
commit 13fea20cdd
2 changed files with 1 additions and 7 deletions

View File

@ -97,12 +97,8 @@ void ViewProviderDatum::attach(App::DocumentObject *obj)
hints->shapeType.setValue(SoShapeHints::UNKNOWN_SHAPE_TYPE);
hints->vertexOrdering.setValue(SoShapeHints::COUNTERCLOCKWISE);
SoMaterialBinding* bind = new SoMaterialBinding();
SoTransparencyType* ttype = new SoTransparencyType();
ttype->value.setValue(SoGLRenderAction::BLEND);
SoDrawStyle* fstyle = new SoDrawStyle();
fstyle->style = SoDrawStyle::FILLED;
SoNormalBinding* normb = new SoNormalBinding();
normb->value = SoNormalBinding::PER_VERTEX_INDEXED;
SoBaseColor* color = new SoBaseColor();
color->rgb.setValue(0.9f, 0.9f, 0.3f);
SoSeparator* sep = new SoSeparator();
@ -111,9 +107,7 @@ void ViewProviderDatum::attach(App::DocumentObject *obj)
sep->addChild(hints);
sep->addChild(bind);
sep->addChild(ttype);
sep->addChild(fstyle);
sep->addChild(normb);
sep->addChild(color);
sep->addChild(ps);
sep->addChild(pShapeSep);

View File

@ -58,7 +58,7 @@ ViewProviderDatumPlane::ViewProviderDatumPlane()
{
SoMaterial* material = new SoMaterial();
material->diffuseColor.setValue(0.9f, 0.9f, 0.13f);
material->transparency.setValue(0.2f);
material->transparency.setValue(0.5f);
pShapeSep->addChild(material);
}