【MotionBuilder】FBListのItemを全消しする
2021-02-27
MotionBuilderのPythonSDKでPlugin開発しているときに,FBListのItemの全消し方法がよく分からなくて詰まったので,メモ。
Env.
MotionBuilder 2019
Method
結論から
1 2 3 4 5 6 7 8 9 10 11 |
SyncCharacterFBList = FBList() # 何かしらのデータが入り... for index in SyncCharacterIndexList: SyncCharacterFBList.Items.append(Characters[index].Name) SyncCharacterFBList.Style = FBListStyle.kFBVerticalList SyncCharacterFBList.MultiSelect = False # データを全消し! FBPropertyStringList.removeAll(SyncCharacterFBList.Items) |
追記,
何故かここ(https://download.autodesk.com/us/motionbuilder/sdk-documentation/PythonSDK/classpyfbsdk_1_1_f_b_list.html)のドキュメントにはFBList.Itemsで返ってくるのはFBStringListって書いてあるのに,実際はFBPropertyStringListが返ってくる。
最終的にはこのページを参考にした。
https://help.autodesk.com/view/MOBPRO/2019/ENU/?guid=__py_ref_class_f_b_property_string_list_html
Pythonの新しいドキュメントって作らないのかな..(初心者