How to set a button strip menu tokens with python.

   736   0   1
User Avatar
Member
24 posts
Joined: Nov. 2019
Offline
Hi! I am trying to make a button that updates the tokens in a button strip when pressed, right now I have made this code in the action button of the parameter, but it gives me the error "Invalid size"

the menuItems consist of a list of strings, for example:
["cluster1","cluster1","cluster2","cluster1"]
so it contains labels and tokens.
import hou
pos = 1
menuItems = kwargs['node'].node("VALUES").geometry().attribValue("clusterList" + str(pos))
kwargs['parmtuple'].set((menuItems))
Edited by RodrigoMartin - Sept. 4, 2023 06:52:57
Final Layout.
Skydance, Madrid.
https://twitter.com/RodrigoMartinKJ [twitter.com]
  • Quick Links