Saving single image of image sequence: image.save_render(): Could not acquire buffer from image. #94051

Open
opened 2021-12-14 10:16:36 +01:00 by Paul Golter · 9 comments

System Information
Operating system: Linux-5.15.5-76051505-generic-x86_64-with-glibc2.33 64 Bits
Graphics card: Radeon RX 590 Series (POLARIS10, DRM 3.42.0, 5.15.5-76051505-generic, LLVM 12.0.0) AMD 4.6 (Core Profile) Mesa 21.2.2

Blender Version
Broken: version: 3.1.0 Alpha, branch: master, commit date: 2021-12-14 05:17, hash: c097c7b855
Worked: (newest version of Blender that worked as expected)

Short description of error
When trying to call the .save_render() function via the PythonAPI on an image datablock that holds an image sequence Blender throws the "Could not acquire buffer from image. " error.

Exact steps for others to reproduce the error

  1. Load any image sequence in image editor.
  2. Call bpy,data.images- .save_render()

I appended a zip with an already prepared blend file and image sequence. You can use that for convenience. bug_report_bundle.zip

**System Information** Operating system: Linux-5.15.5-76051505-generic-x86_64-with-glibc2.33 64 Bits Graphics card: Radeon RX 590 Series (POLARIS10, DRM 3.42.0, 5.15.5-76051505-generic, LLVM 12.0.0) AMD 4.6 (Core Profile) Mesa 21.2.2 **Blender Version** Broken: version: 3.1.0 Alpha, branch: master, commit date: 2021-12-14 05:17, hash: `c097c7b855` Worked: (newest version of Blender that worked as expected) **Short description of error** When trying to call the .save_render() function via the PythonAPI on an image datablock that holds an image sequence Blender throws the "Could not acquire buffer from image. " error. **Exact steps for others to reproduce the error** 1. Load any image sequence in image editor. 2. Call bpy,data.images- [ ].save_render() I appended a zip with an already prepared blend file and image sequence. You can use that for convenience. [bug_report_bundle.zip](https://archive.blender.org/developer/F12739037/bug_report_bundle.zip)
Author

Added subscriber: @paulgolter

Added subscriber: @paulgolter
Author

This hack fixes the error:

https://developer.blender.org/P2644

But it would propably require a nicer solution than that.

This hack fixes the error: https://developer.blender.org/P2644 But it would propably require a nicer solution than that.

Added subscriber: @brecht

Added subscriber: @brecht

What do you need it to do?

Save the entire frame range? Or do you need a parameter so you can specify the frame to save?

What do you need it to do? Save the entire frame range? Or do you need a parameter so you can specify the frame to save?
Author

Hey @brecht,

There are a couple of parameters that would be great to have to control the export:

  • framenr
  • layer index (for multilayer)
  • pass index (for multilayer)

I already chatted with @ideasman42 about this briefly and we were thinking that it would be great to be able to pass an ImageUser to functions like this and others that have similar problems. Currently there is no way to create an ImageUser with Python and a question would be how to handle the lifetime and storage of that ImageUser.

Campbell still wanted to get some opinions on how to approach this. Here a small extract out of that conversation:

  • Support image user as arguments to these functions.
  • Support either creating image users from Python or coercing data such as a dictionary into an image user.
    Perhaps we could support image_user={"frame": 42, eye='LEFT'} - where RNA handles creating the image user for the lifetime of the function.

Would love to hear your opinion on this.

Hey @brecht, There are a couple of parameters that would be great to have to control the export: - framenr - layer index (for multilayer) - pass index (for multilayer) I already chatted with @ideasman42 about this briefly and we were thinking that it would be great to be able to pass an `ImageUser` to functions like this and others that have similar problems. Currently there is no way to create an `ImageUser` with Python and a question would be how to handle the lifetime and storage of that `ImageUser`. Campbell still wanted to get some opinions on how to approach this. Here a small extract out of that conversation: > - Support image user as arguments to these functions. > - Support either creating image users from Python or coercing data such as a dictionary into an image user. > Perhaps we could support image_user={"frame": 42, eye='LEFT'} - where RNA handles creating the image user for the lifetime of the function. Would love to hear your opinion on this.
Author

Added subscriber: @ideasman42

Added subscriber: @ideasman42

Personally I would add individual arguments for frame/layer/pass rather than adding ImageUser as a concept to the API, but either way works.

Personally I would add individual arguments for frame/layer/pass rather than adding `ImageUser` as a concept to the API, but either way works.
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Bastien Montagne added this to the Core project 2023-02-09 15:42:54 +01:00
Bastien Montagne removed this from the Core project 2023-02-09 18:20:37 +01:00
Philipp Oeser removed the
Interest
Python API
label 2023-02-10 09:04:29 +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
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#94051
No description provided.