-
Notifications
You must be signed in to change notification settings - Fork 14
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
Unreal: support in Deadline #1
Conversation
Whole Unreal5 plugin copied here as it is not possible to add to custom folder only `JobPreLoad.py` and `UnrealSyncUtil.py` which is handling Perforce. Might need to be revisited as this would create dependency on official Unreal5 plugin. `JobPreLoad.py` and `UnrealSyncUtil.py` handles Perforce syncing, must be triggered before Unreal rendering job. It would better to have here only these two files here, but deployment wouldn't be straightforward copy as for other plugins.
Subfolders were added to limit imports in different DCCs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was requested to test, but I'm lost and without clear test description can not help . . .
It should be relative path from workspace dir until folder with project
'env' is controlled by AYON, os.getenv might not Stream is required
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just few notes, otherwise it works.
Just for the record, we are including UnrealEngine5 Deadline plugin with small bugfixes as is. Major part is unused by AYON at all, so in the next steps we need to decide what to do with it - as maintaining is probably nothing for us.
client/ayon_deadline/plugins/publish/unreal/submit_unreal_deadline.py
Outdated
Show resolved
Hide resolved
client/ayon_deadline/plugins/publish/unreal/submit_unreal_deadline.py
Outdated
Show resolved
Hide resolved
client/ayon_deadline/repository/custom/plugins/UnrealEngine5/JobPreLoad.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Ondřej Samohel <[email protected]>
Co-authored-by: Ondřej Samohel <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some question about Deadline plugin configuration....
version = deadlinePlugin.GetPluginInfoEntry("EngineVersion") | ||
deadlinePlugin.LogInfo('Version defined: %s' % version ) | ||
version_string = str(version).replace(".", "_") | ||
executable_key = f"UnrealEditorExecutable_{version_string}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So with removing of hardcoded Unreal executable path by b57f535 this needs basically UnrealEditorExecutable_5_4
to be preset in the param (possibly UnrealEngine5.param
) file, but currently there's nothing. Shouldn't we at least provide entries there for the latest 3 versions (5.2, 5.3 and 5.4)? Without it, it crashes:
Error: Job preload script 'C:\ProgramData\Thinkbox\Deadline10\workers\PHOBOS\plugins\66b25541b95e063dbc2eee1c\JobPreLoad.py': Unreal Engine 5.4 entry not found in .param file (FranticX.Scripting.PythonNetException)
at Deadline.Plugins.DeadlinePlugin.FailRender(String message)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or even better - set UnrealExecutable
environment variable using AYON environments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh right, I am doing this too, but still getting thit error 🤔
There is even this entry in Job log:
2024-08-07 10:11:43: 0: INFO: Setting Process Environment Variable UnrealExecutable to C:\Program Files\Epic Games\UE_5.4\Engine\Binaries\Win64\UnrealEditor-Cmd.exe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so it should take both UnrealExecutable
or UnrealEditorExecutable_5_4
(notice that extra Editor). So the problem is, that these variables will not make it to the UnrealEngine5 plugin proces (os.getenv()
in JobPreLoad.py doesn't have them)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it works with this
client/ayon_deadline/repository/custom/plugins/UnrealEngine5/JobPreLoad.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Ondřej Samohel <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works! thanks
Changelog Description
This PR should add possibility to render Unreal project on Deadline with Perforce integration (and possibly without P4).
Additional info
It requires ynput/ayon-version-control#2, working Perforce server with user credentials and P4 workspace created following some P4 depot and stream
Testing notes:
2,provide P4 user credentials (in
Project Settings > Site Settings
)Applications
addonExpected env var: (applicable values for DL WORKER, not artist machine)
ayon_core/modules/deadline/repository/custom/plugins/UnrealEngine5
toDEADLINE_REPO/custom
folderRender target
ayon+settings://unreal/render_config_path
and make sure that it exists in Unreal project(expected value
/Game/Ayon/DefaultMovieRenderQueueConfig.DefaultMovieRenderQueueConfig
)(expected value for
Render Queue Path
-/Game/Ayon/renderQueue
changelist_metadata
creates instance with information about change list(and render instance set to
Farm publishing
. Presence ofchangelist_metadata
triggers Perforce sync before rendering on Deadline workers, implementation works even Perforce though.)Additional info
PR moved from ynput/ayon-core#670
Its cleaned up version of ynput/ayon-core#183 .
Unreal part in ynput/ayon-unreal#8
Version control part in ynput/ayon-version-control#2
Official Unreal5 Deadline plugin is there as it contains additional 2 scripts for Perforce which needs to run before Unreal jobs. Its a question how to easily deploy those to DL repo, as it is not possible to just add these 2 to
custom/Unreal5
to be picked up in addition to main Unreal5 plugin.To add them to
GlobalJobPreload
seems a bit weird. But open for recommendations how to add them for easy deploymentAY-990