예제 #1
0
    override public bool DrawInspector(NPipeEditFlags flags)
    {
        bool changed = base.DrawInspector(flags);

        if (Input != null)
        {
            string newInputValue = NPVoxGUILayout.DrawSocketSelector("Input Socket", InputSocketName, Input as NPVoxIModelFactory);
            if (newInputValue != InputSocketName)
            {
                InputSocketName = newInputValue;
                changed         = true;
            }
            string newTargetValue = NPVoxGUILayout.DrawSocketSelector("Target Socket", TargetSocketName, Target as NPVoxIModelFactory);
            if (newTargetValue != TargetSocketName)
            {
                TargetSocketName = newTargetValue;
                changed          = true;
            }
        }

        return(changed);
    }
    override public bool DrawInspector(NPipeEditFlags flags)
    {
        bool changed = base.DrawInspector(flags & ~NPipeEditFlags.INPUT);

        if (Input != null)
        {
            string newInputValue = NPVoxGUILayout.DrawSocketSelector("Socket 1", SocketName1, Input as NPVoxIModelFactory);
            if (newInputValue != SocketName1)
            {
                SocketName1 = newInputValue;
                changed     = true;
            }
            string newTargetValue = NPVoxGUILayout.DrawSocketSelector("Socket 2", SocketName2, Input as NPVoxIModelFactory);
            if (newTargetValue != SocketName2)
            {
                SocketName2 = newTargetValue;
                changed     = true;
            }
        }


        return(changed);
    }