Skip to content

Commit

Permalink
fix extension loading send2ue import error (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-yao91 authored Aug 1, 2024
1 parent 150615e commit 2b64b32
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/addons/send2ue/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
bl_info = {
"name": "Send to Unreal",
"author": "Epic Games Inc (now a community fork)",
"version": (2, 4, 6),
"version": (2, 4, 7),
"blender": (3, 6, 0),
"location": "Header > Pipeline > Send to Unreal",
"description": "Sends an asset to the first open Unreal Editor instance on your machine.",
Expand Down
2 changes: 1 addition & 1 deletion src/addons/send2ue/blender_manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ schema_version = "1.0.0"
id = "send2ue"
name = "Send to Unreal"
tagline = "Send assets directly to an open Unreal Editor on your machine"
version = "2.4.6"
version = "2.4.7"
type = "add-on"
tags = [ "Pipeline" ]
blender_version_min = "4.2.0"
Expand Down
7 changes: 7 additions & 0 deletions src/addons/send2ue/core/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from abc import abstractmethod
from ..constants import ToolInfo, Extensions, ExtensionTasks
from . import utilities
from pathlib import Path


def run_extension_filters(armature_objects, mesh_objects, hair_objects):
Expand Down Expand Up @@ -262,6 +263,12 @@ class ExtensionCollector(ast.NodeVisitor):

def __init__(self, file_path):
super(ExtensionCollector, self).__init__()

# Todo: Remove this when extensions don't need base classes
addons_folder = str(Path(__file__).parent.parent.parent)
if addons_folder not in sys.path:
sys.path.insert(0, addons_folder)

self._extension_module = self.get_module(file_path)
self._extension_classes = []

Expand Down

0 comments on commit 2b64b32

Please sign in to comment.