3 class MspGLProperties(bpy.types.Panel):
4 bl_idname = "OBJECT_PT_mspgl_properties"
5 bl_label = "MspGL properties"
6 bl_space_type = "PROPERTIES"
7 bl_region_type = "WINDOW"
10 def draw(self, context):
11 obj = context.active_object
13 self.layout.prop(obj, "technique");
14 self.layout.prop(obj, "inherit_tech");
16 self.layout.prop(obj, "override_material");
17 self.layout.prop(obj, "compound");
18 self.layout.prop(obj, "lod_for_parent")
19 if obj.lod_for_parent:
20 self.layout.prop(obj, "lod_index")
22 def register_properties():
23 bpy.types.Object.technique = bpy.props.StringProperty(name="Technique", description="Name of the technique to use for rendering")
24 bpy.types.Object.inherit_tech = bpy.props.BoolProperty(name="Inherit technique", description="Inherit from the technique to customize textures")
25 bpy.types.Object.override_material = bpy.props.BoolProperty(name="Override material", description="Override material in the inherited texture as well", default=True)
26 bpy.types.Object.compound = bpy.props.BoolProperty(name="Compound with parent", description="Join this object to its parent when exporting")
27 bpy.types.Object.lod_for_parent = bpy.props.BoolProperty(name="LoD for parent", description="This object is a level of detail for its parent")
28 bpy.types.Object.lod_index = bpy.props.IntProperty(name="LoD index", description="Index of the level of detail", min=1, default=1)