diff options
author | David Sichma <sichmada@gmail.com> | 2019-07-04 00:17:05 +0200 |
---|---|---|
committer | David Sichma <sichmada@gmail.com> | 2019-07-09 14:50:03 +0200 |
commit | 5a631bf4f438a779e9e4ab1837844129c4d587a1 (patch) | |
tree | 9492a0002233bc48111cc8e094d5a86eb00fbf1b /scene/3d/remote_transform.cpp | |
parent | 2293c612e6c0913b6999080c9f2fa77227348818 (diff) | |
download | redot-engine-5a631bf4f438a779e9e4ab1837844129c4d587a1.tar.gz |
Added force_update_cache() to RemoteTransform and RemoteTransform2D
Diffstat (limited to 'scene/3d/remote_transform.cpp')
-rw-r--r-- | scene/3d/remote_transform.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scene/3d/remote_transform.cpp b/scene/3d/remote_transform.cpp index add77e0272..9137075bc4 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); |