Henryk

reimport or reset spritesheet

Recommended Posts

Hello folks,

 

well, I deleted a sprite atlas by accident. I have setup an animation and it would be a pain in the butt to assign all the elements again.

 

This is sort of a general issue for me. When a project grows, at some point I want to reorganize my footage in folders.

Lets say I used mixed spritesheet atlases and animated sprites of that. Later I want to move that spritesheet in a subfolder (/assets/ani/my-spritesheet.png). If doing so, I'll have to manually assign all used and animated elements again. Which is always super annoying. It would be great if I could just assign the new path / spritesheet to one lement and the rest detects it automatically. 

 

Or I accidently delete one. Couldn't I just copy the old mt.data in the source editor and reimport the spritesheet and everything would be good again?

Or just be able to import a project. That way I could just import my backed up project.

 

Also, it seems I will have to assign the relevant sprite again manually for each keyframe in the animation.

 

Another thing I found a bit strange. Say, I have my spritesheet and the belonging atlas.xml in a subfolder. I upload this in ME and assign the spritesheet. ME will always put the atlas.xml in the main asset folder and not in the subfolder...

 

 

Share this post


Link to post
Share on other sites

Hi,

 

about atlas

you should be able to move atlas freely into subfolder or different folder - as long as item remains same,

however - if you have deleted asset - it will be more problematic to restore it, but it's not impossible.

 

After deleting an asset and browser reload - you should see this icon - post-7939-0-87345100-1427229380.png

 

You can upload new asset ( attach atlas if needed )

 

Select an object with the missing icon and after that right click on the uploaded asset - and click on the "Make Active" menu - it will assign new asset to the old object

atm. it only works for a single object (all selected objects will get same frame) - but I'll add bulk action - so you can double-click any object with missing icon - ME will select all objects with the same atlas and then Make active texture for all objects. It will require approx 10 minutes.

 

 

about backups

only way at the moment is to copy project - so old project ( or copy ) remains same at the all time

 

there is also undo - but it won't work if you delete asset - as it saves only object states - and also undo is limited to local storage size - and shares that size between all project - so it's usable only for small object related mistakes

 

as the next feature batch we will implement:

 

revision history - so you can update revision - and move back to that revision ( something like jsfiddle does now )

git console - so user can gain even more control about project revisions - and even send project to the another server (e.g. github) with git push command

 

 

about restore from exported files

it's not possible to restore project from mt.data.js - as it contains only part of the project. Also you should know - that ME localy assets holds in the root folder named: {uniquie-id-identificator}.ext and sources are stored under src directory - so it's not quite a usable by default - and needs to be exported (compiled) into normal project 

 

 

 

I upload this in ME and assign the spritesheet. ME will always put the atlas.xml in the main asset folder and not in the subfolder...

 

This is bug - I'll fix it now

 

 

 

I'm not sure - what you mean by assign frames to keyframe animations - keyframes are stored with the rest of the object data - if you haven't deleted any object - keyframes should be safe.

But if you are creating new objects - then yes - new object won't contain any info about another objects keyframes.

 

if things are really bad - you can send me your last good mt.data.js  and rest of the project details to my email: my_nick_name@gmail.com (replace my_nick_name with my real nickame :)

I'll try to recreate db file, but might take few hours - and I can check it only tomorrow.

Share this post


Link to post
Share on other sites

Hello Stausz,

 

thanks again for the fast reply and detailed information.

 

I will just redo the animation. Lots of times I end up wasting more time trying to fix things then do recreate from scratch.

 

The 'make active' via right mouse button I will try next time. Sounds useful.

 

About the keyframes:

Yes, the keyframe data is not lost. However for every keyframe I only get shown the 'missing element' icon you mentioned in your post before. I then will have to select each individual keyframe and reassign the sprite.

I would have thought I select the item in the object panel reassign the relevant image and it will update in the timeline accordingly.

 

 

Alright gotta go on. You guys are always very helpful and supportive. Keep it up!

Share this post


Link to post
Share on other sites

 

I upload this in ME and assign the spritesheet. ME will always put the atlas.xml in the main asset folder and not in the subfolder...

 

This is bug - I'll fix it now

 

Did it get fixed?

Because I see this happening again. And also the atlas.xml file always gets renamed atlas.png.xml. As I usually just update the data.js, I always have to rename them and put in the main asset folder...

Share this post


Link to post
Share on other sites

After export Atlases are placed in the same folder as image file.

You are right - atlas name is still generated - {image.filename_with_extension} + "." + {atlas.extension}

I'll check out what can I do and report back

Share this post


Link to post
Share on other sites

It would be a nice feature to be able to edit mt.data by hand in some situations. For example now I am making a dynamic character with few different base forms for heads and so on, but each group then contains the same set of eyes, mouths, noses and hair and they are just in different places, scaled a bit or something similar. Making the group and sprite structure once and then duplicating it in the text editor would help a lot as creating, dragging and naming tens of folders gets a bit tedious.

 

Other idea would be to be able to import a zipped folder structure with sprites and stuff and the group structure would automatically be generated.

Share this post


Link to post
Share on other sites

Have you tried to copy and shift paste the whole group within the objects panel?

 

copy:

 

- Background

- Character ( contains: head, body...)  -> copied

- Foreground

 

then shift paste:

 

- Character1 ( contains: head, body...)  -> shift pasted in

- Background
- Character ( conains: head, body...)

- Foreground

 

It pastes the group in the same position and keeps all the names of the subgroups. So you just have to rename the group. "Character1" to "Character_Angry" or whatsoever.

Then drag it in the order you need and scale, rotate or whatever you like to do with the subgroups/ parts of your character.

 

then order:

 

- Background
- Character ( contains: head, body...)
- Character_Angry ( contains: head, body...)  -> reordered and renamed but still the same

- Foreground

 

I have to admit it would be handy to have a duplicate function and icon in the object panel.

 

Also depending how big the group it it lags a bit and from time to time it doesn't work imediately and I have to try it again. Don't know why.

 

 

Update:

I made this an official issue on github:

https://github.com/TheMightyFingers/mightyeditor/issues/41

Share this post


Link to post
Share on other sites

Hi, this works nicely, thanks! Didn't remember the existence of those shortcuts.

 

Another relevant question: is there a way to duplicate an animation? I would like to do a set of base poses, then duplicate them to use as a basis for idle and walk cycles and so on.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.