Relocate Library Override loses local Materials (but not for automatically overridden data) #92780

Closed
opened 2021-11-03 11:13:01 +01:00 by Konstantins Visnevskis · 9 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 472.39

Blender Version
Broken: version: 2.93.5, branch: master, commit date: 2021-10-05 12:04, hash: a791bdabd0

Short description of error
After Make Lybbrary Override Hierarchy on a Linked Collection, some object's data becomes linked and some a Lybrary Override.
Apparently that depends on whether the object has a valid shape key driver or not.
Not all of object datas becoming overrides might be a bug, given there's no way to enforce either condition by design, while it does has some implications, as described below.

When recovering from auto-save a scene with Lybrary overrides, one has to do "Relocate" on each of Link paths to make them relative again.
This action resets all the material links, that were made local, to the source ones.
However for objects that had their data made a Lybrary override automatically, this does not occur.

In other words - objects, that don't have a valid working shape key with a driver lose their local materials upon Lybrary Relocate.
So either losing local materials, or not all object datas becoming overrides could be a bug.

In case none are, this may be a useful workaround for many -
to create driven shapekeys for every object that shouldn't lose it's local materials upion Lybrary Relocate.

Exact steps for others to reproduce the error
linkable.blend

  • Link -> attached file -> Collections -> Collection_for_Linking
  • Outliner -> expand Collection_for_Linking -> Right click -> ID Data -> Lybrary Override Hierarchy
  • Overridden object data is linked, not overridden
  • Make object's material local. Wait for autosave. (Or save and move the saved file to break link path)
  • Open the autosave.
  • Relocate Lybrary to real path.
  • Local material is lost.

That doesn't happen if object data Library Override is generated instead of link automatically upon Make Library Override Hierarchy, as is the case with objects that have valid shapekey drivers.

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 472.39 **Blender Version** Broken: version: 2.93.5, branch: master, commit date: 2021-10-05 12:04, hash: `a791bdabd0` **Short description of error** After Make Lybbrary Override Hierarchy on a Linked Collection, some object's data becomes linked and some a Lybrary Override. Apparently that depends on whether the object has a valid shape key driver or not. Not all of object datas becoming overrides might be a bug, given there's no way to enforce either condition by design, while it does has some implications, as described below. When recovering from auto-save a scene with Lybrary overrides, one has to do "Relocate" on each of Link paths to make them relative again. This action resets all the material links, that were made local, to the source ones. However for objects that had their data made a Lybrary override automatically, this does not occur. In other words - objects, that don't have a valid working shape key with a driver lose their local materials upon Lybrary Relocate. So either losing local materials, or not all object datas becoming overrides could be a bug. In case none are, this may be a useful workaround for many - to create driven shapekeys for every object that shouldn't lose it's local materials upion Lybrary Relocate. **Exact steps for others to reproduce the error** [linkable.blend](https://archive.blender.org/developer/F11694051/linkable.blend) - Link -> attached file -> Collections -> Collection_for_Linking - Outliner -> expand Collection_for_Linking -> Right click -> ID Data -> Lybrary Override Hierarchy - Overridden object data is linked, not overridden - Make object's material local. Wait for autosave. (Or save and move the saved file to break link path) - Open the autosave. - Relocate Lybrary to real path. - Local material is lost. That doesn't happen if object data Library Override is generated instead of link automatically upon Make Library Override Hierarchy, as is the case with objects that have valid shapekey drivers.

Added subscriber: @KonstantinsVisnevskis

Added subscriber: @KonstantinsVisnevskis
Konstantins Visnevskis changed title from Relocate Lybrary override loses local Materials (but not for overridden data, which can't be controlled directly) to Relocate Library Override loses local Materials (but not for overridden data, which can't be controlled directly) 2021-11-03 11:13:19 +01:00
Konstantins Visnevskis changed title from Relocate Library Override loses local Materials (but not for overridden data, which can't be controlled directly) to Relocate Library Override loses local Materials (but not for automatically overridden data) 2021-11-03 11:14:05 +01:00
Member

Added subscribers: @mont29, @lichtwerk

Added subscribers: @mont29, @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'
Member

I can confirm the behavior.

Not sure if the fact that "Not all of object datas becoming overrides might be a bug" is the culprit here either (if no override on mesh is there I can imagine the material issue is expected).
Also not sure why an override on mesh actually gets generated in the shapekey driver scenario.
In the end there might be an explanation to all this, best if @mont29 has a look.

I can confirm the behavior. Not sure if the fact that "Not all of object datas becoming overrides might be a bug" is the culprit here either (if no override on mesh is there I can imagine the material issue is expected). Also not sure why an override on mesh actually gets generated in the shapekey driver scenario. In the end there might be an explanation to all this, best if @mont29 has a look.

Meshes being made overrides are expected, since they depend on shapekeys which depend on drivers which depend on an (override) object...

Material issue is an internal limitation caused by the infamous intertwining of Object and ObData when it comes to material management.
To be specific here, the (override) object is local, so fully read when reading the working file. However, since the lib file is missing, there is no mesh, and therefore an empty placeholder mesh is generated, which has no materials. Currently, we always sync objects' materials count from it obdata's materials count. In that specific case however, we should do the other way around.

Meshes being made overrides are expected, since they depend on shapekeys which depend on drivers which depend on an (override) object... Material issue is an internal limitation caused by the infamous intertwining of Object and ObData when it comes to material management. To be specific here, the (override) object is local, so fully read when reading the working file. However, since the lib file is missing, there is no mesh, and therefore an empty placeholder mesh is generated, which has no materials. Currently, we always sync objects' materials count from it obdata's materials count. In that specific case however, we should do the other way around.

This issue was referenced by c29f9e14e4

This issue was referenced by c29f9e14e4180af0fbba83d66e08c9852da7fa9c

Added subscriber: @gintszilbalodis

Added subscriber: @gintszilbalodis

Changed status from 'Needs Developer To Reproduce' to: 'Resolved'

Changed status from 'Needs Developer To Reproduce' to: 'Resolved'
Bastien Montagne self-assigned this 2021-11-03 18:16:08 +01:00

Hi, tested a few times with 3.0 3e6907eb8a and at first it seemed not to be working, but after re-saving the library with the same build (was saved with 2.93.5 release previously), it strangely does work! This will save lots of dummy shape-keys for the movie :) Thanks!

Hi, tested a few times with 3.0 3e6907eb8a3d and at first it seemed not to be working, but after re-saving the library with the same build (was saved with 2.93.5 release previously), it strangely does work! This will save lots of dummy shape-keys for the movie :) Thanks!
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
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#92780
No description provided.