Game Development Community

Image Drag and Drop seems to have issues in Beta 3

by Dustin Sims · in Torque Game Builder · 04/20/2007 (7:04 pm) · 9 replies

I am having a problem getting images to drag and drop into TGB editor.
About 2 out of 5 images would go in.

I tried saving them as different formats(.jpg and .png) but no luck
to find a pattern as to why they would not show up. Once dropped in, nothing happened.
I also got mixed results trying to use the create imagemap button and select image.

This might have something to do with my last post about Starting a New project.

(Hold on, going back to test more to make sure)...

I just restarted TGB again to retest and everything dropped in fine...
Must be that when you create a new project, things don't work so hot until you close restart TGB.

#1
04/20/2007 (9:28 pm)
I have another problem with creating imagemaps, the images are always copied to \data\images, even if they are located in a subfolder to \data\images already. Not that much of a problem, but a bit annoying to have to repoint all your datablocks to the correct images and clean up the extra files you don't want in your images folder.
#2
05/11/2007 (6:29 pm)
@Dustin:

I have not been able to reproduce this and I've tried different combinations:

1) All png images (1,5 and 20)
2) All jpg images (1,5 and 20)
3) Mixed png/jpg/bmp images (43)

Did you uninstall the old version and install a clean version or overwrite?

If you can give me some more info so I can repro I would appreciate it.

@Magnus:

I don't really understand why adding new images would already have image map bindings?
Do you mean when you copy in new versions of an existing image?
So just to be clear if you drag in an image you want it to check if the image already exists and overwrite the one it finds?
#3
05/12/2007 (1:30 am)
Neo. My issue isn't really specifically with the drag-and-drop thing, it happens however you import an image.

Say I have an image located in \game\data\images\some_folder\blah.png, if I try to import this image TGB will make a copy of it in \game\data\images\blah.png and point the datablock to that. I'm assuming it does this so you can import images from anywhere in your file system, but there should be a check. ("if already in a sub folder to the \images folder, don't copy the file and point the datablock to the subfolder").
#4
05/12/2007 (5:09 am)
Ah I see. Perhaps it should pop up a dialog box just like windows and ask whether to overwrite etc.

Thanks, I will look into it.
#5
05/12/2007 (5:12 am)
No dialog box please!
The reason this is bugging me is because it takes a couple of extra moments to go in and change the datablock to point to \game\data\images\some_folder\blah.png and remove the \game\data\images\blah.png file. I DON'T WANT NO STINKING DIALOGS taking up my time =)

It's simple. IF the image is already located somewhere within the \images\ folder, there's no need at all to copy the file anywhere.
#6
05/12/2007 (10:25 am)
Ah but you see there is, because if you are copying in a new improved version you are going to start shouting because it just silently failed and still showing your old gunky version ;p

So a dialog box with a tick to with some options "Don't ask me just overwrite or don't ask me just fail' is the only way to do that sort of thing without incurring the wrath of the other side later.

[edit] And perhaps holding down SHIFT or CTRL/CMD can be used to choose without displaying a dialog box as well.
#7
05/13/2007 (5:22 am)
I still think you're not quite seeing my point.

My problem is ONLY for when the image I try to load is within a SUBFOLDER to the \data\images folder. If you try to import a file from some random place in you file system it of course have to be copied. If it's already in your images folder it should only create a datablock pointing to that file. If you want to reload the file later there's already a nice little "reload textures" menu.
#8
05/13/2007 (6:19 am)
Heh, I actually did see you're point, I was just distracted by the whole would dragging the same image file from somewhere else if it hadn't changed thing.

So to make sure I do understand you mean that if you have an image already in a sub folder of data/images and you assign it to an image map it gets copied to the root data/images directory instead of just setting the path to the sub folder? Then yes of course it can just update the path instead of copying it and no dialog boxes ;p.
I will be reviewing all that code to make it do things correctly.
#9
05/13/2007 (6:22 am)
Yep. Wonderful. You got it. =)