Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Unreal: Creator import fixes #3040

Merged
merged 2 commits into from
Apr 8, 2022
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
25 changes: 0 additions & 25 deletions openpype/hosts/unreal/api/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from typing import List

import pyblish.api
from avalon import api

from openpype.pipeline import (
register_loader_plugin_path,
Expand Down Expand Up @@ -76,30 +75,6 @@ def _register_events():
pass


class Creator(LegacyCreator):
hosts = ["unreal"]
asset_types = []

def process(self):
nodes = list()

with unreal.ScopedEditorTransaction("OpenPype Creating Instance"):
if (self.options or {}).get("useSelection"):
self.log.info("setting ...")
print("settings ...")
nodes = unreal.EditorUtilityLibrary.get_selected_assets()

asset_paths = [a.get_path_name() for a in nodes]
self.name = move_assets_to_path(
"/Game", self.name, asset_paths
)

instance = create_publish_instance("/Game", self.name)
imprint(instance, self.data)

return instance


def ls():
"""List all containers.

Expand Down
8 changes: 3 additions & 5 deletions openpype/hosts/unreal/plugins/create/create_camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
from unreal import EditorAssetLibrary as eal
from unreal import EditorLevelLibrary as ell

from openpype.hosts.unreal.api.plugin import Creator
from avalon.unreal import (
instantiate,
)
from openpype.hosts.unreal.api import plugin
from openpype.hosts.unreal.api.pipeline import instantiate


class CreateCamera(Creator):
class CreateCamera(plugin.Creator):
"""Layout output for character rigs"""

name = "layoutMain"
Expand Down
8 changes: 3 additions & 5 deletions openpype/hosts/unreal/plugins/create/create_layout.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# -*- coding: utf-8 -*-
from unreal import EditorLevelLibrary as ell
from openpype.hosts.unreal.api.plugin import Creator
from avalon.unreal import (
instantiate,
)
from openpype.hosts.unreal.api import plugin
from openpype.hosts.unreal.api.pipeline import instantiate


class CreateLayout(Creator):
class CreateLayout(plugin.Creator):
"""Layout output for character rigs."""

name = "layoutMain"
Expand Down
5 changes: 2 additions & 3 deletions openpype/hosts/unreal/plugins/create/create_look.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# -*- coding: utf-8 -*-
"""Create look in Unreal."""
import unreal # noqa
from openpype.hosts.unreal.api.plugin import Creator
from openpype.hosts.unreal.api import pipeline
from openpype.hosts.unreal.api import pipeline, plugin


class CreateLook(Creator):
class CreateLook(plugin.Creator):
"""Shader connections defining shape look."""

name = "unrealLook"
Expand Down
4 changes: 2 additions & 2 deletions openpype/hosts/unreal/plugins/create/create_staticmeshfbx.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# -*- coding: utf-8 -*-
"""Create Static Meshes as FBX geometry."""
import unreal # noqa
from openpype.hosts.unreal.api.plugin import Creator
from openpype.hosts.unreal.api import plugin
from openpype.hosts.unreal.api.pipeline import (
instantiate,
)


class CreateStaticMeshFBX(Creator):
class CreateStaticMeshFBX(plugin.Creator):
"""Static FBX geometry."""

name = "unrealStaticMeshMain"
Expand Down