1
$\begingroup$

I am working on an add-on for Blender 2.83.1, which adds a panel to the sidebar. On this panel, the user simply has to press some buttons from top to bottom to achieve the goal (creating an animation of an electron density cloud).

The last button is of course rendering, but I can't get it to work. I am using row.operator('render.render(animation=True)'), but when running the script, the button does not appear. I am doing what is stated in the API I believe. row.operator('render.render') does work, but doesn't give an animation, but a single frame. The render has to be done using Eevee, I don't know if this makes a difference...

I really hope someone can help me!

full class:

class PT_Make_animation(bpy.types.Panel):
    bl_label = "Animation"
    bl_idname = "PT_Make_animation"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_category = 'e- Density Plot'
    bl_options = {'DEFAULT_CLOSED'}

    def draw(self, context):
        layout = self.layout
        
        # Create the circle, add camera and set
        row = layout.row()
        row.label(text= "Change the camera settings", icon='TOOL_SETTINGS')
        row = layout.row()
        row.operator('setup.cam_operator')
        
        # Start rendering
        row = layout.row()
        row.operator('render.render(animation=True)')
$\endgroup$
0
3
$\begingroup$

I think it is meant to be something like

row.operator("render.render", text="Render Animation", icon='RENDER_ANIMATION').animation = True

$\endgroup$
1
  • 1
    $\begingroup$ This worked perfectly, thank you! So, the parameters should be after the parentheses, I did not know that. $\endgroup$ – Roy Jul 9 '20 at 12:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.