-
Notifications
You must be signed in to change notification settings - Fork 249
/
__init__.py
78 lines (60 loc) · 2.92 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
73
74
75
76
'''
Copyright (C) 2023 CG Cookie
http://cgcookie.com
Created by Jonathan Denning, Jonathan Williamson, and Patrick Moore
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
'''
# initialize deep debugging as early as possible
from .addon_common.terminal.deepdebug import DeepDebug
DeepDebug.init(
fn_debug='RetopoFlow_debug.txt',
clear=True, # clear deep debugging file every Blender session
enable_only_once=True, # only allow this feature to be enabled for one session
)
#################################################################################################################################
# NOTE: the following lines are automatically updated based on hive.json
# if "warning" is present (not commented out), a warning icon will show in add-ons list
bl_info = {
"name": "RetopoFlow",
"description": "A suite of retopology tools for Blender through a unified retopology mode",
"author": "Jonathan Denning, Jonathan Lampel, Jonathan Williamson, Patrick Moore, Patrick Crawford, Christopher Gearhart",
"blender": (3, 6, 0),
"version": (3, 4, 3),
"doc_url": "https://docs.retopoflow.com",
"tracker_url": "https://github.com/CGCookie/retopoflow/issues",
"location": "View 3D > Header",
"category": "3D View",}
# update bl_info above based on hive data
from .addon_common.hive.hive import Hive
Hive.update_bl_info(bl_info, __file__)
import bpy
def register(): pass
def unregister(): pass
from .addon_common.terminal import term_printer
if bpy.app.background:
term_printer.boxed(
f'Blender is running in background',
f'Skipping any further initialization',
title='RetopoFlow', margin=' ', sides='double', color='black', highlight='blue',
)
elif bpy.app.version < Hive.get_version('blender hard minimum version'):
term_printer.boxed(
f'Blender version does not meet hard requirements',
f'Minimum Blender Version: {Hive.get("blender hard minimum version")}',
f'Skipping any further initialization',
title='RetopoFlow', margin=' ', sides='double', color='black', highlight='red',
)
else:
from .retopoflow import blenderregister
def register(): blenderregister.register(bl_info)
def unregister(): blenderregister.unregister(bl_info)