]> git.tdb.fi Git - libs/gl.git/blobdiff - blender/io_mspgl/properties.py
Support exporting meshes from Blender using patch primitives
[libs/gl.git] / blender / io_mspgl / properties.py
index b21f45a2bfdc103ec2d130174cbb5fe87e54ba8a..6e1df6416b974ecb731d47d65c7fb7c53814a7b8 100644 (file)
@@ -43,13 +43,16 @@ class MspGLMeshProperties(bpy.types.Panel):
                mesh = context.active_object.data
 
                self.layout.prop(mesh, "smoothing")
-               self.layout.prop(mesh, "use_strips")
+               self.layout.prop(mesh, "use_patches")
+               if not mesh.use_patches:
+                       self.layout.prop(mesh, "use_strips")
 
                self.layout.separator()
 
                col = self.layout.column()
                col.label(text="Data selection")
-               col.prop(mesh, "use_lines")
+               if not mesh.use_patches:
+                       col.prop(mesh, "use_lines")
                col.prop(mesh, "vertex_groups")
                col.prop(mesh, "max_groups_per_vertex")
 
@@ -244,6 +247,7 @@ def register_properties():
                        ("MSPGL", "MspGL", "Compute vertex normals internally")))
        bpy.types.Mesh.use_lines = bpy.props.BoolProperty(name="Include lines", description="Include edges without faces as lines", default=False)
        bpy.types.Mesh.use_strips = bpy.props.BoolProperty(name="Use strips", description="Combine the mesh's triangles into triangle strips", default=True)
+       bpy.types.Mesh.use_patches = bpy.props.BoolProperty(name="Export as patches", description="Export faces as patches, suitable for tessellation", default=False)
        bpy.types.Mesh.vertex_groups = bpy.props.BoolProperty(name="Vertex groups", description="Include vertex groups and weights", default=False)
        bpy.types.Mesh.max_groups_per_vertex = bpy.props.IntProperty(name="Max groups", description="Maximum amount of groups per vertex", min=1, max=4, default=2)
        bpy.types.Mesh.use_uv = bpy.props.EnumProperty(name="Use UV", description="Use UV coordinates", default="UNIT0",