@zipit Thanks mate, that's done it!
O
Posts made by OllyFJ
-
python combobox get current value
Hey, fairly basic question but I'm pretty new to this and struggling to solve it, I'm trying to write a save script in python, I've filled a combo box with a list of directories, I need to access the string of the currently selected value to link to a second combobox to search for the next folder in the chain, how would I go about doing this? in Houdini I have the same tool working using 'self.ui.jobID.currentText() ' is there a similar function in c4d?
self.AddComboBox(J_NAME, c4d.BFH_SCALEFIT, initw=300, inith=10) self.AddChild(J_NAME,0,'______') self.jobs = 'C:/Users/Olly/Downloads/' if os.path.isdir(self.jobs): # add only directories to list i = 0 dirlist = next(os.walk(self.jobs))[1] dirlist.sort() for d in dirlist: if os.path.isdir(self.jobs+d): i += 1 self.AddChild(J_NAME, i, d)
Thanks!