]> git.tdb.fi Git - libs/math.git/blobdiff - blender/io_mspmath/properties.py
Add a Blender operator to export shapes
[libs/math.git] / blender / io_mspmath / properties.py
diff --git a/blender/io_mspmath/properties.py b/blender/io_mspmath/properties.py
new file mode 100644 (file)
index 0000000..b296e5a
--- /dev/null
@@ -0,0 +1,19 @@
+import bpy
+
+class MspMathObjectProperties(bpy.types.Panel):
+       bl_idname = "OBJECT_PT_mspgl_properties"
+       bl_label = "MspGL properties"
+       bl_space_type = "PROPERTIES"
+       bl_region_type = "WINDOW"
+       bl_context = "object"
+
+       def draw(self, context):
+               obj = context.active_object
+
+               self.layout.prop(obj, "shape_type");
+
+def register_properties():
+       bpy.types.Object.shape_type = bpy.props.EnumProperty(name="Shape type", description="Type of shape to use for exporting this object", default="AUTO",
+               items=(("AUTO", "Automatic", "Automatic"),
+                       ("BOX", "Box", "Box"),
+                       ("SPHERE", "Sphere", "Sphere")))