-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path__init__.py
99 lines (77 loc) · 3.34 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# ##### BEGIN GPL LICENSE BLOCK #####
#
# <Adds plenty of new features to Blenders camera and compositor>
# Copyright (C) <2023> <Kevin Lorengel>
#
# 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, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# Alternatively, see <https://www.gnu.org/licenses/>.
#
# ##### END GPL LICENSE BLOCK #####
import bpy
import bpy.utils.previews
import os
from . import (
SAC_Settings,
SAC_Operators,
SAC_Panel,
SAC_List,
SAC_Functions,
)
bl_info = {
"name": "Super Advanced Camera (SAC)",
"author": "Kevin Lorengel, Slinc",
"version": (1, 0, 0),
"blender": (3, 6, 0),
"description": "Adds plenty of new features to the camera and compositor",
"warning": "",
"doc_url": "",
"category": "Compositor",
}
bpy.types.Scene.new_effect_type = bpy.props.EnumProperty(
items=SAC_Functions.enum_previews_from_directory_effects)
bpy.types.Scene.new_bokeh_type = bpy.props.EnumProperty(
items=SAC_Functions.enum_previews_from_directory_bokeh)
bpy.types.Scene.new_camera_bokeh_type = bpy.props.EnumProperty(
items=SAC_Functions.enum_previews_from_directory_bokeh)
bpy.types.Scene.new_filter_type = bpy.props.EnumProperty(
items=SAC_Functions.enum_previews_from_directory_filter)
bpy.types.Scene.new_gradient_type = bpy.props.EnumProperty(
items=SAC_Functions.enum_previews_from_directory_gradient)
def register():
SAC_Settings.register_function()
SAC_List.register_function()
SAC_Operators.register_function()
SAC_Panel.register_function()
bpy.types.Scene.last_used_id = bpy.props.IntProperty(name="Last Used ID", default=0)
bpy.types.Scene.sac_effect_list = bpy.props.CollectionProperty(type=SAC_List.SAC_EffectList)
bpy.types.Scene.sac_effect_list_index = bpy.props.IntProperty(name="Index for sac_effect_list", default=0, update=SAC_Functions.active_effect_update)
bpy.types.Scene.effect_previews = SAC_Functions.load_effect_previews()
bpy.types.Scene.bokeh_previews = SAC_Functions.load_bokeh_previews()
bpy.types.Scene.filter_previews = SAC_Functions.load_filter_previews()
bpy.types.Scene.gradient_previews = SAC_Functions.load_gradient_previews()
def unregister():
SAC_Panel.unregister_function()
SAC_Operators.unregister_function()
SAC_List.unregister_function()
SAC_Settings.unregister_function()
del bpy.types.Scene.last_used_id
del bpy.types.Scene.sac_effect_list
del bpy.types.Scene.sac_effect_list_index
bpy.utils.previews.remove(bpy.types.Scene.effect_previews)
bpy.utils.previews.remove(bpy.types.Scene.bokeh_previews)
bpy.utils.previews.remove(bpy.types.Scene.filter_previews)
bpy.utils.previews.remove(bpy.types.Scene.gradient_previews)
if __name__ == "__main__":
register()