Run a python script in Unreal after HDA cooks?

   910   1   1
User Avatar
Member
6 posts
Joined: 2月 2022
Offline
Hello,

I've been experimenting with ways to run a Python Script in Unreal Engine after the HDA finishes cooking.
This was to check which map the HDA is being instantiated in and limit it to certain maps.

I ended up using this method posted by adam_perin here
https://www.sidefx.com/forum/topic/78620/?page=1#post-392802 [www.sidefx.com]

This method works. However, it limits the HDA's ability to rebuild several ones at the same time because the Engine ends up deadlocking itself when 2 remote control connection are being done.

Since I couldn't find a way to import the unreal engine python api inside of houdini and run the commands there, is there another way I could pull this off and run the python script after an HDA finishes cooking?
(Avoiding blueprints because that's easily circumventable if the user just instantiates the HDA instead of the Blueprint).

Thanks for any insight on this!
User Avatar
Member
25 posts
Joined: 12月 2019
Online
If you start the cook with python inside Unreal, then the houdini plugin's API gives you a OnPostCookDelegatecallback for running some other python after the HDA cook finishes
  • Quick Links