I'm writing an addon to import game models into Blender. But sometimes, there is a mismatch between a bone's name from the animation file and the name from the object file.
So I'd like, when the script encounters an unknown bone, to open a popup with a list of existing bones (plus an option to ignore the bone), that would pause the script until the user has chosen his result, and to get back the chosen option.
I've seen How to call invoke_popup? to create a popup, but I'm stuck on several points :
how to call it from my python code
how to change its name (label) before calling it (to say for example "bone X not found")
how to get the result of the selection
how to get the user see and interact with the popup before the end of the script
invoke_popup()
is not really reliable for your use case. You should better use a regular panel, because the user can't dismiss it like a popup (they are not really blocking in Blender). $\endgroup$ – CodeManX Aug 11 '14 at 20:48