Exemplo n.º 1
0
		void InputPortSwitchRestriction( WirePort port )
		{
			switch( port.DataType )
			{
				case WirePortDataType.OBJECT:
				break;
				case WirePortDataType.FLOAT:
				case WirePortDataType.FLOAT2:
				case WirePortDataType.FLOAT3:
				case WirePortDataType.FLOAT4:
				case WirePortDataType.COLOR:
				case WirePortDataType.INT:
				{
					port.CreatePortRestrictions( WirePortDataType.FLOAT, WirePortDataType.FLOAT2, WirePortDataType.FLOAT3, WirePortDataType.FLOAT4, WirePortDataType.COLOR, WirePortDataType.INT, WirePortDataType.OBJECT );
				}
				break;
				case WirePortDataType.FLOAT3x3:
				case WirePortDataType.FLOAT4x4:
				{
					port.CreatePortRestrictions( WirePortDataType.FLOAT3x3, WirePortDataType.FLOAT4x4, WirePortDataType.OBJECT );
				}
				break;
				case WirePortDataType.SAMPLER1D:
				case WirePortDataType.SAMPLER2D:
				case WirePortDataType.SAMPLER3D:
				case WirePortDataType.SAMPLERCUBE:
				{
					port.CreatePortRestrictions( WirePortDataType.SAMPLER1D, WirePortDataType.SAMPLER2D, WirePortDataType.SAMPLER3D, WirePortDataType.SAMPLERCUBE, WirePortDataType.OBJECT );
				}
				break;
				default:
				break;
			}
		}
Exemplo n.º 2
0
        void OutputPortSwitchRestriction(WirePort port)
        {
            switch (port.DataType)
            {
            case WirePortDataType.OBJECT:
                break;

            case WirePortDataType.FLOAT:
            case WirePortDataType.FLOAT2:
            case WirePortDataType.FLOAT3:
            case WirePortDataType.FLOAT4:
            case WirePortDataType.COLOR:
            case WirePortDataType.INT:
            case WirePortDataType.FLOAT3x3:
            case WirePortDataType.FLOAT4x4:
            {
                port.AddPortForbiddenTypes(WirePortDataType.SAMPLER1D, WirePortDataType.SAMPLER2D, WirePortDataType.SAMPLER3D, WirePortDataType.SAMPLERCUBE);
            }
            break;

            case WirePortDataType.SAMPLER1D:
            case WirePortDataType.SAMPLER2D:
            case WirePortDataType.SAMPLER3D:
            case WirePortDataType.SAMPLERCUBE:
            {
                port.CreatePortRestrictions(WirePortDataType.SAMPLER1D, WirePortDataType.SAMPLER2D, WirePortDataType.SAMPLER3D, WirePortDataType.SAMPLERCUBE, WirePortDataType.OBJECT);
            }
            break;

            default:
                break;
            }
        }