Topic: Brickset editor

I threw this together in the last 2 days using Python and PyQt4:

http://img191.imageshack.us/img191/1503/brickseteditorscreensho.png

I made it because I wanted to create a  new brickset, but Rapid Brickset Editor is too limited and Celdecea's brickset editor is written for Windows (I use Linux).

I haven't tried making a new brickset with it yet, but it seems to work fine when modifying existing ones.

Even though Python 2 is the most commonly included version in most systems now, I wrote this in Python 3 both to be future proof and because Arch Linux (my favorite distro) has already adopted Python 3. It might work in Python 2, but I haven't tried it.

And besides Python, you also need PyQt4 (Python bindings for the Qt user interface toolkit) to use it.

https://github.com/MTK358/opensurge-brickset-editor

Remeber, the parser that reads the files here is NOT nanoparser, it's just a quick and dirty function using regular expressions. If it mangles your existing brickset file that you spent ours making by hand beyond recognition, you've been warned. smile

If you're modifying and existing brickset, I recommend you back it up under a different name.

Last edited by MTK358 (2011-02-24 14:39:54)

Re: Brickset editor

Can you please upload the screenshot to a new host?

We can only see a frozen frog in here, due to ImageShack's stupid new policy of blocking domains, demanding people to send them their e-mails if they ever want to see their images again.

Re: Brickset editor

Alexandre wrote:

We can only see a frozen frog in here, due to ImageShack's stupid new policy of blocking domains, demanding people to send them their e-mails if they ever want to see their images again.

Plus I got a virus off imageshack that nearly turned my computer into a paperweight a while back. Go figure. Try getting a photobucket account.

Re: Brickset editor

Looks really nice! Can someone compile this for Windows?

Re: Brickset editor

Alexandre wrote:

Can you please upload the screenshot to a new host?

We can only see a frozen frog in here, due to ImageShack's stupid new policy of blocking domains, demanding people to send them their e-mails if they ever want to see their images again.

OK.

I'll update the screenshot, too, since I did a lot of changes to the main window. It looks almost like a real, polished application now!

jobromedia wrote:

Looks really nice! Can someone compile this for Windows?

Python isn't compiled, it's and interpreted language.

Theoretically it should work perfectly if you have Python and PyQt installed.

Re: Brickset editor

Here's the screenshot of the newest version:

http://piczasso.com/i/88918.png

The "Source Rect Pos Increment" spinbox at the bottom sets how much the arrows on the source rect x/y spinboxes change the value. It's very convenient for bricksets that have the same size bricks in a grid in the source image.

Re: Brickset editor

It is great and useful! The design of the app is modern and beautiful

Will I have any problem with python 2?

Last edited by CharlyTx (2011-02-25 18:43:26)

Re: Brickset editor

CharlyTx wrote:

It is great and useful! The design of the app is modern and beautiful

Will I have any problem with python 2?

Try it!

Re: Brickset editor

this tool's got potential, but there are lots of problems:

- the README is misleading. When you do what it tells you to, the program won't run, since it won't find the modules mainwindow_ui.py and brickeditorwidget_ui.py. It's a typo.
- I couldn't open any bricksets (and I defined the game directory correctly).
- My Python isn't 3, but 2.6.6, installed via apt-get

I couldn't do anything with it.

Re: Brickset editor

Alexandre wrote:

- the README is misleading. When you do what it tells you to, the program won't run, since it won't find the modules mainwindow_ui.py and brickeditorwidget_ui.py. It's a typo.

That's easy to fix. I will do it soon.

Alexandre wrote:

- I couldn't open any bricksets (and I defined the game directory correctly).
- My Python isn't 3, but 2.6.6, installed via apt-get

I tried with Python 2, and it doesn't open bricksets. Maybe I can figure something out by reading a few Python 2 to 3 migration guides.

And note that you don't need to define the game directory to open bricksets. It's only purpose is to serve as the path relative to which the bricks' source image is. If you don't define it, it will work, but there will be no image.

Re: Brickset editor

I found that the problem is in read_file in brickutils.py.

It seems as if the regular expressions just aren't matching with Python 2.

Re: Brickset editor

I guess that it isn´t  run on linux with python 2.6, I don´t   know  what file i must execute to run the app.
why don´t you make this on C or another language if you can?

Re: Brickset editor

You execute the file called "opensurge-brickset-editor".

And I wrote it in Python becasue it's far easier than C++ (Qt's native language).

Re: Brickset editor

yeah! it´s true that python is easier than C

Re: Brickset editor

Well, after a few hours of getting the necessary tools installed ( my first successful compilation smile ) I finally managed to get this program working and I must say that it is awesome.  I will be trying to get it to work under windows later, but I'm not sure how successful I will be...

Edit: Got it working, it was easier under windows.

Last edited by lunarrush (2011-03-02 22:58:45)

If I knew then what I know now I'd tell you that the story's true.  Cause whatever you do, it comes back to you.  -Slaughter, Burning Bridges