-
Notifications
You must be signed in to change notification settings - Fork 24
/
Tina-Dev.py
64 lines (49 loc) · 1.44 KB
/
Tina-Dev.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
bl_info = {
'name': 'Tina (dev mode)',
'description': 'A soft-renderer based on Taichi programming language',
'author': 'archibate <1931127624@qq.com>',
'version': (0, 0, 0),
'blender': (2, 81, 0),
'location': 'Render -> Tina',
'support': 'TESTING',
'wiki_url': 'https://github.com/archibate/tina/wiki',
'tracker_url': 'https://github.com/archibate/tina/issues',
'warning': 'Development mode',
'category': 'Render',
}
import sys
sys.path.insert(0, '/home/bate/Develop/three_taichi')
registered = False
def register():
print('Tina-Dev register...')
import tina_blend
tina_blend.register()
global registered
registered = True
print('...register done')
def unregister():
print('Tina-Dev unregister...')
import tina_blend
tina_blend.unregister()
global registered
registered = False
print('...unregister done')
def reload_addon():
import tina
import tina_blend
if registered:
tina_blend.unregister()
tina.__lazyreload__()
tina_blend.__lazyreload__()
tina_blend.register()
@eval('lambda x: x()')
def _():
class Reload:
def __repr__(self):
import os
import bpy
os.system('clear')
reload_addon()
bpy.context.scene.frame_current = bpy.context.scene.frame_current
return 'reloaded'
__import__('bpy').a = Reload()