A Question for Python Coders

One thing I miss in 2.70 is the ‘Play rendered Animation’ button in the render panel. I’ve tried pasting in this line of code:

row.operator(“render.play_rendered_anim”, text=“Play”, icon=‘PLAY’)

that I copied from 2.68, however all that happens when I ‘run script’ is the entire panel disappears.
Obviously it’s not that simple, any suggestions?

Pasting that code in will add the button to Blender Internal, but will remove the Render panel from Cycles. Removing the code again does not restore the Render panel to Cycles.

Testing possible solution. Slow machine.

You can still find the operator in the Render menu (Info area) or use Ctrl + F11.

If the panel disappears if you add the above code, it probably means you got a syntax error or similar. Check the system console.

The Render panel (and the Dimensions, Output and Stamp panels) disappear because of the line

COMPAT_ENGINES = {‘BLENDER_RENDER’}

Why only those four panels disappear and not all panels in properties_render.py marked as only BLENDER_RENDER compatible, I don’t know. These panels disappear if you click ‘Run Script’ even without making any changes.

Solution:
Mark the affected panels as CYCLES compatible as well:

COMPAT_ENGINES = {‘BLENDER_RENDER’, ‘CYCLES’}

Alternatively, replace your properties_render.py with this one: properties_render.py.zip (3.79 KB)
(found in <Blender_file_location>/2.70/scripts/startup/bl_ui)
I don’t know if my hack job will cause problems down the road, but it seemed to work for my test.

CoDEmanX is correct in that it’s still available in the Render menu (Info window) and via the CTRL+F11 shortcut; which might be easier.

It’s odd that ‘CYCLES’ does not appear in the ‘COMPAT_ENGINES’ line in the 2.68 script either. Perhaps that was what threw me off. But many thanks, seems to work!
Cheers.