-
-
Notifications
You must be signed in to change notification settings - Fork 28
/
properties.py
66 lines (53 loc) · 2.08 KB
/
properties.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
import bpy
from .reload import object_types
def select_all_callback(self, context):
value = self.autoreload_select_all
for obj_type in object_types:
setattr(self, f"autoreload_{obj_type}", value)
class AUTORELOAD_PR_properties(bpy.types.PropertyGroup) :
# Timers type
autoreload_images : bpy.props.BoolProperty(
name = 'Autoreload Images',
)
autoreload_movieclips : bpy.props.BoolProperty(
name = 'Autoreload Movie Clips',
)
autoreload_sounds : bpy.props.BoolProperty(
name = 'Autoreload Sounds',
)
autoreload_libraries : bpy.props.BoolProperty(
name = 'Autoreload Libraries',
)
autoreload_cache_files : bpy.props.BoolProperty(
name = 'Autoreload Cache Files',
)
autoreload_run : bpy.props.BoolProperty(
name = "Autoreload Run",
)
autoreload_select_all : bpy.props.BoolProperty(
name = 'Autoreload Select All',
update = select_all_callback,
)
### REGISTER ---
def register():
bpy.utils.register_class(AUTORELOAD_PR_properties)
bpy.types.WindowManager.autoreload_properties = \
bpy.props.PointerProperty(type = AUTORELOAD_PR_properties, name="Auto Reload Properties")
bpy.types.Image.file_modif_date = \
bpy.props.StringProperty(name="File Modification Date")
bpy.types.MovieClip.file_modif_date = \
bpy.props.StringProperty(name="File Modification Date")
bpy.types.Sound.file_modif_date = \
bpy.props.StringProperty(name="File Modification Date")
bpy.types.Library.file_modif_date = \
bpy.props.StringProperty(name="File Modification Date")
bpy.types.CacheFile.file_modif_date = \
bpy.props.StringProperty(name="File Modification Date")
def unregister():
bpy.utils.unregister_class(AUTORELOAD_PR_properties)
del bpy.types.WindowManager.autoreload_properties
del bpy.types.Image.file_modif_date
del bpy.types.MovieClip.file_modif_date
del bpy.types.Sound.file_modif_date
del bpy.types.Library.file_modif_date
del bpy.types.CacheFile.file_modif_date