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

Issue with offset and padding #5

Open
BrahRah opened this issue Oct 7, 2023 · 6 comments
Open

Issue with offset and padding #5

BrahRah opened this issue Oct 7, 2023 · 6 comments

Comments

@BrahRah
Copy link

BrahRah commented Oct 7, 2023

offset padding problem
As the picture shows the space between the tiles is at the size of 2 pixels instead of 1.

This might be fixable if margin values were allowed to have negative values.

I've also noticed that messing with (line 739):

                grid_size[0] + (padding[0]+2) + margin[1] + margin[3],
                grid_size[1] + (padding[1]+2) + margin[0] + margin[2]

like removing the *2 changes the selection to two pixels to the left.

@BrahRah
Copy link
Author

BrahRah commented Oct 7, 2023

I've tried to trace the issue but I have no clue. It'd be nice to know what the padding[0]*2 is for. There are def. not enough comments in this project.

@BrahRah
Copy link
Author

BrahRah commented Oct 9, 2023

padding not working
I've tested it again with this version not the other ReSprytile and this version def. has the same issue.

@ionthedev
Copy link
Owner

Hey there, Thank you submitting these issues, it helps me greatly.

I agree the project has a severe lack of comments as only 1% of resprytile are my changes to enable the port to work for newer blender versions.

As for your issue, I am unable to exactly replicate this. Are your tiles a rounded size (i.e: 32x32, 128x128)?

@BrahRah
Copy link
Author

BrahRah commented Oct 12, 2023

yes they are 16x16

Resprytile is an absolute timesaver for me so I'm willing to learn and contribute but I'm not a full programmer so it's prob. gonna take me a couple of years to understand what is going on in the code.

I think it could have to do with the image size. I'll do some experiments.

@BrahRah
Copy link
Author

BrahRah commented Oct 12, 2023

no padding 512x512
with padding top bot 513x513

I've tried both of these and both don't work. One is 512x512px and the other 513x513px. One has padding at top and bot the other doesn't. But in both files the setting don't work. So it doesn't look like it has to do with the image size.

@ionthedev
Copy link
Owner

If your textures are tiles needed are squared, Id recommend just keeping them together. It seems like the padding and margin offsets are for the selector only and can be a little hard to work with when using large tilesets.

I will have an attempt at a rewrite of this feature, but as for now, just keep your tiles together on the palette image like this example wierdpalette2

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