Jump to content
Sign in to follow this  
Kdeg

Create multiple folder parameters on a single node with python

Recommended Posts

Hello guys,

I'm trying to create two different parameter folders on a node. These two folders would be created by two different python nodes with the hou.FolderParmTemplate() method.  Unfortunately when I try to achieve this, the second folder created doesn't get its name set properly. It sort of automatically takes an incremented name of the first folder created, even though it has a distinct name set in the hou.FolderParmTemplate() method.
Any idea as to why this is happening and how to resolve it?

I've attached a file, a simple setup of what i'm trying to do.
There are three nodes : a null on which i'm trying to create two separate folders and the two python nodes that generate the different folders. If you run both of their codes and then go in the Parameter interface of the null, you'll see the second file hasn't been properly named.

Many Thanks.

 

Edited by Kdeg

Share this post


Link to post
Share on other sites

Well turns out you can only name the first tab folder. The others will be locked and given an incremented name of the first one even if you create them manually in the parameter interface. Not sure why, maybe a bug in my Houdini version. Other folder types, like simple folder or collapsable work fine.

Share this post


Link to post
Share on other sites

Indeed that is kinda the behavior that you need to follow in order to create tab folders or radio buttons.

I have been trying to figure out how to put folder group with parameters and sub-folders into an already existing folder. Have you done anything like that?
It looks like, you can't just stack `parm_template_group.appendToFolder(target_folder, source_folder)` one after another if I want to include two folder in an existing one. I guess I need to have a parmTemplateGroup() for each folder.

Share this post


Link to post
Share on other sites

Hey man,

I made an example of that in the scene attached below. Just run the code on the python node and it will generate the folders/subfolders/parameters on the null.

PY_Layered Folders.hipnc

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×