//this method is called by vvvv when the node is created public void SetPluginHost(IPluginHost Host) { //assign host FHost = Host; //create inputs FHost.CreateValueInput("Enable", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FEnable); FEnable.SetSubType(0, 1, 1, 0, false, false, true); FHost.CreateValueInput("Sensitivity XYZ", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FSensitivity); FSensitivity.SetSubType(double.MinValue, double.MaxValue, 0.01, 0, false, false, false); FHost.CreateValueInput("Serial Number", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FSerial); FSerial.SetSubType(0, double.MaxValue, 1, 0, false, false, true); //create outputs FHost.CreateValueOutput("Axis XYZ", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FAxis); FAxis.SetSubType(0, 1, 0.0001, 0, false, false, false); FHost.CreateValueOutput("Connected", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FConnected); FConnected.SetSubType(0, 1, 1, 0, false, true, true); FHost.CreateStringOutput("Info", TSliceMode.Dynamic, TPinVisibility.True, out FInfo); FInfo.SetSubType("Disabled", false); }
//this method is called by vvvv when the node is created public void SetPluginHost(IPluginHost Host) { // assign host FHost = Host; // create inputs FHost.CreateValueFastInput("Vector2D In", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FInputPoints); FInputPoints.SetSubType(double.MinValue, double.MaxValue, 0.001, 0, false, false, false); FHost.CreateValueInput("Source Grid", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FInputGridFrom); FInputGridFrom.SetSubType(double.MinValue, double.MaxValue, 0.001, 0, false, false, false); FHost.CreateValueInput("Target Grid", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FInputGridTo); FInputGridTo.SetSubType(double.MinValue, double.MaxValue, 0.001, 0, false, false, false); FHost.CreateValueFastInput("Width", 1, null, TSliceMode.Single, TPinVisibility.True, out FPinWidth); FPinWidth.SetSubType(2, double.MaxValue, 1, 2, false, false, true); FHost.CreateValueFastInput("Height", 1, null, TSliceMode.Single, TPinVisibility.True, out FPinHeight); FPinHeight.SetSubType(2, double.MaxValue, 1, 2, false, false, true); FHost.CreateValueOutput("Vector2D Out", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FOutputPoints); FOutputPoints.SetSubType(0, double.MaxValue, 0.001, 0, false, false, false); FHost.CreateValueOutput("Hit Tester", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FOutputHit); FOutputHit.SetSubType(0, double.MaxValue, 0.001, 0, false, false, false); }
//this method is called by vvvv when the node is created public void SetPluginHost(IPluginHost Host) { //assign host FHost = Host; //create inputs FHost.CreateValueInput("SetDigitalOut", 12, null, TSliceMode.Dynamic, TPinVisibility.True, out SetDigitalOut); SetDigitalOut.SetSubType(double.MinValue, double.MaxValue, 1, 0, false, false, true); FHost.CreateValueInput("ConfigureDigital", 12, null, TSliceMode.Dynamic, TPinVisibility.True, out ConfigureDigital); ConfigureDigital.SetSubType(double.MinValue, double.MaxValue, 1, 0, false, false, true); FHost.CreateValueInput("ConfigurePWM", 12, null, TSliceMode.Dynamic, TPinVisibility.True, out ConfigurePWM); ConfigurePWM.SetSubType(double.MinValue, double.MaxValue, 1, 0, false, false, true); FHost.CreateValueInput("ComPort", 1, null, TSliceMode.Single, TPinVisibility.True, out SetComPort); SetComPort.SetSubType(0, 100, 1, 0, false, false, true); FHost.CreateValueInput("Enable", 1, null, TSliceMode.Single, TPinVisibility.True, out EnablePlugin); EnablePlugin.SetSubType(0, 1, 1, 0, false, true, false); //create outputs FHost.CreateValueOutput("AnalogIn", 6, null, TSliceMode.Dynamic, TPinVisibility.True, out AnalogIn); AnalogIn.SetSubType(double.MinValue, double.MaxValue, 0.01, 0, false, false, false); FHost.CreateValueOutput("DigitalIn", 12, null, TSliceMode.Dynamic, TPinVisibility.True, out DigitalIn); DigitalIn.SetSubType(double.MinValue, double.MaxValue, 0.01, 0, false, false, true); }
//this method is called by vvvv when the node is created public void SetPluginHost(IPluginHost Host) { //assign host FHost = Host; System.Guid[] guids = new System.Guid[1]; guids[0] = new Guid("AB312E34-8025-40F2-8241-1958793F3D39"); //create inputs String[] dimensions = new String[3]; FHost.CreateValueFastInput("Vertices", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FVerticesInput); FHost.CreateNodeInput("Skeleton", TSliceMode.Dynamic, TPinVisibility.True, out FSkeletonInput); FSkeletonInput.SetSubType(guids, "Skeleton"); FHost.CreateValueFastInput("Apply", 1, null, TSliceMode.Single, TPinVisibility.True, out FApplyInput); FApplyInput.SetSubType(0, 1, 1, 0, true, false, true); // create outputs FHost.CreateValueOutput("Bind Indices", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FBindIndicesOutput); FHost.CreateValueOutput("Skin Weights", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FSkinWeightsOutput); FHost.CreateValueOutput("Indices", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FIndicesOutput); }
//this method is called by vvvv when the node is created public void SetPluginHost(IPluginHost Host) { //assign host FHost = Host; //create inputs //create outputs FHost.CreateValueOutput("Position", 3, null, TSliceMode.Dynamic, TPinVisibility.True, out FPositionPin); FPositionPin.SetSubType3D(double.MinValue, double.MaxValue, 0.01, 0, 0, 0, false, false, false); FPositionPin.SliceCount = 1; FHost.CreateValueOutput("Rotation", 3, null, TSliceMode.Dynamic, TPinVisibility.True, out FRotationPin); FRotationPin.SetSubType3D(double.MinValue, double.MaxValue, 0.01, 0, 0, 0, false, false, false); FRotationPin.SliceCount = 1; FHost.CreateValueOutput("Angle", 1, null, TSliceMode.Single, TPinVisibility.True, out FAnglePin); FAnglePin.SetSubType(double.MinValue, double.MaxValue, 0.01, 0, false, false, false); FHost.CreateValueOutput("Buttons", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FKeyboardPin); FKeyboardPin.SetSubType(0, 1, 1, 0, false, true, true); FHost.CreateValueOutput("Device Type", 1, null, TSliceMode.Single, TPinVisibility.True, out FDeviceTypePin); FDeviceTypePin.SetSubType(0, int.MaxValue, 1, 0, false, false, true); DeviceChange(0); }
//this method is called by vvvv when the node is created public void SetPluginHost(IPluginHost Host) { //assign host FHost = Host; //create inputs FHost.CreateStringInput("Input", TSliceMode.Dynamic, TPinVisibility.True, out FInput); FInput.SetSubType("", true); FHost.CreateValueInput("Hidden", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FHidden); FHidden.SetSubType(0, 1, 1, 0, false, true, false); FHost.CreateValueInput("ReadOnly", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FReadOnly); FReadOnly.SetSubType(0, 1, 1, 0, false, true, false); FHost.CreateValueInput("System", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FSystem); FSystem.SetSubType(0, 1, 1, 0, false, true, false); FHost.CreateValueInput("Set", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FSet); FSet.SetSubType(0, 1, 1, 0, true, false, false); //create outputs FHost.CreateValueOutput("Hidden", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FIsHidden); FIsHidden.SetSubType(0, 1, 1, 0, false, true, false); FHost.CreateValueOutput("ReadOnly", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FIsReadOnly); FIsReadOnly.SetSubType(0, 1, 1, 0, false, true, false); FHost.CreateValueOutput("System", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FIsSystem); FIsSystem.SetSubType(0, 1, 1, 0, false, true, false); }
//this method is called by vvvv when the node is created public void SetPluginHost(IPluginHost Host) { //assign host FHost = Host; //create inputs FHost.CreateValueInput("A.", 3, null, TSliceMode.Dynamic, TPinVisibility.True, out FA); FA.SetSubType(double.MinValue, double.MaxValue, 0.01, 0.0, false, false, false); FHost.CreateValueInput("B.", 3, null, TSliceMode.Dynamic, TPinVisibility.True, out FB); FB.SetSubType(double.MinValue, double.MaxValue, 0.01, 0.5, false, false, false); FHost.CreateValueInput("C.", 3, null, TSliceMode.Dynamic, TPinVisibility.True, out FC); FC.SetSubType(double.MinValue, double.MaxValue, 0.01, 1.0, false, false, false); FHost.CreateValueInput("Radius A", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FRA); FRA.SetSubType(double.MinValue, double.MaxValue, 0.01, 1.0, false, false, false); FHost.CreateValueInput("Radius B", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FRB); FRB.SetSubType(double.MinValue, double.MaxValue, 0.01, 1.0, false, false, false); FHost.CreateValueInput("Radius C", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FRC); FRC.SetSubType(double.MinValue, double.MaxValue, 0.01, 1.0, false, false, false); //create outputs FHost.CreateValueOutput("Intersections", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FIntersections); FIntersections.SetSubType(double.MinValue, double.MaxValue, 0.01, 0, false, false, false); FHost.CreateValueOutput("Intersect Point 1", 3, null, TSliceMode.Dynamic, TPinVisibility.True, out FP1); FP1.SetSubType(double.MinValue, double.MaxValue, 0.01, 0, false, false, false); FHost.CreateValueOutput("Intersect Point 2", 3, null, TSliceMode.Dynamic, TPinVisibility.True, out FP2); FP2.SetSubType(double.MinValue, double.MaxValue, 0.01, 0, false, false, false); }
//this method is called by vvvv when the node is created public void SetPluginHost(IPluginHost Host) { //assign host FHost = Host; //create inputs FHost.CreateValueInput("Input", 2, null, TSliceMode.Dynamic, TPinVisibility.True, out FInput); FInput.SetSubType(double.MinValue, double.MaxValue, 0.01, 0.5, false, false, false); FHost.CreateValueInput("Distortion", 4, null, TSliceMode.Dynamic, TPinVisibility.True, out FDistortion); FDistortion.SetSubType(double.MinValue, double.MaxValue, 0.01, 0.5, false, false, false); FHost.CreateValueInput("Focal Length", 2, null, TSliceMode.Dynamic, TPinVisibility.True, out FFocalLength); FFocalLength.SetSubType(double.MinValue, double.MaxValue, 0.01, 0.5, false, false, false); FHost.CreateValueInput("Principal Point", 2, null, TSliceMode.Dynamic, TPinVisibility.True, out FPrincipalPoint); FPrincipalPoint.SetSubType(double.MinValue, double.MaxValue, 0.01, 0.5, false, false, false); FHost.CreateValueInput("Resolution", 2, null, TSliceMode.Dynamic, TPinVisibility.True, out FResolution); FResolution.SetSubType(double.MinValue, double.MaxValue, 0.01, 0.5, false, false, false); //create outputs FHost.CreateValueOutput("Output", 2, null, TSliceMode.Dynamic, TPinVisibility.True, out FOutput); FOutput.SetSubType(double.MinValue, double.MaxValue, 0.01, 0, false, false, false); FHost.CreateValueOutput("Tries", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FTries); FOutput.SetSubType(1, double.MaxValue, 1, 0, false, false, false); }
//this method is called by vvvv when the node is created public void SetPluginHost(IPluginHost Host) { //assign host FHost = Host; //create inputs FHost.CreateValueInput("Set", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FSet); FSet.SetSubType(0, 1, 1, 0, false, true, false); FHost.CreateValueInput("Time", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FTime); FTime.SetSubType(0, double.MaxValue, 0.01, 1.0, false, false, false); FHost.CreateValueInput("Reset", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FReset); FReset.SetSubType(0, 1, 1, 0, true, false, false); //create outputs FHost.CreateValueOutput("Output", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FOutput); FOutput.SetSubType(0, 1, 1, 0, false, true, false); FHost.CreateValueOutput("Running", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FRunning); FRunning.SetSubType(0, 1, 0.01, 0, false, false, false); FHost.CreateValueOutput("Active", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FActive); FActive.SetSubType(0, 1, 1, 0, false, true, false); }
//this method is called by vvvv when the node is created public void SetPluginHost(IPluginHost Host) { //assign host FHost = Host; //create inputs FHost.CreateValueInput("Input", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FInput); FInput.SetSubType(double.MinValue, double.MaxValue, 0.01, 0.0, false, false, false); FHost.CreateValueInput("Control", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FPts); FPts.SetSubType(double.MinValue, double.MaxValue, 0.01, 0.0, false, false, false); FHost.CreateValueInput("Tangent", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FCtrl); FCtrl.SetSubType(double.MinValue, double.MaxValue, 0.01, 0.0, false, false, false); FHost.CreateValueInput("Vector Size", 1, null, TSliceMode.Single, TPinVisibility.Hidden, out FVecSize); FVecSize.SetSubType(1, double.MaxValue, 1, 1, false, false, true); FHost.CreateValueInput("Inputs per Curve", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FInPC); FInPC.SetSubType(double.MinValue, double.MaxValue, 1, -1, false, false, true); FHost.CreateValueInput("Controls per Curve", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FPtPC); FPtPC.SetSubType(double.MinValue, double.MaxValue, 1, -1, false, false, true); FHost.CreateValueInput("Closed", 1, null, TSliceMode.Dynamic, TPinVisibility.Hidden, out FClosed); FClosed.SetSubType(0, 1, 1, 0, false, true, false); //create outputs FHost.CreateValueOutput("Output", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FOutput); FOutput.SetSubType(double.MinValue, double.MaxValue, 0.01, 0, false, false, false); FHost.CreateValueOutput("Curve Count", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FCurveC); FCurveC.SetSubType(0, double.MaxValue, 1, 0, false, false, true); }
//this method is called by vvvv when the node is created public void SetPluginHost(IPluginHost Host) { //assign host FHost = Host; //create inputs FHost.CreateValueInput("Input 1 ", 4, null, TSliceMode.Dynamic, TPinVisibility.True, out FMyValueInput1); FMyValueInput1.SetSubType4D(double.MinValue, double.MaxValue, 0.01, 1, 0, 0, 0, false, false, false); FHost.CreateValueInput("Input 2 ", 4, null, TSliceMode.Dynamic, TPinVisibility.True, out FMyValueInput2); FMyValueInput2.SetSubType4D(double.MinValue, double.MaxValue, 0.01, 0, 0, 0, 0, false, false, false); FHost.CreateValueInput("Input 3 ", 4, null, TSliceMode.Dynamic, TPinVisibility.True, out FMyValueInput3); FMyValueInput3.SetSubType4D(double.MinValue, double.MaxValue, 0.01, 1, 0, 0, 0, false, false, false); FHost.CreateValueInput("Input 4 ", 4, null, TSliceMode.Dynamic, TPinVisibility.True, out FMyValueInput4); FMyValueInput4.SetSubType4D(double.MinValue, double.MaxValue, 0.01, 0, 0, 0, 0, false, false, false); //create outputs FHost.CreateValueOutput("Output 1 ", 4, null, TSliceMode.Dynamic, TPinVisibility.True, out FMyValueOutput1); FMyValueOutput1.SetSubType4D(double.MinValue, double.MaxValue, 0.01, 0, 0, 0, 0, false, false, false); FHost.CreateValueOutput("Output 2 ", 4, null, TSliceMode.Dynamic, TPinVisibility.True, out FMyValueOutput2); FMyValueOutput2.SetSubType4D(double.MinValue, double.MaxValue, 0.01, 0, 0, 0, 0, false, false, false); }
//this method is called by vvvv when the node is created public void SetPluginHost(IPluginHost Host) { //assign host FHost = Host; //create inputs FHost.CreateStringInput("Filename", TSliceMode.Single, TPinVisibility.True, out FMyStringInput); FMyStringInput.SetSubType("rig.x", true); //create outputs FHost.CreateValueOutput("Bind Indices", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FBindIndicesOutput); FBindIndicesOutput.Order = 1; FHost.CreateValueOutput("Skin Weights", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FSkinWeightsOutput); FSkinWeightsOutput.Order = 2; FHost.CreateValueOutput("Indices", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FIndicesOutput); FIndicesOutput.Order = 3; FHost.CreateTransformOutput("Inverse Bind Pose", TSliceMode.Dynamic, TPinVisibility.True, out FInverseBindPoseOutput); FInverseBindPoseOutput.Order = 4; FHost.CreateNodeOutput("Skeleton", TSliceMode.Single, TPinVisibility.True, out FSkeletonOutput); System.Guid[] guids = new System.Guid[1]; guids[0] = new Guid("AB312E34-8025-40F2-8241-1958793F3D39"); FSkeletonOutput.SetSubType(guids, "Skeleton"); FSkeletonOutput.Order = 5; }
//this method is called by vvvv when the node is created public void SetPluginHost(IPluginHost Host) { //assign host FHost = Host; //create inputs FHost.CreateValueInput("Input m ", 1, null, TSliceMode.Single, TPinVisibility.True, out FMyValueInputM); FMyValueInputM.SetSubType(1, double.MaxValue, 1, 1, false, false, true); FHost.CreateValueInput("Input n ", 1, null, TSliceMode.Single, TPinVisibility.True, out FMyValueInputN); FMyValueInputN.SetSubType(1, double.MaxValue, 1, 1, false, false, true); FHost.CreateValueInput("Phase m ", 1, null, TSliceMode.Single, TPinVisibility.True, out FMyValuePhaseM); FMyValuePhaseM.SetSubType(double.MinValue, double.MaxValue, 1, 0, false, false, true); FHost.CreateValueInput("Phase n ", 1, null, TSliceMode.Single, TPinVisibility.True, out FMyValuePhaseN); FMyValuePhaseN.SetSubType(double.MinValue, double.MaxValue, 1, 0, false, false, true); //create outputs FHost.CreateValueOutput("Output X ", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FMyValueOutputX); FMyValueOutputX.SetSubType(1, double.MaxValue, 1, 0, false, false, false); FHost.CreateValueOutput("Output Y ", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FMyValueOutputY); FMyValueOutputY.SetSubType(1, double.MaxValue, 1, 0, false, false, false); FHost.CreateValueOutput("IsPrime ", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FMyValueOutputIsPrime); FMyValueOutputIsPrime.SetSubType(0, double.MaxValue, 0, 0, false, false, true); }
//this method is called by vvvv when the node is created public void SetPluginHost(IPluginHost Host) { //assign host FHost = Host; //create inputs FHost.CreateValueInput("Enable", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FEnable); FEnable.SetSubType(0, 0, 0, 0, false, true, true); FHost.CreateValueInput("Sensitivity", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FSensitivity); FSensitivity.SetSubType(0, 1, 0.01, 0.1, false, false, false); FHost.CreateValueInput("Serial", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FSerial); FSerial.SetSubType(0, double.MaxValue, 1, 0, false, false, true); //create outputs FHost.CreateValueOutput("Position", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FPosition); FPosition.SetSubType(double.MinValue, double.MaxValue, 0.0001, 0, false, false, false); FHost.CreateValueOutput("Pressed", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FPress); FPress.SetSubType(0, 1, 1, 0, false, true, true); FHost.CreateStringOutput("Info", TSliceMode.Dynamic, TPinVisibility.True, out FInfo); FInfo.SetSubType("", false); }
//this method is called by vvvv when the node is created public void SetPluginHost(IPluginHost Host) { //assign host FHost = Host; //create inputs FHost.CreateStringInput("Filename", TSliceMode.Dynamic, TPinVisibility.True, out FFile); FFile.SetSubType("", true); FHost.CreateStringInput("Custom Root", TSliceMode.Dynamic, TPinVisibility.Hidden, out FCustomRoot); FCustomRoot.SetSubType("", false); FHost.CreateValueInput("Update", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FUpdate); FUpdate.SetSubType(0, 1, 1, 0, true, false, false); //create outputs FHost.CreateValueOutput("Exists", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FExists); FExists.SetSubType(0, 1, 1, 0, false, true, false); FHost.CreateValueOutput("Filesize", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FFileSize); FFileSize.SetSubType(0, double.MaxValue, 0.01, 0, false, false, true); FHost.CreateValueOutput("Read Only", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FReadOnly); FReadOnly.SetSubType(0, 1, 1, 0, false, true, false); FHost.CreateValueOutput("Hidden", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FHidden); FHidden.SetSubType(0, 1, 1, 0, false, true, false); }
//this method is called by vvvv when the node is created public void SetPluginHost(IPluginHost Host) { //assign host FHost = Host; //create inputs FHost.CreateValueInput("Input X", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FValueInputX); FValueInputX.SetSubType(double.MinValue, double.MaxValue, 0.01, 1, false, false, false); FHost.CreateValueInput("Input Y", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FValueInputY); FValueInputX.SetSubType(double.MinValue, double.MaxValue, 0.01, 2, false, false, false); FHost.CreateValueInput("DeltaTime", 1, null, TSliceMode.Single, TPinVisibility.OnlyInspector, out FValueInputDeltaT); FValueInputDeltaT.SetSubType(0, 1, 0.001, 0.01, false, false, false); FHost.CreateValueInput("A", 1, null, TSliceMode.Single, TPinVisibility.True, out FValueInputA); FValueInputA.SetSubType(double.MinValue, double.MaxValue, 0.01, 1, false, false, false); FHost.CreateValueInput("B", 1, null, TSliceMode.Single, TPinVisibility.True, out FValueInputB); FValueInputB.SetSubType(double.MinValue, double.MaxValue, 0.01, -1, false, false, false); FHost.CreateValueInput("C", 1, null, TSliceMode.Single, TPinVisibility.True, out FValueInputC); FValueInputC.SetSubType(double.MinValue, double.MaxValue, 0.01, 0.3, false, false, false); FHost.CreateValueInput("D", 1, null, TSliceMode.Single, TPinVisibility.True, out FValueInputD); FValueInputD.SetSubType(double.MinValue, double.MaxValue, 0.01, 0.2, false, false, false); //create outputs FHost.CreateValueOutput("Output X", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FValueOutputX); FValueOutputX.SetSubType(double.MinValue, double.MaxValue, 0.01, 0, false, false, false); FHost.CreateValueOutput("Output Y", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FValueOutputY); FValueOutputY.SetSubType(double.MinValue, double.MaxValue, 0.01, 0, false, false, false); }
public void SetPluginHost(IPluginHost Host) { FHost = Host; //INPUT-PINS FHost.CreateStringInput("Input", TSliceMode.Dynamic, TPinVisibility.True, out FDataIn); FDataIn.SetSubType("", false); FHost.CreateValueInput("Do Send", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FDoSendIn); FDoSendIn.SetSubType(0, 1, 1, 0, true, false, true); FHost.CreateValueInput("Keep Last Data", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FKeepLastDataIn); FKeepLastDataIn.SetSubType(0, 1, 1, 0, false, false, true); FHost.CreateValueInput("Baudrate", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FBaudrateIn); FBaudrateIn.SetSubType(Double.MinValue, Double.MaxValue, 1, 9600, false, false, true); FHost.CreateEnumInput("Data Bits", TSliceMode.Dynamic, TPinVisibility.True, out FDatabitsIn); FDatabitsIn.SetSubType("DataBits"); FHost.CreateEnumInput("Stop Bits", TSliceMode.Dynamic, TPinVisibility.True, out FStopbitsIn); FStopbitsIn.SetSubType("StopBits"); FHost.CreateEnumInput("Parity", TSliceMode.Dynamic, TPinVisibility.True, out FParityIn); FParityIn.SetSubType("Parity"); FHost.CreateEnumInput("Hand Shake", TSliceMode.Dynamic, TPinVisibility.True, out FHandShakeIn); FHandShakeIn.SetSubType("Hand Shake"); FHost.UpdateEnum("Hand Shake", "None", new string[] { "None", "RequestToSend", "RequestToSendXOnXOff", "XOnXOff" }); FHost.CreateValueInput("ReadBuffer Size", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FReadBufferIn); FReadBufferIn.SetSubType(0, Double.MaxValue, 1, 4096, false, false, true); FHost.CreateValueInput("Enabled", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FEnableIn); FEnableIn.SetSubType(0, 1, 1, 0, false, false, true); FHost.CreateValueInput("ComPort", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FPortNumberIn); FPortNumberIn.SetSubType(1, double.MaxValue, 1, 1, false, false, true); // OUTPUT-PINS FHost.CreateStringOutput("Output", TSliceMode.Dynamic, TPinVisibility.True, out FDataOut); FDataOut.SetSubType("", false); FHost.CreateValueOutput("On Data", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FOnDataOut); FOnDataOut.SetSubType(0, 1, 1, 0, true, false, true); FHost.CreateValueOutput("IsConnected", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FConnectedOut); FConnectedOut.SetSubType(0, 1, 1, 0, false, false, true); FHost.CreateValueOutput("Available Ports", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FPortsOut); FPortsOut.SetSubType(1, 15, 1, 1, false, false, true); FHost.CreateValueOutput("ReadBuffer Size", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FReadBufferOut); FReadBufferOut.SetSubType(0, Double.MaxValue, 1, 0, false, false, true); FPortsOut.SliceCount = _AvailablePorts.Length; }
//this method is called by vvvv when the node is created public virtual void SetPluginHost(IPluginHost Host) { //assign host FHost = Host; //create inputs: //transform FHost.CreateTransformInput("Transform In", TSliceMode.Dynamic, TPinVisibility.True, out FTransformIn); //FHost.CreateValueInput("Transform In",1,null, TSliceMode.Dynamic, TPinVisibility.True, out FTransformIn); //value FHost.CreateValueInput("Value Input", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FValueIn); FValueIn.SetSubType(0, double.MaxValue, 1, 0, false, false, true); FHost.CreateValueInput("Set Value", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FSetValueIn); FSetValueIn.SetSubType(0, 1, 1, 0, true, false, false); //counts FHost.CreateValueInput("Count X", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FCountXIn); FCountXIn.SetSubType(1, double.MaxValue, 1, 1, false, false, true); FHost.CreateValueInput("Count Y", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FCountYIn); FCountYIn.SetSubType(1, double.MaxValue, 1, 1, false, false, true); //size FHost.CreateValueInput("Size X", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FSizeXIn); FSizeXIn.SetSubType(double.MinValue, double.MaxValue, 0.01, 0.9, false, false, false); FHost.CreateValueInput("Size Y", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FSizeYIn); FSizeYIn.SetSubType(double.MinValue, double.MaxValue, 0.01, 0.9, false, false, false); //mouse this.FHost.CreateValueInput("Touch Id", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out this.FPinInTouchId); this.FPinInTouchId.SetSubType(double.MinValue, double.MaxValue, 1, 0, false, false, true); this.FHost.CreateValueInput("Touch Position", 2, null, TSliceMode.Dynamic, TPinVisibility.True, out this.FPinInTouchPos); this.FPinInTouchPos.SetSubType2D(double.MinValue, double.MaxValue, 0.01, 0, 0, false, false, false); this.FHost.CreateValueInput("Is new", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out this.FPinInIsNew); this.FPinInIsNew.SetSubType(0, 1, 1, 0, false, true, false); //create outputs FHost.CreateTransformOutput("Transform Out", TSliceMode.Dynamic, TPinVisibility.True, out FTransformOut); FHost.CreateValueOutput("Value Output", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FValueOut); FValueOut.SetSubType(double.MinValue, double.MaxValue, 0.01, 0, false, false, false); FHost.CreateValueOutput("Hit", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FHitOut); FHitOut.SetSubType(0, 1, 1, 0, true, false, false); FHost.CreateValueOutput("Spread Counts", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FSpreadCountsOut); FSpreadCountsOut.SetSubType(0, double.MaxValue, 0.01, 0, false, false, true); FControllerGroups = new List <T>(); }
//this method is called by vvvv when the node is created public void SetPluginHost(IPluginHost Host) { //assign host FHost = Host; System.Guid[] guids = new System.Guid[1]; guids[0] = new Guid("AB312E34-8025-40F2-8241-1958793F3D39"); FHost.CreateNodeInput("Pose", TSliceMode.Single, TPinVisibility.True, out FPoseInput); FPoseInput.SetSubType(guids, "Skeleton"); FHost.CreateStringInput("Start Joint", TSliceMode.Single, TPinVisibility.True, out FChainStart); FHost.CreateStringInput("End Joint", TSliceMode.Single, TPinVisibility.True, out FChainEnd); FHost.CreateValueInput("Target", 3, null, TSliceMode.Dynamic, TPinVisibility.True, out FTargetInput); FHost.CreateValueInput("Epsilon", 1, null, TSliceMode.Single, TPinVisibility.True, out FEpsilonInput); FHost.CreateValueInput("Velocity", 1, null, TSliceMode.Single, TPinVisibility.True, out FVelocityInput); FVelocityInput.SetSubType(0.0, 10.0, 0.1, 1.0, false, false, false); FHost.CreateValueInput("Pole Target", 3, null, TSliceMode.Dynamic, TPinVisibility.True, out FPoleTargetInput); FHost.CreateValueInput("Enable Pole Target", 1, null, TSliceMode.Single, TPinVisibility.True, out FEnablePoleTargetInput); FEnablePoleTargetInput.SetSubType(0.0, 1.0, 1.0, 0.0, false, false, true); // create outputs FHost.CreateNodeOutput("Output Pose", TSliceMode.Single, TPinVisibility.True, out FPoseOutput); FPoseOutput.SetSubType(guids, "Skeleton"); FHost.CreateValueOutput("Debug", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FDebugOutput); }
//this method is called by vvvv when the node is created public void SetPluginHost(IPluginHost Host) { //assign host FHost = Host; //create inputs FHost.CreateStringInput("Input", TSliceMode.Single, TPinVisibility.True, out FStringInput); FStringInput.SetSubType("", false); FHost.CreateValueInput("Speed", 1, null, TSliceMode.Single, TPinVisibility.True, out FSpeedInput); //Supported values range from -10 to 10 FSpeedInput.SetSubType(-10.0, 10.0, 1.0, 5.0, false, false, true); FHost.CreateValueInput("Speak", 1, null, TSliceMode.Single, TPinVisibility.True, out FSpeakInput); FSpeakInput.SetSubType(0.0, 1.0, 1.0, 0.0, true, false, true); string[] narrators = new string[vox.GetVoices(string.Empty, string.Empty).Count]; int i = 0; foreach (ISpeechObjectToken Token in vox.GetVoices(string.Empty, string.Empty)) { narrators[i++] = Token.GetAttribute("Name"); } FHost.CreateEnumInput("Narrator", TSliceMode.Single, TPinVisibility.True, out FNarratorInput); FNarratorInput.SetSubType("SpeechSynthesisNarrator"); FHost.UpdateEnum("SpeechSynthesisNarrator", narrators[0], narrators); //create outputs FHost.CreateValueOutput("Done", 1, null, TSliceMode.Single, TPinVisibility.True, out FDoneOutput); FDoneOutput.SetSubType(0.0, 1.0, 1.0, 0.0, true, false, true); }
//this method is called by vvvv when the node is created public void SetPluginHost(IPluginHost Host) { //assign host FHost = Host; //create config FHost.CreateStringConfig("Cases", TSliceMode.Single, TPinVisibility.OnlyInspector, out FCases); FCases.SetSubType("one, two", false); //create inputs FHost.CreateStringInput("Switch", TSliceMode.Dynamic, TPinVisibility.True, out FSwitch); FSwitch.SetSubType("one", false); FHost.CreateValueInput("one", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FIn0); FIn0.SetSubType(double.MinValue, double.MaxValue, 0.01, 0.0, false, false, false); FHost.CreateValueInput("two", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FIn1); FIn1.SetSubType(double.MinValue, double.MaxValue, 0.01, 0.0, false, false, false); //create outputs FHost.CreateValueOutput("Value Output", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FOutput); FOutput.SetSubType(double.MinValue, double.MaxValue, 0.01, 0, false, false, false); FHit[0] = 0; FPinArr[0] = FIn0; FCaseArr[0] = "one"; FPinArr[1] = FIn1; FCaseArr[1] = "two"; }
//this method is called by vvvv when the node is created public void SetPluginHost(IPluginHost Host) { //assign host FHost = Host; //create inputs FHost.CreateValueInput("Input ", 2, null, TSliceMode.Dynamic, TPinVisibility.True, out FPositionInput); FPositionInput.SetSubType2D(double.MinValue, double.MaxValue, 0.01, 0.5, 0.5, false, false, false); FHost.CreateValueInput("Upper Left Value ", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FP1Input); FP1Input.SetSubType(double.MinValue, double.MaxValue, 0.01, 0, false, false, false); FHost.CreateValueInput("Upper Right Value ", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FP2Input); FP2Input.SetSubType(double.MinValue, double.MaxValue, 0.01, 0, false, false, false); FHost.CreateValueInput("Lower Right Value ", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FP3Input); FP3Input.SetSubType(double.MinValue, double.MaxValue, 0.01, 1, false, false, false); FHost.CreateValueInput("Lower Left Value ", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FP4Input); FP4Input.SetSubType(double.MinValue, double.MaxValue, 0.01, 1, false, false, false); FHost.CreateValueInput("Vector Size", 1, null, TSliceMode.Single, TPinVisibility.True, out FVectorSizeInput); FVectorSizeInput.SetSubType(double.MinValue, double.MaxValue, 1, 1, false, false, true); //create outputs FHost.CreateValueOutput("Output", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FValueOutput); FValueOutput.SetSubType(double.MinValue, double.MaxValue, 0.01, 0.5, false, false, false); }
//this method is called by vvvv when the node is created public void SetPluginHost(IPluginHost Host) { //assign host FHost = Host; //create inputs FHost.CreateStringInput("Directory", TSliceMode.Dynamic, TPinVisibility.True, out FDir); FDir.SetSubType2(@"C:\", -1, string.Empty, TStringType.Directory); FHost.CreateValueInput("Create", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FCreate); FCreate.SetSubType(0, 1, 1, 0, true, false, false); FHost.CreateValueInput("Remove", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FDelete); FDelete.SetSubType(0, 1, 1, 0, true, false, false); FHost.CreateStringInput("New Name", TSliceMode.Dynamic, TPinVisibility.True, out FNewDir); FNewDir.SetSubType2(@"C:\", -1, string.Empty, TStringType.Directory); FHost.CreateValueInput("Rename", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FRename); FRename.SetSubType(0, 1, 1, 0, true, false, false); //create outputs FHost.CreateValueOutput("Exists", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FExists); FExists.SetSubType(0, 1, 1, 0, false, true, false); }
public void Configurate(IPluginConfig Input) { if (Input == null) { return; } switch (Input.Name) { case "Debug Pins": double pinConfigDebug; FPinConfigDebug.GetValue(0, out pinConfigDebug); if (pinConfigDebug == 1d) { if (FPinDebugButtons == null) { FHost.CreateValueOutput("Buttons (Debug)", 1, null, TSliceMode.Single, TPinVisibility.True, out FPinDebugButtons); FPinDebugButtons.SetSubType(int.MinValue, int.MinValue, 1, 0, false, false, true); } } else if (FPinDebugButtons != null) { FHost.DeletePin(FPinDebugButtons); FPinDebugButtons = null; } break; } }
//this method is called by vvvv when the node is created public void SetPluginHost(IPluginHost Host) { //assign host FHost = Host; //create inputs FHost.CreateValueInput("External Pressure", 4, null, TSliceMode.Dynamic, TPinVisibility.True, out FExternalPressureInput); FExternalPressureInput.SetSubType(double.MinValue, double.MaxValue, 0.01, 0, false, false, false); FHost.CreateValueInput("Attack", 1, null, TSliceMode.Single, TPinVisibility.True, out FAttackInput); FAttackInput.SetSubType(double.MinValue, double.MaxValue, 0.01, 0.5, false, false, false); FHost.CreateValueInput("Decay", 1, null, TSliceMode.Single, TPinVisibility.True, out FDecayInput); FDecayInput.SetSubType(double.MinValue, double.MaxValue, 0.001, 0.01, false, false, false); FHost.CreateValueInput("Reset", 1, null, TSliceMode.Single, TPinVisibility.True, out FResetInput); FResetInput.SetSubType(0, 1, 1, 0, true, false, false); FHost.CreateValueInput("Size", 3, null, TSliceMode.Dynamic, TPinVisibility.True, out FSizeInput); FSizeInput.SetSubType(double.MinValue, double.MaxValue, 1, 10, false, false, true); FHost.CreateValueInput("Render", 1, null, TSliceMode.Single, TPinVisibility.True, out FRenderInput); FRenderInput.SetSubType(0, 1, 1, 1, false, true, true); FHost.CreateValueInput("Number of Threads", 1, null, TSliceMode.Single, TPinVisibility.True, out FNrOfThreadsInput); FNrOfThreadsInput.SetSubType(1, double.MaxValue, 1, 4, false, false, true); //create outputs FHost.CreateValueOutput("Output", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FMyVectorOutput); FMyVectorOutput.SetSubType(double.MinValue, double.MaxValue, 0.01, 0, false, false, false); }
public static IValueOut CreateValueOutput(this IPluginHost host, OutputAttribute attribute, Type type) { attribute = NormalizePinAttribute(attribute, type); IValueOut result = null; host.CreateValueOutput(attribute.Name, attribute.Dimension, attribute.DimensionNames, (TSliceMode)attribute.SliceMode, (TPinVisibility)attribute.Visibility, out result); switch (attribute.Dimension) { case 2: result.SetSubType2D(attribute.MinValue, attribute.MaxValue, attribute.StepSize, attribute.DefaultValues[0], attribute.DefaultValues[1], attribute.IsBang, attribute.IsToggle, attribute.AsInt); break; case 3: result.SetSubType3D(attribute.MinValue, attribute.MaxValue, attribute.StepSize, attribute.DefaultValues[0], attribute.DefaultValues[1], attribute.DefaultValues[2], attribute.IsBang, attribute.IsToggle, attribute.AsInt); break; case 4: result.SetSubType4D(attribute.MinValue, attribute.MaxValue, attribute.StepSize, attribute.DefaultValues[0], attribute.DefaultValues[1], attribute.DefaultValues[2], attribute.DefaultValues[3], attribute.IsBang, attribute.IsToggle, attribute.AsInt); break; default: result.SetSubType(attribute.MinValue, attribute.MaxValue, attribute.StepSize, attribute.DefaultValue, attribute.IsBang, attribute.IsToggle, attribute.AsInt); break; } result.Order = attribute.Order; return(result); }
//this method is called by vvvv when the node is created public void SetPluginHost(IPluginHost Host) { //assign host FHost = Host; //create inputs FHost.CreateValueConfig("Pin Count", 1, null, TSliceMode.Single, TPinVisibility.OnlyInspector, out FPinCountPin); FPinCountPin.SetSubType(1, double.MaxValue, 1, 2, false, false, true); FHost.CreateValueConfig("Cons Count", 1, null, TSliceMode.Single, TPinVisibility.OnlyInspector, out FPinCountCons); FPinCountCons.SetSubType(1, double.MaxValue, 1, 2, false, false, true); FHost.CreateValueInput("Input 1,1", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FInputPin1_1); FInputPin1_1.SetSubType(double.MinValue, double.MaxValue, 0.01, 0.0, false, false, false); FHost.CreateValueInput("Input 1,2", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FInputPin1_2); FInputPin1_2.SetSubType(double.MinValue, double.MaxValue, 0.01, 0.0, false, false, false); FHost.CreateValueInput("Select 1", 1, null, TSliceMode.Single, TPinVisibility.True, out FSelectPin1); FSelectPin1.SetSubType(0, double.MaxValue, 1, 1, false, false, true); FHost.CreateValueInput("Input 2,1", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FInputPin2_1); FInputPin2_1.SetSubType(double.MinValue, double.MaxValue, 0.01, 0.0, false, false, false); FHost.CreateValueInput("Input 2,2", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FInputPin2_2); FInputPin2_2.SetSubType(double.MinValue, double.MaxValue, 0.01, 0.0, false, false, false); FHost.CreateValueInput("Select 2", 1, null, TSliceMode.Single, TPinVisibility.True, out FSelectPin2); FSelectPin2.SetSubType(0, double.MaxValue, 1, 1, false, false, true); FInputPinList.Add(FInputPin1_1); FInputPinList.Add(FInputPin1_2); FInputPinList.Add(FInputPin2_1); FInputPinList.Add(FInputPin2_2); FSelectPinList.Add(FSelectPin1); FSelectPinList.Add(FSelectPin2); //create outputs FHost.CreateValueOutput("Output 1", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FOutputPin1); FOutputPin1.SetSubType(double.MinValue, double.MaxValue, 0.01, 0, false, false, false); FHost.CreateValueOutput("Output 2", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FOutputPin2); FOutputPin2.SetSubType(double.MinValue, double.MaxValue, 0.01, 0, false, false, false); FOutputPinList.Add(FOutputPin1); FOutputPinList.Add(FOutputPin2); }
//this method is called by vvvv when the node is created public void SetPluginHost(IPluginHost Host) { //assign host FHost = Host; //create inputs FHost.CreateStringInput("Remote Host", TSliceMode.Dynamic, TPinVisibility.True, out FRemoteHostStringInput); FRemoteHostStringInput.SetSubType("localhost", false); FHost.CreateValueInput("Remote Port", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FRemotePortValueInput); FRemotePortValueInput.SetSubType(0.0, 65535.0, 1.0, 4444.0, false, false, true); FHost.CreateStringInput("Input", TSliceMode.Dynamic, TPinVisibility.True, out FInputStringInput); FInputStringInput.SetSubType("", false); FHost.CreateValueInput("Send", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FDoSendValueInput); FDoSendValueInput.SetSubType(0.0, 1.0, 1.0, 0.0, true, false, false); FHost.CreateValueInput("Hold", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FHoldOutputInput); FHoldOutputInput.SetSubType(0.0, 1.0, 1.0, 0.0, false, true, false); FHost.CreateValueInput("Receive Buffer Size", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FReceiveBufferSizeInput); FReceiveBufferSizeInput.SetSubType(1.0, (double)int.MaxValue, 1.0, 8192.0, false, false, true); FHost.CreateValueInput("Receive Timeout", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FReceiveTimeoutInput); FReceiveTimeoutInput.SetSubType(0.0, int.MaxValue / 1000.0, 1.0, 0.0, false, false, false); FHost.CreateValueInput("Send Buffer Size", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FSendBufferSizeInput); FSendBufferSizeInput.SetSubType(1.0, (double)int.MaxValue, 1.0, 8192.0, false, false, true); FHost.CreateValueInput("Send Timeout", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FSendTimeoutInput); FSendTimeoutInput.SetSubType(0.0, int.MaxValue / 1000.0, 1.0, 0.0, false, false, false); FHost.CreateValueInput("Enable", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FEnableValueInput); FEnableValueInput.SetSubType(0.0, 1.0, 1.0, 1.0, false, true, false); //create outputs FHost.CreateStringOutput("Output", TSliceMode.Dynamic, TPinVisibility.True, out FOutputStringOutput); FOutputStringOutput.SetSubType("", false); FHost.CreateValueOutput("NewData", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FReceivedNewData); FReceivedNewData.SetSubType(0, 1, 1, 0, true, false, true); FHost.CreateValueOutput("Connected", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FConnectedValueOutput); FConnectedValueOutput.SetSubType(0.0, 1.0, 1.0, 0.0, false, true, false); }
public void Configurate(IPluginConfig Input) { if (Input == FPinCountPin || Input == FPinCountCons) { double countPin; double countCons; FPinCountPin.GetValue(0, out countPin); FPinCountCons.GetValue(0, out countCons); // delete all pins. for (int i = 0; i < FInputPinList.Count; i++) { IValueIn pinToDelete = FInputPinList[i]; FHost.DeletePin(pinToDelete); } for (int i = 0; i < FSelectPinList.Count; i++) { IValueIn pinToDelete = FSelectPinList[i]; FHost.DeletePin(pinToDelete); } for (int i = 0; i < FOutputPinList.Count; i++) { IValueOut pinToDelete = FOutputPinList[i]; FHost.DeletePin(pinToDelete); } FInputPinList.Clear(); FSelectPinList.Clear(); FOutputPinList.Clear(); // create new pins. for (int i = 0; i < countCons; i++) { for (int j = 0; j < countPin; j++) { IValueIn inputPin; FHost.CreateValueInput("Input " + (i + 1) + "," + (j + 1), 1, null, TSliceMode.Dynamic, TPinVisibility.True, out inputPin); inputPin.SetSubType(double.MinValue, double.MaxValue, 0.01, 0.0, false, false, false); FInputPinList.Add(inputPin); } IValueIn selectPin; FHost.CreateValueInput("Select " + (i + 1), 1, null, TSliceMode.Single, TPinVisibility.True, out selectPin); selectPin.SetSubType(0, double.MaxValue, 1, 1, false, false, true); FSelectPinList.Add(selectPin); } for (int i = 0; i < countPin; i++) { IValueOut outputPin; FHost.CreateValueOutput("Output " + (i + 1), 1, null, TSliceMode.Dynamic, TPinVisibility.True, out outputPin); outputPin.SetSubType(double.MinValue, double.MaxValue, 0.01, 0, false, false, false); FOutputPinList.Add(outputPin); } } }
//this method is called by vvvv when the node is created public void SetPluginHost(IPluginHost Host) { //assign host FHost = Host; //create inputs FHost.CreateValueInput("Refresh", 1, null, TSliceMode.Single, TPinVisibility.True, out FRefresh); FRefresh.SetSubType(0, 1, 1, 0, true, false, false); //create outputs FHost.CreateValueOutput("Resolution", 2, null, TSliceMode.Dynamic, TPinVisibility.True, out FResolutionOutput); FResolutionOutput.SetSubType2D(double.MinValue, double.MaxValue, 0.01, 0, 0, false, false, true); FHost.CreateValueOutput("Resolution Offset", 2, null, TSliceMode.Dynamic, TPinVisibility.True, out FResolutionOffsetOutput); FResolutionOffsetOutput.SetSubType2D(double.MinValue, double.MaxValue, 0.01, 0, 0, false, false, true); FHost.CreateValueOutput("Working Area", 2, null, TSliceMode.Dynamic, TPinVisibility.True, out FWorkAreaOutput); FWorkAreaOutput.SetSubType2D(double.MinValue, double.MaxValue, 0.01, 0, 0, false, false, true); FHost.CreateValueOutput("Working Area Offset", 2, null, TSliceMode.Dynamic, TPinVisibility.True, out FWorkAreaOffsetOutput); FWorkAreaOffsetOutput.SetSubType2D(double.MinValue, double.MaxValue, 0.01, 0, 0, false, false, true); FHost.CreateValueOutput("Bits Per Pixel", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FBitsPerPixel); FBitsPerPixel.SetSubType(0.0, 1.1, 0.01, 0, false, false, true); FHost.CreateStringOutput("Device Name", TSliceMode.Dynamic, TPinVisibility.True, out FDeviceName); FDeviceName.SetSubType("", false); FHost.CreateValueOutput("Is Primary", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FIsPrimary); FIsPrimary.SetSubType(0.0, 1.1, 0.01, 0, false, true, false); }