diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-07-09 22:08:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-09 22:08:59 +0200 |
commit | b489e757166664405ecf1174d8b929acb33bb4ae (patch) | |
tree | 209cbfa721d446a4d279b1f7707e44e085633a92 /scene/3d | |
parent | 9d47e3b975eb5013e125be0b3c169e1173d90d3b (diff) | |
parent | 5a631bf4f438a779e9e4ab1837844129c4d587a1 (diff) |
Merge pull request #30304 from DavidSichma/remote_cache
Exposed update_cache() of RemoteTransform and RemoteTransform2D
Diffstat (limited to 'scene/3d')
-rw-r--r-- | scene/3d/remote_transform.cpp | 7 | ||||
-rw-r--r-- | scene/3d/remote_transform.h | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/scene/3d/remote_transform.cpp b/scene/3d/remote_transform.cpp index 28c6fbf5f7..76b0b0c92f 100644 --- a/scene/3d/remote_transform.cpp +++ b/scene/3d/remote_transform.cpp @@ -105,7 +105,7 @@ void RemoteTransform::_notification(int p_what) { switch (p_what) { - case NOTIFICATION_READY: { + case NOTIFICATION_ENTER_TREE: { _update_cache(); @@ -174,6 +174,10 @@ bool RemoteTransform::get_update_scale() const { return update_remote_scale; } +void RemoteTransform::force_update_cache() { + _update_cache(); +} + String RemoteTransform::get_configuration_warning() const { if (!has_node(remote_node) || !Object::cast_to<Spatial>(get_node(remote_node))) { @@ -187,6 +191,7 @@ void RemoteTransform::_bind_methods() { ClassDB::bind_method(D_METHOD("set_remote_node", "path"), &RemoteTransform::set_remote_node); ClassDB::bind_method(D_METHOD("get_remote_node"), &RemoteTransform::get_remote_node); + ClassDB::bind_method(D_METHOD("force_update_cache"), &RemoteTransform::force_update_cache); ClassDB::bind_method(D_METHOD("set_use_global_coordinates", "use_global_coordinates"), &RemoteTransform::set_use_global_coordinates); ClassDB::bind_method(D_METHOD("get_use_global_coordinates"), &RemoteTransform::get_use_global_coordinates); diff --git a/scene/3d/remote_transform.h b/scene/3d/remote_transform.h index b737a4f858..07e01284e5 100644 --- a/scene/3d/remote_transform.h +++ b/scene/3d/remote_transform.h @@ -68,6 +68,8 @@ public: void set_update_scale(const bool p_update); bool get_update_scale() const; + void force_update_cache(); + virtual String get_configuration_warning() const; RemoteTransform(); |