Hi all,
I have some 3D environment in which I need to change the viewport position and take high-res screenshots.
The following commands work nicely when executed one-by-one:
unreal.EditorLevelLibrary.set_level_viewport_camera_info([x,y,z],[pitch,yaw,roll])
unreal.AutomationLibrary.take_high_res_screenshot(res_x,res_y,name)
But when trying to run several of those in a script, only the last command of each kind is being executed (and the is_task_done() always returns “False” during the script’s runtime).
I have scoured the net and API reference for days now, and I understand that when running a python script then the entire script is being executed in one editor frame (or tick), and the commands I want need to be run in consecutive frames, as depicted in the link below, for example:
https://forums.unrealengine.com/development-discussion/python-scripting/1728778-how-to-wait-for-take_high_res_screenshot
My scene is completely static, and I don’t mind waiting as many frames as needed. What I couldn’t figure out is how do I wait for the next frame without exiting my script? Or how do I “tick” the editor from within it? The keywords are too generic (that is, if “frame” or “tick” are even the right terminology) and I can’t seem to find what I need in search or google.
I would be ever grateful for any pointing towards the right direction.
Many thanks, Tim.