You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Some code simplifications
AnimationNodeBlendSpace2DEditor: - `!tree` is always false, because it is checked a few lines above CurveEdit: - grabbing != GRAB_NONE is redundant GradientTexture2DEdit: - grabbed != HANDLE_FROM is redundant - grabbed != HANDLE_TO is redundant Viewport: - index is not used afterwards - In these cases `gui.mouse_focus` is always valid. Move check to a DEV_ASSERT - simplify `stopped` calculation
This commit is contained in:
@@ -820,9 +820,7 @@ void AnimationNodeBlendSpace2DEditor::_notification(int p_what) {
|
||||
|
||||
String error;
|
||||
|
||||
if (!tree) {
|
||||
error = TTR("BlendSpace2D does not belong to an AnimationTree node.");
|
||||
} else if (!tree->is_active()) {
|
||||
if (!tree->is_active()) {
|
||||
error = TTR("AnimationTree is inactive.\nActivate to enable playback, check node warnings if activation fails.");
|
||||
} else if (tree->is_state_invalid()) {
|
||||
error = tree->get_invalid_state_reason();
|
||||
|
||||
Reference in New Issue
Block a user