Node Wrangler: Add more specific poll methods
[blender-addons.git] / render_copy_settings / __init__.py
bloba5bcc1042618aeca647f44630d18745e7537b49f
1 # SPDX-FileCopyrightText: 2011-2022 Blender Foundation
3 # SPDX-License-Identifier: GPL-2.0-or-later
5 bl_info = {
6 "name": "Copy Render Settings",
7 "author": "Bastien Montagne",
8 "version": (2, 0, 0),
9 "blender": (4, 0, 0),
10 "location": "Render buttons (Properties window)",
11 "description": "Allows to copy a selection of render settings "
12 "from current scene to others.",
13 "doc_url": "{BLENDER_MANUAL_URL}/addons/render/copy_settings.html",
14 "category": "Render",
18 if "bpy" in locals():
19 import importlib
20 importlib.reload(data)
21 importlib.reload(operator)
22 importlib.reload(panel)
23 importlib.reload(translations)
25 else:
26 from . import (
27 data,
28 operator,
29 panel,
30 translations,
34 import bpy
35 from bpy.props import (
36 PointerProperty,
40 classes = data.classes + operator.classes + panel.classes
43 def scene_render_copy_settings_timer():
44 operator.scene_render_copy_settings_update()
45 return 1.0 # Run every second.
48 def register():
49 for cls in classes:
50 bpy.utils.register_class(cls)
51 bpy.types.Scene.render_copy_settings = PointerProperty(type=data.RenderCopySettingsData)
53 bpy.app.translations.register(__name__, translations.translations_dict)
55 bpy.app.timers.register(scene_render_copy_settings_timer, persistent=True)
58 def unregister():
59 bpy.app.timers.unregister(scene_render_copy_settings_timer)
61 bpy.app.translations.unregister(__name__)
63 del bpy.types.Scene.render_copy_settings
64 for cls in classes:
65 bpy.utils.unregister_class(cls)
68 if __name__ == "__main__":
69 register()