chore: modifiers are aware of parent terrain

This commit is contained in:
Sara Gerretsen 2026-02-25 20:21:13 +01:00
parent 80eb6ef4c0
commit 953e4abe5b
3 changed files with 18 additions and 6 deletions

View file

@ -5,6 +5,7 @@
#include "macros.h"
#include "scene/3d/marker_3d.h"
#include "scene/resources/curve.h"
class Terrain;
class TerrainModifier : public Marker3D {
GDCLASS(TerrainModifier, Marker3D);
@ -27,6 +28,7 @@ private:
BlendMode blend_mode{ Add };
Vector3 thread_safe_global_position{};
bool dirty{ false };
Terrain *terrain{ nullptr };
public:
Vector3 get_thread_safe_global_position() const;
@ -35,6 +37,7 @@ public:
void set_blend_mode(BlendMode mode);
BlendMode get_blend_mode() const;
GET_SET_FNS(bool, dirty);
GET_SET_FNS(Terrain *, terrain);
static String const sig_changed;
};