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

2 Likes

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 ?

1 Like

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

First of all, thanks for sharing all the information on the forum.
I am on the same page that you @paulgolter

I have been trying to follow the instructions on the link:
https://github.com/ue4plugins/tk-framework-unrealqt

  1. I tried to use the git descriptor on the framework. When Shotgrid tried to download v1.3.0, the file was not found. ( I used tank cache_apps to process the frameworks)
    tk-framework-unrealqt_v1.x.x:
    location:
    version: v1.3.0
    type: git
    path: git@github.com:ue4plugins/tk-framework-unrealqt.git

  2. I tried to use a GitHub_release descriptor on the framework. The v1.3.0.zip file was not found. ( I used tank cache_apps to process the frameworks)
    tk-framework-unrealqt_v1.x.x:
    location:
    version: v1.3.0
    type: github_release
    organization: ue4plugins
    repository: tk-framework-unrealqt

  3. The only part that I didn’t do was run the build script because I didn’t have any idea how can I run it. Another important information is the current framework which is 1.2.3. Unfortunately, is the only pack that shotgrid loads.
    tk-framework-unrealqt_v1.x.x:
    location:
    organization: ue4plugins
    repository: tk-framework-unrealqt
    version: v1.2.3
    type: github_release

Could you guys help me, please.

Only the framework v1.2.3 was located. The framework version 1.3.0 could not be located. What is wrong?
What are the steps to run build_packages.sh ?

Maybe there is an easier way to integrate Unreal 5 on Shotgrid that I don’t know.

I’m all ears.
Thanks a million
Ricardo



Hi Guys

I tried to use the tk-framework-unrealqt_v1.3.0, but it doesn’t exist…
The instructions were weird for me…

The solution I came up with was to change the frameworks to v1.2.3, use the tank to update frameworks and cache and install Pyside 2 within the Unreal App.

  # unrealqt - PySide build for Unreal
  tk-framework-unrealqt_v1.x.x:
    location:
      organization: ue4plugins
      repository: tk-framework-unrealqt
      version: v1.2.3
      type: github_release
  1. I enabled the Shotgrid, Python Foundation Packages and Python Automation Test Plugins into Shotgrid.

  2. I Installed Pyside2 within the Unreal App.

run cmd as Administrator

cd "C:\Program Files\Epic Games\UE_5.3\Engine\Binaries\ThirdParty\Python3\Win64"
python.exe -m pip install --upgrade pip

cd Scripts
pip install pyside2

I loaded Unreal through of Shotgrid App. Done.

Thanks

1 Like

Nice @Ricardo , and the Published is working?
Because I just make it work the “Loader” but is failing on the publish.
Thanks

LogPython: Warning: get_shotgun_work_dir is deprecated, get_shotgrid_work_dir should be used instead.
LogPython: [ERROR sgtk.env.project.tk-unreal.tk-multi-publish2.tkimp43c404dd087d40b282fa9bb8b3093494.tk_multi_publish2.api.plugins.collector_instance] Error running process_current_session for <CollectorPluginInstance: {self}/collector.py:{config}/tk-multi-publish2/tk-unreal/collector.py>. Traceback (most recent call last):
File “Z:\Shotgun\DEM_ShotGrid\DEV\install\github\SAU\tk-multi-publish2\v2.6.9\python\tk_multi_publish2\api\plugins\collector_instance.py”, line 74, in run_process_current_session
return self._hook_instance.process_current_session(self.settings, item)
File “Z:\Shotgun\DEM_ShotGrid\DEV\config\hooks\tk-multi-publish2\tk-unreal\collector.py”, line 85, in process_current_session
self.collect_selected_assets(parent_item)
File “Z:\Shotgun\DEM_ShotGrid\DEV\config\hooks\tk-multi-publish2\tk-unreal\collector.py”, line 183, in collect_selected_assets
“%s” % asset.object_path,
AttributeError: ‘AssetData’ object has no attribute ‘object_path’
LogPython: [ERROR collector_instance] Error running process_current_session for <CollectorPluginInstance: {self}/collector.py:{config}/tk-multi-publish2/tk-unreal/collector.py>. Traceback (most recent call last):
File “Z:\Shotgun\DEM_ShotGrid\DEV\install\github\SAU\tk-multi-publish2\v2.6.9\python\tk_multi_publish2\api\plugins\collector_instance.py”, line 74, in run_process_current_session
return self._hook_instance.process_current_session(self.settings, item)
File “Z:\Shotgun\DEM_ShotGrid\DEV\config\hooks\tk-multi-publish2\tk-unreal\collector.py”, line 85, in process_current_session
self.collect_selected_assets(parent_item)
File “Z:\Shotgun\DEM_ShotGrid\DEV\config\hooks\tk-multi-publish2\tk-unreal\collector.py”, line 183, in collect_selected_assets
“%s” % asset.object_path,
AttributeError: ‘AssetData’ object has no attribute ‘object_path’
LogAutomationController: Ignoring very large delta of 5.72 seconds in

You may have to check what you are selecting, this is your error, basically the hook is trying to gather info in a property that does not exist.

File “Z:\Shotgun\DEM_ShotGrid\DEV\config\hooks\tk-multi-publish2\tk-unreal\collector.py”, line 183, in collect_selected_assets
“%s” % asset.object_path,
AttributeError: ‘AssetData’ object has no attribute ‘object_path’

Just be aware that the Unreal API can change between versions.