Run script after startup

Hello there!

Is there a hook, or other solution, to run code right after the DCC started? I know there’s a before_app_launch hook, but I need something like “an after_app_launch” hook.
Maybe this should be in the engine somehow or as an engine hook.

I know Maya has and Houdini has, and these run right on startup.
But with Shotgrid is it possible to create a more generic script for each engine, that runs on startup?

Thanks in advance!

Update: maybe it is I’m looking for? But I want to handle this engine-by-engine and not as a core hook.

Would I need to create a new app and implement post_engine_init() in it to achieve this?

I think the app approach would be a valid way to do it.
Maybe fork the tk-multi-setframerange app and repurpose its setup so you can execute a hook per engine.
(Or recreate the same approach)

1 Like

We actually forked some of the engines to add this hook.
But an app with post_engine_init sounds better!

In engine_init you could switch on the engine name, which is also not ideal. We use this in some places, too.


Thank you for your answers! :slight_smile:

1 Like