Mark01 Posted March 31, 2023 Share Posted March 31, 2023 Hi All ! So I have an array of strings. Each string is a character_name in the scene, the array is therefore listing all the characters in the scene. I would like to list all the characters in the scene in the parameter interface of a Null node. So my questions is, how do we take array data and list it in the parameter interface of a null node? The number of characters in the array changes too. I really can't seem to find any information about this anywhere so any ideas would be really useful! Thanks Quote Link to comment Share on other sites More sharing options...
Alain2131 Posted April 1, 2023 Share Posted April 1, 2023 Hey Mark ! I assume your null parameter interface is a multi-parm block. The idea is, in Python, to set the multiparm block number to the amount of items of your array, then for each items of your array, set the string parameter for the character name. geo = hou.pwd().geometry() characters = geo.stringListAttribValue("characters") hou.parm("../UI/characters").set(len(characters)) for i, character in enumerate(characters): parm_name = "../UI/character_{}".format(i) hou.parm(parm_name).set(character) list_of_string_to_parameter_interface.hipnc 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.