image_user.frame_duration = 100 when creating single image node in Cycles #78646

Closed
opened 2020-07-05 17:12:22 +02:00 by Thomas Larsson · 10 comments
Member

This is a followup to #78537.

Consider the attached script. It creates an image and a texture node. Image.source = SINGLE IMAGE but behind the scenes Image.image_user.frame_duration = 100, which apparently causes memory problems according to the other bug report. You can see that by switching the source to MOVIE.

It is easy to avoid this problem by adding the line

node.image_user.frame_duration = 1

whenever a texture node is created. But then you need to know that you should do that.

image_user.py

tiger.png

This is a followup to #78537. Consider the attached script. It creates an image and a texture node. Image.source = SINGLE IMAGE but behind the scenes Image.image_user.frame_duration = 100, which apparently causes memory problems according to the other bug report. You can see that by switching the source to MOVIE. It is easy to avoid this problem by adding the line ``` node.image_user.frame_duration = 1 ``` whenever a texture node is created. But then you need to know that you should do that. [image_user.py](https://archive.blender.org/developer/F8667103/image_user.py) ![tiger.png](https://archive.blender.org/developer/F8667108/tiger.png)
Author
Member

Added subscriber: @thomasl-3

Added subscriber: @thomasl-3
Vincent Blankfield self-assigned this 2020-07-05 21:47:50 +02:00
Vincent Blankfield removed their assignment 2020-07-05 21:49:28 +02:00

Added subscriber: @VincentBlankfield

Added subscriber: @VincentBlankfield
Member

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

Changed status from 'Needs Triage' to: 'Confirmed'
Vincent Blankfield was assigned by Ankit Meel 2020-07-08 22:31:54 +02:00
Member

Added subscriber: @ankitm

Added subscriber: @ankitm

Added subscriber: @brecht

Added subscriber: @brecht

Changed status from 'Confirmed' to: 'Archived'

Changed status from 'Confirmed' to: 'Archived'

I do not consider this to be a bug. The frame duration should only be used for frame sequences, it should not be expected to be 1 for still images. Changing an image datablock back and forth between different types should not lose duration data.

I do not consider this to be a bug. The frame duration should only be used for frame sequences, it should not be expected to be 1 for still images. Changing an image datablock back and forth between different types should not lose duration data.

Added subscriber: @toxsickcity

Added subscriber: @toxsickcity

Changed status from 'Archived' to: 'Resolved'

Changed status from 'Archived' to: 'Resolved'

Can I request if someone can make a script which will fix all materials in a blender file? To convert any material with
Image.image_user.frame_duration = 100 into a single frame.

I think the above solution is to either change to movie, or run that py files on every material

Can I request if someone can make a script which will fix all materials in a blender file? To convert any material with Image.image_user.frame_duration = 100 into a single frame. I think the above solution is to either change to movie, or run that py files on every material
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
5 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#78646
No description provided.