Image attribute has_data gives incorrect values #51615

Closed
opened 2017-05-24 20:51:35 +02:00 by Miki · 6 comments

System Information
Windows 10, GTX970

Blender Version
Broken: 2.78c

Short description of error
It's not possible to say if an image contains data or not based on the has_data attribute, because it returns True-False randomly when called within a cycle.

Exact steps for others to reproduce the error
Run this simple script and img.has_data returns False even for valid images.

import bpy

print("\n* Test has_data attribute *")

for img in bpy.data.images:
    print(img.name, img.has_data)
**System Information** Windows 10, GTX970 **Blender Version** Broken: 2.78c **Short description of error** It's not possible to say if an image contains data or not based on the `has_data` attribute, because it returns True-False randomly when called within a cycle. **Exact steps for others to reproduce the error** Run this simple script and `img.has_data` returns False even for valid images. ``` import bpy print("\n* Test has_data attribute *") for img in bpy.data.images: print(img.name, img.has_data) ```
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @MikiProxima

Added subscriber: @MikiProxima

Added subscriber: @brecht

Added subscriber: @brecht

img.has_data tests if the image data is currently loaded in memory, it doesn't test if the image is valid if no attempt has been made to load it.

`img.has_data` tests if the image data is currently loaded in memory, it doesn't test if the image is valid if no attempt has been made to load it.

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

This issue was referenced by blender/blender@1ddf67382b

This issue was referenced by blender/blender@1ddf67382bec8838de8f569281a68275d05356cf
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 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-addons#51615
No description provided.