-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path__init__.py
47 lines (36 loc) · 1.21 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
import bpy
bl_info = {
"name": "Acetone",
"author": "gwirn",
"version": (1, 0),
"blender": (2, 80, 0),
"location": "View3D > N > Acetone > Superimpose",
"description": "Superimpose two objects",
"warning": "",
"doc_url": "",
"category": "Superimpose Object",
}
def get_object_items(self, context):
return [(obj.name, obj.name, "") for obj in bpy.data.objects]
def register():
bpy.types.Scene.object_static = bpy.props.EnumProperty(
items=get_object_items, name="Static"
)
bpy.types.Scene.object_mobile = bpy.props.EnumProperty(
items=get_object_items, name="Mobile"
)
from . import ui
bpy.utils.register_class(ui.AcetonePanel)
bpy.utils.register_class(ui.AcetoneOperator)
bpy.types.Scene.rmsd = bpy.props.FloatProperty(name="Result")
bpy.types.Scene.rmsd_done = bpy.props.BoolProperty(name="RMSD Done", default=False)
def unregister():
del bpy.types.Scene.object_static
del bpy.types.Scene.object_mobile
from . import ui
bpy.utils.unregister_class(ui.AcetonePanel)
bpy.utils.unregister_class(ui.AcetoneOperator)
del bpy.types.Scene.rmsd
del bpy.types.Scene.rmsd_done
if __name__ == "__main__":
register()