[BUG] Brushes changed to Paint, Paint2, Paint3, Paint4, instead of including Erase, Single, and Reapply
Delpire opened this issue · 7 comments
Godot version
Godot v3.5.rc4.mono.official
Plugin version
v1.0.0-stable (although I made a minor tweak to get it to work with Godot 3.5)
Platform
Windows 10
Issue description
After closing and reopening Godot, I can no longer erase and all the brush tabs are just Paint with a number.
Steps to Reproduce
Not entirely sure how this occurred. I was in a separate branch, created a commit, merged to main, and pulled main. Perhaps something was lost a long the way, but it looks like everything in the addons folder is still there.
Minimal reproduction project
Hmm, that's peculiar.
I think what happened is the brush objects got reset to null and automatically generated a default brush (which is Paint).
Most likely a change was made to toolshed_brush.gd, toolshed.gd or input_field_resource.gd which triggered an error in the toolshed resource.
A workaround for now would be to delete the toolshed.tres in the work directory of your gardener.
I'm not sure yet if that's something I can fix or if that's a quirk on Godot's side.
@dreadpon That did help. I now have Erase first, and then Paint, Paint2, and Paint3. :)
@Delpire You mentioned you made a 3.5 compatability change. What exactly was it?
Next, when you first encountered this problem, what actions preceded that? What happened between "it works as intended" and "it's borked now"?
If you make a fresh gardener and assign it an empty folder, can you reproduce this bug? Maybe try the full use-cycle: paint some foliage, then save/reload the scene, maybe relaunch the editor for good measure.
I think the only change I made was related to the duplicate signal since 3.5 now contains a signal you had to create manually before.
Between working and not working, all I did was make a commit, push a branch, merge it with main in GitHub, switched branches to main locally and pull the changes.
Creating a new Gardener shows the correct brushes and I am able to paint and erase as expected. Closing and opening Godot, the brushes continue to work correctly. I'll try going through my git workflow again later and report back to see if that was really the cause.
Okay I just went through my git workflow, and the brushes continue to work correctly. This time though I made sure to close Godot before all the git stuff. Perhaps having Godot open before messed with things, or maybe it was just a fluke.
Either way, it may not be worth looking into and perhaps this issue can be closed.
@Delpire Maybe.
It's kind of part of a bigger issue (two issues actually, that I'd like to solve in the future).
First is to streamline saving of resources to files. It's full of workarounds right now and I might rethink it with a clearer head.
Second is the whole input_field_resource.gd thing.
I couldn't find a way to make a second inspector window or to reuse it's native structure for my own side panel. Maybe I overlooked something? If yes, I would very much like to use the native solution which is obviously less error prone.
Okay. The problem with saving resources seems to have solved itself (perhaps due to 3.4.4-3.5 updates).
And I was unable to reproduce the bug with brushes.
I will assume it was due to changing the script and Godot recreating brushes with default values in attempt to restore a corrupted resource.
Unless this issue reappears when using the plugin in a regular way, I will count it as solved.