Override / Call core function from within Hook

Hi Team

I’m wanting to modify the contents of a class shipped with one of the default apps.

The modification is literally 1 line of code.

Obviously I don’t want to actually change the code of the original source, so I’m trying to figure out how I can override the function I’m making the change within.

I’ll be super specific:

  • Within tk-multi-publish2\v2.5.2\python\tk_multi_publish2\ui\dialog.py
  • I add this line self._create_master_summary_details()
  • I do this at the end of the _update_details_from_selection function

This has the effect of flattening the UI into shared thumbnail/description fields (which is what I want).

Is there a way I can replicate this modification using the standard customisation tools (hooks/config files) ?

Thanks, clinton.

2 Likes

Sounds like a useful modification, Clinton! I’ll ask a member of the Toolkit team where this sort of change would be best positioned so you can easily replicate it.

2 Likes

Hi Clinton –

There’s not a way to do that with hooks, unfortunately. I’d be curious to see what this looks like if you’d be game to provide before/after screenshots. Might be worth a feature request.

thanks!
-tannaz

2 Likes

Hi Tannaz

I’m away from the office for a month but the functionality I’m forcing is the same thing you see if all publishes are of the same type (the instance where the UI shows the SUMMARY heading).

Because I’m using a workflow with many different formats, it won’t give me this summarised behaviour. The summarised workflow is ideal for me because it means the many publishes only require thumbnail/description input once.

A feature request would be to have this shown as a UI option (a checkbox to toggle it, for example), with config control over its default behaviour.

In my case, I would default it to ON, but someone might disable it for special cases where adding a description for each publish makes sense.

Clinton

2 Likes

@tannaz

Here you go; before and after!