Skip to content
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

Keep resources relative not working #20

Closed
Betalord opened this issue Apr 1, 2017 · 3 comments
Closed

Keep resources relative not working #20

Betalord opened this issue Apr 1, 2017 · 3 comments

Comments

@Betalord
Copy link

Betalord commented Apr 1, 2017

The "Keep resources relative?" option in the settings window does not seem to have an effect. When this option is ticked and project is saved, resource paths are saved as absolute paths, for example:

{
atlasData: {
	atlasCurrent: true
	drawables: [
		{
			file: E:/Eclipse/workspace/Supergalactix/Supergalactix-core/razno/SGX UI Skin - MOJI POPRAVKI/sgxui_data/button.9.png
[...]

When changing the above path manually inside the .scmp file like this:
file: sgxui_data/button.9.png
the program will load the skin just fine, however upon saving it, it will overwrite it with the absolute path again, as shown before.

@raeleus
Copy link
Owner

raeleus commented Apr 1, 2017

This feature works by telling Skin Composer to just ignore the source path and find the named file in the relative assets path. This presents a problem when the source file still exists as it prioritizes the source path first. I'll have this fixed by the next version. Thanks.

@raeleus raeleus closed this as completed in 64c5b16 Apr 3, 2017
@Betalord
Copy link
Author

In the latest version 11, this problem is still present (it behaves exactly like in version 10A). That is, when "Keep relative paths" is ticked, it always saves them as absolute paths (even if paths are modified manually, they get rewritten with absolute ones).

@raeleus
Copy link
Owner

raeleus commented Apr 13, 2017

Sorry, I should have addressed that directly. The file objects are serialized directly to the scmp file. That means full path and everything. With the keep resources relative option selected, it chops off the path and looks in the data folder for the file in the code, not the scmp file.

I mean, I could have rewritten it so that the save files looks cleaner, but the behavior would be the same. You can test by making a project file and link a resource to it. Make it keep resources relative, then click save. Make a change to the original and it should not be reflected in your project.

Another thing, this is not an option to keep relative paths. By ticking the option, it makes duplicates of the source files in a data folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants