forked from corrodedHash/blender-fractals
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path__init__.py
66 lines (49 loc) · 1.8 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
bl_info = {
"name": "Fractals",
"author": "corrodedHash",
"version": (0, 3),
"blender": (2, 75, 0),
"location": "View3D > Add > Mesh > Fractal",
"description": "Adds a new fractal",
"warning": "",
"wiki_url": "",
"category": "Add Mesh",
}
import bpy # NOQA
# import dragon # NOQA
from .fractal import Fractal_add_object # NOQA
from .dragon import DragonCurve_add_object # NOQA
# Registration
def add_dragon_button(self, context):
self.layout.operator(
DragonCurve_add_object.bl_idname,
text="Dragon Curve",
icon='PLUGIN')
def add_fractal_button(self, context):
self.layout.operator(
Fractal_add_object.bl_idname,
text="Fractal",
icon='PLUGIN')
# This allows you to right click on a button and link to the manual
def add_dragon_manual_map():
url_manual_prefix = "http://wiki.blender.org/index.php/Doc:2.6/Manual/"
url_manual_mapping = (
("bpy.ops.mesh.add_object", "Modeling/Objects"),
)
return url_manual_prefix, url_manual_mapping
def register():
# bpy.utils.register_class(dragon.DragonCurve_add_object)
# bpy.utils.register_manual_map(add_object_manual_map)
# bpy.types.INFO_MT_mesh_add.append(add_dragon_button)
bpy.utils.register_class(Fractal_add_object)
# bpy.utils.register_manual_map(add_object_manual_map)
bpy.types.INFO_MT_mesh_add.append(add_fractal_button)
def unregister():
# bpy.utils.unregister_class(dragon.DragonCurve_add_object)
# bpy.utils.unregister_manual_map(add_object_manual_map)
# bpy.types.INFO_MT_mesh_add.remove(add_dragon_button)
bpy.utils.unregister_class(Fractal_add_object)
# bpy.utils.unregister_manual_map(add_object_manual_map)
bpy.types.INFO_MT_mesh_add.remove(add_fractal_button)
if __name__ == "__main__":
register()