The pull request is here and should be the base for discussions if this goes in the right direction. https://github.com/FreeCAD/FreeCAD-render/pull/13
I create this thread because @Nocturnial told me that he did some similar refactorings in his fork of the Render Workbench.
The material changes are similar. Except he uses a dict and I created a RenderMaterial class instead.
I went for a dict before, but I like the class approach more. It has two advantages.
1. With a dict you have to write "material['color']" with a class you can write "material.color". I think the later is easier to read. But this might be personal taste.
2. A class can be extended in the future to have methods. E.g. all renderers for now have the same use for the color. Create a comma separated list of the RGB values. So this could easily be implemented as a "getColorString" method on the RenderMaterial. @Nocturnial solved it by using a DiffuseColor property that is already a string. I think this is less flexible because maybe in the future we have a renderer that needs another representation of colors. Having a list of numbers is easier to transform the having to split a string back into its separate parts.
yorik wrote: ping
Nocturnial wrote: ping