make render, world and material buttons show when netrender is selected
authorMartin Poirier <theeth@yahoo.com>
Wed, 4 Nov 2009 20:42:05 +0000 (20:42 +0000)
committerMartin Poirier <theeth@yahoo.com>
Wed, 4 Nov 2009 20:42:05 +0000 (20:42 +0000)
release/scripts/io/netrender/client.py

index e1dc3f1b7b19fdf8f6776abb0f16a62bca26353d..52643af7d73b96d7702c91e45fb7b1e7b1a7a9cf 100644 (file)
@@ -253,3 +253,15 @@ class NetworkRenderEngine(bpy.types.RenderEngine):
                        
                        conn.close()
 
+def compatible(module):
+       exec("import " + module)
+       module = eval(module)
+       for member in dir(module):
+               subclass = getattr(module, member)
+               try:            subclass.COMPAT_ENGINES.add('NET_RENDER')
+               except: pass
+       del module
+
+compatible("properties_render")
+compatible("properties_world")
+compatible("properties_material")