Open Ark2000 opened 1 year ago
neither the eraser tool.
Bug; editing of textures from the File System (rather than in an object on the scene) currently doesn't work. As a workaround, try placing your image into a Sprite and selecting the new sprite.
It looks like different behavior from when I worked with it. Or not, but I'll take note of this. Thanks!
Looked more into this. Images can't be edited properly if they don't have alpha. If you undo after it goes black, the area you painted in comes back
There needs to be a way to change an image's format into one with alpha support, but I couldn't find it in my short search. Need to seek solutions later
Throwing in my two cents. I was looking into older Godot sprite editor plugins (Godoxel, Sprite Editor), and it seems like Godoxel uses RGBA8 format. Sprite Editor has no mention of format somehow.
I rooted around some more and other examples of image creation in Godoxel set the format to RGBA8 as well. I think Godoxel does have alpha support. I have no idea if Godot 4 changed formatting API.
I still have a lot to learn and I'm not 100% sure what the problem is so I realize this may not be helpful at all, but I hope it helps in some way! I love the plugin btw :D
Yep, RGBA8 supports alpha, but RGB8 does not. However, images saved from other software will use the no-alpha format if there is, well, no alpha. image.create()
lets you choose format, but I'm loading not creating, and load_png
does not.
I'd convert, but there seems to be no easy way in Godot. Methods creating images from other images take an array of bytes, and the same image in different formats has different raw data. blit_rect
copy-pastes a rectange or the whole image, but requires same format, too.
When I can, I'll try manually editing the byte array. RGBA8 and RGB is just 4 bytes vs. 3 bytes per pixel... right?...
Some strange behavior to report. I was tinkering around and suddenly the Godot icon.svg broke. It wouldn't let me draw like Ark observed. I also noticed it wouldn't let me pan around, and when I tried to increase the border size by 1 the entire canvas disappeared.
When I tried messing around more, it crashed. I can't open the project again. Okay, fresh project, new install. Try to enable plugin, it crashes. I delete both projects and make another one with another install. Same thing. It appears to be unusable for me now for some reason
Back with more to report. Updated to Godot 4.0.2 (from 4.0.1). I can use it now. I assume this is just because it's a fresh Godot install
Here's my findings: (All my settings are the default out-of-the-box, except I have my Blender path defined)
When I updated to .2, svgs wouldn't update in the scene even though changes would be saved in the editor. I'm 90% sure they updated in .1, but I can't verify. Here you can see the sprite not representing what's in the editor (this is after reimporting):
For an unknown reason, at some point all svgs become a blank canvas in the editor. I believe this is the danger zone as far as it crashing. I always close without saving when it reaches this point, just to be safe.
You can't pan around when it's blank, but you can also do weird things like scroll in ways you shouldn't. Here's an outline that went out of bounds from scrolling on the mouse wheel:
The Godot icon.svg should have alpha, (it has the rounded corners so there's some transparency), but I'm having the same issue Ark described.
I had another minor crash issue while messing with the full-white image, but I didn't need to do another Godot install.
I'm new to bug reporting so apologies if I could have done something better, but I hope this is helpful! ^^
🤨 you can't edit SVG files. This is a raster editor! They can be loaded because they're converted to raster by Godot - they can theoretically be converted (plugin saves in .png) but that results in data loss, I might later add a prompt to convert to PNG.
The no-panning/no-editing issue is possible for PNG, I don't know why it happens because I just checked and it doesn't break if you open from FileSystem. That's in the example project - on new projects it broke for me
Aha! I wondered if that was what was going on. I know Godot rasterizes them though so I figured I would still document my findings.
Hmm. If that's the case you should probably remove svg loading support entirely or put up a warning if someone does. Just my two cents though
Alpha issue fixed by 216c6c1b0f07f47e6612524c164137e1e59f5283 . Need reliable reproduction of the no-edit-from-filesystem issue.
sprite_painter_bug.webm