+ self.layout.prop(obj, "compound")
+ self.layout.prop(obj, "lod_for_parent")
+ if obj.lod_for_parent:
+ self.layout.prop(obj, "lod_index")
+
+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, "render_mode")
+ if mat.render_mode=='CUSTOM':
+ self.layout.prop(mat, "shader")
+ elif mat.render_mode=='EXTERNAL':
+ self.layout.prop(mat, "technique")
+ self.layout.prop(mat, "array_atlas")
+ if mat.array_atlas:
+ self.layout.prop(mat, "array_layer")
+ if mat.render_mode!='EXTERNAL':
+ self.layout.prop(mat, "material_map")
+
+class MspGLTextureNodeProperties(bpy.types.Panel):
+ bl_idname = "NODE_PT_mspgl_properties"
+ bl_label = "MspGL properties"
+ bl_space_type = "NODE_EDITOR"
+ bl_region_type = "UI"
+ bl_category = "Item"
+
+ @classmethod
+ def poll(cls, context):
+ node = context.active_node
+ return node and node.type=='TEX_IMAGE'
+
+ def draw(self, context):
+ node = context.active_node
+ if not node:
+ return
+
+ self.layout.prop(node, "default_filter")
+ if not node.default_filter:
+ self.layout.prop(node, "use_mipmap")
+ self.layout.prop(node, "max_anisotropy")
+
+classes = [MspGLMeshProperties, MspGLObjectProperties, MspGLMaterialProperties, MspGLTextureNodeProperties]