Sequencer OpenGL Render : Annotations not rendered with python command but is rendered using UI button #65763

Closed
opened 2019-06-12 19:27:06 +02:00 by Félix · 9 comments

System Information
Operating system: Windows-10-10.0.16299 64 Bits
Graphics card: GeForce GTX 970/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 390.65

Blender Version
Broken: version: 2.80 (sub 74), branch: blender2.7, commit date: 2019-06-11 23:43, hash: 6529d20d79
Worked: (optional)

Short description of error
Sequencer OpenGL render using python command doesn't export Annotations but clicking on the View -> Sequence Render Animation does export Annotations.

Exact steps for others to reproduce the error

  • Open linked .blend file: BugRenderOpenGLPython.blend
  • Run the script: Annotations are not rendered.
  • Sequencer Preview: Click on View -> Sequence Render Animation, Annotations are rendered.
**System Information** Operating system: Windows-10-10.0.16299 64 Bits Graphics card: GeForce GTX 970/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 390.65 **Blender Version** Broken: version: 2.80 (sub 74), branch: blender2.7, commit date: 2019-06-11 23:43, hash: `6529d20d79` Worked: (optional) **Short description of error** Sequencer OpenGL render using python command doesn't export Annotations but clicking on the *View -> Sequence Render Animation* does export Annotations. **Exact steps for others to reproduce the error** - Open linked .blend file: [BugRenderOpenGLPython.blend](https://archive.blender.org/developer/F7100522/BugRenderOpenGLPython.blend) - Run the script: Annotations are not rendered. - Sequencer Preview: Click on *View -> Sequence Render Animation*, Annotations are rendered.
Author

Added subscriber: @Miadim

Added subscriber: @Miadim
Member

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jeroen-Bakker
Member

When clicking on View -> Sequence Render Animation the area has a setting if the annotations needs to be exported
image.png

The python API does not have a setting to render annotations and cannot get to the context of the sequencer. You might have zero or multiple sequencer areas open. By default it does not export annotations as it is not expected to do so.

When clicking on `View -> Sequence Render Animation` the area has a setting if the annotations needs to be exported ![image.png](https://archive.blender.org/developer/F7101774/image.png) The python API does not have a setting to render annotations and cannot get to the context of the sequencer. You might have zero or multiple sequencer areas open. By default it does not export annotations as it is not expected to do so.
Author

Thank you for answering.
I'm not sure to get what you're talking about. This worked for me few days ago... And it still works on an older code on Blender 2.77. I changed things in the current code, but I can't figure out what I might have done wrong on what you're saying.
I've tested le context I'm currently in before calling this operator, and it's a 'SEQUENCE_EDITOR'.

Thank you for answering. I'm not sure to get what you're talking about. This worked for me few days ago... And it still works on an older code on Blender 2.77. I changed things in the current code, but I can't figure out what I might have done wrong on what you're saying. I've tested le context I'm currently in before calling this operator, and it's a 'SEQUENCE_EDITOR'.
Member

Hi @Miadim

Hmmm... I will perform a bisect tomorrow to find out when the different behavior started. I did several fixes in this area. There might be some conflict going on.
Please note that the 2.77 Grease Pencil/Annotation system has been spliced in 2.80 into a Grease Pencil, what will always be rendered and an annotation system. Not sure the real thoughts are behind the annotations in conjunction with the opengl rendering.
Ah, then the script in the .blend file might not be complete as it perform in a different context. So you have an operation that executes the opengl render in the sequencer context, and there you expect the annotations to be present.

Hi @Miadim Hmmm... I will perform a bisect tomorrow to find out when the different behavior started. I did several fixes in this area. There might be some conflict going on. Please note that the 2.77 Grease Pencil/Annotation system has been spliced in 2.80 into a Grease Pencil, what will always be rendered and an annotation system. Not sure the real thoughts are behind the annotations in conjunction with the opengl rendering. Ah, then the script in the `.blend` file might not be complete as it perform in a different context. So you have an operation that executes the opengl render in the sequencer context, and there you expect the annotations to be present.
Jeroen Bakker self-assigned this 2019-06-13 18:28:31 +02:00
Member

I tried versions upto 1 month ago and was not able to find a version of blender 2.80 that exported the annotations as you describe it would with your given example file. In Blender 2.79 when running the same script as provided in your blend file, it also does not export the grease pencil layers.

When the next script is called from a sequence editor area it uses the settings of the area and the annotations are exported in 2.79 but not in 2.80. Is this what you are referring to?

import bpy


class SimpleOperator(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "object.simple_operator"
    bl_label = "Simple Export Operator"

    @classmethod
    def poll(cls, context):
        return context.area.type == 'SEQUENCE_EDITOR'

    def execute(self, context):
        bpy.ops.render.opengl(animation=True, sequencer=True)
        return {'FINISHED'}


def register():
    bpy.utils.register_class(SimpleOperator)


def unregister():
    bpy.utils.unregister_class(SimpleOperator)


if __name__ == "__main__":
    register()

Note: when rendering stills it is working. When rendering animations the first frame is correct, but the second frame is shifted by half width and height. So the third frame will move the annotation outside the export canvas.

I tried versions upto 1 month ago and was not able to find a version of blender 2.80 that exported the annotations as you describe it would with your given example file. In Blender 2.79 when running the same script as provided in your blend file, it also does not export the grease pencil layers. When the next script is called from a sequence editor area it uses the settings of the area and the annotations are exported in 2.79 but not in 2.80. Is this what you are referring to? ``` import bpy class SimpleOperator(bpy.types.Operator): """Tooltip""" bl_idname = "object.simple_operator" bl_label = "Simple Export Operator" @classmethod def poll(cls, context): return context.area.type == 'SEQUENCE_EDITOR' def execute(self, context): bpy.ops.render.opengl(animation=True, sequencer=True) return {'FINISHED'} def register(): bpy.utils.register_class(SimpleOperator) def unregister(): bpy.utils.unregister_class(SimpleOperator) if __name__ == "__main__": register() ``` Note: when rendering stills it is working. When rendering animations the first frame is correct, but the second frame is shifted by half width and height. So the third frame will move the annotation outside the export canvas.

This issue was referenced by 31a99a3ab4

This issue was referenced by 31a99a3ab45a72476df781288f1c81763df57c62
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Author

Hi, I was trying to build an older version of blender to find how I managed to make it work few days ago, but it seems you handled it. Is it working now ?

Hi, I was trying to build an older version of blender to find how I managed to make it work few days ago, but it seems you handled it. Is it working now ?
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#65763
No description provided.