Pawel Lukaszewicz

pablo_lukaszewicz

About Me

Expertise
Not Specified
Location
Poland
Website

Connect

Recent Forum Posts

Possible to set defaults for "Houdini Engine" section params May 11, 2022, 11:26 a.m.

Guys is it possible to set defaults for "Houdini Engine" set of parameters per HDA (vide image).
So when an artist drags the HDA from content browser onto the world they get those set to exact working values required by this HDA to work properly?
Like push transforms to Houdini checked and bake target set to "Foliage" etc?

Houdini Engine for Unreal - Version 2 Beta Feb. 22, 2022, 7:28 a.m.

Hey, I would like to ask if importing landscapes from bgeo via HoudiniGeoImport commandlet is somewhere near in the road map?
Thanks

cook from python in commandlet, possible? Feb. 10, 2022, 4:34 a.m.

Hey
Is it possible to get bake results from python api when running python script as a commandlet?

I'am using a python script based on what is described here:
https://www.sidefx.com/docs/unreal/_public_a_p_i.html#PublicAPIPyAsyncProcessor [www.sidefx.com]
(script at the end)

When running script.py in unreal editor (5.0ea2) itself I get the bake saved.

But if run the scirpt as a commandlet it just runs and no errors but no bare results and no hars spawned no callbacks on ProcessHDAExample called (on_failure or other). That is how I run the script as a commandlet:

#.\UnrealEditor-Cmd.exe "myproject.uproject" -run=pythonscript -script="script.py"
The hda is just a file input sop with file path to bgeo exposed as param.

Thanks in advance.

----------------script---------,
from time import sleep
import unreal
from HoudiniEngineV2.asyncprocessor import ProcessHDA
_g_processor = None

hda_path = '/Game/HDA/import_utils.import_utils'

def make_parameters():
    parameters = {}
    parameter_tuple = unreal.HoudiniParameterTuple()
    parameter_tuple.string_values = ("path to bgeo",)
    parameters['file'] = parameter_tuple
    return parameters    

class ProcessHDAExample(ProcessHDA):
    def on_failure(self):
        unreal.log_error('on_failure!')
        global _g_processor
        _g_processor = None

    def on_complete(self):
        unreal.log_warning('on_complete!')
        global _g_processor
        _g_processor = None

    def on_post_processing(self):
        unreal.log_warning('on_post')



def run():
    # Create the processor
    global _g_processor
    _g_processor = ProcessHDAExample(
        unreal.load_object(None, hda_path), 
        parameters = make_parameters(),
        enable_auto_bake = True,
        bake_directory_path = "/Game/HDA",
        remove_output_after_bake = True,
        replace_previous_bake = True,
        delete_instantiated_asset_on_completion_or_failure = True
        )

    if not _g_processor.activate():
        unreal.log_warning('Activation failed.')
    else:
        unreal.log_warning('Activated!')

    #i = 0
    #while _g_processor:
    #    sleep(5)
    #    i+=1
    #    unreal.log_error("tik tack {}".format(i))


if __name__ == '__main__':
    run()