This repository has been archived by the owner on Dec 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
__init__.py
57 lines (46 loc) · 1.4 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
from unicodedata import category
import bpy
from . ui import *
from . operators import *
from . props import *
bl_info = {
"name": "PBR-Database-Importer",
"description": "",
"author": "biteworks (Add-on), Anton Palmqvist (Database)",
"version": (0, 0, 4),
"blender": (2, 83, 0),
"location": "3D View > Tools",
"warning": "",
"wiki_url": "https://github.com/biteworks/PBR-Database-Importer/wiki",
"tracker_url": "",
"category": "Generic"
}
classes = (
PBRDBIMPORTER_Props,
PBRDBIMPORTER_OT_CreateMaterial,
PBRDBIMPORTER_OT_CreateLightSource,
PBRDBIMPORTER_OT_CreateCamera,
PBRDBIMPORTER_PT_Panel,
PBRDBIMPORTER_PT_MaterialPanel,
PBRDBIMPORTER_PT_LightSourcesPanel,
# PBRDBIMPORTER_PT_CamerasPanel
PBRDBIMPORTER_PT_AboutPanel
)
categories = ("materials", "lightsources", "cameras")
def register():
from bpy.utils import register_class
for cls in classes:
register_class(cls)
bpy.types.Scene.pbrdbimporterprops = bpy.props.PointerProperty(
type=PBRDBIMPORTER_Props)
# Get initial API Data and cache it
for category in categories:
tempObj = PBR_DB_Connect(category)
tempObj.getApiData()
def unregister():
from bpy.utils import unregister_class
for cls in reversed(classes):
unregister_class(cls)
del bpy.types.Scene.pbrdbimporterprops
if __name__ == "__main__":
register()