-
Notifications
You must be signed in to change notification settings - Fork 129
Conversation
…E-basic-integration
…-617-UE-basic-integration
…E-basic-integration
I cannot compile the plugin! I get an error in |
This is usually problem with UnrealHeaderTool tool. Do you compiling it with new project created by Pype or standalone? Maybe try to create empy C++ project in Unreal Editor, copy Avalon Integration Plugin to |
That is exactly what I did 😅
Just tried this and it didn't work. Still saying that |
Ok, I managed to compile it. I had to change:
|
I fixed a bug in Pype when creating new Unreal C++ project, it messed up directory creation. Please run @simonebarbieri this might be some paths set on my side. I am using UnrealVS extension for Visual Studio that might change few things. Commenting that line in |
I'll try to install it!
It was a redefinition from line 58! |
Oh, I see it now, thanks. |
Integrate_new: publishing fixes
Probably I'm missing something. When |
Ok, I have been able to open unreal from ftrack with an action, and it seems to create the unreal project correctly.
several times, and makes the window unusable. It doesn't list anything anymore, even by closing the window and reopening. The only way to show something again is to close Unreal and reopen the task from ftrack. |
…E-basic-integration
Pype Unreal Engine Integration
This PR implements basic support for Unreal Engine.
Requirements
Installation in Unreal
You need to compile Unreal Editor Avalon Integration plugin for your Unreal Engine version. For that you need Microsoft Visual Studio 2017 (Community Edition is 👌 ). You can either compile it manually, or just clone it somewhere and then set
AVALON_UNREAL_PLUGIN
to point there. This can also be set in pypeclub/pype-config inenvironments/unreal_4.24.json
on line 2. Then during Unreal project creation when starting Unreal from ftrack task, Pype will detect presence ofBinaries
andIntemediate
folders in plugin directory atAVALON_UNREAL_PLUGIN
. If found, they will be copied to new project then and Visual Studio is not needed. Otherwise project will be set as C++ project and it will compile everything during first launch.It will automatically enable required plugins PythonScriptPlugin and EditorScriptingUtilities.
Implementation
Implementation is multi-part. Avalon Core part implements support for loading, creating, managing and publishing instances. Pype part takes care of project setup, Unreal launching and basic pipeline for publishing StaticMesh from Maya and loading, managing and creating publish instance in Unreal.Avalon Integration Plugin is enabling Avalon in Unreal - it provides menu to control avalon functionality and provides other support functions for bridging Unreal and Avalon. And finally pype-config is providing basic support for creating correct environment.
Avalon Integration Plugin
Menu
This is C++ and Python code connecting Unreal Python API and Avalon Core API. Unreal doesn't support creation of new main menu items from Python so this plugin is defining new Blueprint class doing just that. Callback functions for this menu are implemented in Python part (in
Content/Python/init_unreal.py
) and they themselves are referencing corresponding functions in avalon-core host integration.Containers
This plugin is also providing two "container" BP classes -
AssetContainer
andAvalonPublishInstance
container. Reason behind those two is that you cannot add metadata to folders in Unreal Editor Content Browser - and that is the only way to group assets together there.So loading stuff from avalon will create folder with subset name, put content in it and also create
AssetContainer
class asset there to hold metadata.There are two reasons for this: first, it holds metadata on it needed for Avalon to keep track of assets and second - it helps to easily find this container. Unreal project can have thousands of assets and iterating through them can be time consuming. But finding assets of only specific class type is much faster.
Those two classes tracks all changes in directory they reside in and provide live list of assets they are "containing" for script or Blueprint use.
Other
This plugin is also exposing some C++ API not available yet in Python API, implemented as
UAvalonLib
in C++ andAvalonHelpers
in Python. There is currently only one function -set_folder_color()
that can be used to set folder colors 😄 that can be normally done from UI. Caveat is that for color change take place, editor must be restarted.Pype Integration
As work in Unreal Editor is quite different then in other DCCs there must be different approach to its support. In Unreal, there are no work scenes as files. Instead we work directly in self-contained project folder. So running Unreal Editor in specific context must include environment setup, project management and Unreal Engine version support.
Determining Unreal Engine version
Pype can autodetect installed Unreal Engine versions (at least on Windows). You can then choose per project/task what version you wish to use. This is done by enabling corresponding Avalon application in ftrack.
Project Setup
When launching Unreal Editor for given context, project must be prepared before Engine itself is run:
AVALON_UNREAL_PLUGIN
location. If Binaries and Intermediate are present (plugin was compiled) than simple project is created. Otherwise project is set as C++ project and will try to compile itself on Editor launch. For that you'll need Visual Studio 2017install_unreal_python_engine
, it will also install and enable Unreal Engine Python. It will be pulled fromPYPE_UNREAL_ENGINE_PYTHON_PLUGIN
and if that is missing than it will be cloned with git from github. For that, you'll need git installed and in PATH and also Visual Studio 2017 to compile it.dev_mode
in presetsAvalon and Pyblish plugins
This includes basic support of Static Meshes pipeline. You can create and publish Static Meshes from Maya and load them into Unreal. There is simple validation for correct naming and checking for world orientation etc. This is not by far complete pipeline and serves as demonstration for implementing other, more advanced stuff.
Avalon Core Integration
This implements necessary host specific API in Avalon Core to support it and its tools. Mainly creating containers, imprinting them with data and discovering them.
Note about launchers
There is no need to set path to Unreal Engine as it is discovered by Pype. So only one
unreal.bat
orunreal
shell script is needed.Caveats
pip