Shotgrid with Unreal Engine 5.1

Hey everyone,

I want to setup shotgrid for unreal engine 5.1.

So far I integrated all the required changes from:

In to my config to the best of my knowledge.
I enabled the Shotgrid plugin for my unreal project.
But there is no Shotgrid menu or anything in sight when I start Unreal via Shotgrid desktop.

I use this config entry in in env\includes\settings\tk-multi-launchapp.yml to add the Unreal starter.

settings.tk-multi-launchapp.unreal:
  engine: tk-unreal
  icon: "{config_path}/icons/unreal_editor.png"
  windows_path: "@path.windows.unreal"
  linux_path: "@path.linux.unreal"
  menu_name: Unreal Engine {version}
  location: "@apps.tk-multi-launchapp.location"
  versions: ["5.1"]
  hook_before_register_command: "{config}/tk-multi-launchapp/before_register_command.py"
  hook_before_app_launch: "{config}/tk-multi-launchapp/before_app_launch.py"

Is ist just that everything is outdated for Unreal5? Can anyone share some experiences maybe?

All the best

Have you added an entry for it in the software table?

1 Like

Hey @craig422 :slight_smile:

After a while I got it to a point in which the engine properly loaded and the shotgrid menu appeared in unreal. I am on to the next error now, it seems to have trouble to import Qt.

Excerpt from the unreal python console:

LogPython: [DEBUG sgtk.env.project.tk-unreal] <Sgtk Engine 0x2726d2535e0: tk-unreal, env: project>: Initializing UnrealEditorEngine from U:\pipeline\shotgrid\sg_dev\install\github\ue4plugins\tk-unreal\v1.2.0\engine.py...
LogPython: [DEBUG tk-unreal] <Sgtk Engine 0x2726d2535e0: tk-unreal, env: project>: Initializing UnrealEditorEngine from U:\pipeline\shotgrid\sg_dev\install\github\ue4plugins\tk-unreal\v1.2.0\engine.py...
LogPython: [DEBUG sgtk.core.util.qt_importer] Requesting Qt4-like interface
LogPython: [DEBUG qt_importer] Requesting Qt4-like interface
LogPython: [DEBUG sgtk.core.util.qt_importer] No Qt matching that interface was found.
LogPython: [DEBUG qt_importer] No Qt matching that interface was found.
LogPython: [DEBUG sgtk.core.util.qt_importer] Requesting Qt5-like interface
LogPython: [DEBUG qt_importer] Requesting Qt5-like interface
LogPython: [DEBUG sgtk.core.util.qt_importer] No Qt matching that interface was found.
LogPython: [DEBUG qt_importer] No Qt matching that interface was found.
LogPython: [DEBUG sgtk.env.project.tk-unreal] <Sgtk Engine 0x2726d2535e0: tk-unreal, env: project>: Initializing QtApp for Unreal
LogPython: [DEBUG tk-unreal] <Sgtk Engine 0x2726d2535e0: tk-unreal, env: project>: Initializing QtApp for Unreal
LogPython: Error: Traceback (most recent call last):
LogPython: Error:   File "C:/Program Files/Epic Games/UE_5.1/Engine/Plugins/Experimental/Shotgrid/Content/Python/init_unreal.py", line 21, in <module>
LogPython: Error:     import bootstrap
LogPython: Error:   File "U:\pipeline\shotgrid\sg_dev\install\github\ue4plugins\tk-unreal\v1.2.0\plugins\basic\bootstrap.py", line 13, in <module>
LogPython: Error:     plugin_bootstrap.bootstrap_plugin(plugin_root_dir)
LogPython: Error:   File "U:\pipeline\shotgrid\sg_dev\install\github\ue4plugins\tk-unreal\v1.2.0\plugins\basic\python\tk_unreal_basic\plugin_bootstrap.py", line 50, in bootstrap_plugin
LogPython: Error:     manager.bootstrap_engine(
LogPython: Error:   File "U:\pipeline\shotgrid\sg_dev\install\core\python\tank\bootstrap\manager.py", line 492, in bootstrap_engine
LogPython: Error:     engine = self._start_engine(tk, engine_name, entity)
LogPython: Error:   File "U:\pipeline\shotgrid\sg_dev\install\core\python\tank\bootstrap\manager.py", line 1217, in _start_engine
LogPython: Error:     engine = tank.platform.start_engine(engine_name, tk, ctx)
LogPython: Error:   File "U:\pipeline\shotgrid\sg_dev\install\core\python\tank\platform\engine.py", line 3013, in start_engine
LogPython: Error:     return _start_engine(engine_name, tk, None, context)
LogPython: Error:   File "U:\pipeline\shotgrid\sg_dev\install\core\python\tank\platform\engine.py", line 3173, in _start_engine
LogPython: Error:     engine = class_obj(tk, new_context, engine_name, env)
LogPython: Error:   File "U:\pipeline\shotgrid\sg_dev\install\github\ue4plugins\tk-unreal\v1.2.0\engine.py", line 40, in __init__
LogPython: Error:     Engine.__init__(self, *args, **kwargs)
LogPython: Error:   File "U:\pipeline\shotgrid\sg_dev\install\core\python\tank\platform\engine.py", line 198, in __init__
LogPython: Error:     self.pre_app_init()
LogPython: Error:   File "U:\pipeline\shotgrid\sg_dev\install\github\ue4plugins\tk-unreal\v1.2.0\engine.py", line 89, in pre_app_init
LogPython: Error:     self.init_qt_app()
LogPython: Error:   File "U:\pipeline\shotgrid\sg_dev\install\github\ue4plugins\tk-unreal\v1.2.0\engine.py", line 109, in init_qt_app
LogPython: Error:     from sgtk.platform.qt5 import QtWidgets
LogPython: Error: ImportError: cannot import name 'QtWidgets' from 'tank.platform.qt5' (U:\pipeline\shotgrid\sg_dev\install\core\python\tank\platform\qt5\__init__.py)

I am not exactly sure why it is not able to import QtWidgets from tank.platform.qt5.
This import works in other softwares like maya or blender without a problem.

You need to load the framework tk-framework-unrealqt

unrealqt - PySide build for Unreal

tk-framework-unrealqt_v1.x.x:
location:
version: v1.2.3
type: github_release
organization: ue4plugins
repository: tk-framework-unrealqt

needs to go in frameworks.yml

1 Like

Just to let you know that UE5.1 does not work with Shtogrid presently, there are multiple changes to the Unreal prython API that have broken this integration. Looking at bugfixes on the unreal site I believe many of these are addressed in upcoming 5.2

It works great on UE5

2 Likes

Hey @craig422

Sorry for the late respose, was away for a while!

Thanks for the note about the framework settings with tk-framework-unrealqt
I already had them in place tough.

I see so Unreal 5.1 is the problem. Are the unreal python api changes you were talking about adressable by updating the shotgrid unreal toolkit? (Could you go a bit more in to detail what is breaking there exactly?)

Or do we have to wait for the new unreal release?

All the best

I just tried it with Unreal 5.0.3 and I get the exact same error as above:

LogPython: [DEBUG sgtk.env.project.tk-unreal] <Sgtk Engine 0x21590ddffa0: tk-unreal, env: project>: Initializing UnrealEditorEngine from U:\pipeline\shotgrid\sg_dev\install\github\ue4plugins\tk-unreal\v1.2.0\engine.py...
LogPython: [DEBUG tk-unreal] <Sgtk Engine 0x21590ddffa0: tk-unreal, env: project>: Initializing UnrealEditorEngine from U:\pipeline\shotgrid\sg_dev\install\github\ue4plugins\tk-unreal\v1.2.0\engine.py...
LogPython: [DEBUG sgtk.core.util.qt_importer] Requesting Qt4-like interface
LogPython: [DEBUG qt_importer] Requesting Qt4-like interface
LogPython: [DEBUG sgtk.core.util.qt_importer] No Qt matching that interface was found.
LogPython: [DEBUG qt_importer] No Qt matching that interface was found.
LogPython: [DEBUG sgtk.core.util.qt_importer] Requesting Qt5-like interface
LogPython: [DEBUG qt_importer] Requesting Qt5-like interface
LogPython: [DEBUG sgtk.core.util.qt_importer] No Qt matching that interface was found.
LogPython: [DEBUG qt_importer] No Qt matching that interface was found.
LogPython: [DEBUG sgtk.env.project.tk-unreal] <Sgtk Engine 0x21590ddffa0: tk-unreal, env: project>: Initializing QtApp for Unreal
LogPython: [DEBUG tk-unreal] <Sgtk Engine 0x21590ddffa0: tk-unreal, env: project>: Initializing QtApp for Unreal
LogPython: Error: Traceback (most recent call last):
LogPython: Error:   File "C:/Program Files/Epic Games/UE_5.0/Engine/Plugins/Experimental/Shotgrid/Content/Python/init_unreal.py", line 18, in <module>
LogPython: Error:     import bootstrap
LogPython: Error:   File "U:\pipeline\shotgrid\sg_dev\install\github\ue4plugins\tk-unreal\v1.2.0\plugins\basic\bootstrap.py", line 13, in <module>
LogPython: Error:     plugin_bootstrap.bootstrap_plugin(plugin_root_dir)
LogPython: Error:   File "U:\pipeline\shotgrid\sg_dev\install\github\ue4plugins\tk-unreal\v1.2.0\plugins\basic\python\tk_unreal_basic\plugin_bootstrap.py", line 50, in bootstrap_plugin
LogPython: Error:     manager.bootstrap_engine(
LogPython: Error:   File "U:\pipeline\shotgrid\sg_dev\install\core\python\tank\bootstrap\manager.py", line 492, in bootstrap_engine
LogPython: Error:     engine = self._start_engine(tk, engine_name, entity)
LogPython: Error:   File "U:\pipeline\shotgrid\sg_dev\install\core\python\tank\bootstrap\manager.py", line 1217, in _start_engine
LogPython: Error:     engine = tank.platform.start_engine(engine_name, tk, ctx)
LogPython: Error:   File "U:\pipeline\shotgrid\sg_dev\install\core\python\tank\platform\engine.py", line 3013, in start_engine
LogPython: Error:     return _start_engine(engine_name, tk, None, context)
LogPython: Error:   File "U:\pipeline\shotgrid\sg_dev\install\core\python\tank\platform\engine.py", line 3173, in _start_engine
LogPython: Error:     engine = class_obj(tk, new_context, engine_name, env)
LogPython: Error:   File "U:\pipeline\shotgrid\sg_dev\install\github\ue4plugins\tk-unreal\v1.2.0\engine.py", line 40, in __init__
LogPython: Error:     Engine.__init__(self, *args, **kwargs)
LogPython: Error:   File "U:\pipeline\shotgrid\sg_dev\install\core\python\tank\platform\engine.py", line 198, in __init__
LogPython: Error:     self.pre_app_init()
LogPython: Error:   File "U:\pipeline\shotgrid\sg_dev\install\github\ue4plugins\tk-unreal\v1.2.0\engine.py", line 89, in pre_app_init
LogPython: Error:     self.init_qt_app()
LogPython: Error:   File "U:\pipeline\shotgrid\sg_dev\install\github\ue4plugins\tk-unreal\v1.2.0\engine.py", line 109, in init_qt_app
LogPython: Error:     from sgtk.platform.qt5 import QtWidgets
LogPython: Error: ImportError: cannot import name 'QtWidgets' from 'tank.platform.qt5' (U:\pipeline\shotgrid\sg_dev\install\core\python\tank\platform\qt5\__init__.py)

I think you need to wait as there are aspects that need fixing in the next update that can’t easily be fixed in the SG integration – You can of course use 5.0

1 Like

Ok I see!

I tried using 5.0.3 as you can see in the above message and got the same errors. You know by any chance whats going on?

It does look like a qt issue and I’ve had a similar error when this framework has not loaded correctly. Have you read the documentation here https://github.com/ue4plugins/tk-framework-unrealqt ?

PS You need to make sure you’ve changed the bootstrap.py hook or it won’t load:

It resides in your config/core/hooks folder

2 Likes

Hey @craig422

Thanks for pointing me to the README.md file of the tk-framework-unrealqt project.

I realised I never executed the build script in:

resources\build_packages.sh

After I executed it once and the again with the -b option unreal could finally import the qt library from the newly created virtual env.

And it even works in Unreal 5.1 for me.

1 Like