Search - User list
Full Version: On Post Bake Delegate not allowing me to bind callable to it
Root » Houdini Engine API » On Post Bake Delegate not allowing me to bind callable to it
tov95
Hi!

I'm working in Unreal 5.2, using UnrealPython in tandem with Houdini Engine for my pipeline work!

So far I'm able to successfully bind callables to other delegates of the HoudiniPublicAPIAssetWrapper to execute functions post-instantiation of the wrapper, post-cook and post-processing.

def bind_post_instantiation(HDAwrapper):
    HDAWrapper.on_post_instantiation_delegate.add_callable(post_instantiation)

def post_instantiation(HDAWrapper):
    print("test post instantiation")

But I'm currently stuck trying to do the same for the On_Post_Bake_Delegate! Not too sure what i'm doing wrong here, would like some help on this!


def bind_post_bake(HDAwrapper):
    HDAWrapper.on_post_bake_delegate.add_callable(post_bake)

def post_bake(HDAWrapper):
    print("test post bake")

The exception that's raised on this line is:
Exception: HoudiniPublicAPIAssetWrapper_OnHoudiniAssetPostBake: Callable has the incorrect number of arguments (expected 2, got 1)


Thank you!
tov95
Ah ok I found the fix :/ I should learn to read better :S

Exception: HoudiniPublicAPIAssetWrapper_OnHoudiniAssetPostBake: Callable has the incorrect number of arguments (expected 2, got 1)

def bind_post_bake(HDAwrapper):
    HDAWrapper.on_post_bake_delegate.add_callable(post_bake)

def post_bake(HDAWrapper, bake_success):
    print("test post bake")

the callable should be able to accept the second argument of whether the bake is successful or not , similar to post_cook
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB