diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp index 43c6285d282..2c8fa257869 100644 --- a/editor/animation_bezier_editor.cpp +++ b/editor/animation_bezier_editor.cpp @@ -689,7 +689,7 @@ void AnimationBezierTrackEdit::set_editor(AnimationTrackEditor *p_editor) { } void AnimationBezierTrackEdit::_play_position_draw() { - if (!animation.is_valid() || play_position_pos < 0) { + if (animation.is_null() || play_position_pos < 0) { return; } diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index 6ae74aef428..f93029a3c5c 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -8066,7 +8066,7 @@ void AnimationTrackKeyEditEditor::_time_edit_exited() { } AnimationTrackKeyEditEditor::AnimationTrackKeyEditEditor(Ref p_animation, int p_track, real_t p_key_ofs, bool p_use_fps) { - if (!p_animation.is_valid()) { + if (p_animation.is_null()) { return; } diff --git a/editor/animation_track_editor_plugins.cpp b/editor/animation_track_editor_plugins.cpp index da3112fc79c..9c30f156267 100644 --- a/editor/animation_track_editor_plugins.cpp +++ b/editor/animation_track_editor_plugins.cpp @@ -220,7 +220,7 @@ Rect2 AnimationTrackEditAudio::get_key_rect(int p_index, float p_pixels_sec) { Ref stream = object->call("get_stream"); - if (!stream.is_valid()) { + if (stream.is_null()) { return AnimationTrackEdit::get_key_rect(p_index, p_pixels_sec); } @@ -260,7 +260,7 @@ void AnimationTrackEditAudio::draw_key(int p_index, float p_pixels_sec, int p_x, Ref stream = object->call("get_stream"); - if (!stream.is_valid()) { + if (stream.is_null()) { AnimationTrackEdit::draw_key(p_index, p_pixels_sec, p_x, p_selected, p_clip_left, p_clip_right); return; } @@ -379,7 +379,7 @@ Rect2 AnimationTrackEditSpriteFrame::get_key_rect(int p_index, float p_pixels_se if (Object::cast_to(object) || Object::cast_to(object)) { Ref texture = object->call("get_texture"); - if (!texture.is_valid()) { + if (texture.is_null()) { return AnimationTrackEdit::get_key_rect(p_index, p_pixels_sec); } @@ -422,7 +422,7 @@ Rect2 AnimationTrackEditSpriteFrame::get_key_rect(int p_index, float p_pixels_se } Ref texture = sf->get_frame_texture(animation_name, frame); - if (!texture.is_valid()) { + if (texture.is_null()) { return AnimationTrackEdit::get_key_rect(p_index, p_pixels_sec); } @@ -456,7 +456,7 @@ void AnimationTrackEditSpriteFrame::draw_key(int p_index, float p_pixels_sec, in if (Object::cast_to(object) || Object::cast_to(object)) { texture = object->call("get_texture"); - if (!texture.is_valid()) { + if (texture.is_null()) { AnimationTrackEdit::draw_key(p_index, p_pixels_sec, p_x, p_selected, p_clip_left, p_clip_right); return; } @@ -514,7 +514,7 @@ void AnimationTrackEditSpriteFrame::draw_key(int p_index, float p_pixels_sec, in } texture = sf->get_frame_texture(animation_name, frame); - if (!texture.is_valid()) { + if (texture.is_null()) { AnimationTrackEdit::draw_key(p_index, p_pixels_sec, p_x, p_selected, p_clip_left, p_clip_right); return; } @@ -808,7 +808,7 @@ int AnimationTrackEditTypeAudio::get_key_height() const { Rect2 AnimationTrackEditTypeAudio::get_key_rect(int p_index, float p_pixels_sec) { Ref stream = get_animation()->audio_track_get_key_stream(get_track(), p_index); - if (!stream.is_valid()) { + if (stream.is_null()) { return AnimationTrackEdit::get_key_rect(p_index, p_pixels_sec); } @@ -841,7 +841,7 @@ bool AnimationTrackEditTypeAudio::is_key_selectable_by_distance() const { void AnimationTrackEditTypeAudio::draw_key(int p_index, float p_pixels_sec, int p_x, bool p_selected, int p_clip_left, int p_clip_right) { Ref stream = get_animation()->audio_track_get_key_stream(get_track(), p_index); - if (!stream.is_valid()) { + if (stream.is_null()) { AnimationTrackEdit::draw_key(p_index, p_pixels_sec, p_x, p_selected, p_clip_left, p_clip_right); // Draw diamond. return; } @@ -1025,7 +1025,7 @@ void AnimationTrackEditTypeAudio::gui_input(const Ref &p_event) { for (int i = 0; i < get_animation()->track_get_key_count(get_track()); i++) { Ref stream = get_animation()->audio_track_get_key_stream(get_track(), i); - if (!stream.is_valid()) { + if (stream.is_null()) { continue; } diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 5ccf2d413d0..9934b8f4521 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -866,7 +866,7 @@ void CodeTextEditor::input(const Ref &event) { const Ref key_event = event; - if (!key_event.is_valid()) { + if (key_event.is_null()) { return; } if (!key_event->is_pressed()) { @@ -1053,7 +1053,7 @@ Ref CodeTextEditor::_get_completion_icon(const ScriptLanguage::CodeCo tex = get_editor_theme_icon(p_option.display); } else { tex = EditorNode::get_singleton()->get_class_icon(p_option.display); - if (!tex.is_valid()) { + if (tex.is_null()) { tex = get_editor_theme_icon(SNAME("Object")); } } diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp index a383ebbc3c2..cd3f9b6c0a0 100644 --- a/editor/create_dialog.cpp +++ b/editor/create_dialog.cpp @@ -114,7 +114,7 @@ bool CreateDialog::_is_type_preferred(const String &p_type) const { bool CreateDialog::_is_class_disabled_by_feature_profile(const StringName &p_class) const { Ref profile = EditorFeatureProfileManager::get_singleton()->get_current_profile(); - return !profile.is_null() && profile->is_class_disabled(p_class); + return profile.is_valid() && profile->is_class_disabled(p_class); } bool CreateDialog::_should_hide_type(const StringName &p_type) const { @@ -312,7 +312,7 @@ void CreateDialog::_configure_search_option_item(TreeItem *r_item, const StringN r_item->set_suffix(0, "(" + suffix + ")"); } - ERR_FAIL_COND(!scr.is_valid()); + ERR_FAIL_COND(scr.is_null()); is_abstract = scr->is_abstract(); } else { r_item->set_metadata(0, custom_type_parents[p_type]); diff --git a/editor/debugger/editor_debugger_inspector.cpp b/editor/debugger/editor_debugger_inspector.cpp index e085e2e4480..7a1435e92bb 100644 --- a/editor/debugger/editor_debugger_inspector.cpp +++ b/editor/debugger/editor_debugger_inspector.cpp @@ -167,7 +167,7 @@ ObjectID EditorDebuggerInspector::add_object(const Array &p_arr) { if (debug_obj->get_script() != var) { debug_obj->set_script(Ref()); Ref