Gui_Creator update

Update list for Version 2.3:
Bug fix: String caption and initial where swapped
Bug fix: String length was always 10, now always 1024
Added: Automatic menu insert code on compile for Blender menus.
Updated: Moved version lable

And the file format is still backwards compatible… Do I say that everytime? Oh dear… I wont say it anymore. :stuck_out_tongue: :smiley:

This is version 2.3 (if you haven’t figured that out yet). I was working with my script and found a few bugs, thought of some new features, etc… So here it is. I’ll post updates like this from now on.

http://www.restorides.com/~nerd/gui_creator.py

I hope you enjoy this script as much as I do. :smiley:

The_Nerd

Thanks, I’m sure I will. :slight_smile:

Good work The_Nerd !

Just one suggestion:

Why don’t you use the “module image”;
Avantages:

  • we can load differents type of image.
  • When your script compile big image, when we try to load the compiled script, it take a very long time if image size was too big, whereas if you use the “module image” you just could save image path to load using “module image” in the compilation.

++
ph

I wanted to do this. But I didn’t see any way of getting the pixel data from the image module. Also, I could have done it by binding the image to a gl quad, but this would require the user to always have a x^2 image. :-?

So I decided it was best to just make my own bitmap loader. If blender ever supports getting pixel data (am I missing something?), then I will.

Thanks.

[edited]

Jonathan Merritt submitted a patch to add a Draw.Image function to the python api, so don’t worry, drawing images in the script window is coming. Unfortunately he finished it too to late to make it in this release, but I’m sure that it’ll be in 2.36. Untill then, you may want to use PIL . . .even though I know it’s horrible slow. . .

joeedh

No, I am not using PIL for two resons:
(One): I couldn’t get it to work, although I didn’t try very hard :smiley:
(Two): I didn’t want my script dependant on PIL, so I decided not to

Btw, besides the fact that bitmaps suck, and so does my loader, whats wrong with it anyhow? :stuck_out_tongue:

Good idea. PIL is really slow, (or maybe it’s my PIL-to-opengl conversion functions), and if you have an alternative to use until 2.36, then I suggest that you use it.

Look at this, may be this link could help you using “module image” :

++
ph

Look at this, may be this link could help you using “module image” :

++
ph[/quote]

Thanks, but I don’t think you read a thing I said. Or you didn’t look at the code on that page! :stuck_out_tongue: :smiley:

Hi Nerd!
Nice scriptt.I used it yesterday in one of my scripts.
( http://www.kino3d.com/forum/viewtopic.php?t=2236&start=30
the last one)
It’s verysimple and useful.I did an interface in less then an hour.
Bug: when within text “” are used it crashes.
Suggestion: Sometimes there is no need to create an event(for eg.
for Text).Can you make optionable(1 create event and 0 not)

Ben

Good idea Ben, I have that in the next release. Could you please explain that bug a little more and how I can duplicate it? Thanks.

Since text is included within quotation marks"…text…" ,
if I use other marks within the text “…“text”…” the
script crashes.The right use is “…‘text’…” or ‘…“text”…’
Maybe yo need to split the text string and, if there are
quotation marks “” within the text written by the user
use ’ ’ or inverse.