different background colors
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
different background colors
Is there a way to set the background colors for different 3D Views independently?
- Attachments
-
- bp_308.png (64.2 KiB) Viewed 528 times
Re: different background colors
I think it should be possible from pivy:
Code: Select all
Gui.ActiveDocument.ActiveView.getViewer().getSoRenderManager()
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: different background colors
thank you, it works
Code: Select all
p=FreeCAD.ParamGet("User parameter:BaseApp/Preferences/View")
p.SetBool("Gradient",False)
sorendermanager=Gui.ActiveDocument.ActiveView.getViewer().getSoRenderManager()
sorendermanager.setBackgroundColor(coin.SbColor4f(1, 0, 0, 0.5))
sorendermanager.activate()
sorendermanager.render(True, True)