Materials made from 'Make Single User' share animation from the material they were made from #59390

Closed
opened 2018-12-14 23:07:35 +01:00 by Laurence Weedy · 11 comments

System Information
Operating system: Win10P Pro 64 bit
Graphics card: MSI 1080 - i7 6800k 16GB ram

Blender Version
version: 2.80 (sub 37), branch: blender2.8, commit date: 2018-12-14 16:29, hash: c7cc97c7b9, type: Release
build date: 14/12/2018, 08:44

Short description of error
This seems to work OK in 2.79 so guess is a bug.

In 2.8 -
With the default cube make a change the material so it has two shaders (say red and green) and a mix shader.
Set the factor of the mix node to say 0.2 and set a key frame for it.
Now Alt-D the cube to make another.
Go to Object/Relations/Make Single User and select Object&Data&Materials to make it single user.
Now go to the Shader Editor for the new cube and find the Factor of the Mix Shader and set it to a new value.
Materials.jpg
The two cubes will be different colours.
Press 'i' with cursor over the Factor window to make a key for it. Both cubes will become the same colour.

This is I think because Blender believes the Mix Shader for the two different materials are the same mix shader.

Hope that makes sense.

**System Information** Operating system: Win10P Pro 64 bit Graphics card: MSI 1080 - i7 6800k 16GB ram **Blender Version** version: 2.80 (sub 37), branch: blender2.8, commit date: 2018-12-14 16:29, hash: c7cc97c7b90, type: Release build date: 14/12/2018, 08:44 **Short description of error** This seems to work OK in 2.79 so guess is a bug. In 2.8 - With the default cube make a change the material so it has two shaders (say red and green) and a mix shader. Set the factor of the mix node to say 0.2 and set a key frame for it. Now Alt-D the cube to make another. Go to Object/Relations/Make Single User and select Object&Data&Materials to make it single user. Now go to the Shader Editor for the new cube and find the Factor of the Mix Shader and set it to a new value. ![Materials.jpg](https://archive.blender.org/developer/F5955707/Materials.jpg) The two cubes will be different colours. Press 'i' with cursor over the Factor window to make a key for it. Both cubes will become the same colour. This is I think because Blender believes the Mix Shader for the two different materials are the same mix shader. Hope that makes sense.
Author

Added subscriber: @LaurenceWeedy

Added subscriber: @LaurenceWeedy

Added subscriber: @ZedDB

Added subscriber: @ZedDB
Sergey Sharybin was assigned by Sebastian Parborg 2018-12-19 14:20:25 +01:00

I'm guessing this is a depsgraph issue?

I'm guessing this is a depsgraph issue?
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Think this is a duplicate of #59062?

Think this is a duplicate of #59062?

@ZedDB but my guess is that is either make Make Single User doesn't make action local or does not inform dependency graph about changes.

@ZedDB but my guess is that is either make `Make Single User` doesn't make action local or does not inform dependency graph about changes.
Sergey Sharybin removed their assignment 2018-12-19 15:26:56 +01:00
Bastien Montagne was assigned by Sergey Sharybin 2018-12-19 15:26:56 +01:00

Added subscribers: @mont29, @Sergey

Added subscribers: @mont29, @Sergey

@mont29, afraid need to bounce this to you, as the most familiar with all the library remap and such. A bit of a long story:

single_mat_users() does BKE_material_copy(), which does not do anything with actions. So, there is BKE_animdata_copy_id_action() for material's animation right after material copy. So one of the fixes is to add BKE_animdata_copy_id_action() for material node tree (if that is not NULL).

Alternatively, maybe need to pass some extra flags to BKE_material_copy() to say, that we want LIB_ID_COPY_ACTIONS ?

@mont29, afraid need to bounce this to you, as the most familiar with all the library remap and such. A bit of a long story: `single_mat_users()` does `BKE_material_copy()`, which does not do anything with actions. So, there is `BKE_animdata_copy_id_action()` for material's animation right after material copy. So one of the fixes is to add `BKE_animdata_copy_id_action()` for material node tree (if that is not NULL). Alternatively, maybe need to pass some extra flags to `BKE_material_copy()` to say, that we want `LIB_ID_COPY_ACTIONS` ?
Author

Hello,
This problem seems to have been fixed now with this mornings build - Win 64 ending 7e5 - 21/12/18. Was still a problem with yesterdays build.

Hope this helps

Hello, This problem seems to have been fixed now with this mornings build - Win 64 ending 7e5 - 21/12/18. Was still a problem with yesterdays build. Hope this helps

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

I'll close this as resolved then.

I'll close this as resolved then.
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#59390
No description provided.