Hey,
I am new to scripting in python for MotionBuilder, and I am having some difficulty with a script that needs to allow the user to choose a selected character from a dropdown list, and plot the animation.
I managed to create the window and the dropdown list with all the characters in the scene, I just need to find out how to remeber the selected characters- preferably when clicking the ok button.
print control.Items[control.ItemIndex] #prints the selected characters on selection
varTest = 0
for x in control.Items[control.ItemIndex]:
if x.IsSelected(varTest)==True:
x.Items.append(chararacterList[i].Name)
or #prefer this one
def ClosePopupCallback(control, event):
characterList=[]
for x in Items[control.ItemIndex]:
if x.selected (True):
x.Items.append(chararacterList[i].Name)
CloseTool(t)
Any ideas? Thank you!