+class MspGLMaterialProperties(bpy.types.Panel):
+ bl_idname = "MATERIAL_PT_mspgl_properties"
+ bl_label = "MspGL properties"
+ bl_space_type = "PROPERTIES"
+ bl_region_type = "WINDOW"
+ bl_context = "material"
+
+ @classmethod
+ def poll(cls, context):
+ return context.active_object.active_material is not None
+
+ def draw(self, context):
+ mat = context.active_object.active_material
+ if not mat:
+ return
+
+ self.layout.prop(mat, "technique")
+ self.layout.prop(mat, "inherit_tech")
+ if mat.inherit_tech:
+ self.layout.prop(mat, "override_material")
+ self.layout.prop(mat, "srgb_colors")
+ self.layout.prop(mat, "array_atlas")
+ if mat.array_atlas:
+ self.layout.prop(mat, "array_layer")
+ self.layout.prop(mat, "material_map")
+
+class MspGLTextureProperties(bpy.types.Panel):
+ bl_idname = "TEXTURE_PT_mspgl_properties"
+ bl_label = "MspGL properties"
+ bl_space_type = "PROPERTIES"
+ bl_region_type = "WINDOW"
+ bl_context = "texture"
+
+ @classmethod
+ def poll(cls, context):
+ mat = context.active_object.active_material
+ return mat is not None and mat.active_texture is not None
+
+ def draw(self, context):
+ tex = context.active_object.active_material.active_texture
+ if not tex:
+ return
+
+ self.layout.prop(tex, "default_filter")
+
+classes = [MspGLMeshProperties, MspGLObjectProperties, MspGLMaterialProperties, MspGLTextureProperties]
+