Defer group calls in Node3D
This commit is contained in:
parent
e22255edaf
commit
6b981bf12b
1 changed files with 4 additions and 4 deletions
|
@ -180,7 +180,7 @@ void Node3D::_notification(int p_what) {
|
|||
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (Engine::get_singleton()->is_editor_hint() && get_tree()->is_node_being_edited(this)) {
|
||||
get_tree()->call_group_flags(0, SceneStringNames::get_singleton()->_spatial_editor_group, SceneStringNames::get_singleton()->_request_gizmo, this);
|
||||
get_tree()->call_group_flags(SceneTree::GROUP_CALL_DEFERRED, SceneStringNames::get_singleton()->_spatial_editor_group, SceneStringNames::get_singleton()->_request_gizmo, this);
|
||||
}
|
||||
#endif
|
||||
} break;
|
||||
|
@ -418,7 +418,7 @@ void Node3D::update_gizmos() {
|
|||
}
|
||||
|
||||
if (data.gizmos.is_empty()) {
|
||||
get_tree()->call_group_flags(0, SceneStringNames::get_singleton()->_spatial_editor_group, SceneStringNames::get_singleton()->_request_gizmo, this);
|
||||
get_tree()->call_group_flags(SceneTree::GROUP_CALL_DEFERRED, SceneStringNames::get_singleton()->_spatial_editor_group, SceneStringNames::get_singleton()->_request_gizmo, this);
|
||||
return;
|
||||
}
|
||||
if (data.gizmos_dirty) {
|
||||
|
@ -436,7 +436,7 @@ void Node3D::set_subgizmo_selection(Ref<Node3DGizmo> p_gizmo, int p_id, Transfor
|
|||
}
|
||||
|
||||
if (Engine::get_singleton()->is_editor_hint() && get_tree()->is_node_being_edited(this)) {
|
||||
get_tree()->call_group_flags(0, SceneStringNames::get_singleton()->_spatial_editor_group, SceneStringNames::get_singleton()->_set_subgizmo_selection, this, p_gizmo, p_id, p_transform);
|
||||
get_tree()->call_group_flags(SceneTree::GROUP_CALL_DEFERRED, SceneStringNames::get_singleton()->_spatial_editor_group, SceneStringNames::get_singleton()->_set_subgizmo_selection, this, p_gizmo, p_id, p_transform);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -452,7 +452,7 @@ void Node3D::clear_subgizmo_selection() {
|
|||
}
|
||||
|
||||
if (Engine::get_singleton()->is_editor_hint() && get_tree()->is_node_being_edited(this)) {
|
||||
get_tree()->call_group_flags(0, SceneStringNames::get_singleton()->_spatial_editor_group, SceneStringNames::get_singleton()->_clear_subgizmo_selection, this);
|
||||
get_tree()->call_group_flags(SceneTree::GROUP_CALL_DEFERRED, SceneStringNames::get_singleton()->_spatial_editor_group, SceneStringNames::get_singleton()->_clear_subgizmo_selection, this);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue