How to access Freestyle LineSet options via Python?

Hello,

Blender tooltip shows the following information:
image
What do these three dots mean? What’s the proper line of code to turn Contour on?

Try this

bpy.data.scenes["Scene"].render.layers["RenderLayer"].freestyle_settings.linesets["LineSet"].select_contour = True

The dots in the tool tip are just telling you that the text is too long to be displayed in the message box. In this case the dots represent

 .render.layers["RenderLayer"].freestyle_settings.linesets["LineSet"].

This will work on 2.79.

1 Like

Works perfectly, thank you!

I hope one day the documention for Freestyle API use will be more detailed and clear…

Do you know an appropriate line for 2.8?
It seems that “layers” and “scenes” should be replaced, but I can’t find any precise references in documentation.