So I want to dynamically change several render settings in a Python script. I need a function to be able to call the setting from an index or a key, so that it modifies the correct setting. Since there is about 10 settings I want to modify the only way I can get the desired result is by having a bunch of IF statements for each possible setting. That seems like a terrible way to do it. Is there a way to save the settings to a list or dictionary?
Heres an example:
bpy.data.scenes.cycles.samples = 1 # Number of samples
lis = [bpy.data.scenes.cycles.samples]
lis = (10)
print ('Actual ' + str(bpy.data.scenes.cycles.samples))
print ('Modified ' + str(lis))
It should produce: