Customize Hiero export UI

Hi,

I’m having a hard time adding extra UI elements to the Hiero Export UI. I added a custom string parameter as per manual. I can see my {free_field} in the help balloon showing up. But now ideally I want to add a UI element to the export dialog that let’s me set a custom string to add to the export filenames.

What I tried:
I figured I need to use the hiero_customize_export_ui.py hook.
I set the tk-hiero-export.yml hook like so:
settings.tk-hiero-export:
hook_customize_export_ui: “{config}/tk-hiero-export/hiero_customize_export.py”
Copied the file and tried a few things. I copied over the contents of tests/fixtures etc hook. But once I did that, Hiero wasn’t even seeing the shotgun export anymore, just regular Hiero exporters only.

I’d like some pointers on customizing the UI, reading the manual here also didn’t help me get started : https://developer.shotgunsoftware.com/tk-hiero-export/
Preferably I’d like to add the field under the version spinner, but I got a feeling that version there is a bit of a special thing.

Thanks for any pointers or example hooks/setups that work!
Cheers,
-Johan

4 Likes

Hey @Johan, thanks for posting. I don’t have an answer for you here, but just wanted to let you know we will circulate this internally to get the right eyes on it, and get you an answer soon. In the mean time, will keep an eye out to see if another member of the community can chime in with some guidance or working examples. :slight_smile:

Thanks Tommy, I’ve moved on to work on other area’s of the pipeline while I wait for an answer (fingers crossed!). I have another week to finish this task, so I’d really appreciate any pointers/feedback on the matter.

Should I make it a complete new app, or can I handle it with hooks alone. Obviously I’d prefer the hooks solution. Thanks in advance for any info/help on the matter.

1 Like

Hi Johan

So I think the create_shot_processor_widget method from HieroCustomizeExportUI hook is probably what you want to use.

You can’t, unfortunately, group it under the version spinner via the hook, any widget will go into the “Shotgun Shot and Sequence Creation Settings” UI Group.

Sounds like it was probably erroring. I would check out the NukeStudio/Hiero script editor and the tk-nukestudio.log/tk-hiero.log file see if there are any errors in there.

As for an example, that sounds like a great idea, I’ll see if I can put one together, but I won’t, unfortunately, have a chance today and next week I’m off.
I’ll see if anyone else is able to in my absence.

Best
Phil

3 Likes

Thanks Philip!
I found the log and the errors show me something more indeed. So is the ‘hook_customize_export_ui’ hook the right one to declare in ‘tk-hiero-export.yml’, or do I need another hook? Also it would help to know how to use the test hook from the fixtures folder.

1 Like

Hey Johan! hook_customize_export_ui is indeed the right hook. Here it is in tk-hiero-export's manifest.

If you need pointers on how to point to a custom hook in your config, I’ve described it for a different hook in this post, but I can definitely add detail if that’s not clear.

Let us know how it goes!

3 Likes

Hey everyone,
I’m actually trying something really similar that’s why I’m writing in this thread.
Looking at get_transcode_exporter_ui_properties in the hiero_customize_export_ui base hook I see that this is used to populate any properties on the returned custom widget. Rather than properties (simple QCheckBoxes) I would like to implement a QComboBox. Of course I could set up my combobox in create_transcode_exporter_widget but I would like to know if there is the possibility to do that via get_transcode_exporter_ui_properties.

Cheers,
Tony

3 Likes

Duh I found it…
just specifying a list of strings for the value key did the trick.
If you want to have other types of input you can run the following code in Hiero’s script editor to get a list of types and what they will turn into.

from hiero.ui.FnUIProperty import UIPropertyFactory

for k,v in UIPropertyFactory.PropertyDictionary.items():
    print k,v
5 Likes