Create a simple GUI: entering values and create buttons


I try to start coding for Blender. My longterm-goal is to create my own sets of tools to automate a few functions in Blender that I regularly use. Nothing too spectacular I thought. Having a great deal of experience with JS and AS3, Python didn’t seem too complicated as well.

I have worked through some python-tutorials and have also executed some functions from the commandline. So I think I know the basics.

What I keep failing at is setting up any GUI. All examples I tried to use for reference seem overly complicated. All I want to do just now are the following:

  1. Set up a simple button that executes an arbitrary command/script when it’s pushed.
  2. (in the distant future :slight_smile: ) Set up a few number-fields in which I can enter parameters
    and add some kind of “submit”-button, to send all the parameters to a function

So far I haven’t even managed to add a button anywhere, let alone giving it some functionality. I have read through a lot of sample-code and tutorials, but haven’t found a single one that explains this seemingly simple task. Could anyone please help me?

There are scripting tutorials at blendercookie that create addons with interface elements.

You might check these links below, some of the info might be slightly outdated but should get you started. Keep in mind there is no “easy” way, if you’re not familiar with Python it will probably seem complicated. Just ask questions here if you get stuck.