-
Notifications
You must be signed in to change notification settings - Fork 4
/
__init__.py
72 lines (52 loc) · 1.96 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
67
68
69
70
71
72
#!/usr/bin/python3
import bpy
from .modules.geoscript import test_node_trees
bl_info = {
"name": "Anatomy Re-engineering Framework",
"author": "Freedom of Form Foundation",
"version": (0, 0, 1),
"blender": (3, 3, 0),
"location": "Unknown",
"description": "A CAD tool for humanoid anatomy alterations",
"warning": "Experimental",
"category": "3D View",
"doc_url": "https://",
"tracker_url": "https://",
}
# Define an operator (button) that allows the user to run the script:
class GeoscriptTestingOperator(bpy.types.Operator):
"""Run GeoScript test functions"""
bl_idname = "geoscript.run_tests"
bl_label = "Run GeoScript test functions"
def execute(self, context):
test_geometry_modifier = test_node_trees.ExampleFunction(
"test_geometry_modifier"
)
test_normal_distribution = test_node_trees.NormalDistribution(
"common.normal_distribution"
)
test_tubercule = test_node_trees.Tubercule("tubercule")
return {"FINISHED"}
class TEXT_EDITOR_PT_GeoscriptTestingPanel(bpy.types.Panel):
"""Creates a Panel in the text editor window"""
bl_label = "_PT_Hello World Panel"
bl_space_type = "TEXT_EDITOR"
bl_category = "GeoScript"
bl_region_type = "UI"
def draw(self, context):
layout = self.layout
obj = context.object
row = layout.row()
row.label(text="Hello world!", icon="WORLD_DATA")
row = layout.row()
row.operator("geoscript.run_tests")
def register():
bpy.utils.register_class(GeoscriptTestingOperator)
bpy.utils.register_class(TEXT_EDITOR_PT_GeoscriptTestingPanel)
print("Registered Anatomy Re-engineering Framework Addon")
def unregister():
bpy.utils.unregister_class(GeoscriptTestingOperator)
bpy.utils.unregister_class(TEXT_EDITOR_PT_GeoscriptTestingPanel)
print("Unregistered Anatomy Re-engineering Framework Addon")
if __name__ == "__main__":
register()