I want to know how I can call and open the bvh export menu from my python operator (button)? I've looked into it and I found that the class INFO_MT_file_export(Menu): is located in the space_info.py but I couldn't find except the collada no bvh.

So first, I want to know how I can call and open the bvh export as shown below from my operator?

enter image description here

Also, I've used Blender's operator_file_export template for this and edited it to export bvh instead, and it also adds a menu item to the export menu, I wonder how I can add the Rotation dropdown list and the Root Translation Only shown below to my menu item created?

enter image description here

So to wrap it up, I want to know how to open the bvh export window from my operator, and also want to know how I can get the bvh export parameters to add them to my panel menu.

  • $\begingroup$ It's basically the same as this one: blender.stackexchange.com/a/31852/3710. Supply your properties in a draw method or raw in the operator itself. Just let me know what you do not understand, then I will write an answer... $\endgroup$ – p2or Oct 28 '16 at 6:53
  • $\begingroup$ @poor thank you very much for your comment. I've just checked the answers to the link you sent, and the other one included in your answer there as well. These are customized import/export scripts. I want to know how I can call an already existing one, like in my case I want when I press on a button in my script labeled "Import bvh", to open the import bvh form, and same with "export bvh", "import fbx" and export "fbx", and I don't want customization in them or anything, just being able to call them from the four buttons operators I'm going to create in my script. Is it clearer now? let me know $\endgroup$ – Tak Oct 28 '16 at 7:06
  • $\begingroup$ @poor so don't want the user to do this: 1-open the file menu 2- go to export or import 3- select bvh, fbx,... I want these three steps to be done through my operators supplied in my script, so for example, when my "import bvh" button operator is clicked, I want steps 1,2,3 to be done so that the export or import view of the chosen file type (bvh, fbx,..) will show up. Regarding the other part of my question, was how I can through my script write these properties in my panel, but I think the link you referenced will allow me to do so, I hope :) $\endgroup$ – Tak Oct 28 '16 at 7:15
  • $\begingroup$ That's the only way @Tak since we can't overwrite (not easily) existing export operators. Simplified my obj export operator with a enum and a bool: gist.github.com/p2or/07638b457053d674a018a69a452fefc1 (It also appends the operator to the file menu) $\endgroup$ – p2or Oct 28 '16 at 7:17
  • $\begingroup$ @poor thank you very much. Just to clarify, I don't want to overwrite, I want to just call them, is that possible? $\endgroup$ – Tak Oct 28 '16 at 7:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.