Sun Position: fix error in HDRI mode when no env tex is selected
[blender-addons.git] / io_curve_svg / __init__.py
blob5ac9353a3a43cb399b5ecca297018504ed203ad1
1 # SPDX-License-Identifier: GPL-2.0-or-later
3 bl_info = {
4 "name": "Scalable Vector Graphics (SVG) 1.1 format",
5 "author": "JM Soler, Sergey Sharybin",
6 "blender": (2, 80, 0),
7 "location": "File > Import > Scalable Vector Graphics (.svg)",
8 "description": "Import SVG as curves",
9 "warning": "",
10 "doc_url": "{BLENDER_MANUAL_URL}/addons/import_export/curve_svg.html",
11 "support": 'OFFICIAL',
12 "category": "Import-Export",
16 # To support reload properly, try to access a package var,
17 # if it's there, reload everything
18 if "bpy" in locals():
19 import importlib
20 if "import_svg" in locals():
21 importlib.reload(import_svg)
24 import bpy
25 from bpy.props import StringProperty
26 from bpy_extras.io_utils import ImportHelper
29 class ImportSVG(bpy.types.Operator, ImportHelper):
30 """Load a SVG file"""
31 bl_idname = "import_curve.svg"
32 bl_label = "Import SVG"
33 bl_options = {'UNDO'}
35 filename_ext = ".svg"
36 filter_glob: StringProperty(default="*.svg", options={'HIDDEN'})
38 def execute(self, context):
39 from . import import_svg
41 return import_svg.load(self, context, filepath=self.filepath)
44 def menu_func_import(self, context):
45 self.layout.operator(ImportSVG.bl_idname,
46 text="Scalable Vector Graphics (.svg)")
49 def register():
50 bpy.utils.register_class(ImportSVG)
52 bpy.types.TOPBAR_MT_file_import.append(menu_func_import)
55 def unregister():
56 bpy.utils.unregister_class(ImportSVG)
58 bpy.types.TOPBAR_MT_file_import.remove(menu_func_import)
60 # NOTES
61 # - blender version is hardcoded
63 if __name__ == "__main__":
64 register()