Cleanup: quiet strict name warnings for addons a..h.
[blender-addons.git] / btrace / __init__.py
blob8f00f2c33368eea966ca597c34ad4b95268e6faf
1 # ##### BEGIN GPL LICENSE BLOCK #####
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License
5 # as published by the Free Software Foundation; either version 2
6 # of the License, or (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software Foundation,
15 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 # ##### END GPL LICENSE BLOCK #####
20 bl_info = {
21 "name": "Btrace",
22 "author": "liero, crazycourier, Atom, Meta-Androcto, MacKracken",
23 "version": (1, 2, 1),
24 "blender": (2, 78, 0),
25 "location": "View3D > Tools",
26 "description": "Tools for converting/animating objects/particles into curves",
27 "warning": "",
28 "wiki_url": "https://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Curve/Btrace",
29 "category": "Add Curve"}
31 if "bpy" in locals():
32 import importlib
33 importlib.reload(bTrace_props)
34 importlib.reload(bTrace)
35 else:
36 from . import bTrace_props
37 from . import bTrace
39 import bpy
40 from bpy.types import AddonPreferences
41 from .bTrace_props import (
42 TracerProperties,
43 addTracerObjectPanel,
45 from .bTrace import (
46 OBJECT_OT_convertcurve,
47 OBJECT_OT_objecttrace,
48 OBJECT_OT_objectconnect,
49 OBJECT_OT_writing,
50 OBJECT_OT_particletrace,
51 OBJECT_OT_traceallparticles,
52 OBJECT_OT_curvegrow,
53 OBJECT_OT_reset,
54 OBJECT_OT_fcnoise,
55 OBJECT_OT_meshfollow,
56 OBJECT_OT_materialChango,
57 OBJECT_OT_clearColorblender,
59 from bpy.props import (
60 EnumProperty,
61 PointerProperty,
65 # Add-on Preferences
66 class btrace_preferences(AddonPreferences):
67 bl_idname = __name__
69 expand_enum = EnumProperty(
70 name="UI Options",
71 items=[
72 ('list', "Drop down list",
73 "Show all the items as dropdown list in the Tools Region"),
74 ('col', "Enable Expanded UI Panel",
75 "Show all the items expanded in the Tools Region in a column"),
76 ('row', "Icons only in a row",
77 "Show all the items as icons expanded in a row in the Tools Region")
79 description="",
80 default='list'
83 def draw(self, context):
84 layout = self.layout
85 layout.label("UI Options:")
87 row = layout.row(align=True)
88 row.prop(self, "expand_enum", text="UI Options", expand=True)
91 # Define Classes to register
92 classes = (
93 TracerProperties,
94 addTracerObjectPanel,
95 OBJECT_OT_convertcurve,
96 OBJECT_OT_objecttrace,
97 OBJECT_OT_objectconnect,
98 OBJECT_OT_writing,
99 OBJECT_OT_particletrace,
100 OBJECT_OT_traceallparticles,
101 OBJECT_OT_curvegrow,
102 OBJECT_OT_reset,
103 OBJECT_OT_fcnoise,
104 OBJECT_OT_meshfollow,
105 OBJECT_OT_materialChango,
106 OBJECT_OT_clearColorblender,
107 btrace_preferences,
111 def register():
112 for cls in classes:
113 bpy.utils.register_class(cls)
114 bpy.types.WindowManager.curve_tracer = PointerProperty(type=TracerProperties)
117 def unregister():
118 for cls in classes:
119 bpy.utils.unregister_class(cls)
120 del bpy.types.WindowManager.curve_tracer
123 if __name__ == "__main__":
124 register()