[ Solved ] Quickly switch background color
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
[ Solved ] Quickly switch background color
Hi
Does exist a way to switch the 3D view background color without opening user preference panel?
I ask this because I use a white background for screenshot and the blue gradients one for modeling.
Thanks!
Does exist a way to switch the 3D view background color without opening user preference panel?
I ask this because I use a white background for screenshot and the blue gradients one for modeling.
Thanks!
Last edited by flachyjoe on Thu Jul 19, 2018 9:07 am, edited 1 time in total.
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: Quickly switch background color
you can write your macro
just look, what are the roght color value for your case
rGrp=FreeCAD.ParamGet('User parameter:BaseApp/Preferences/View')
atr="HeadlightIntensity"
rGrp.SetInt(atr,100)
rGrp=FreeCAD.ParamGet('User parameter:BaseApp/Preferences/View')
atr="BackgroundColor"
rGrp.SetUnsigned(atr,1437270015)
just look, what are the roght color value for your case
rGrp=FreeCAD.ParamGet('User parameter:BaseApp/Preferences/View')
atr="HeadlightIntensity"
rGrp.SetInt(atr,100)
rGrp=FreeCAD.ParamGet('User parameter:BaseApp/Preferences/View')
atr="BackgroundColor"
rGrp.SetUnsigned(atr,1437270015)
Re: Quickly switch background color
I recently worked on the wiki and would have appreciated such a whitening function.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Quickly switch background color
Thank you !
Solved with :
I manually set the simple color as white in user pref.
Solved with :
Code: Select all
rGrp=FreeCAD.ParamGet('User parameter:BaseApp/Preferences/View')
attr = 'Gradient'
curval = rGrp.GetBool(attr)
rGrp.SetBool(attr, not curval)
Gui.activeView().redraw()
Re: [ Solved ] Quickly switch background color
Could not get microelly2's code working. flachyjoe's works.
OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13976 (Git)
Build type: Release
Branch: (HEAD detached at fae0de5)
Hash: fae0de58581694157a97d567c151bdce75d387dc
Python version: 2.7.15
Qt version: 5.11.0
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)
OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13976 (Git)
Build type: Release
Branch: (HEAD detached at fae0de5)
Hash: fae0de58581694157a97d567c151bdce75d387dc
Python version: 2.7.15
Qt version: 5.11.0
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: [ Solved ] Quickly switch background color
The built-in save picture doesn't work on some Macs since mid 0.17 times. That's not really an issue for me, because the standard screenshot tool serves the purpose very well; I can select the rectangle to be shot making the screenshots smaller and usually more focused on the matter.
Message is:
Message is:
Code: Select all
<unknown exception traceback><type 'exceptions.RuntimeError'>: Cannot save null image.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: [ Solved ] Quickly switch background color
You're right but as the settings are not saved between Save Picture calls, it's not as quick as a macro button in toolbar.