Linking and Make Library Override breaks Drivers in Curve Material #122623

Closed
opened 2024-06-02 08:29:33 +02:00 by Sacha Goedegebure · 4 comments

System Information
Operating system: Linux-6.5.0-35-generic-x86_64-with-glibc2.35 64 Bits, X11 UI
Graphics card: NVIDIA GeForce RTX 2060/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 470.239.06

Blender Version
Broken: version: version: 4.1.1, branch: blender-v4.1-release, commit date: 2024-04-15 15:11, hash: e1743a0317bc
Worked: 4.0.2

Short description of error
After linking and Make Library Override of a Curve object , any drivers in the curve material will stop working after restarting file.
This worked properly in 4.0.2

Exact steps for others to reproduce the error
Attached file 'curve_driver' contains a Curve and an Armature (1 bone). The pose bone has a custom property 'color switch', which drives the color (Factor in Mix Node) of the curve material.
image
Steps:

  1. start empty file and Link 'Collection' from 'curve_driver'
  2. make Override Library (at this point, the driver still works; the bone's custom property 'color switch' can still change the color of the curve material)
  3. save and re-open file. The custom property does not affect the driver anymore. No sign of error.
**System Information** Operating system: Linux-6.5.0-35-generic-x86_64-with-glibc2.35 64 Bits, X11 UI Graphics card: NVIDIA GeForce RTX 2060/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 470.239.06 **Blender Version** Broken: version: version: 4.1.1, branch: blender-v4.1-release, commit date: 2024-04-15 15:11, hash: `e1743a0317bc` Worked: 4.0.2 **Short description of error** After linking and Make Library Override of a Curve object , any drivers in the curve material will stop working after restarting file. This worked properly in 4.0.2 **Exact steps for others to reproduce the error** Attached file 'curve_driver' contains a Curve and an Armature (1 bone). The pose bone has a custom property 'color switch', which drives the color (Factor in Mix Node) of the curve material. ![image](/attachments/6e74bb1e-107b-43a6-b964-9e65d79c3f2a) Steps: 1. start empty file and Link 'Collection' from 'curve_driver' 2. make Override Library (at this point, the driver still works; the bone's custom property 'color switch' can still change the color of the curve material) 3. save and re-open file. The custom property does not affect the driver anymore. No sign of error.
Sacha Goedegebure added the
Type
Report
Status
Needs Triage
Priority
Normal
labels 2024-06-02 08:29:34 +02:00
Philipp Oeser added the
Interest
Overrides
label 2024-06-03 08:49:23 +02:00

Since this breaks some materials in my rigs, I tried different things to prevent the issue.

One thing that does NOT work:
I included a mesh object to the collection and gave it the same material as the curve object, hoping it would preserve the drivers in the material. But the drivers still break.
Only when the curve object is deleted from the collection, the drivers won't break anymore.

One workaround:
Drivers in the curve material will break when it uses Custom Properties from any ID type.
One exception seems when the Custom Property comes from the curve's own Curve Data; drivers then do not break. But this means I need double amount of custom properties and drivers (from Pose Bone to Curve Data to Curve Material).

Since this breaks some materials in my rigs, I tried different things to prevent the issue. One thing that does NOT work: I included a mesh object to the collection and gave it the same material as the curve object, hoping it would preserve the drivers in the material. But the drivers still break. Only when the curve object is deleted from the collection, the drivers won't break anymore. One workaround: Drivers in the curve material will break when it uses Custom Properties from any ID type. One exception seems when the Custom Property comes from the curve's own Curve Data; drivers then do not break. But this means I need double amount of custom properties and drivers (from Pose Bone to Curve Data to Curve Material).

Caused by fb8bf8b0c8

Further investigation to understand what is actually happening is still needed

Caused by fb8bf8b0c892e Further investigation to understand what is actually happening is still needed
Bastien Montagne added
Type
Bug
and removed
Type
Report
labels 2024-07-02 14:50:11 +02:00
Bastien Montagne added this to the Core project 2024-07-02 14:50:28 +02:00

For now, as a simpler workaround I put this in my characters' scripts, to fix the drivers at startup:

bpy.data.materials[curve material name].override_library.resync(scene=bpy.context.scene, do_whole_hierarchy=True)

For now, as a simpler workaround I put this in my characters' scripts, to fix the drivers at startup: `bpy.data.materials[curve material name].override_library.resync(scene=bpy.context.scene, do_whole_hierarchy=True)`

Indeed, resyncing the whole hierarchy will fix the issue. The problem is caused by partial resync (done for faster resync), which is then unaware of some other data in the override hierarchy. Still working on a proper fix.

Indeed, resyncing the whole hierarchy will fix the issue. The problem is caused by partial resync (done for faster resync), which is then unaware of _some_ other data in the override hierarchy. Still working on a proper fix.
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2024-07-04 15:43:05 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
Asset Browser Project
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
2 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#122623
No description provided.