Fix duplicating spline

#452
This commit is contained in:
Wojtek Figat
2021-04-12 21:06:34 +02:00
parent 3bfeb1db76
commit 55155630ca
5 changed files with 25 additions and 3 deletions

View File

@@ -29,7 +29,7 @@ namespace FlaxEditor.SceneGraph.Actors
public override bool CanBeSelectedDirectly => true;
public override bool CanDuplicate => true;
public override bool CanDuplicate => !Root?.Selection.Contains(ParentNode) ?? true;
public override bool CanDelete => true;

View File

@@ -1,6 +1,7 @@
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using System.Collections.Generic;
using FlaxEditor.SceneGraph.Actors;
using FlaxEngine;
@@ -146,5 +147,10 @@ namespace FlaxEditor.SceneGraph
/// Gets the undo.
/// </summary>
public abstract Undo Undo { get; }
/// <summary>
/// Gets the list of selected scene graph nodes in the editor context.
/// </summary>
public abstract List<SceneGraphNode> Selection { get; }
}
}

View File

@@ -57,7 +57,9 @@ namespace FlaxEditor.SceneGraph
/// </summary>
public virtual RootNode Root => ParentNode?.Root;
/// <inheritdoc />
/// <summary>
/// Gets or sets the transform of the node.
/// </summary>
public abstract Transform Transform { get; set; }
/// <summary>