def execute(self, context):
from .export import DataExporter
exporter = DataExporter()
- exporter.collection = self.collection
- exporter.shared_resources = self.shared_resources
- exporter.export_to_file(context, self.filepath)
+ exporter.export_to_file(context, self.filepath,
+ collection=self.collection,
+ shared_resources=self.shared_resources)
return {'FINISHED'}
def draw(self, context):
def execute(self, context):
from .export_animation import AnimationExporter
exporter = AnimationExporter()
- exporter.export_all = self.export_all
- exporter.collection = self.collection
- exporter.looping_threshold = self.looping_threshold
- exporter.export_to_file(context, self.filepath)
+ exporter.export_to_file(context, self.filepath,
+ export_all=self.export_all,
+ collection=self.collection,
+ looping_threshold=looping_threshold)
return {'FINISHED'}
def draw(self, context):
def execute(self, context):
from .export_scene import SceneExporter
exporter = SceneExporter()
- exporter.selected_only = self.selected_only
- exporter.visible_only = self.visible_only
- exporter.collection = self.collection
- exporter.skip_existing = self.skip_existing
- exporter.export_to_file(context, self.filepath)
+ exporter.export_to_file(context, self.filepath,
+ selected_only=self.selected_only,
+ visible_only=self.visible_only,
+ collection=self.collection,
+ skip_existing=self.skip_existing)
return {'FINISHED'}
def draw(self, context):
exporter.export_to_directory(context, self.directory)
return {'FINISHED'}
+class AddRenderMethod(bpy.types.Operator):
+ bl_idname = "material.add_render_method"
+ bl_label = "Add Render Method"
+ bl_description = "Add a new render method to the material"
+
+ def execute(self, context):
+ mat = context.active_object.active_material
+ mat.render_methods.add()
+ mat.active_render_method_index = len(mat.uniforms)-1
+
+ return {"FINISHED"}
+
+class RemoveRenderMethod(bpy.types.Operator):
+ bl_idname = "material.remove_render_method"
+ bl_label = "Remove Render Method"
+ bl_description = "Remove the selected render method from the material"
+
+ def execute(self, context):
+ mat = context.active_object.active_material
+ mat.render_methods.remove(mat.active_render_method_index)
+ mat.active_render_method_index = min(mat.active_render_method_index, len(mat.render_methods)-1)
+
+ return {"FINISHED"}
+
class AddUniform(bpy.types.Operator):
bl_idname = "material.add_uniform"
bl_label = "Add Uniform"
return {"FINISHED"}
-classes = [ExportMspGLData, ExportMspGLAnimation, ExportMspGLScene, ExportMspGLProject, AddUniform, RemoveUniform]
+classes = [ExportMspGLData, ExportMspGLAnimation, ExportMspGLScene, ExportMspGLProject, AddRenderMethod,
+ RemoveRenderMethod, AddUniform, RemoveUniform]
def register_operators():
for c in classes: