Cleanup: simplify file name incrementing logic
[blender-addons.git] / render_copy_settings / data.py
blob59b91fcce8569283ae09d020b956f08993b2d5eb
1 # ##### BEGIN GPL LICENSE BLOCK #####
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License
5 # as published by the Free Software Foundation; either version 2
6 # of the License, or (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software Foundation,
15 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 # ##### END GPL LICENSE BLOCK #####
19 # <pep8 compliant>
21 import bpy
22 from bpy.props import (
23 StringProperty,
24 BoolProperty,
25 IntProperty,
26 CollectionProperty,
29 ########################################################################################################################
30 # Global properties for the script, for UI (as there’s no way to let them in the operator…).
31 ########################################################################################################################
33 class RenderCopySettingsDataScene(bpy.types.PropertyGroup):
34 allowed: BoolProperty(default=True)
37 class RenderCopySettingsDataSetting(bpy.types.PropertyGroup):
38 strid: StringProperty(default="")
39 copy: BoolProperty(default=False)
42 class RenderCopySettingsData(bpy.types.PropertyGroup):
43 # XXX: The consistency of this collection is delegated to the UI code.
44 # It should only contain one element for each render setting.
45 affected_settings: CollectionProperty(type=RenderCopySettingsDataSetting,
46 name="Affected Settings",
47 description="The list of all available render settings")
48 # XXX Unused, but needed for template_list…
49 affected_settings_idx: IntProperty()
51 # XXX: The consistency of this collection is delegated to the UI code.
52 # It should only contain one element for each scene.
53 allowed_scenes: CollectionProperty(type=RenderCopySettingsDataScene,
54 name="Allowed Scenes",
55 description="The list all scenes in the file")
56 # XXX Unused, but needed for template_list…
57 allowed_scenes_idx: IntProperty()
59 filter_scene: StringProperty(name="Filter Scene",
60 description="Regex to only affect scenes which name matches it",
61 default="")
64 classes = (
65 RenderCopySettingsDataScene,
66 RenderCopySettingsDataSetting,
67 RenderCopySettingsData,