dynamic UI enheritance

   6209   8   1
User Avatar
Member
300 posts
Joined: March 2011
Offline
I have a tool that contains a set of otls,
they need to be controlled from the top level, therefore I need to take all the visible controls from the otls below, and aggregate them into controls on this tool.
putting each otl into a tab/folder the reason being that the tools below the toplevel will be very much in flux.

it's very easy to drag a tool into a subnet copying all controls and hooking them up, but I cannot find a python/hscript equivalent… and unfortunately this will be too much work to do by han all the time.

has anyone made such a system? or could anyone give me some pointers?

Greets Freek.
User Avatar
Member
8780 posts
Joined: July 2007
Offline
did you try Import Blocks?
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
300 posts
Joined: March 2011
Offline
no I have not yet,
sounds like an interesting option, bit I seem t be having a hard time finding documentation or examples of this in use, have you ever used it?

all I could find is this thread:
http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=10182&highlight=&sid=3813f3ef14a0f79608c5bab3ec1f86c9 [sidefx.com]
unfortunately I cannot find a way to use the actual import block option.
(I tried using the source parameter but with no success)

to further explain a bit what I need:
Get all the parameters from all otl's contained in this one which the name fits: ../paint*

so in this case it could be:

paint_rockyness,
paint_soiltype,
paint_vegetation_type,
paint_wetness

and take all the parameters on those nodes that are visible and use them.
so I can add an otl at will.
User Avatar
Member
8780 posts
Joined: July 2007
Offline
on your top otl
just create folder
check Import Settings
in Source type: op:paint_rockyness
rightclick to your folder and choose Refresh Imports
(you can as well define suubset of folders in Token or further specify Mask, refer to this page for help http://www.sidefx.com/docs/houdini13.0/ref/windows/optype#importfolder) [sidefx.com]

on your otls you can mark parms with Available For Import checkbox

so the limits of this method are:
- you need to specify at least one folder for each otl to import parms from
op:paint_* will not work
- you need to force refresh, therefore saving your top asset definition, imports don't update automatically (which I consider a good thing)

so maybe you can use Import Blocks, and still a bit of python to automate main folder generation from otl names, setting them to import block type and let them import all the stuff
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
300 posts
Joined: March 2011
Offline
YES got it to work
thank you!!!!

if I find a way to script that I will surely let you and everyone else know
although so far i have yet to find a python hook
User Avatar
Member
8780 posts
Joined: July 2007
Offline
a few hints:
hou.FolderParmTemplate.setFolderType( hou.folderType.ImportBlock )
hou.FolderParmTemplate.setTags( {'import_mask': ‘', ’import_enable': ‘1’, ‘import_source’: ‘op:paint_rockyness ’, ‘import_token’: ‘'} )

but I’m not really sure if you can force importblock to refresh imports through python
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
1922 posts
Joined: Nov. 2006
Offline
tamte
but I'm not really sure if you can force importblock to refresh imports through python
My oldest submitted RFE from back at SESI, 90 months old now:
#25143: Ability to call Refresh Imports on an asset using HOM
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
5 posts
Joined: Nov. 2013
Offline
Sorry for resurrecting this old thread, is Refresh Imports still not possible using HOM, or even using hscript?
User Avatar
Member
4 posts
Joined: June 2017
Offline
90 months old, five years ago now means that RFE was submitted around 2006 ahah.

Is there any update on this, oscar_juarez did you find a workaround? I have ~30 hda's to update import block folders on using “Refresh Imports”.
  • Quick Links