How do I handle operators / dialog boxes to implement something similar to the "add preset" functionality in blender? I want to have a +/- buttons to add/remove presets and when the + button is clicked it should essentially invoke an operator to add the preset, but first it will have to pop up a dialog box to ask for the preset's name. How would these operators / dialog box work together so that the output of the dialog box entered in the preset name dialog box is then used to carry out adding the preset via the "add preset" operator? I looked at the blender presets.py code but it's rather dense and hard to understand so I need some hints.

Note: any links to posts/code that show the operators/dialog boxes interaction within an addon script are highly appreciated.

  • 1
    $\begingroup$ see the UI cookbook.wiki.blender.org/index.php/Dev:Py/Scripts/Cookbook/… $\endgroup$ – zeffii Mar 29 '17 at 20:22
  • $\begingroup$ @zeffi stop follow me :p Yeah.. I need to take a better look at that cookbook. I skimmed through and couldn't find an answer right away. I'll have to give it another try. $\endgroup$ – DolphinDream Mar 29 '17 at 20:42

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.