HDA processor parameter referencing

   159   2   0
User Avatar
Member
14 posts
Joined: Sept. 2013
Offline
I have an object-level batch asset processing-type HDA with a TOP network inside that contains several sop-level HDA processors

I promoted all the necessary parameters from the HDAs themselves onto the top object-level asset so the user has control over everything, but I need to link the pdg HDA processors to those parameters as well

there doesnt seem to be any parameter references created when you hit ‘update HDA parameters’ on the hda processor, even when pointing to a template sop node. So far i've only been able to manually copy/paste relative reference each parameter manually, and the assets contain multiparms so that no longer works

On a normal HDA for instance you could use the ‘Import Settings’ toggle on a folder pointing to the template HDA, refresh the imports, and your good, but since the HDA processor is dynamically generating spare parameters for everything (and not all of them come across correct, things like buttons, hide/disable when etc don't link up perfectly), whats the preferred workflow here?

If its through the Filter HDA parameters window, I cant find any documentation on it, I tried checking enable expression but it just creates an empty python expression. Is the idea that you then fill in the expressions yourself, or how is that mean to work?

Finally, I remember reading somewhere you can control parameters using work item attributes, would you create an attribute that has the same name and type as the HDA parameter and it will pick it up automatically? or do you need to fill in all the HDA parameters manually with `@my_attrib` for it to work? Which again would be problematic due to the dynamic multiparms etc

Any help is appreciated!
User Avatar
Staff
344 posts
Joined: Aug. 2017
Offline
Hello!

HDA Processor is not actually cooking the instances of the HDAs that are within your HIP file. When an HDA Processor job cooks, it runs Hython in a new process. The HDA Processor job will instantiate the HDA within that Hython session, set the parameters, cook the HDA, and then report the outputs. Therefore, if you want to expose the HDA Parameters on the interface of your top-level OBJ HDA, I would directly promote the HDA Parameters from the HDA Processor onto the top level HDA interface.

I will file a bug for the hide/disable not working. This is happening because the HDA Parameters are prefixed to avoid name clashes and the hide/disable expressions are not updated to account for this.

Buttons on your HDA's interface should be working correctly. They will appear as Toggle parameters within the “HDA Parameters” folder. When the toggle is enabled, it means that HDA Processor will “press” the button when it cooks.

You are correct – the “Enable Expressions” toggle in the “Filter HDA Parameters” window is just a quick way to enable Python expressions on parameters.

You could drive everything on the HDA Processor using attributes like you are describing. I would recommend disabling all the parameters with the “Filter HDA Parameters” window if you do this. The HDA Processor knows which attributes on the work item are HDA Parameters via 4 string attributes: hdparms_buttons, hdaparms_floats, hdaparms_ints, and hdaparms_strings. These attributes contain lists of names of the HDA Parameters. For example, if you wanted to set a float attribute on your HDA Processor called “velocity”, you would have to add a “velocity” attribute with its values, and add “velocity” to the hdaparms_floats string attribute.

I hope this helps. Let me know if you have any more questions. I can also provide some example files if you need any further clarification!
User Avatar
Member
14 posts
Joined: Sept. 2013
Offline
Hey Brandon, thank you for the info! That's exactly what I was looking for, and thank you for filing the RFE as well.

Examples are always welcome if you have them
  • Quick Links