Page MenuHome

Materials made from 'Make Single User' share animation from the material they were made from
Closed, ResolvedPublic


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.

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.



Event Timeline

Sebastian Parborg (zeddb) triaged this task as Confirmed, Medium priority.Dec 19 2018, 2:20 PM

I'm guessing this is a depsgraph issue?

@Sebastian Parborg (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.

@Bastien Montagne (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 ?

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

I'll close this as resolved then.