No image.previews for some D.images #94418

Closed
opened 2021-12-27 16:40:11 +01:00 by Andrea · 8 comments

System Information
Operating system: Windows-10-10.0.19043-SP0 64 Bits
Graphics card: GeForce GTX 1080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 461.40

Blender Version
Broken: version: 3.0.0, branch: master, commit date: 2021-12-02 18:35, hash: f1cca30557
Worked: (newest version of Blender that worked as expected)

Short description of error
Open the Blend file and Run the script

Exact steps for others to reproduce the error
Running the for loop inside the script to check, some image.preview is None
Bug.blend
This only happens on Blender 3.0, in Blender 2.93 the images always had the preview.

**System Information** Operating system: Windows-10-10.0.19043-SP0 64 Bits Graphics card: GeForce GTX 1080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 461.40 **Blender Version** Broken: version: 3.0.0, branch: master, commit date: 2021-12-02 18:35, hash: `f1cca30557` Worked: (newest version of Blender that worked as expected) **Short description of error** Open the Blend file and Run the script **Exact steps for others to reproduce the error** Running the for loop inside the script to check, some image.preview is None [Bug.blend](https://archive.blender.org/developer/F12778026/Bug.blend) This only happens on Blender 3.0, in Blender 2.93 the images always had the preview.
Author

Added subscriber: @Andrew_D-1

Added subscriber: @Andrew_D-1
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

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

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

Thanks for the report. Can confirm.

Broken between 9dabb342ba - a1556fa05c

I will check

Thanks for the report. Can confirm. Broken between 9dabb342ba - a1556fa05c I will check
Member

Added subscribers: @mont29, @lichtwerk

Added subscribers: @mont29, @lichtwerk
Member

Changed status from 'Confirmed' to: 'Archived'

Changed status from 'Confirmed' to: 'Archived'
Member

This changed in e3faef686d.

However, I assume this is not really a bug.
If the previews have not been generated, you (now) have to ensure this by hand like so:

import bpy

D = bpy.data

for i in D.images:
    i.id_data.preview_ensure()
    print(i.name, i.preview)

Bug_corrected.blend

Assume this will not be considered a bug (@mont29: correct me if I am wrong), so thx reporting, but afraid we'll have to close.
@Andrew_D-1 : feel free to comment again if the above does not work for you

This changed in e3faef686d. However, I assume this is not really a bug. If the previews have not been generated, you (now) have to ensure this by hand like so: ``` import bpy D = bpy.data for i in D.images: i.id_data.preview_ensure() print(i.name, i.preview) ``` [Bug_corrected.blend](https://archive.blender.org/developer/F12786730/Bug_corrected.blend) Assume this will not be considered a bug (@mont29: correct me if I am wrong), so thx reporting, but afraid we'll have to close. @Andrew_D-1 : feel free to comment again if the above does not work for you
Author

Uh, ok I didn't know this API to generate the preview. I think it might be a good way to be sure to generate it manually.

Although I find that in version 2.93 the fact that they were always generated could be good.

In any case, the important thing is to know.
Thank you for the clarification.

Uh, ok I didn't know this API to generate the preview. I think it might be a good way to be sure to generate it manually. Although I find that in version 2.93 the fact that they were always generated could be good. In any case, the important thing is to know. Thank you for the clarification.
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#94418
No description provided.