Skip to content

Commit

Permalink
plugin - fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
HENDRIX-ZT2 committed Jan 20, 2025
1 parent 1a93c59 commit 860c749
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
28 changes: 15 additions & 13 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Frontier's Cobra Engine Formats",
"author": "Harlequinz Ego, HENDRIX et al.",
"blender": (4, 0, 0),
"version": (2025, 1, 14),
"version": (2025, 1, 20),
"location": "File > Import-Export",
"description": "Import-Export models, skeletons and animations",
"warning": "",
Expand All @@ -17,24 +17,27 @@ def fmt_version(tup):
return '.'.join([str(x) for x in tup])


import bpy

if bpy.app.version < bl_info["blender"]:
raise ValueError(
f"Cobra Tools require at least blender {fmt_version(bl_info['blender'])}, "
f"but you are running blender {fmt_version(bpy.app.version)}.")
import os
import sys
import subprocess
import logging

try:
import os
import sys
import subprocess
import logging
import pkg_resources, importlib.util
import bpy

if bpy.app.version < bl_info["blender"]:
raise ValueError(
f"Cobra Tools require at least blender {fmt_version(bl_info['blender'])}, "
f"but you are running blender {fmt_version(bpy.app.version)}.")
except ModuleNotFoundError:
logging.warning(f"Module bpy not found; only run the plugin from blender.")

try:
import bpy.utils.previews
from bpy.props import IntProperty
from bpy.types import PropertyGroup
import addon_utils
import pkg_resources, importlib.util

copies_of_tools = []
for addon in addon_utils.modules():
Expand Down Expand Up @@ -303,7 +306,6 @@ def cobra_viewport3d_drop_handler(scene, depsgraph):

except:
logging.exception("Startup failed")
pass


def register():
Expand Down
6 changes: 3 additions & 3 deletions __version__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# this file is auto-generated by the pre-commit hook increment_version.py
VERSION = "2025.01.14"
COMMIT_HASH = "566753e5a"
COMMIT_TIME = "Tue Jan 14 17:51:28 2025 +0100"
VERSION = "2025.01.20"
COMMIT_HASH = "1a93c5935"
COMMIT_TIME = "Mon Jan 20 15:08:22 2025 +0100"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "cobra-tools"
version = "2025.01.14"
version = "2025.01.20"
readme = "README.md"
license = { file = "LICENSE" }
requires-python = "==3.11.*"
Expand Down

0 comments on commit 860c749

Please sign in to comment.