(SOLVED!) Replacing Sprites from Sourcefile - Alter Sourcefile Path?

Started by Ali, Mon 04/03/2013 10:31:35

Previous topic - Next topic

Ali

Right. So, what kind of paper would you like the crown to be made of?

Thanks! You've saved me hours and hours of tedium!

Crimson Wizard

Another suggestion just jumped into my mind (or out of my mind?).
There might be a situation when you copied project to a different location and want to re-establish source-to-sprite connection. Now you'd have to export all sprites to folder(s) and manually replace them one-by-one.
My suggestion is to make some kind of "Export and use as source" operation, that will:
a) export sprite to folder
b) set new file as a new sprite's source
repeat for every exported sprite.

zabnat

This is awesome! I have literally waited six years for this feature. I love you.  :-*

Snarky

I find it amusing that this (long-desired) feature, estimated to save some 40 minutes of work each time it's used, took less than two hours to implement. Nice one, Calin!

Calin Leafshade

To be honest, 90% of that time was trying to get the damn source to compile.. something seems very wrong with compiling AGS.Native under windows.

In total I added maybe 10 lines of code... This is why it's called a do-ocracy.

When it's more complete i'll submit a patch for review.

Crimson Wizard

Quote from: Calin Leafshade on Tue 05/03/2013 07:43:36something seems very wrong with compiling AGS.Native under windows.
Does this happen with svn version too, or only git version?
Does it compile on other platforms than windows?  :=

Calin Leafshade

I couldn't get either to compile under windows. I havent tried compiling it under a different OS but compiling AGS.Native for any other OS would be somewhat useless anyway.



Crimson Wizard

Calin, I looked on the code, and I don't understand, is there any reason why the failed sprites could not be simply skipped to let the reimporting process continue?

Calin Leafshade

Theres not explicit reason why they could not be skipped, no. Providing the failures are made clear to the user of course.

Crimson Wizard

Well, should I apply this as it is now, or wait for any improvement? Do you have any plans on this?

Ali

One useful addition would be the ability to re-link files with the same name, but in different folders. To allow the user to change their folder arrangement or transfer to a different computer.

Ideally, pointing out one sprite's new location would make AGS look there the next time it tried to reload a missing file. (Similar to how it works in After Effects.)

Ali

Hello!

As fantastic as this patch has been for me, I've run into the problem I mentioned above. I've just moved my project to a new computer, and unfortunately that has made reloading sprites impossible.

AGS is looking for the sprites here:
D:\Users\Ali\Documents\Nelly Cootalot II\Game Files\Sprites\Nelly\Pirate\Down\nelly_down0000.png

When actually, they're here:
C:\Users\Ali\Documents\Nelly Cootalot II\Game Files\Sprites\Nelly\Pirate\Down\nelly_down0000.png

After Effects would allow me to relink one file, and then it would automatically relink any (missing) file. Would implementing something like this be possible? Or manually editing the source paths en masse?

Or do I need to rename my C: Drive?

Crimson Wizard

Ali, I think while this feature is missing you can run automatic replacement of root path string in the Game.agf file. It is a common XML, but you may make a backup just in case.

Ali


SMF spam blocked by CleanTalk