diff options
author | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2021-08-12 11:26:47 -0700 |
---|---|---|
committer | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2021-08-19 10:31:19 -0700 |
commit | 645bc94bfcb0d494e9d53e29aee1419800adcd4e (patch) | |
tree | 1ff9fd17f54d9490effc9bb09f0610bad3577b3c /core/object/class_db.h | |
parent | 93dac1c7db0837eba82831e6391a022d454b67f9 (diff) |
Fix capsule height/radius setters with linked properties
Capsule height and radius setters can modify each other, rather than
using clamping, to avoid cases where values are not set correctly when
loading a scene (depending on the order of properties).
Inspector undo/redo:
Added the possibility to link properties together in the editor, so
they can be undone together, for cases where a property can modify
another one.
Gizmo undo/redo:
Capsule handles pass both radius and height values so they can be undone
together.
Diffstat (limited to 'core/object/class_db.h')
-rw-r--r-- | core/object/class_db.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/object/class_db.h b/core/object/class_db.h index 6a7b39c230..8add0285f7 100644 --- a/core/object/class_db.h +++ b/core/object/class_db.h @@ -354,6 +354,7 @@ public: static void add_property_subgroup(const StringName &p_class, const String &p_name, const String &p_prefix = ""); static void add_property(const StringName &p_class, const PropertyInfo &p_pinfo, const StringName &p_setter, const StringName &p_getter, int p_index = -1); static void set_property_default_value(const StringName &p_class, const StringName &p_name, const Variant &p_default); + static void add_linked_property(const StringName &p_class, const String &p_property, const String &p_linked_property); static void get_property_list(const StringName &p_class, List<PropertyInfo> *p_list, bool p_no_inheritance = false, const Object *p_validator = nullptr); static bool get_property_info(const StringName &p_class, const StringName &p_property, PropertyInfo *r_info, bool p_no_inheritance = false, const Object *p_validator = nullptr); static bool set_property(Object *p_object, const StringName &p_property, const Variant &p_value, bool *r_valid = nullptr); |