Hey All. Could anyone point me to a good, up-to-date tutorial, on creating a user interface panel? I am wanting to create an interface for a custom object, similar to the panel that appears when a cube, sphere, or other primitive is added.
So far, I have not been able to find the info I need. I have tried the basic bits of code, that I have found, as well as the template included with the text editor. But, when i run them, only the “run script” panel appears—no created panel. Am I missing something? Thanx.
Hi,
In the blender text editor, there is a template button.
You can learn a lot testing and reading these examples (UI layout, primitives…)
I think, for your case, the very first one is what you need just click ‘Run script’ to test it.
Thanks Tmaes, for getting back to me. Yes, I have tries the templates in the text editor. I did run the first one—the “Add Object” one—as well as the UI templates. I have also tried bits of UI code found online. But, for some reason, when I run those scripts, I only get the title “Run Script” showing up in the tools panel, where the UI should appear. Is there something that I need to turn on or off? Or, do I need to add some line of code? I can find absolutely no reason why the UI never displays.
Well, I finally found the missing piece. It took a lot of digging and searching. But, I found that this piece of code needs to go at the end, when running scripts from the text editor: