Dark mode and customizing highlight colors to prevent flashing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
TLDR : How to get Fusion in dark mode and prevent flashing highlights (work in progress)
NOTE 1 : I'm on a windows machine.
NOTE 2 : Always back up your system files before editing.
Close Fusion before edit, restart after.
NOTE 3 : If you choose to follow these instructions, you do so at your own risk.
Ok, so earlier today I started a topic asking about customizing the xml files for environment to prevent the (extreme) flashing of highlighted items. From what I have read this has been a serious issue for many user that has not yet(?) been properly addressed by Autodesk.
So I spend my Sunday to find a somewhat workable solution, this is now:
Most important change, no more seizure triggering flashes when moving my mouse over the model. I still need to tweak some settings for sketching. I could actually use some help in finding the right parameters.
By posting my steps I hope to help out others, provide some feedback to developers and get some input for finding the right parameters for the xml('s).
1. Setting the dark blue theme.
Got to preferences > Preview features > Enable UI Themes
After doing that you could set your environment to Theme (default)
Yeah you would have a dark theme but the flashing highlights are probably even more annoying in dark mode. So editing the xml file would be the next step... At this point I have no idea where to find the xml for the 'Theme' environment to tweak the flashing.
Since I figured out how to get rid of the flashing in 'Photo booth' I switched my environment back to that. This got me a dark mode with a solid white background, awesome...
But that can be changed by editing PhotoBooth.xml
So where is that file? Well... you can find and edit it:
1. Manually
2. Use my script posted below
1. Manually
On windows the file should be in:
C:\Users\__USERNAME__\AppData\Local\Autodesk\webdeploy\production\
__random_hexcode_folder__\
Neutron\Server\Scene\Resources\Environments\PhotoBooth\PhotoBooth.xml
You should look for the most recent __random_hexcode_folder__ that has the Neutron\Server\Scene\Resources\Environments\PhotoBooth\PhotoBooth.xml file in it.
Edit the parameters to your needs or replace with the attached PhotoBooth.xml file
2. Use my Python script
If you made it this far I hope you know how to (edit and) run python scripts.
Adapt the script as needed and run to edit your PhotoBooth.xml file
Script:
import os, re
username = '__username__'
root = f'C:/Users/{username}/AppData/Local/Autodesk/webdeploy/production'
target_dir = 'Neutron/Server/Scene/Resources/Environments/PhotoBooth'
target_file = 'PhotoBooth.xml'
BaseColorRGBA = '0.5 0.5 0.5 0'
UseBase = '1'
BackFaceColorRGBA = '0 0 0 0'
HaloColorRGBA = '1 1 1 0.25'
HaloWidth = '2'
UseHalo = '1'
QuickHalo = '0'
LineColorRGBA = '0 0 0 1'
UseLines = '1'
LinesWidth = '2'
HiddenLineColorRGBA = '0 0 0 0.2'
UseHiddenLines = '1'
GlowColorRGBA = '0.3, 0.47, 0.84, 0.33'
UseGlow = '0'
BlurWeight = '0'
DilateOne = '1'
new_highlight_values = f'''BaseColorRGBA="{BaseColorRGBA}" BackFaceColorRGBA="{BackFaceColorRGBA}" HaloColorRGBA="{HaloColorRGBA}" HiddenLineColorRGBA="{HiddenLineColorRGBA}" LineColorRGBA="{LineColorRGBA}" GlowColorRGBA = "{GlowColorRGBA}"
BlurWeight="{BlurWeight}" HaloWidth="{HaloWidth}" LinesWidth="{LinesWidth}" UseBase="{UseBase}" UseGlow="{UseGlow}" UseHalo="{UseHalo}" UseHiddenLines="{UseHiddenLines}" UseLines="{UseLines}" QuickHalo="{QuickHalo}" DilateOne="{DilateOne}"'''
new_background_value = '0.2352 0.2705 0.3254'
def get_dirs_in_root(path):
# Dictionary {'dir_name':timestamp, ...}
dir_dict = {}
for f in os.listdir(path):
if os.path.isdir(os.path.join(path, f)):
time_modified = round(os.path.getmtime(os.path.join(path, f)))
dir_dict[f] = time_modified
# Sort by modified timestamp in descending order
dir_dict = dict(sorted(dir_dict.items(), key=lambda item: item[1], reverse=True))
dir_list = list(dir_dict.keys())
return dir_list
def get_file_path(dir_list):
for dir in dir_list:
file_path = f'{root}/{dir}/{target_dir}/{target_file}'
if os.path.isfile(file_path):
return file_path
def replace(file_path, start_tag, end_tag, replace_with):
with open(file_path, 'r') as file:
content = file.read()
pattern = f'{re.escape(start_tag)}(.*?){re.escape(end_tag)}'
new_content = re.sub(pattern, f'{start_tag}{replace_with}{end_tag}', content, flags=re.DOTALL)
with open(file_path, 'w') as file:
file.write(new_content)
# Get a list of directories in root folder, sorted by timestamp descending
dirs_in_root = get_dirs_in_root(root)
# Now search for the most recent directory containing 'target'
file_path = get_file_path(dirs_in_root)
# Open the file and replace highlight values
start_tag = '<HighlightEffectInfo '
end_tag = '/>'
replace(file_path, start_tag, end_tag, new_highlight_values)
# Open the file and replace background values
start_tag = '<Background RGB="'
end_tag = '" />'
replace(file_path, start_tag, end_tag, new_background_value)