so if you have a hidden folder and do not hide the parms on an Digital Asset the parms do not show up in the parameter interface. However, if you do a hou.pwd().parm('foo').isHidden() it returns ‘false’! What is the best way to check and see if that parm is actually displayed to the user - is there some hou.parmTemplate or hou.folderParmTemplate way.
I've been playing around with it but seems quite unintuitive - you would think that if a folder is hidden and the parms inside of it do not show up in the interface that the above command would return ‘true’.
Regardless, if there is a way to determine which parms are ‘hidden’ (ie. not showing up in the parameter interface and hou.pwd().parm('foo').isHidden() = false) that would be great at least I can work around this.
Cheers,
'hidden' parms in hidden folders on HDA
2678 1 1- are2d2
- Member
- 79 posts
- Joined: April 2011
- Offline
- jhuitema
- Member
- 3 posts
- Joined: June 2018
- Offline
I've run into this problem as well and I managed to get something working with a helper function like so:
It only checks for a single folder as is but it worked for my purposes. If you have multiple levels of folders that might or might not be invisible then you would need to modify the script.
This would be nice if SideFX could change the isHidden to be intuitive like you said. But for now hopefully the python script helps.
def is_parm_hidden(parm): """Determine whether the given parameter is hidden. Args: parm (hou.Parm): The parameter to check the visibility of. Returns: bool: Whether the parameter is hidden in the Parameter interface. """ is_hidden = False parm_template = parm.parmTemplate() if parm_template.isHidden(): # ignore invisible parameters is_hidden = True else: # ignore parameters in invisible folders node = parm.node() parm_template_group = node.parmTemplateGroup() try: parm_folder = parm_template_group.containingFolder( parm_template.name() ) except hou.OperationFailed: pass else: if parm_folder.isHidden(): is_hidden = True return is_hidden
It only checks for a single folder as is but it worked for my purposes. If you have multiple levels of folders that might or might not be invisible then you would need to modify the script.
This would be nice if SideFX could change the isHidden to be intuitive like you said. But for now hopefully the python script helps.
-
- Quick Links