Hi,
I would like to call an import just like you would by selecting manually the menu item.
I mean a requester to navigate in HDs and Folders until finding the desired file.
Say for instance a mhx rig+mesh (but not only Makehuman, I would like a general method).
I stumbled on “bpy.ops.wm.call_menu” which maybe would be convenient, but no idea what to give as “name”.
Maybe it’s a wrong way and there would be a better one ?
Any kind of help would be much appreciated !
Thanks in advance !
call_menu() is for displaying menus, not to call a menu entry.
Clickable menu entries are just operators added to a menu. Wat you actually want is to call an operator, or more precisely, invoke it:
bpy.ops.import_scene.obj(‘INVOKE_DEFAULT’)
If you want to create your own operator with a file selector, see the templates in text editor. There’s an example for an import operator with modal file selector.