Last active
May 6, 2019 06:43
-
-
Save raganmd/e3bf539788f6ddc28bc84778ea9514f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def my_pars_to_dict(p_name): | |
# create empty par_dict with input name as the preset_name value | |
par_dict = { | |
"preset_name" : p_name, | |
"preset_vals" : { | |
"Blacklevel" : op('base1').par.Blacklevel.val, | |
"Contrast" : op('base1').par.Contrast.val, | |
"Opacity" : op('base1').par.Opacity.val | |
} | |
} | |
return par_dict | |
# example use | |
p_name = "Preset001" | |
presets = my_pars_to_dict(p_name) | |
print(presets) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment