Prevent loading prevent when trying to install in 4.3+ without raising error
3.3.4 - fixed: Error when trying to load addon in 4.3.0+ (prevent loading without error, print about incompatibility in console)gpv2
parent
abe526d046
commit
5aeb21342a
|
@ -1,5 +1,9 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
3.3.4
|
||||||
|
|
||||||
|
- fixed: Error when trying to load addon in 4.3.0+ (prevent loading without error, print about incompatibility in console)
|
||||||
|
|
||||||
3.3.3
|
3.3.3
|
||||||
|
|
||||||
- added: list collections visibility conflict from search menu with dev extras (backported from gpv3)
|
- added: list collections visibility conflict from search menu with dev extras (backported from gpv3)
|
||||||
|
|
10
__init__.py
10
__init__.py
|
@ -4,7 +4,7 @@ bl_info = {
|
||||||
"name": "GP toolbox",
|
"name": "GP toolbox",
|
||||||
"description": "Tool set for Grease Pencil in animation production",
|
"description": "Tool set for Grease Pencil in animation production",
|
||||||
"author": "Samuel Bernou, Christophe Seux",
|
"author": "Samuel Bernou, Christophe Seux",
|
||||||
"version": (3, 3, 3),
|
"version": (3, 3, 4),
|
||||||
"blender": (4, 0, 0),
|
"blender": (4, 0, 0),
|
||||||
"location": "Sidebar (N menu) > Gpencil > Toolbox / Gpencil properties",
|
"location": "Sidebar (N menu) > Gpencil > Toolbox / Gpencil properties",
|
||||||
"warning": "",
|
"warning": "",
|
||||||
|
@ -812,6 +812,10 @@ addon_modules = (
|
||||||
)
|
)
|
||||||
|
|
||||||
def register():
|
def register():
|
||||||
|
if bpy.app.version >= (4, 3, 0):
|
||||||
|
print(f"Skip GP toolbox load, version {'.'.join([str(x) for x in bl_info['version']])} incompatible with Blender 4.3+")
|
||||||
|
return
|
||||||
|
|
||||||
# Register property group first
|
# Register property group first
|
||||||
properties.register()
|
properties.register()
|
||||||
for cls in classes:
|
for cls in classes:
|
||||||
|
@ -837,6 +841,10 @@ def register():
|
||||||
|
|
||||||
|
|
||||||
def unregister():
|
def unregister():
|
||||||
|
if bpy.app.version >= (4, 3, 0):
|
||||||
|
# print(f'GP Toolbox version is not compatible with Blender 4.3+')
|
||||||
|
return
|
||||||
|
|
||||||
if 'remap_relative' in [hand.__name__ for hand in bpy.app.handlers.save_pre]:
|
if 'remap_relative' in [hand.__name__ for hand in bpy.app.handlers.save_pre]:
|
||||||
bpy.app.handlers.save_pre.remove(remap_relative)
|
bpy.app.handlers.save_pre.remove(remap_relative)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue