bpy.ops.render.render() no cause update Image Editor for Render Results #104534

Closed
opened 2023-02-09 18:43:35 +01:00 by Bartosz Moniewski · 4 comments

System Information
Operating system: Win10
Graphics card: Nvidia RTX 2070

Blender Version
Broken: 3.1 to 3.5 alpha
Worked: 3.0

Short description of error

Render Results in Image Editor no longer display images after running bpy.ops.render.render(). Images can be saved and correctly reflects the state of the scene, which means that actual rendering works fine. Missing part is refreshing image buffer to display the renders in the Image Editor.

I assume it might be caused by 'DrawManager: Image engine support huge images.' introduced in 3.1. Similar report were made about baked and generated textures.

Render Results are displayed while interacting with the editor, such as changing zoom or resizing the window.
Setting operator execution context to 'INVOKE_DEFAULT' updates Render Results but also freezes UI and stops animation playback. In our project we run simple eevee renders in a modal operator to see "pixelart" models in real-time. Interacting with scenes and animation playback is crucial for us so 'INVOKE_DEFAULT' is not acceptable workaround.

Exact steps for others to reproduce the error

Download RenderResultsBug.blend and see attached video.

Worked:

  • Open the file in Blender 3.0
  • Run the script from the Text Editor. The Test panel will appear in the sidebar of the 3D view.
  • Toggle "Active Render" in the Test panel. The render will appear in the Image Editor.
  • Scrub the timeline or play animation to see Render Results updates in real-time.

Broken:

  • Open the file in blender 3.1
  • Run the script.
  • Press "Render once" in the Test panel. Something changes in the Image Editor, but the render is not displayed.
  • Toggle "Active Rendering". The render does not appear.
  • Scrub the timeline or play an animation. The render is not updated.
  • Play the animation and resize the Image Editor window. The render updates, but only while resizing the window.
**System Information** Operating system: Win10 Graphics card: Nvidia RTX 2070 **Blender Version** Broken: 3.1 to 3.5 alpha Worked: 3.0 **Short description of error** Render Results in Image Editor no longer display images after running `bpy.ops.render.render()`. Images can be saved and correctly reflects the state of the scene, which means that actual rendering works fine. Missing part is refreshing image buffer to display the renders in the Image Editor. I assume it might be caused by ['DrawManager: Image engine support huge images.'](https://projects.blender.org/blender/blender/commit/bdd74e1e9338) introduced in 3.1. Similar report were made about baked and generated textures. Render Results are displayed while interacting with the editor, such as changing zoom or resizing the window. Setting operator execution context to `'INVOKE_DEFAULT'` updates Render Results but also freezes UI and stops animation playback. In our project we run simple eevee renders in a modal operator to see "pixelart" models in real-time. Interacting with scenes and animation playback is crucial for us so `'INVOKE_DEFAULT'` is not acceptable workaround. **Exact steps for others to reproduce the error** Download RenderResultsBug.blend and see attached video. **Worked:** * Open the file in Blender **3.0** * Run the script from the Text Editor. The Test panel will appear in the sidebar of the 3D view. * Toggle "Active Render" in the Test panel. The render will appear in the Image Editor. * Scrub the timeline or play animation to see Render Results updates in real-time. **Broken:** * Open the file in blender **3.1** * Run the script. * Press "Render once" in the Test panel. Something changes in the Image Editor, but the render is not displayed. * Toggle "Active Rendering". The render does not appear. * Scrub the timeline or play an animation. The render is not updated. * Play the animation and resize the Image Editor window. The render updates, but only while resizing the window.
Bartosz Moniewski added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-02-09 18:43:35 +01:00
Iliya Katushenock changed title from Image Editor Render Results no longer update after bpy.ops.render.render() to bpy.ops.render.render() no cause update Image Editor for Render Results 2023-02-09 18:57:34 +01:00
Iliya Katushenock added
Module
EEVEE & Viewport
and removed
Module
Pipeline, Assets & IO
labels 2023-02-09 18:59:44 +01:00
Iliya Katushenock added
Module
Render & Cycles
and removed
Module
EEVEE & Viewport
labels 2023-02-09 19:14:27 +01:00

I did some more tests and updated the blend file.

area.tag_redraw() don't update the image.
bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1) don't work too.

I did some more tests and updated the blend file. `area.tag_redraw()` don't update the image. `bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1)` don't work too.
Brecht Van Lommel added
Status
Confirmed
Type
Bug
and removed
Status
Needs Info from Developers
Type
Report
labels 2023-02-10 19:52:54 +01:00
Brecht Van Lommel added this to the Render & Cycles project 2023-02-10 19:53:01 +01:00

I tested forcing updates in bpy.app.handlers.render_complete as suggested by Jeroen Bakker. Still no luck.

I updated the blend file.

I tested forcing updates in `bpy.app.handlers.render_complete` as suggested by Jeroen Bakker. Still no luck. I updated the blend file.
Member

I will assign the task to me and look into it this week. It might be a missing edge case when we did the image engine. I do see the value of having this to work as described by the ticket.

I will assign the task to me and look into it this week. It might be a missing edge case when we did the image engine. I do see the value of having this to work as described by the ticket.
Jeroen Bakker self-assigned this 2023-02-13 14:43:15 +01:00
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2023-03-06 08:44:45 +01:00
Member

Fix is also added to be backported to 3.3

Fix is also added to be backported to 3.3
Brecht Van Lommel removed this from the Render & Cycles project 2023-03-09 18:57:18 +01:00
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
2 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#104534
No description provided.