-
Notifications
You must be signed in to change notification settings - Fork 717
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
Piskel layers #696
Comments
This is the next thing I will work on, after jsfx is completed |
sorry, this will wait a bit. I am working on replacing jsfx by jfxr |
No worries, jfxr will be great addition :) |
On the subject of layers - I wonder if the layer metadata should be stored on the first frame image resource or all of them? If it's on the first - it is possible that the user moves its index or removes it in GD and that deletes the data. If it's on all of them then we have a json project file full of repetition of a very long string. One alternative is to save the piskel file in the project's folder and store the relative path to it as metadata - then having the path in each frame image resource won't be as bad. |
How long it is? What is the kind of information stored? I wonder if in this case it's metadata that should be stored on the animation (well, the |
To be a bit more precise, I think it can be a new, optional parameter, passed to onChangesSaved that would contain information about all the resources (as opposed as the first parameter, which are information per resource). This could then be stored in the direction. If you think that can work, I can add a getter/setter for metadata for |
@4ian that is a great idea! In this case it makes a lot of sense to store it in the direction! |
@4ian Just for reference, this is the example megaman sprite that has three frames. I added another layer to it, called 'Hat'
If is what you will see if you open a *.piskel file with a text editor |
Ok so the images are stored in metadata, so clearly we cannot duplicate this. Will try to add metadata to direction in the next days. We would need these metadata passed back during |
I can get the pull started, but without being able to set/get the metadata, I wont be able to test properly. A simple way to address those corner cases is to disable adding resources with gdevelop to resources with piskel metadata and instead open piskel when that happens- so the user adds them in piskel The way it works is that piskel stores the frames as a horizontal tileset strip of images, which gets converted to a string. So splicing new ones/changing order in the metadata with gdevelop is probably not very trivial |
I will add the get/set metadata to Direction this afternoon |
@blurymind Delete public/libGD.js, relaunch yarn start/npm start and you should get the version of libGD.js with set/getMetadata on Direction :) |
I started refactoring the code :) Thank you @4ian |
@4ian we might need to also set metadata on tiledSprite object :) |
If there is only a single image, it's better to store it directly on the ImageResource (so that layers and any saved data can be retrieved from another object using it too) |
I'll close the issue as it's tracked in a card on the roadmap made by @blurymind and in the Pull Request opened :) |
I found out that when you use a layers in piskel in GDevelop when i save the image it merges the layers and i cant edit the image using them again, i have to make new layers and split the image on them. I cant say this is a bug but it would be better without it.
Also the layers cant be renamed...i checked the browser version and it uses dialog box to ask for the new name of the layer you want to set, but this doesnt happen in GDevelop. Probably cause GDevelop isnt a browser, anyways you might want to find other way of asking about the name.
The text was updated successfully, but these errors were encountered: