Windows 10 64-bit, Graphics cards: GTX 570, GT 610 (display).
Broken: 7b29e91 (latest Windows 64-bit build)
Short description of error
I am trying to test if freestyle is on or off from a frame_change_post handler so my code is not run when rendering in the viewport in Blender Render while Freestyle is enabled (related to my add-on mentiond here: T53801)
When use_freestyle is printed from a frame_change_post handler it will print the correct value (ie. use_freestyle will return True) if the viewport isn't set to 'Rendered' mode. When changing to 'Rendered' viewport shading mode the frame handler will trigger (though I don't know why it is triggering) and report that freestyle is not running (ie. use_freestyle will return False).
This only happens when 'Blender Render' is the render engine. This doesn't happen in Cycles (nor is the frame handler even triggered when changing to 'Rendered' shading) and doesn't happen when there are no objects in the scene.
Exact steps for others to reproduce the error
- Open the attached file.
- Run the script in the attached file in the text editor.
- Change frame and look in the System Console. "Using freestyle!" will be printed.
- Change to 'Rendered' viewport shading mode.
- "Not Using freestyle!" will have been printed (even though the frame hasn't changed).
- Change frames and both 'using' and 'not using' messages will be displayed.