Coin nodes have a "override" property that could be useful for that purpose.
But I am not sure it would offer enough flexibility, because the whole materials of the objects are overridden, while we would probably want to override the transparency only.
Here is a little piece of code to give a try :
from pivy import coin
# create a coin material with transparency and override property
mat = coin.SoMaterial()
mat.setOverride(True)
mat.transparency = 0.8
# insert the material at the top of the scenegraph
sg = Gui.ActiveDocument.ActiveView.getSceneGraph()
sg.insertChild(mat,1)
# uncomment the last line to remove the material
# and to get back the objects in their original state
#sg.removeChild(mat)
NormandC wrote: ↑Sat Mar 31, 2018 6:27 am
...
Agreed, but who will do it?
Please search the tracker first, it may exist already...
Politeness made me leave this for the OP
Made a few searches with what I thought to be relevant keywords but couldn't find existing issues, so here it is https://freecadweb.org/tracker/view.php?id=3414
Chris_G wrote: ↑Sat Mar 31, 2018 8:37 am
Coin nodes have a "override" property that could be useful for that purpose.
But I am not sure it would offer enough flexibility, because the whole materials of the objects are overridden, while we would probably want to override the transparency only.
True that it would be better, but it would nevertheless be handy in many cases !
Chris_G wrote: ↑Sat Mar 31, 2018 8:37 am
Here is a little piece of code to give a try :
I don't think that is what was meant here, the "x-ray" term used is just some stupid fancy name borrowed from sketchup, in my interpretation the request was just for a draw style that forces transparency on all objects.