("INLINE", "Inline", "Embed textures in the object")))
separate_mesh = bpy.props.BoolProperty(name="Separate mesh", description="Write mesh data into a separate file", default=False)
- shared_mesh = bpy.props.BoolProperty(name="Shared mesh", description="Use mesh name for mesh file to enable sharing", default=True)
separate_tech = bpy.props.BoolProperty(name="Separate technique", description="Write technique data into a separate file", default=False)
- shared_tech = bpy.props.BoolProperty(name="Shared technique", description="Use material name for technique file to enable sharing", default=True)
+ shared_resources = bpy.props.BoolProperty(name="Shared resources", description="Use global names for resource files to enable sharing", default=True)
export_lods = bpy.props.BoolProperty(name="Export LoDs", description="Export all levels of detail", default=True)
col = self.layout.column()
col.label("Files")
col.prop(self, "separate_mesh")
- if self.separate_mesh:
- col.prop(self, "shared_mesh")
col.prop(self, "separate_tech")
- if self.separate_tech:
- col.prop(self, "shared_tech")
+ if self.separate_mesh or self.separate_tech:
+ col.prop(self, "shared_resources")
class ExportMspGLArmature(bpy.types.Operator, ExportMspGLBase):
bl_idname = "export.mspgl_armature"
def __init__(self):
self.textures = "REF"
self.separate_mesh = False
- self.shared_mesh = True
self.separate_tech = False
- self.shared_tech = True
+ self.shared_resources = True
self.export_lods = True
def export(self, context, out_file, obj=None, progress=None):
if self.separate_mesh:
from .outfile import open_output
path, name = external_name(out_file, ".mesh", lod_index)
- if self.shared_mesh:
+ if self.shared_resources:
name = obj.data.name+".mesh"
mesh_out = open_output(os.path.join(path, name))
mesh = mesh_export.export(context, mesh_out, obj, progress)
else:
out_file.write("technique", '"{}"'.format(obj.technique))
elif self.separate_tech:
- if self.shared_tech and material:
+ if self.shared_resources and material:
name = material.name+".tech"
tech_out = open_output(os.path.join(path, name))
self.export_technique_definition(material, tech_out)