[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31160] branches/soc-2010-moguri-2/release /scripts/ui/properties_material.py: Fixing my shaders panel to work with changes from trunk.

Mitchell Stokes mogurijin at gmail.com
Sun Aug 8 10:12:36 CEST 2010


Revision: 31160
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31160
Author:   moguri
Date:     2010-08-08 10:12:36 +0200 (Sun, 08 Aug 2010)

Log Message:
-----------
Fixing my shaders panel to work with changes from trunk. (Looks like changes to poll())

Modified Paths:
--------------
    branches/soc-2010-moguri-2/release/scripts/ui/properties_material.py

Modified: branches/soc-2010-moguri-2/release/scripts/ui/properties_material.py
===================================================================
--- branches/soc-2010-moguri-2/release/scripts/ui/properties_material.py	2010-08-08 07:32:04 UTC (rev 31159)
+++ branches/soc-2010-moguri-2/release/scripts/ui/properties_material.py	2010-08-08 08:12:36 UTC (rev 31160)
@@ -743,14 +743,15 @@
         col.prop(halo, "flares_sub", text="Subflares")
         col.prop(halo, "flare_subsize", text="Subsize")
 
-class MATERIAL_PT_shaders(MaterialButtonsPanel):
+class MATERIAL_PT_shaders(MaterialButtonsPanel, bpy.types.Panel):
     bl_label = "Custom Shaders"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
-    def poll(self, context):
+    @staticmethod
+    def poll(context):
         mat = context.material
         engine = context.scene.render.engine
-        return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in self.COMPAT_ENGINES)
+        return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in __class__.COMPAT_ENGINES)
 
     def draw(self, context):
         layout = self.layout





More information about the Bf-blender-cvs mailing list