Arnklit / Waterways

A tool to generate river meshes with flow and foam maps based on bezier curves.
https://github.com/Arnklit/WaterGenGodotDemo
MIT License
1.03k stars 68 forks source link

Modifications to be used with Custom Terrain Modules #21

Open ozzr opened 1 year ago

ozzr commented 1 year ago

When using the addon with my custom terrain module the editor crashes when refocusing any of WaterSystem or River nodes.

Most of the issues came from plugin.gd and the function called on selection changed.

Fixes are implemented here

Issues and Fixes

  1. Editor crash after selecting River Node - Fixed by moving display logic in plugin.gd to the make_visible method of the EditorPlugin class
  2. Constraints switched between: Unconstrained and Snap to Colliders when flying around the scene with right mouse button and S key pressed at the same time - Fixed by handling the case directly in the input method

Enhancements

  1. Added a "Save Path" option to the River Menu. This creates a Path Node from the internal curve so it can be used and modified externally without affecting the River path
  2. Switched order of Constraints menu and Local Mode check box because the first one could have different widths depending on the selected constraint and it didn't look good to have a width changed menu bar

Changes where tested using the demo repository and worked without any issue.