Import_3ds: Improved distance cue node setup
[blender-addons.git] / btrace / __init__.py
blobab61578e65e312600aa18de604387d08292da420
1 # SPDX-FileCopyrightText: 2017-2022 Blender Foundation
3 # SPDX-License-Identifier: GPL-2.0-or-later
6 bl_info = {
7 "name": "BTracer",
8 "author": "liero, crazycourier, Atom, Meta-Androcto, MacKracken",
9 "version": (1, 2, 4),
10 "blender": (2, 80, 0),
11 "location": "View3D > Sidebar > Create Tab",
12 "description": "Tools for converting/animating objects/particles into curves",
13 "warning": "",
14 "doc_url": "{BLENDER_MANUAL_URL}/addons/add_curve/btracer.html",
15 "category": "Add Curve",
18 import bpy
20 # if "bpy" in locals():
21 # import importlib
22 # importlib.reload(bTrace_props)
23 # importlib.reload(bTrace)
24 # else:
25 # from . import bTrace_props
26 # from . import bTrace
27 from . import bTrace_props
28 from . import bTrace
30 from bpy.types import AddonPreferences
31 from . bTrace_props import TracerProperties
33 from . bTrace import (
34 OBJECT_OT_convertcurve,
35 OBJECT_OT_objecttrace,
36 OBJECT_OT_objectconnect,
37 OBJECT_OT_writing,
38 OBJECT_OT_particletrace,
39 OBJECT_OT_traceallparticles,
40 OBJECT_OT_curvegrow,
41 OBJECT_OT_reset,
42 OBJECT_OT_fcnoise,
43 OBJECT_OT_meshfollow,
44 OBJECT_OT_materialChango,
45 OBJECT_OT_clearColorblender,
48 from . bTrace_panel import addTracerObjectPanel
49 from bpy.props import (
50 EnumProperty,
51 PointerProperty,
55 # Add-on Preferences
56 class btrace_preferences(AddonPreferences):
57 bl_idname = __name__
59 expand_enum: EnumProperty(
60 name="UI Options",
61 items=[
62 ('list', "Drop down list",
63 "Show all the items as dropdown list in the Tools Region"),
64 ('col', "Enable Expanded UI Panel",
65 "Show all the items expanded in the Tools Region in a column"),
66 ('row', "Icons only in a row",
67 "Show all the items as icons expanded in a row in the Tools Region")
69 description="",
70 default='list'
73 def draw(self, context):
74 layout = self.layout
75 layout.label(text="UI Options:")
77 row = layout.row(align=True)
78 row.prop(self, "expand_enum", text="UI Options", expand=True)
81 # Define Classes to register
82 classes = (
83 TracerProperties,
84 addTracerObjectPanel,
85 OBJECT_OT_convertcurve,
86 OBJECT_OT_objecttrace,
87 OBJECT_OT_objectconnect,
88 OBJECT_OT_writing,
89 OBJECT_OT_particletrace,
90 OBJECT_OT_traceallparticles,
91 OBJECT_OT_curvegrow,
92 OBJECT_OT_reset,
93 OBJECT_OT_fcnoise,
94 OBJECT_OT_meshfollow,
95 OBJECT_OT_materialChango,
96 OBJECT_OT_clearColorblender,
97 btrace_preferences
102 # register, unregister = bpy.utils.register_classes_factory(classes)
103 def register():
104 for cls in classes:
105 bpy.utils.register_class(cls)
106 bpy.types.WindowManager.curve_tracer = PointerProperty(type=TracerProperties)
108 def unregister():
109 for cls in classes:
110 bpy.utils.unregister_class(cls)
111 del bpy.types.WindowManager.curve_tracer
113 # if __name__ == "__main__":
114 # register()