コード例 #1
0
ファイル: Editor.DocOperations.cs プロジェクト: thomasvt/pose
        /// <summary>
        /// Moves a node to another place in the scene Hierarchy.
        /// </summary>
        public void MoveNodeInHierarchy(ulong nodeId, ulong targetNodeId, InsertPosition insertPosition)
        {
            RequireMode(EditorMode.Design);

            var node = CurrentDocument.GetNode(nodeId);

            using var uow = CurrentDocument.StartUnitOfWork($"{node} Move in scene tree");
            _currentDocument.MoveNodeInHierarchy(uow, nodeId, targetNodeId, insertPosition);
        }
コード例 #2
0
ファイル: Editor.DocOperations.cs プロジェクト: thomasvt/pose
        /// <summary>
        /// Adds an animation key in the current animation, at the current timeline frame.
        /// </summary>
        public void RemoveKeyAtCurrentFrame(ulong nodeId, PropertyType property)
        {
            RequireMode(EditorMode.Animate);

            var node      = CurrentDocument.GetNode(nodeId);
            var animation = CurrentDocument.GetAnimation(_currentAnimationId);

            using var uow = CurrentDocument.StartUnitOfWork($"{node} Remove Key {property} @ [F:{animation.CurrentFrame}]");
            animation.RemoveKeyAtCurrentFrame(uow, nodeId, property);
        }