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:
parent
f357e045de
commit
13fea20cdd
|
@ -97,12 +97,8 @@ void ViewProviderDatum::attach(App::DocumentObject *obj)
|
||||||
hints->shapeType.setValue(SoShapeHints::UNKNOWN_SHAPE_TYPE);
|
hints->shapeType.setValue(SoShapeHints::UNKNOWN_SHAPE_TYPE);
|
||||||
hints->vertexOrdering.setValue(SoShapeHints::COUNTERCLOCKWISE);
|
hints->vertexOrdering.setValue(SoShapeHints::COUNTERCLOCKWISE);
|
||||||
SoMaterialBinding* bind = new SoMaterialBinding();
|
SoMaterialBinding* bind = new SoMaterialBinding();
|
||||||
SoTransparencyType* ttype = new SoTransparencyType();
|
|
||||||
ttype->value.setValue(SoGLRenderAction::BLEND);
|
|
||||||
SoDrawStyle* fstyle = new SoDrawStyle();
|
SoDrawStyle* fstyle = new SoDrawStyle();
|
||||||
fstyle->style = SoDrawStyle::FILLED;
|
fstyle->style = SoDrawStyle::FILLED;
|
||||||
SoNormalBinding* normb = new SoNormalBinding();
|
|
||||||
normb->value = SoNormalBinding::PER_VERTEX_INDEXED;
|
|
||||||
SoBaseColor* color = new SoBaseColor();
|
SoBaseColor* color = new SoBaseColor();
|
||||||
color->rgb.setValue(0.9f, 0.9f, 0.3f);
|
color->rgb.setValue(0.9f, 0.9f, 0.3f);
|
||||||
SoSeparator* sep = new SoSeparator();
|
SoSeparator* sep = new SoSeparator();
|
||||||
|
@ -111,9 +107,7 @@ void ViewProviderDatum::attach(App::DocumentObject *obj)
|
||||||
|
|
||||||
sep->addChild(hints);
|
sep->addChild(hints);
|
||||||
sep->addChild(bind);
|
sep->addChild(bind);
|
||||||
sep->addChild(ttype);
|
|
||||||
sep->addChild(fstyle);
|
sep->addChild(fstyle);
|
||||||
sep->addChild(normb);
|
|
||||||
sep->addChild(color);
|
sep->addChild(color);
|
||||||
sep->addChild(ps);
|
sep->addChild(ps);
|
||||||
sep->addChild(pShapeSep);
|
sep->addChild(pShapeSep);
|
||||||
|
|
|
@ -58,7 +58,7 @@ ViewProviderDatumPlane::ViewProviderDatumPlane()
|
||||||
{
|
{
|
||||||
SoMaterial* material = new SoMaterial();
|
SoMaterial* material = new SoMaterial();
|
||||||
material->diffuseColor.setValue(0.9f, 0.9f, 0.13f);
|
material->diffuseColor.setValue(0.9f, 0.9f, 0.13f);
|
||||||
material->transparency.setValue(0.2f);
|
material->transparency.setValue(0.5f);
|
||||||
pShapeSep->addChild(material);
|
pShapeSep->addChild(material);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user