Exemplo n.º 1
0
 // ----------------------------------------------------------------------
 public void Reset()
 {
     // Common
     ObjectType          = VSObjectType.Unknown;
     NodeSpec            = NodeSpecification.Default;
     PortSpec            = PortSpecification.Default;
     InstanceId          = -1;
     ParentId            = -1;
     QualifiedType       = "";
     RawName             = "";
     LocalAnchorPosition = Vector2.zero;
     LayoutPriority      = 0;
     DisplayOption       = iCS_DisplayOptionEnum.Unfolded;
     // Node
     MethodName  = null;
     NbOfParams  = 0;
     IconGUID    = null;
     Description = null;
     // Port
     Edge                = NodeEdge.None;
     SourceId            = -1;
     PortIndex           = -1;
     InitialValueArchive = null;
     // State
     IsEntryState = false;
 }
Exemplo n.º 2
0
        // ======================================================================
        /// Change the node specification of the visual script object.
        ///
        /// @param vsObject The visual script to change.
        /// @param nodeSpec The new node specification.
        ///
        public static void ChangeNodeSpec(iCS_EditorObject vsObject, NodeSpecification nodeSpec)
        {
            if (vsObject == null)
            {
                return;
            }
            var iStorage = vsObject.IStorage;

            OpenTransaction(iStorage);
            try {
                vsObject.NodeSpec = nodeSpec;
            }
            catch (System.Exception) {
                CancelTransaction(iStorage);
            }
            iCS_UserCommands.CloseTransaction(iStorage, "Change Node Specification => " + vsObject.DisplayName, TransactionType.Field);
        }
 // ===================================================================
 /// Sets the node specififcation.
 ///
 /// @param nodeSpec The new node specification.
 ///
 protected void SetNodeSpec(NodeSpecification nodeSpec)
 {
     iCS_UserCommands.ChangeNodeSpec(vsObject, nodeSpec);
 }