Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix extension loading send2ue import error #59

Merged
merged 1 commit into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading