Other methods could easily be supported in the future. The method now works as planned for the contour style. For style modules with Python shaders, there still is a problem that I will fix right away.
Included MediumType's initialization at proper time to avoid Blender's crash.