I'm working on my addon for Blender, which is a simple offline renderer. I'm stuck at the material system for two days. I would be much appreciated if anyone gives me a pointer.
The issue is that in order to implement my own material system, I have to store my material information in the context.material class, however I've no idea how to add a customized property for this class. I noticed that there are customized property for other external renderers, such as this one: http://www.mitsuba-renderer.org/ There is a property named "context.material.mitsuba_material". What I want is something like "context.material.my_material" so that I can store my material information there.
I also found this class in the render addon script:
@MitsubaAddon.addon_register_class
class mitsuba_material(declarative_property_group):
'''
Storage class for Mitsuba Material settings.
'''
ef_attach_to = ['Material']
I believe it has something to do with this customized property, however I got no luck by implementing myself.
Forgive me if it is a silly question and I did googled it, got nothing useful yet.