This is a proposal I initially made here: https://github.com/FreeCAD/FreeCAD/pull/4503, but I'm now transferring to the forum so that it can be discussed.
App::Part has a Material property which type is currently App::PropertyMap.
However, to be consistent with other domains using materials (like Arch, especially) and with FreeCAD Material system, it should rather be App::PropertyLink.
Indeed, this is required to link a Material card to the object. Such a consistency is expected from workbenches which use the Material system extensively (like Render workbench).
Therefore my proposal is to make the type of App::Part Material property evolve to App::PropertyLink.
For existing documents with objects having a Material property of the old type, 2 cases:
- If the property is empty, it would be converted to App::PropertyLink.
- If the property has been filled in, we would transfer its content to a Material_old property and we create a Material property of type App::PropertyLink (with a warning message for the user)
Any comments welcome...