New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default animation duration #1631

Open
greeny opened this Issue Jun 28, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@greeny

greeny commented Jun 28, 2017

Hi, is there any way to set default animation frame duration in tile animations editor? The default 100 does not fit me and I have to do around 500 animated tiles, so I would love to have a way to set it by default to something else. I don't mind compiling my own version of tiled with different value, but I was not able to find, where it is set in code.

@bjorn bjorn added the feature label Jun 28, 2017

@bjorn

This comment has been minimized.

Owner

bjorn commented Jun 28, 2017

Yes, there should definitely be a way to change the default duration.

If compiling your own Tiled isn't a problem, you can change this line in tileanimationeditor.cpp:

static const int DEFAULT_DURATION = 100;

I have to do around 500 animated tiles

I kind of pity you even with a good default duration... the current animation editor is really not suitable for setting up a huge amount of animations, and you may be better off using a text editor. Suggestions for how to improve the UI are welcome.

@greeny

This comment has been minimized.

greeny commented Jun 28, 2017

Hi, thanks for response :) I will try to compile it with different duration as you suggested.
Many of my files have same layout of animated tiles (e.g. coords 0|0, 1|0 and 2|0 is first tile, 1|1, 2|1, 3|1 is second tile, etc.), so in theory this can help, as I will only do the first file and then export to JSON and change that JSON to match other files (which should basically be only terrain name and image file). But I am also playing with idea of generating whole JSON by custom-written tool. I will see.

So for your question about UI, not sure how this will fit in and be actually implementable, but you can do some multiselect for tiles, so you select a pattern, say first 10 rows, first column and mark them as first frame, then using the same pattern you can select another frames. This will work only in case that image files are well-structured, but that should be the case anyway.

Attaching example file i found somewhere using google search (not mine, just example), but I have similary structured file:
image

So in this case you could select first four rows and mark them as first frame, then 5-8 rows and mark as second frame, and 9-12 rows as third frame.

That could improve it a bit and also fasten the process of animating tiles. But this may be only my usage case and others might have other ideas for UI improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment