Hi, i’ve just created my first addon and want some feedback. this is my first real python project so i could really need some advice. the script generates a nested list from the paths where the theme settings are. then it uses the pickle module to save the list to a file. to open a theme file is just a matter of iterating through the list.
it’s designed to be low maintenance and should work even if new settings are added to the theme options.
however, i wouldn’t like to use the file browser to open a theme, but rather a dropdown menu which is generated by files in a specific directory. also the filebrowser for the save operator should default to the same standard directory. can anyone give me some hints on how to achieve this?
also general feedback is much welcome as i am a python newbie.
First version
here is a link to the addon together with two themes (one custom dark made by me + the default). Just rename it to “.zip” and unzip it pasteall
Update 1
Here is a new version that uses zip compression to minimize the size of theme files. LINK - rename to .zip
(for some reason, the “original” theme does not match the blender original, but that’s not the scripts fault but mine, just save a new original if you want)
Update 2 (current)
sorry for too frequent small updates, but this is a fix that gives higher precision to floats (previous implementations rounded them but this became unnecessary when compression was implemented). LINK Theme examples (rename to .zip)
Ricky,
The first link he provided is a link to pasteall with the script. I just copy the script and made a new file under my addons directory. After that, in user preferences there are buttons at the bottom to load and save themes.
@RickyBlender
Currently Themes can not be saved in 2.5 that’s what this addon is for as it creates a “.btheme” file on your hard drive. if you want to be sure about your current theme, i’d suggest you backup the startup.blend. however you can also save the theme with the plugin before you do anything else and load the file (with the plugin again) to restore it. and yes, it does not alter user preferences.
but i tough this could be done a few months ago !
is it temporary of will never be able to save theme again ?
i mean i know they crated several new files and tough this would be like in 2.49 !
but if not save then your script will be very userfull indeed !
@RickyBlender, i know that theme saving is on the blender todo, but if this script turns out to be sufficient, maybe it could be made official, i don’t know. i’m probably using to many newbie hacks in the code though. and it’s not done, i’d like the interaction to be a little different as described in the first post