Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Lovato <nathan@gdquest.com>2020-05-14 23:40:24 +0300
committerNathan Lovato <nathan@gdquest.com>2020-05-14 23:40:24 +0300
commitc9f09d722abbaeded92803fc8fbb3e286480b35e (patch)
treedc16b3524b860829515b9b34a45d4c87df8678be /power_sequencer/__init__.py
parent3b7dd92024ac0ac2b58b3ef4e5cf7daee6dfdefb (diff)
Power Sequencer: update to version 1.5, fix for Blender 2.83
This makes the add-on compatible with Blender 2.83 after renaming the cut operator to split. The update brings mainly bug fixes and quality of life improvements. Changelog: https://github.com/GDQuest/blender-power-sequencer/blob/master/CHANGELOG.md#power-sequencer-1 36 Commits: https://github.com/GDQuest/blender-power-sequencer/compare/1.4.0...fb55bc77cf31920ddfe6fd4342b11e53ac988c93
Diffstat (limited to 'power_sequencer/__init__.py')
-rwxr-xr-xpower_sequencer/__init__.py34
1 files changed, 11 insertions, 23 deletions
diff --git a/power_sequencer/__init__.py b/power_sequencer/__init__.py
index 3ec6999f..1817a7d6 100755
--- a/power_sequencer/__init__.py
+++ b/power_sequencer/__init__.py
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2016-2019 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
#
# This file is part of Power Sequencer.
#
@@ -38,11 +38,11 @@ bl_info = {
"name": "Power Sequencer",
"description": "Video editing tools for content creators",
"author": "Nathan Lovato",
- "version": (1, 4, 0),
- "blender": (2, 80, 0),
+ "version": (1, 5, 0),
+ "blender": (2, 81, 0),
"location": "Sequencer",
"tracker_url": "https://github.com/GDquest/Blender-power-sequencer/issues",
- "doc_url": "https://www.gdquest.com/docs/documentation/power-sequencer/",
+ "wiki_url": "https://www.gdquest.com/docs/documentation/power-sequencer/",
"support": "COMMUNITY",
"category": "Sequencer",
}
@@ -70,13 +70,11 @@ def register():
bpy.utils.register_class(cls)
# Register tools
- version_min_toolbar = (2, 83, 0)
- if is_blender_version_compatible(version_min_toolbar):
- classes_tool = get_tool_classes()
- last_tool = {"builtin.cut"}
- for index, cls in enumerate(classes_tool):
- bpy.utils.register_tool(cls, after=last_tool, separator=index == 0)
- last_tool = {cls.bl_idname}
+ classes_tool = get_tool_classes()
+ last_tool = {"builtin.cut"}
+ for index, cls in enumerate(classes_tool):
+ bpy.utils.register_tool(cls, after=last_tool, separator=index == 0)
+ last_tool = {cls.bl_idname}
# Register keymaps
keymaps = register_shortcuts(classes_operator)
@@ -98,10 +96,8 @@ def unregister():
for cls in classes_operator:
bpy.utils.unregister_class(cls)
- version_min_toolbar = (2, 82, 0)
- if is_blender_version_compatible(version_min_toolbar):
- for cls in classes_tool:
- bpy.utils.unregister_tool(cls)
+ for cls in classes_tool:
+ bpy.utils.unregister_tool(cls)
unregister_ui()
unregister_preferences()
@@ -109,11 +105,3 @@ def unregister():
unregister_handlers()
print("Unregistered {}".format(bl_info["name"]))
-
-
-def is_blender_version_compatible(version: Tuple[int, int, int]) -> bool:
- """Returns True if the `version` is greater or equal to the current Blender version.
- Converts the versions to integers to compare them."""
- version_int = version[0] * 1000 + version[1] * 10 + version[2]
- blender_version_int = bpy.app.version[0] * 1000 + bpy.app.version[1] * 10 + bpy.app.version[2]
- return blender_version_int >= version_int