godot-texture-painter icon indicating copy to clipboard operation
godot-texture-painter copied to clipboard

undo/redo is missing

Open karroffel opened this issue 6 years ago • 3 comments

It would be cool if there was a way to go back to the last state before the brush was "set on the mesh" the last time.

Not sure how that can be done efficiently, I guess storing images to which the program can revert to would work just fine, it would just take quite some memory, but maybe there's another way.

karroffel avatar May 13 '18 23:05 karroffel

Would this require another uniform in the paint_shader.shader script or is it possible to assign the material textures in gdscript? Loading the textures and assigning them to the material of the mesh isn't difficult but it doesn't allow to edit / paint on them. I tried this: https://github.com/LinuxUserGD/godot-texture-painter/commit/6c2ce6bcf2f4b382b26ba974ff732215f29d8dbf

LinuxUserGD avatar May 22 '18 15:05 LinuxUserGD

@LinuxUserGD the problem is that storing whole images on disk takes a while and takes a lot of disk space very fast.

Probably I'll implement an image-delta algorithm in GDNative that can be used to find rects that store only the changes from the last image, that way you can play stuff back

karroffel avatar May 22 '18 15:05 karroffel

This is gonna be difficult because the program is already gobbling up a large amount of VRAM (1.1GB when I start it up without painting anything). I'll first have to focus on bringing VRAM usage down.

Bauxitedev avatar May 24 '18 13:05 Bauxitedev