Hi there!
I'm currently working on a script with a UI which requires appending to a textScrollList.
The script creates an object when run, and I would like that object to be added to the textScrollList in the UI after it's run, creating a list of the objects as they're being created. Right now, I have it to where it'll append the object the first time, but every time after that it won't do it. I have no clue why.
Here's the relevant part of the code (there's a lot of stuff inbetween, but I don't think it should be impacting anything):
Under the window function, I have this
curre.textScrollList( 'currentTrackersList', numberOfRows=8, allowMultiSelection=False, append=[ ])
and under the main function, I have this
cmds.textScrollList('currentTrackersList', e=True, append =[systemName + '_' + 'tracker_system'])
(where systemName is a previously defined variable)
What I was assuming is that every time I call the main function, the list will be updated with the appended name. What am I missing to make that happen? Is there a better way to tackle this?
Thinking about it some more also made me realise that every time you open the window, the list would be cleared. So now I'm also wondering if it would be possible to store the information so it loads every time, or if that would require making this a plugin.