Linked Instances Across Scenes have unreliable updates when editing their common mesh data. #91996

Open
opened 2021-10-07 05:35:33 +02:00 by daniellapalme@gmail.com · 9 comments

Broken: 2.93.4 LTS;
Broken: master

Short description of error
With two different objects in two different scenes sharing a same obdata Mesh, editing the mesh in one of the scene can fail to properly update object in the other scene.

Exact steps for others to reproduce the error

  • Open attached file.
  • Go to scene 2.
  • Switch to Edit mode.
  • Assign the red material (first slot) to the cube in edit mode.
  • Switch back to Object mode.
  • Go to Scene 1, the Cube in Scene one still uses the second slot material (green).

Switch to edit mode and back, now the cube is shown with expected first material slot (red) as well.

NOTE: If you replace step 4 by a mesh geometry editing (e.g. rotate the mesh in Edit mode), in current master there is the same missing update issue in Scene 1, but in 2.93LTS it is properly updated... Regression introduced by 51568030e9.

Example.blend


Original report

System Information
Operating system: Windows-10-10.0.22000-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 680/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 472.12

Blender Version
Broken: version: 2.93.0, branch: master, commit date: 2021-06-02 11:21, hash: 84da05a8b8

Short description of error
If you link an instanced object to another scene, having it's material link to object, it can have a different material from the non-instance. However upon saving and re-opening the scene, the instance's material will revert to that of the non-instance.

Exact steps for others to reproduce the error

  • Open attached file or
    • Take the default cube and assign a material to it. In the viewport display settings assign a color for the material, this will give feedback in the viewport to highlight the issue.
    • Create another material on the same cube and once again assign a color in the viewport display settings.
    • Set both materials to Object Link in the material properties.
    • Name the current scene "Scene 1" and proceed to create another scene named "Scene 2".
    • Return to Scene 1, and using Alt+D instance the cube.
    • Using Ctrl+ L, link the instance to Scene 2. Delete the newly created instance in Scene 1.
  • In Scene 2, assign the instance a different material than Scene 1 in edit mode. You now have 2 scenes, with 2 cubes that share mesh data, but that are using 2 different materials. This is the desired goal in practice.
  • Save the file and re-open it. Blender will have automatically assigned both cubes to 1 material.
    Example.blend
Broken: 2.93.4 LTS; Broken: master **Short description of error** With two different objects in two different scenes sharing a same obdata Mesh, editing the mesh in one of the scene can fail to properly update object in the other scene. **Exact steps for others to reproduce the error** - Open attached file. - Go to scene 2. - Switch to Edit mode. - Assign the red material (first slot) to the cube in edit mode. - Switch back to Object mode. - Go to Scene 1, the Cube in Scene one still uses the second slot material (green). # Switch to edit mode and back, now the cube is shown with expected first material slot (red) as well. NOTE: If you replace step 4 by a mesh geometry editing (e.g. rotate the mesh in Edit mode), in current master there is the same missing update issue in Scene 1, but in 2.93LTS it is properly updated... Regression introduced by 51568030e9. [Example.blend](https://archive.blender.org/developer/F10831918/Example.blend) ------------------------ # Original report **System Information** Operating system: Windows-10-10.0.22000-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 680/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 472.12 **Blender Version** Broken: version: 2.93.0, branch: master, commit date: 2021-06-02 11:21, hash: `84da05a8b8` **Short description of error** If you link an instanced object to another scene, having it's material link to object, it can have a different material from the non-instance. However upon saving and re-opening the scene, the instance's material will revert to that of the non-instance. **Exact steps for others to reproduce the error** - Open attached file or - Take the default cube and assign a material to it. In the viewport display settings assign a color for the material, this will give feedback in the viewport to highlight the issue. - Create another material on the same cube and once again assign a color in the viewport display settings. - Set both materials to Object Link in the material properties. - Name the current scene "Scene 1" and proceed to create another scene named "Scene 2". - Return to Scene 1, and using Alt+D instance the cube. - Using Ctrl+ L, link the instance to Scene 2. Delete the newly created instance in Scene 1. - In Scene 2, assign the instance a different material than Scene 1 in edit mode. You now have 2 scenes, with 2 cubes that share mesh data, but that are using 2 different materials. This is the desired goal in practice. - Save the file and re-open it. Blender will have automatically assigned both cubes to 1 material. [Example.blend](https://archive.blender.org/developer/F10831918/Example.blend)

Added subscriber: @Bobo_The_Imp

Added subscriber: @Bobo_The_Imp

Added subscriber: @mano-wii

Added subscriber: @mano-wii

Thanks for the report, I can confirm the problem.

I believe the #core module handles Read/Write .blend files (Am I right?), so tagging it.

Thanks for the report, I can confirm the problem. I believe the #core module handles Read/Write .blend files (Am I right?), so tagging it.

Added subscriber: @mont29

Added subscriber: @mont29

There is no write/load bug here, 'assigning a material in edit mode' means you assign the active material index (i.e. material slot) to the selected faces of the mesh. This will affect both objects, since they share the same mesh, assigning faces of that mesh to material slot 1 in one object will make it use material of material slot 1 in the other object as well.

The issue here is that object in scene 1 is not immediately updated (it is as soon as e.g. you switch to edit mode and back). Same goes if you edit mesh shape in Scene 2, go back to Object mode and switch to scene 1, you also need to force update to see the changes... Not sure what is happening here, it only happens in some specific order (e.g.if you change material slot assignment on mesh in scene 1, it is immediately updated in scene 2 as well).

There is no write/load bug here, 'assigning a material in edit mode' means you assign the active material index (i.e. material slot) to the selected faces of the *mesh*. This will affect both objects, since they share the same mesh, assigning faces of that mesh to material slot 1 in one object will make it use material of material slot 1 in the other object as well. The issue here is that object in scene 1 is not immediately updated (it is as soon as e.g. you switch to edit mode and back). Same goes if you edit mesh shape in Scene 2, go back to Object mode and switch to scene 1, you also need to force update to see the changes... Not sure what is happening here, it only happens in some specific order (e.g.if you change material slot assignment on mesh in scene 1, it is immediately updated in scene 2 as well).
Bastien Montagne changed title from Linked Instances Across Scenes with Material Link Set to Object do not Retain Material Assignment Through Saves to Linked Instances Across Scenes have unreliable updates when editing their common mesh data. 2021-10-08 16:34:52 +02:00

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

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

Oh I see!
The step "Set both materials to Object Link in the material properties" baffled my mind.
(I forgot to confirm)

Oh I see! The step "Set both materials to Object Link in the material properties" baffled my mind. (I forgot to confirm)

Added subscriber: @ideasman42

Added subscriber: @ideasman42

Mesh editing regression comes from 51568030e9 (tagging @ideasman42 here too).

Mesh editing regression comes from 51568030e9 (tagging @ideasman42 here too).
Philipp Oeser removed the
Interest
Modeling
label 2023-02-09 15:28:16 +01:00
Bastien Montagne added this to the Core project 2023-02-09 15:42:54 +01:00
Bastien Montagne removed this from the Core project 2023-02-09 18:20:37 +01:00
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
3 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#91996
No description provided.