Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.
I'm trying to do a Python script where I want to append an Item from an FBList to another FBList. What I want to happen is, I don't want to prevent appending the same Item in the other FBList once it is already appended. I know how if/else condition works, I just don't know yet how to properly apply it in this case. Here's the sample BTW.
def addHeadCall(control, event):
addOpt = optList.Items[optList.ItemIndex]
headList.Items.append(addOpt)
print addOpt, "has been added to Head"
And how do you get the size of the FBList, in order to avoid getting an error if I accidentally remove an item from an empty FBList?
I'm sorry, I'm still completely new to Python especially for Motionbuilder. I can only apply a few of my knowledge for MEL scripting.
Again, thanks in advance for the help.
My mistake. I only solved my 2nd problem.
How do you set to unsolve this forum post?
Can't find what you're looking for? Ask the community or share your knowledge.