Linked Custom Nodes with fake user are removed when re-opening file. #103867

Closed
opened 2023-01-13 20:26:20 +01:00 by Jeroen Bakker · 13 comments
Member

System Information
Operating system: Linux-5.15.0-57-generic-x86_64-with-glibc2.35 64 Bits
Graphics card: Mesa Intel(R) UHD Graphics 620 (KBL GT2) Intel 4.6 (Core Profile) Mesa 22.0.5

Blender Version
Broken: version: 3.5.0 Alpha, branch: master, commit date: 2023-01-13 14:09, hash: f7a1433ffb
Worked: version 3.4

Short description of error
When having a blend file (lib.blend) containing a custom node tree, that is linked from another blend file (uselib.blend) the link is lost, even when it is marked as fake user.

Exact steps for others to reproduce the error
From Scratch

  • In text-editor add Python script for Custom nodes. (can use the one from the templates menu)

  • Run the script

  • Create a Custom node tree and see that the fake user is set.

  • Save this as lib.blend

  • In a second blend file add and run the same script

  • In text-editor add Python script for Custom nodes. (can use the one from the templates menu)

  • Run the script

  • Save this file as uselib.blend

  • link the Custom node tree from lib.blend.

  • See that the linked node tree fake user is set.

  • Save uselib.blend

  • Open uselib.blend

  • See that the linked node tree is not loaded, even when fake user is set.


Use attached blend files

lib.blend
uselib.blend

  • Download both files
  • open uselib.blend
  • link Custom Node tree from lib.blend
  • Save uselib.blend
  • Open uselib.blend
  • See that the linked node tree is not loaded.

NOTE: Not sure if related but I am not able to unlink using Ctrl-click of a local custom node tree.

**System Information** Operating system: Linux-5.15.0-57-generic-x86_64-with-glibc2.35 64 Bits Graphics card: Mesa Intel(R) UHD Graphics 620 (KBL GT2) Intel 4.6 (Core Profile) Mesa 22.0.5 **Blender Version** Broken: version: 3.5.0 Alpha, branch: master, commit date: 2023-01-13 14:09, hash: `f7a1433ffb` Worked: version 3.4 **Short description of error** When having a blend file (lib.blend) containing a custom node tree, that is linked from another blend file (uselib.blend) the link is lost, even when it is marked as fake user. **Exact steps for others to reproduce the error** *From Scratch* * In text-editor add Python script for Custom nodes. (can use the one from the templates menu) * Run the script * Create a Custom node tree and see that the fake user is set. * Save this as lib.blend * In a second blend file add and run the same script * In text-editor add Python script for Custom nodes. (can use the one from the templates menu) * Run the script * Save this file as uselib.blend * link the Custom node tree from lib.blend. * See that the linked node tree fake user is set. * Save uselib.blend * Open uselib.blend * See that the linked node tree is not loaded, even when fake user is set. --- *Use attached blend files* [lib.blend](https://archive.blender.org/developer/F14148636/lib.blend) [uselib.blend](https://archive.blender.org/developer/F14148639/uselib.blend) - Download both files - open uselib.blend - link Custom Node tree from lib.blend - Save uselib.blend - Open uselib.blend - See that the linked node tree is not loaded. --- NOTE: Not sure if related but I am not able to unlink using Ctrl-click of a local custom node tree.
Author
Member

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jeroen-Bakker

Added subscriber: @mod_moder

Added subscriber: @mod_moder

I have some problem with playback.
If you have a garbage collection, then when adding the node tree, I manually set the protection flag and did not lose tree 001 after reload project.
If you are talking about whether the added tree sees 001, then since the script needs to be run manually, both the original tree and the added tree are also correctly determined by the script.

I have some problem with playback. If you have a garbage collection, then when adding the node tree, I manually set the protection flag and did not lose tree 001 after reload project. If you are talking about whether the added tree sees 001, then since the script needs to be run manually, both the original tree and the added tree are also correctly determined by the script.
Member

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

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

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Added subscriber: @mont29

Added subscriber: @mont29
Member

git bisect points to 133dde41bb
@mont29 ^

git bisect points to 133dde41bb @mont29 ^

Changed status from 'Confirmed' to: 'Archived'

Changed status from 'Confirmed' to: 'Archived'

Previous behavior was a bug/inconsistency, by definition you cannot edit linked data, which means that its 'fake user' status is irrelevant (since it cannot be defined from the user side currently, only in the library). Therefore, it should be ignored, and the only way to decide whether to keep or not a linked ID is if it's actually used by some local data.

We may have to revisit this consideration at some point (e.g. by making 'fake user' editable on linked data, and force such linked ID to be written even if unused, but this is a design topic.

Previous behavior was a bug/inconsistency, by definition you cannot edit linked data, which means that its 'fake user' status is irrelevant (since it cannot be defined from the user side currently, only in the library). Therefore, it should be ignored, and the only way to decide whether to keep or not a linked ID is if it's actually used by some local data. We may have to revisit this consideration at some point (e.g. by making 'fake user' editable on linked data, and force such linked ID to be written even if unused, but this is a design topic.

To be specific, previous behavior existed regardless of the 'fake user' status, it was related to the fact that once a linked ID was tagged as directly used (i.e. presumably used by a local ID, but this tag was also abused in other cases), it would never be untagged, and therefore would remain linked in the local file forever. This is what was fixed by 133dde41bb.

To be specific, previous behavior existed regardless of the 'fake user' status, it was related to the fact that once a linked ID was tagged as directly used (i.e. presumably used by a local ID, but this tag was also abused in other cases), it would never be untagged, and therefore would remain linked in the local file forever. This is what was fixed by 133dde41bb.
Bastien Montagne added this to the Core project 2023-02-09 15:43:10 +01:00
Bastien Montagne removed this from the Core project 2023-02-09 18:19:06 +01:00
Author
Member

@mont29 I think this should be mentioned in the release notes as this breaks behavior with previous versions.

@mont29 I think this should be mentioned in the release notes as this breaks behavior with previous versions.
@Jeroen-Bakker fair point, done here: https://wiki.blender.org/wiki/Reference/Release_Notes/3.5/Core

@Jeroen-Bakker created a design task to make a decision on this, #105786.

@Jeroen-Bakker created a design task to make a decision on this, #105786.
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
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#103867
No description provided.