Swap each material link to "Object" and "Data" , remove material from current material slot. #82712

Closed
opened 2020-11-14 04:11:54 +01:00 by takeshi funahashi · 18 comments

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 980 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.71

Blender Version
Broken: version: 2.92.0 Alpha, branch: master (modified), commit date: 2020-10-21 22:51, hash: ef5d6e9c45

Maybe all verison blender have not worked I suppose.

Short description of error
when change material of each material slot of the object, from "Data" to "Object" or "Object" to "Data" ,
current material which used for the slot removed. so user need to assgin them one by one again.

Exact steps for others to reproduce the error

  1. load cube.
  2. in material property, add new 3 material slots
  3. with select cube in edit mode, , assgin faces for each material slots. (so cube has 3 material slots assgined for 6 faces)
  4. set different material for each material slots. with name mat_a, mat_b, mat_c. (just change base color with principled bsdf )

(or open attached blend. file)
slottest.blend

  1. change each "material" link to "Data" to "Object" ,

link1.JPG

when change material link to , it remove the material from current active material slot or sometimes it set other material (I do not know how it choose material to swap)

link2.JPG

material slots already assgined for faces. so they keep as same as before. (it is reasonable), then there seems no need to remove or change material from each slot.

Though untill I close the scene , blender can keep those material temporally, then I can set material again for each material_slot
but it is annoying when there are many materials already in the current scene. it can easy mess up my current material setting for the mesh (or object)
I only hope to swap material link way not expect it change or remove material (I will manually do it, as I like for duplicated mesh when I need)

**System Information** Operating system: Windows-10-10.0.18362-SP0 64 Bits Graphics card: GeForce GTX 980 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.71 **Blender Version** Broken: version: 2.92.0 Alpha, branch: master (modified), commit date: 2020-10-21 22:51, hash: `ef5d6e9c45` Maybe all verison blender have not worked I suppose. **Short description of error** when change material of each material slot of the object, from "Data" to "Object" or "Object" to "Data" , current material which used for the slot removed. so user need to assgin them one by one again. **Exact steps for others to reproduce the error** 1. load cube. 2. in material property, add new 3 material slots 3. with select cube in edit mode, , assgin faces for each material slots. (so cube has 3 material slots assgined for 6 faces) 4. set different material for each material slots. with name mat_a, mat_b, mat_c. (just change base color with principled bsdf ) (or open attached blend. file) [slottest.blend](https://archive.blender.org/developer/F9280437/slottest.blend) 5. change each "material" link to "Data" to "Object" , ![link1.JPG](https://archive.blender.org/developer/F9280457/link1.JPG) when change material link to , it remove the material from current active material slot or sometimes it set other material (I do not know how it choose material to swap) ![link2.JPG](https://archive.blender.org/developer/F9280466/link2.JPG) material slots already assgined for faces. so they keep as same as before. (it is reasonable), then there seems no need to remove or change material from each slot. Though untill I close the scene , blender can keep those material temporally, then I can set material again for each material_slot but it is annoying when there are many materials already in the current scene. it can easy mess up my current material setting for the mesh (or object) I only hope to swap material link way not expect it change or remove material (I will manually do it, as I like for duplicated mesh when I need)

Added subscriber: @TakeshiFunahashi

Added subscriber: @TakeshiFunahashi

Added subscriber: @rjg

Added subscriber: @rjg

I think this behavior is correct, but depending on your use case possibly inconvenient. When you change the link form Data to Object you're telling the material slot to use a material linked to the object and not the object's data. The option to change the link is on the material slot, not the material. Hence the slot presents an empty material selection, since the material that was previously associated with it is not (yet) linked to the object. In this step Blender could theoretically link the material automatically to the object, but this may not be intended, hence it doesn't do that. That is why you have to select an existing material, which then tells Blender to you actually meant to create a link between the object and the existing material. Then both the object and object's data are users of the same material, as indicated by the number "2" behind the materials name in the material slot.

Looking at the sub-hierarchy of the object in the Outliner between the different steps visualizes the associations between the object (orange triangle icon), the object's mesh data (green triangle icon) and the materials. It may help to understand my description a bit better.

I think this behavior is correct, but depending on your use case possibly inconvenient. When you change the link form *Data* to *Object* you're telling the material slot to use a material linked to the object and not the object's data. The option to change the link is on the material slot, not the material. Hence the slot presents an empty material selection, since the material that was previously associated with it is not (yet) linked to the object. In this step Blender could theoretically link the material automatically to the object, but this may not be intended, hence it doesn't do that. That is why you have to select an existing material, which then tells Blender to you actually meant to create a link between the object and the existing material. Then both the object and object's data are users of the same material, as indicated by the number "2" behind the materials name in the material slot. Looking at the sub-hierarchy of the object in the Outliner between the different steps visualizes the associations between the object (orange triangle icon), the object's mesh data (green triangle icon) and the materials. It may help to understand my description a bit better.

Though untill I close the scene , blender can keep those material temporally, then I can set material again for each material_slot

I'm not entirely sure what you mean by this. Does Blender lose the changes you've made, e.g. the material is no longer linked to the object when you open the file later?

I've tested this an all changes where saved in the file.

> Though untill I close the scene , blender can keep those material temporally, then I can set material again for each material_slot I'm not entirely sure what you mean by this. Does Blender lose the changes you've made, e.g. the material is no longer linked to the object when you open the file later? I've tested this an all changes where saved in the file.

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

What I means, when I change material "data" to "object", it change current material of each slot. or when I first set material then change material link, data to object, the material of the slot disappear. In this case, material A change as material C for slot A (it is because I already swap "data" to "object" few times, then the material seems not simply removed but change with other material.

then material A do not be linked any object. (current material link mode) So I just supposed when save the scene mateiral A will be deleted as orhpan data.
if blender can keep those material which likned for DATA before, but currently not used correspond with current user material setting . it is good. thank you.
But it is not main things what I reported.

There is almost no need, blender auto change current material which set in each material slots.. I know material link change from mesh-data to object, or object to mesh-data.
but it never means we change material of the same material slot. and not expect it disappear from current slot.
(so as you said, maybe blender keep data, even though I saved, so I can still choose them but it not things easy.. after all I need to serch material which used before for the slot.)

What I means, when I change material "data" to "object", it change current material of each slot. or when I first set material then change material link, data to object, the material of the slot disappear. In this case, material A change as material C for slot A (it is because I already swap "data" to "object" few times, then the material seems not simply removed but change with other material. then material A do not be linked any object. (current material link mode) So I just supposed when save the scene mateiral A will be deleted as orhpan data. if blender can keep those material which likned for DATA before, but currently not used correspond with current user material setting . it is good. thank you. But it is not main things what I reported. There is almost no need, blender auto change current material which set in each material slots.. I know material link change from mesh-data to object, or object to mesh-data. but it never means we change material of the same material slot. and not expect it disappear from current slot. (so as you said, maybe blender keep data, even though I saved, so I can still choose them but it not things easy.. after all I need to serch material which used before for the slot.)

What I means, when I change material "data" to "object", it change current material of each slot.

There is almost no need, blender auto change current material which set in each material slots.

Am I understanding you correctly that changing the link from Data to Object on one material slot affects all other material slots? That would indeed be a bug.

then material A do not be linked any object. (current material link mode) So I just supposed when save the scene mateiral A will be deleted as orhpan data.
if blender can keep those material which likned for DATA before, but currently not used correspond with current user material setting . it is good. thank you.
But it is not main things what I reported.

The material is still linked to the mesh data, therefore it's not orphaned data. It will be saved.

I know material link change from mesh-data to object, or object to mesh-data. but it never means we change material of the same material slot. and not expect it disappear from current slot.

That's what I tried to explain in my first comment. It does mean that you're changing the material. When you've originally created the material and assigned it to the slot, it is linked to the object's mesh data. You can see this in the outliner, all materials are listed under the data.

material_link.png

Now if you switch the link from Data to Object ...

material_link_2.png

... the material slot will not have any material associated with it. The reason for this is that there is no material linked to the object, only the data. This can be seen in the outliner, as before all material are listed under the data, none under the object. I believe the reason that Blender doesn't automatically link the material to the object when switching the link from Data to Object is that this is not always what is intended. A user may not want the same material to be linked to both data and the object.

material_link_3.png

Now if you select the material for the material slot after changing the link type to Object ...

material_link_4.png

... Blender links the material to the object for you. You will see that the same material is now also listed under the object in the outliner.

material_link_5.png

I hope this clears things up and avoids miscommunication.

> What I means, when I change material "data" to "object", it change current material of each slot. > There is almost no need, blender auto change current material which set in each material slots. Am I understanding you correctly that changing the link from *Data* to *Object* on one material slot affects all other material slots? That would indeed be a bug. > then material A do not be linked any object. (current material link mode) So I just supposed when save the scene mateiral A will be deleted as orhpan data. > if blender can keep those material which likned for DATA before, but currently not used correspond with current user material setting . it is good. thank you. > But it is not main things what I reported. The material is still linked to the mesh data, therefore it's not orphaned data. It will be saved. > I know material link change from mesh-data to object, or object to mesh-data. but it never means we change material of the same material slot. and not expect it disappear from current slot. That's what I tried to explain in my first comment. It does mean that you're changing the material. When you've originally created the material and assigned it to the slot, it is linked to the object's mesh data. You can see this in the outliner, all materials are listed under the data. ![material_link.png](https://archive.blender.org/developer/F9283039/material_link.png) Now if you switch the link from *Data* to *Object* ... ![material_link_2.png](https://archive.blender.org/developer/F9283045/material_link_2.png) ... the material slot will not have any material associated with it. The reason for this is that there is no material linked to the object, only the data. This can be seen in the outliner, as before all material are listed under the data, none under the object. I believe the reason that Blender doesn't automatically link the material to the object when switching the link from *Data* to *Object* is that this is not always what is intended. A user may not want the same material to be linked to both data and the object. ![material_link_3.png](https://archive.blender.org/developer/F9283048/material_link_3.png) Now if you select the material for the material slot after changing the link type to *Object* ... ![material_link_4.png](https://archive.blender.org/developer/F9283051/material_link_4.png) ... Blender links the material to the object for you. You will see that the same material is now also listed under the object in the outliner. ![material_link_5.png](https://archive.blender.org/developer/F9283053/material_link_5.png) I hope this clears things up and avoids miscommunication.

Then I may not need all detail of code behavor, but I think, it is good to know "you're telling the material slot to use a material linked to the object and not the object's data."
because I did not think so.. I telling material slot, to change the material (which in the slot) link from object to object_data.. it is all what I intended.

do not intend to change material which the slot currently keep.

Then I may not need all detail of code behavor, but I think, it is good to know "you're telling the material slot to use a material linked to the object and not the object's data." because I did not think so.. I telling material slot, to change the material (which in the slot) link from object to object_data.. it is all what I intended. do not intend to change material which the slot currently keep.

I understand what your intention is and this is a bit confusing. I will check with the other developers just to make sure that I'm not misunderstanding the intention behind the current implementation. I can see both your and my interpretation to be valid, although Blender currently behaves like I described.

From a user's perspective I can understand the expectation that it should change the current link of the material from the data to the object. The tooltip "Link material to the object or the object's data" also does not clarify this case, as it implies that this is an option for the material and not just the material slot.

I understand what your intention is and this is a bit confusing. I will check with the other developers just to make sure that I'm not misunderstanding the intention behind the current implementation. I can see both your and my interpretation to be valid, although Blender currently behaves like I described. From a user's perspective I can understand the expectation that it should change the current link of the material from the data to the object. The tooltip "Link material to the object or the object's data" also does not clarify this case, as it implies that this is an option for the material and not just the material slot.

So I could understand better how blender treat material link change. with your pics and each step guide. Thanks.

but I can not understand, (though blender work as you discribed, but I feel that is reason why I report and hope to change way, because it is not usuall manner for user)

"The reason thatBlender doesn't automatically link the material to the object when switching the link from Data to Object is that this is not always what is intended! A user may not want the same material to be linked to both data and the object."

when I ask blender , "hey blender!! please change material link from data to object please! " with kind voice, I mean "change the material link from "object" to "data" of the current slots. (is there any exceptional case?)

But blender deny user request, because it may keep link for both, so she think it may need one more step to confirm user "do your really attach it for material?", after all she anyway hide it from current slot. or sometimes to user notice, something changed,, auto swap with different one. it is what blender do for me.
So I do not know what she really thinking, but hope she may change the way when I asked same thing..

It is what actually current blender do. I think.. so nowdays we know many AI product which try to do what user talk. , if they behave so, I do not like it. I do not like such friend.


So I could understand better how blender treat material link change. with your pics and each step guide. Thanks. but I can not understand, (though blender work as you discribed, but I feel that is reason **why I report and hope to change way, because it is not usuall manner for user**) "The reason that**Blender doesn't automatically link the material to the object when switching the link from Data to Object** is that this is not always what is intended! A user may not want the same material to be linked to both data and the object." when I ask blender , "hey blender!! please change material link from data to object please! " with kind voice, I mean "change the material link from "object" to "data" of the current slots. (is there any exceptional case?) But blender deny user request, because it may keep link for both, so she think it may need one more step to confirm user "do your really attach it for material?", after all she anyway hide it from current slot. or sometimes to user notice, something changed,, auto swap with different one. it is what blender do for me. So I do not know what she really thinking, but hope she may change the way when I asked same thing.. It is what actually current blender do. I think.. so nowdays we know many AI product which try to do what user talk. , if they behave so, I do not like it. I do not like such friend. ```

Anyway thanks all detail guide seriously I thanks you take time to guide me with pics..

I understand it is not bug. But for user experience, it seems not what I hope and I think it may better to change. without there is user who do not like to keep same material in current slot.

And to make things easy I could make script with one click without change all slot materials.  yes it is not difficult at all. At current I use it.. so if yours dev team check this request I apreciate it. 
Anyway thanks all detail guide seriously I thanks you take time to guide me with pics.. I understand it is not bug. But for user experience, it seems not what I hope and I think it may better to change. without there is user who do not like to keep same material in current slot. ``` And to make things easy I could make script with one click without change all slot materials. yes it is not difficult at all. At current I use it.. so if yours dev team check this request I apreciate it.

Added subscriber: @mont29

Added subscriber: @mont29

Changed status from 'Needs User Info' to: 'Archived'

Changed status from 'Needs User Info' to: 'Archived'
Bastien Montagne self-assigned this 2020-11-14 14:08:08 +01:00

Those are two different sets of data, it is intended as such, so there is no bug here. Discussion about design/UI/UX is alwasy welcome, but should be kept separated from the bug tracker.

Those are two different sets of data, it is intended as such, so there is no bug here. Discussion about design/UI/UX is alwasy welcome, but should be kept separated from the bug tracker.

Yes I know when you say bug it means the code which you offered not work as you designed. so it is not bug because maybe you designed so.

Yes I know when you say bug it means the code which you offered not work as you designed. so it is not bug because maybe you designed so.

I calm down myself, then read again carefrully blender manuall, because I can not udnerstand, why it made so.
I understand how developer make this function, but it is not reasonable for me Blender manuall discribed it clear.

Data-Block
Material
The Material Data-Block Menu for the selected material slot. Here new materials can be created, or existing materials can to the material slot.

Data-block Links
Specifies whetherthe material is to be linked to the Object or to the Object Data.

The Link selector has two choices, Data and Object. These two menu choices determine whether the material is linked to the object or to the data(e.g. a mesh or curve). The Data menu item determines that this material will be linked to the mesh’s data-block which is linked to the object’s data-block. The Object menu item determines that the material will be linked to the object’s data-block directly.


The material ( "Which I currently selected in th material slot") need to be change link with. Then yes it change link. so yes it work as discribed,
But please understand why I think it is not usuall (acceptable) behavor.

There is no discribe, This function remove the material from current material slot.

I understand, Developer do not Admit this is Bug, but I can not approve, the behavor is reasonable and user can expectable.
the function do not do "necesasry thing". After change material link from Object to Data, or Data to Object, it should be expected to re-locate the Material in same material-slot as same as before.

I request so, but I do not think it need to be requested in another forum etc.. Because the behavor should be expected.

If developer think, "Remove material from current material slot" is usuall. The behavor must need to be discribed as Manuall. (no one expect it, I think)

I calm down myself, then read again carefrully blender manuall, because I can not udnerstand, why it made so. I understand how developer make this function, but it is not reasonable for me Blender manuall discribed it clear. > Data-Block > Material > The Material Data-Block Menu for the selected material slot. Here new materials can be created, or existing materials can to the material slot. > > **Data-block Links** > Specifies whether**the material is to be linked** to the Object or to the Object Data. > > The Link selector has two choices, Data and Object. These two menu choices determine **whether the material is linked to the object or to the data**(e.g. a mesh or curve). The Data menu item determines that this material will be linked to the mesh’s data-block which is linked to the object’s data-block. The Object menu item determines that the material will be linked to the object’s data-block directly. **** The material ( "Which I currently selected in th material slot") need to be change link with. Then yes it change link. so yes it work as discribed, But please understand why I think it is not usuall (acceptable) behavor. There is no discribe, **This function remove the material from current material slot.** I understand, Developer do not Admit this is Bug, but I can not approve, the behavor is reasonable and user can expectable. the function do not do "necesasry thing". After change material link from Object to Data, or Data to Object, it should be expected to re-locate the Material in same material-slot as same as before. I request so, but I do not think it need to be requested in another forum etc.. Because the behavor should be expected. If developer think, "Remove material from current material slot" is usuall. The behavor must need to be discribed as Manuall. (no one expect it, I think)

Then the actual behavor of this function is, Choose <"Data-linked" Material or "Object-linked" Material for the Current Active Material Slot.>

so you say, Material A (witch link with Data) and same label Material A (which link with Object) are different sets of Data.

It work so. Then why Blender developer do not change Manuall as it should be? it discribed

whether the material is linked to the object or to the data

From this , I can not read, which may generate new Material.

So problem is, developer think it is usuall there is no bug, because you desgined so, but you do not offer right description for same function.
then when user report as bug, you said, "it is desgiend so if you need to hope, please add request in another place" As for me it is not welcom. because I do not hope to kill my time twice
to report same thing even though it is not bug of code, but miss infomation of manual.

Then the actual behavor of this function is, Choose <"Data-linked" Material or "Object-linked" Material for the Current Active Material Slot.> so you say, Material A (witch link with Data) and same label Material A (which link with Object) are different sets of Data. It work so. Then why Blender developer do not change Manuall as it should be? it discribed whether **the material is linked to the object or to the data** From this , I can not read, which may generate new Material. So problem is, developer think it is usuall there is no bug, because you desgined so, but you do not offer right description for same function. then when user report as bug, you said, "it is desgiend so if you need to hope, please add request in another place" As for me it is not welcom. because I do not hope to kill my time twice to report same thing even though it is not bug of code, but miss infomation of manual.

From document description it need to work like this (I made this add on work, to exchange all of material slots link but, if user use the blender default UI fucntion , it need to do same -thing,
or you should not discribe "Data-block Links Specifies whether the material is to be linked to the Object or to the Object Data."

actually blender do not change material link, just change material slot to use material which linked with another. as Robert Guetzkow (rjg) said.

When you change the link form Data to Object you're telling the material slot to use a material linked to the object and not the object's data. The option to change the link is on the material slot, not the material.

and just un-link material from current slot whcih user activated.

linktodata.JPG

linktoobj.JPG

If developers made so, There is no reason to afraid, " that Blender doesn't automatically link the material to the object when switching the link from Data to Object is that this is not always what is intended. A user may not want the same material to be linked to both data and the object."

but dev did not make so, then just say it is desgined so. But it do not work as manuall which discribe about same function. about this case, I think user can call bug. because as user, we only check manuall then expect, the tool work as it is described.

Then many product, or aprication dev team may say, at least it is issue, then may keep it as bug tracker, untill correct it. (manuall infomation or actually make code which change material link)

From document description it need to work like this (I made this add on work, to exchange all of material slots link but, if user use the blender default UI fucntion , it need to do same -thing, or you should not discribe "Data-block Links Specifies whether **the material is to be linked to the Object or to the Object Data**." actually blender do not change material link, just change material slot to use material which linked with another. as Robert Guetzkow (rjg) said. **When you change the link form Data to Object you're telling the material slot to use a material linked to the object and not the object's data. The option to change the link is on the material slot, not the material.** and just un-link material from current slot whcih user activated. ![linktodata.JPG](https://archive.blender.org/developer/F9387331/linktodata.JPG) ![linktoobj.JPG](https://archive.blender.org/developer/F9387339/linktoobj.JPG) If developers made so, There is no reason to afraid, " that Blender doesn't automatically link the material to the object when switching the link from Data to Object is that this is not always what is intended. A user may not want the same material to be linked to both data and the object." but dev did not make so, then just say it is desgined so. But it do not work as manuall which discribe about same function. about this case, I think user can call bug. because as user, we only check manuall then expect, the tool work as it is described. Then many product, or aprication dev team may say, at least it is issue, then may keep it as bug tracker, untill correct it. (manuall infomation or actually make code which change material link)
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#82712
No description provided.