The current approach to flatten seems to be envisioned for creating flat surfaces that also have a degree of elevation rather than creating surfaces which are strictly perpendicular to the Z axis. It is attempting to flatten the triangles relative to each other, not to set all points at a uniform height. There is value in the tool as it works currently, and I don't think a new mode is the best way to go here at all.@MiToVo
Yeah, I really dislike the current terrain materials deal. Making terrains use the regular materials is on the block for 4.0, because the odd half-n-half materials it has now is definitely less than ideal.
As for the flatten terrain, I think it's intended to flatten at the average point, compared to the set height function, which sets it to an explicit height. But yeah, I can see what you mean about flatten sampling the height when flirst clicked, and then acting as setHeight as long as the mouse is held down. Maybe as an alternate mode for flatten to dictate weither it re-evaluates the height, or just paints-to-height of the initial click.
The "flatten" functionality envisioned in this thread describes the "set height" tool. IMO, the problem is a lack of easy way to determine what height should be entered in to the text box for any given terrain situation. Using the tool requires that whole "fiddling with numbers" process to find the desired height in almost any practical application. Adding a "click to pick height" functionality of some sort to "set height" (maybe like the Photoshop eyedropper or something) would accomplish exactly what the user wants while keeping the functionality paired with the proper tool for the desired job.
[Edit: seem to have poor reading comprehension today ... guess I'm sort of restating things a bit. But it seems least complicated to implement as part of the setheight tool's basic functionality rather than trying to add modes to flatten.].