Import_3ds: Fixed keyframe transformation
[blender-addons.git] / io_curve_svg / __init__.py
blob4d8553685ae2c20ca7d8ade0cf7eb5ddc8a91f7d
1 # SPDX-FileCopyrightText: 2011-2022 Blender Foundation
3 # SPDX-License-Identifier: GPL-2.0-or-later
5 bl_info = {
6 "name": "Scalable Vector Graphics (SVG) 1.1 format",
7 "author": "JM Soler, Sergey Sharybin",
8 "blender": (2, 80, 0),
9 "location": "File > Import > Scalable Vector Graphics (.svg)",
10 "description": "Import SVG as curves",
11 "warning": "",
12 "doc_url": "{BLENDER_MANUAL_URL}/addons/import_export/curve_svg.html",
13 "support": 'OFFICIAL',
14 "category": "Import-Export",
18 # To support reload properly, try to access a package var,
19 # if it's there, reload everything
20 if "bpy" in locals():
21 import importlib
22 if "import_svg" in locals():
23 importlib.reload(import_svg)
26 import bpy
27 from bpy.props import StringProperty
28 from bpy_extras.io_utils import ImportHelper
31 class ImportSVG(bpy.types.Operator, ImportHelper):
32 """Load a SVG file"""
33 bl_idname = "import_curve.svg"
34 bl_label = "Import SVG"
35 bl_options = {'UNDO'}
37 filename_ext = ".svg"
38 filter_glob: StringProperty(default="*.svg", options={'HIDDEN'})
40 def execute(self, context):
41 from . import import_svg
43 return import_svg.load(self, context, filepath=self.filepath)
46 def menu_func_import(self, context):
47 self.layout.operator(ImportSVG.bl_idname,
48 text="Scalable Vector Graphics (.svg)")
51 def register():
52 bpy.utils.register_class(ImportSVG)
54 bpy.types.TOPBAR_MT_file_import.append(menu_func_import)
57 def unregister():
58 bpy.utils.unregister_class(ImportSVG)
60 bpy.types.TOPBAR_MT_file_import.remove(menu_func_import)
62 # NOTES
63 # - blender version is hardcoded
65 if __name__ == "__main__":
66 register()