Changeset View
Changeset View
Standalone View
Standalone View
io_scene_vrml2/__init__.py
| Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | from bpy.props import ( | ||||
| CollectionProperty, | CollectionProperty, | ||||
| StringProperty, | StringProperty, | ||||
| BoolProperty, | BoolProperty, | ||||
| EnumProperty, | EnumProperty, | ||||
| FloatProperty, | FloatProperty, | ||||
| ) | ) | ||||
| from bpy_extras.io_utils import ( | from bpy_extras.io_utils import ( | ||||
| ExportHelper, | ExportHelper, | ||||
| orientation_helper_factory, | orientation_helper, | ||||
| path_reference_mode, | path_reference_mode, | ||||
| axis_conversion, | axis_conversion, | ||||
| ) | ) | ||||
| ExportVRMLOrientationHelper = orientation_helper_factory("ExportVRMLOrientationHelper", axis_forward='Z', axis_up='Y') | @orientation_helper(axis_forward='Z', axis_up='Y') | ||||
| class ExportVRML(bpy.types.Operator, ExportHelper): | |||||
| class ExportVRML(bpy.types.Operator, ExportHelper, ExportVRMLOrientationHelper): | |||||
| """Export mesh objects as a VRML2, colors and texture coordinates""" | """Export mesh objects as a VRML2, colors and texture coordinates""" | ||||
| bl_idname = "export_scene.vrml2" | bl_idname = "export_scene.vrml2" | ||||
| bl_label = "Export VRML2" | bl_label = "Export VRML2" | ||||
| filename_ext = ".wrl" | filename_ext = ".wrl" | ||||
| filter_glob = StringProperty(default="*.wrl", options={'HIDDEN'}) | filter_glob = StringProperty(default="*.wrl", options={'HIDDEN'}) | ||||
| use_selection = BoolProperty( | use_selection = BoolProperty( | ||||
| ▲ Show 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | |||||
| def menu_func_export(self, context): | def menu_func_export(self, context): | ||||
| self.layout.operator(ExportVRML.bl_idname, text="VRML2 (.wrl)") | self.layout.operator(ExportVRML.bl_idname, text="VRML2 (.wrl)") | ||||
| def register(): | def register(): | ||||
| bpy.utils.register_module(__name__) | bpy.utils.register_module(__name__) | ||||
| bpy.types.INFO_MT_file_export.append(menu_func_export) | bpy.types.TOPBAR_MT_file_export.append(menu_func_export) | ||||
| def unregister(): | def unregister(): | ||||
| bpy.utils.unregister_module(__name__) | bpy.utils.unregister_module(__name__) | ||||
| bpy.types.INFO_MT_file_export.remove(menu_func_export) | bpy.types.TOPBAR_MT_file_export.remove(menu_func_export) | ||||
| if __name__ == "__main__": | if __name__ == "__main__": | ||||
| register() | register() | ||||