I’m trying to render a scene with a python script using custom Linesets, but it doesn’t render the proper LineStyle settings.
Running the script below does seem to change the settings. I can check the values in the UI window and they do change, however, the rendered images do not reflect the settings.
If I render the scene by pressing the “Render” button in the UI, it renders with the correct LineStyle settings.
Is there a render setting I’m missing?
Also, how do I select and modify different LineSets using python? I want to be able to select one Lineset and modify it’s settings, then select another and modify it’s settings.
bpy.context.scene.render.layers["RenderLayer"].use_freestyle = True
#change to script mode
rl = bpy.context.scene.render.layers.active
rl.freestyle_settings.mode = 'SCRIPT'
freestyle = rl.freestyle_settings
lineset = freestyle.linesets.active
lineStyle = lineset.linestyle
lineStyle.thickness = 1.53
lineStyle.color = (0, 255, 255)