Add 2d snap transforms option

This is a cut back backport of reduz snapping PR #43194.

It just offers a global project setting for transform snapping.
This commit is contained in:
lawnjelly
2020-11-15 09:40:07 +00:00
parent c9bce23014
commit a79293e0fc
7 changed files with 15 additions and 4 deletions

View File

@ -62,6 +62,7 @@ private:
int _target_fps;
float _time_scale;
bool _pixel_snap;
bool _snap_2d_transforms;
uint64_t _physics_frames;
float _physics_interpolation_fraction;
@ -110,6 +111,7 @@ public:
Object *get_singleton_object(const String &p_name) const;
_FORCE_INLINE_ bool get_use_pixel_snap() const { return _pixel_snap; }
bool get_snap_2d_transforms() const { return _snap_2d_transforms; }
#ifdef TOOLS_ENABLED
_FORCE_INLINE_ void set_editor_hint(bool p_enabled) { editor_hint = p_enabled; }