Datablock ID Properties attached to bpy.types.Material are not saved (or loaded) #53509
Labels
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
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#53509
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Short description of error
Attach a PointerProperty D113 to a material, let it point to an object, save and load the scene -> it will point to None.
E.g. the following code:
To reproduce:
System Information
Ubuntu 14.04
Blender Version
Broken: Official 2.79, latest master (
4a73432
)Added subscriber: @BYOB
I just discovered that it also unlinks when undoing something in object mode.
Added subscribers: @mont29, @Sergey
Pointer properties is something what Cycles is using, so not sure why those would fail (those are not ID pointers though).
@mont29, is that something related on ID custom pointers?
They are Datablock ID Properties (see D113), exposed in Python since 2.79.
I hope I don't get on your nerves when I say that it would be good to have a fix for this bug in 2.79a.
It is crippling any external renderer addon that uses Datablock ID Properties.
I might have a fix for this.
In the function lib_link_material in the file source/blender/blenloader/intern/readfile.c, the statement IDP_LibLinkProperty(ma->id.properties, fd); is executed twice:
I commented out the second call to IDP_LibLinkProperty and now my demo addon works as expected (both PointerProperties survive a save and load).
This is the patch:
Please have a look at it and tell me if it's complete bogus, if we need to fix something else or if this is indeed the only thing necessary to fix the bug.
Nice catch, this is indeed plain bold stupid bug! Thanks for the investigation.
This issue was referenced by
96e507d989
Changed status from 'Open' to: 'Resolved'