예제 #1
0
파일: SetJoint.cs 프로젝트: vnmone/vvvv-sdk
        //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
            FHost.CreateNodeInput("Skeleton", TSliceMode.Single, TPinVisibility.True, out FSkeletonInput);
            FSkeletonInput.SetSubType(guids, "Skeleton");

            FHost.CreateStringInput("Parent Name", TSliceMode.Dynamic, TPinVisibility.True, out FParentNameInput);

            FHost.CreateValueInput("Constraints", 2, null, TSliceMode.Dynamic, TPinVisibility.False, out FConstraintsInput);
            FConstraintsInput.SetSubType2D(-1.0, 1.0, 0.01, -1.0, 1.0, false, false, false);

            FHost.CreateTransformInput("Base Transform", TSliceMode.Dynamic, TPinVisibility.True, out FBaseTransformInput);

            FHost.CreateTransformInput("Animation Transform", TSliceMode.Dynamic, TPinVisibility.True, out FAnimationTransformInput);

            //FHost.CreateValueInput("Rotation", 3, null, TSliceMode.Dynamic, TPinVisibility.True, out FRotationInput);

            FHost.CreateStringInput("Joint Name", TSliceMode.Dynamic, TPinVisibility.True, out FJointNameInput);

            // create outputs

            FHost.CreateNodeOutput("Skeleton", TSliceMode.Single, TPinVisibility.True, out FSkeletonOutput);
            FSkeletonOutput.SetSubType(guids, "Skeleton");
        }
예제 #2
0
        //this method is called by vvvv when the node is created
        public void SetPluginHost(IPluginHost Host)
        {
            //assign host
            FHost = Host;

            var guids = new System.Guid[1];

            guids[0] = SkeletonNodeIO.GUID;

            //create inputs
            FHost.CreateStringInput("Joint Name", TSliceMode.Single, TPinVisibility.True, out FJointNameInput);
            FHost.CreateTransformInput("Base Transform", TSliceMode.Single, TPinVisibility.True, out FBaseTransformInput);
            String[] dimensions = new String[2];
            dimensions[0] = "Min";
            dimensions[1] = "Max";
            FHost.CreateValueInput("Rotation Constraints", 2, dimensions, TSliceMode.Dynamic, TPinVisibility.True, out FRotationConstraintsInput);
            FRotationConstraintsInput.SetSubType2D(-1.0, 1.0, 0.1, -1.0, 1.0, false, false, false);
            INodeIn node;

            FHost.CreateNodeInput("Child1", TSliceMode.Single, TPinVisibility.True, out node);
            node.SetSubType(guids, "Skeleton");
            FChildPins.Add(node);

            FHost.CreateValueConfig("Children Count", 1, null, TSliceMode.Single, TPinVisibility.OnlyInspector, out FChildrenCountInput);
            FChildrenCountInput.SetSubType(0, 50, 1.0, 1.0, false, false, true);

            // create outputs
            FHost.CreateNodeOutput("Skeleton", TSliceMode.Single, TPinVisibility.True, out FSkeletonOutput);
            FSkeletonOutput.SetSubType(guids, "Skeleton");
            FSkeletonOutput.MarkPinAsChanged();
        }
예제 #3
0
        //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

            FHost.CreateStringInput("Joint Name", TSliceMode.Dynamic, TPinVisibility.True, out FJointNameInput);

            FHost.CreateStringInput("Parent Name", TSliceMode.Dynamic, TPinVisibility.True, out FParentNameInput);

            FHost.CreateTransformInput("Base Transformation", TSliceMode.Dynamic, TPinVisibility.True, out FBaseTransformInput);

            String[] dimensions = new String[2];
            dimensions[0] = "Min";
            dimensions[1] = "Max";

            FHost.CreateValueInput("Constraints", 2, dimensions, TSliceMode.Dynamic, TPinVisibility.True, out FConstraintsInput);
            FConstraintsInput.SetSubType2D(-1.0, 1.0, 0.1, -1.0, 1.0, false, false, false);


            String[] offsetModes = new String[2];
            offsetModes[0] = "parent";
            offsetModes[1] = "world";
            FHost.UpdateEnum("OffsetModes", "parent", offsetModes);
            FHost.CreateEnumInput("Position relative to", TSliceMode.Single, TPinVisibility.True, out FOffsetModeInput);
            FOffsetModeInput.SetSubType("OffsetModes");

            FHost.CreateNodeOutput("Skeleton", TSliceMode.Single, TPinVisibility.True, out FSkeletonOutput);
            FSkeletonOutput.SetSubType(guids, "Skeleton");
        }
예제 #4
0
        public static ITransformIn CreateTransformInput(this IPluginHost host, InputAttribute attribute, Type type)
        {
            ITransformIn result = null;

            host.CreateTransformInput(attribute.Name, (TSliceMode)attribute.SliceMode, (TPinVisibility)attribute.Visibility, out result);
            SetInputProperties(result, attribute);
            return(result);
        }
예제 #5
0
 public DrawText(IPluginHost host)
 {
     host.CreateRenderStateInput(TSliceMode.Single, TPinVisibility.True, out FRenderStatePin);
     FRenderStatePin.Order = -2;
     host.CreateTransformInput("Transform", TSliceMode.Dynamic, TPinVisibility.True, out FTransformIn);
     FTransformIn.Order = -1;
     host.CreateLayerOutput("Layer", TPinVisibility.True, out FLayerOutput);
     FLayerOutput.Order = -1;
 }
예제 #6
0
        public static ITransformIn CreateTransformInput(this IPluginHost host, InputAttribute attribute, Type type)
        {
            ITransformIn result = null;

            host.CreateTransformInput(attribute.Name, (TSliceMode)attribute.SliceMode, (TPinVisibility)attribute.Visibility, out result);
            result.Order        = attribute.Order;
            result.AutoValidate = attribute.AutoValidate;
            return(result);
        }
예제 #7
0
        //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>();
        }
예제 #8
0
파일: DrawFlash.cs 프로젝트: VRaul/vvvv-sdk
        public DrawFlash(IPluginHost host)
        {
            host.CreateRenderStateInput(TSliceMode.Single, TPinVisibility.True, out FRenderStatePin);
            FRenderStatePin.Order = -2;
            host.CreateTransformInput("Transform", TSliceMode.Single, TPinVisibility.True, out FTransformIn);
            FTransformIn.Order = -1;
            host.CreateLayerOutput("Layer", TPinVisibility.True, out FLayerOutput);
            FLayerOutput.Order = -1;

            FLastKeyState = new List <int>();

            _FNUIMain = new FNUIMain();
            _FNUIMain.SetLicenseKey(0, LICENSENAME, LICENSENUMBER);
            _FNUIMain.CreateUI("");
        }
예제 #9
0
        //this method is called by vvvv when the node is created
        public void SetPluginHost(IPluginHost Host)
        {
            //assign host
            FHost = Host;

            //create inputs
            FHost.CreateValueInput("Vertices", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FVerticesInput);
            FHost.CreateValueInput("BindIndices", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FBindIndicesInput);
            FHost.CreateValueInput("SkinWeights", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FSkinWeightsInput);
            FHost.CreateValueInput("Indices", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FIndicesInput);
            FHost.CreateTransformInput("Joint Transformations", TSliceMode.Dynamic, TPinVisibility.True, out FJointTransformsInput);

            //outputs
            FHost.CreateValueOutput("Vertices XYZ", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FVerticesOutput);
        }
예제 #10
0
        //this method is called by vvvv when the node is created
        public void SetPluginHost(IPluginHost Host)
        {
            //assign host
            FHost = Host;

            //create inputs
            var guids = new System.Guid[1];

            guids[0] = SkeletonNodeIO.GUID;
            FHost.CreateNodeInput("Skeleton", TSliceMode.Single, TPinVisibility.True, out FSkeletonInput);
            FSkeletonInput.SetSubType(guids, "Skeleton");
            FHost.CreateTransformInput("Inverse Bind Pose", TSliceMode.Dynamic, TPinVisibility.True, out FInverseBindPoseInput);
            FHost.UpdateEnum("SkinningMatricesOutputMode", "Dynamic", new string[] { "Dynamic", "Fixed to 60" });
            FHost.CreateEnumInput("Output Transform Count", TSliceMode.Single, TPinVisibility.True, out FOutputModeInput);
            FOutputModeInput.SetSubType("SkinningMatricesOutputMode");
            FHost.CreateStringInput("Joint Name", TSliceMode.Dynamic, TPinVisibility.True, out FJointNameInput);

            // create outputs
            FHost.CreateTransformOutput("Transform", TSliceMode.Dynamic, TPinVisibility.True, out FTransformOutput);
        }
예제 #11
0
        //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
            FHost.CreateValueInput("Vertices", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FVerticesInput);

            FHost.CreateValueInput("BindIndices", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FBindIndicesInput);

            FHost.CreateValueInput("SkinWeights", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FSkinWeightsInput);

            FHost.CreateValueInput("Indices", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FIndicesInput);

            FHost.CreateTransformInput("Joint Transformations", TSliceMode.Dynamic, TPinVisibility.True, out FJointTransformsInput);

            //outputs
            FHost.CreateValueOutput("Vertices XYZ", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FVerticesOutput);
        }
예제 #12
0
        //this method is called by vvvv when the node is created
        public void SetPluginHost(IPluginHost Host)
        {
            //assign host
            FHost = Host;

            //create inputs
            FHost.CreateTransformInput("Transform In", TSliceMode.Dynamic, TPinVisibility.True, out FTransformInput);

            FHost.CreateValueInput("Upper Left Point ", 4, null, TSliceMode.Dynamic, TPinVisibility.True, out FP1Input);
            FP1Input.SetSubType4D(double.MinValue, double.MaxValue, 0.01, 0, 1, 0, 1, false, false, false);

            FHost.CreateValueInput("Upper Right Point ", 4, null, TSliceMode.Dynamic, TPinVisibility.True, out FP2Input);
            FP2Input.SetSubType4D(double.MinValue, double.MaxValue, 0.01, 1, 1, 0, 1, false, false, false);

            FHost.CreateValueInput("Lower Right Point ", 4, null, TSliceMode.Dynamic, TPinVisibility.True, out FP3Input);
            FP3Input.SetSubType4D(double.MinValue, double.MaxValue, 0.01, 1, 0, 0, 1, false, false, false);

            FHost.CreateValueInput("Lower Left Point ", 4, null, TSliceMode.Dynamic, TPinVisibility.True, out FP4Input);
            FP4Input.SetSubType4D(double.MinValue, double.MaxValue, 0.01, 0, 1, 0, 1, false, false, false);


            //create outputs
            FHost.CreateTransformOutput("Transform Out", TSliceMode.Dynamic, TPinVisibility.True, out FTransformOutput);
        }
예제 #13
0
        //this method is called by vvvv when the node is created
        public override void SetPluginHost(IPluginHost Host)
        {
            //assign host
            FHost = Host;

            //create inputs:

            //transform
            FHost.CreateTransformInput("Transform In", TSliceMode.Dynamic, TPinVisibility.True, out FTransformIn);

            //value
            FHost.CreateValueInput("Value Input ", 2, null, TSliceMode.Dynamic, TPinVisibility.True, out FValueIn);
            FValueIn.SetSubType2D(0, 1, 0.01, 0, 0, false, false, false);

            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
            FHost.CreateValueInput("Mouse X", 1, null, TSliceMode.Single, TPinVisibility.True, out FMouseXIn);
            FMouseXIn.SetSubType(double.MinValue, double.MaxValue, 0.01, 0, false, false, false);

            FHost.CreateValueInput("Mouse Y", 1, null, TSliceMode.Single, TPinVisibility.True, out FMouseYIn);
            FMouseYIn.SetSubType(double.MinValue, double.MaxValue, 0.01, 0, false, false, false);

            FHost.CreateValueInput("Mouse Left", 1, null, TSliceMode.Single, TPinVisibility.True, out FLeftButtonIn);
            FLeftButtonIn.SetSubType(0, 1, 1, 0, false, true, false);

            //color
            FHost.CreateColorInput("Color", TSliceMode.Dynamic, TPinVisibility.True, out FColorIn);
            FColorIn.SetSubType(new RGBAColor(0.2, 0.2, 0.2, 1), true);

            FHost.CreateColorInput("Mouse Over Color", TSliceMode.Dynamic, TPinVisibility.True, out FOverColorIn);
            FOverColorIn.SetSubType(new RGBAColor(0.5, 0.5, 0.5, 1), true);

            FHost.CreateColorInput("Activated Color", TSliceMode.Dynamic, TPinVisibility.True, out FActiveColorIn);
            FActiveColorIn.SetSubType(new RGBAColor(1, 1, 1, 1), true);

            FHost.CreateValueInput("Size Slider", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FSizeSliderIn);
            FSizeSliderIn.SetSubType(double.MinValue, double.MaxValue, 0.01, 0.02, false, false, false);

            FHost.CreateColorInput("Slider Color", TSliceMode.Dynamic, TPinVisibility.True, out FSliderColorIn);
            FSliderColorIn.SetSubType(new RGBAColor(1, 1, 1, 1), true);

            FHost.CreateValueInput("Slider Speed", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FSliderSpeedIn);
            FSliderSpeedIn.SetSubType(0, double.MaxValue, 0.01, 1, false, false, false);


            //create outputs
            FHost.CreateTransformOutput("Transform Out", TSliceMode.Dynamic, TPinVisibility.True, out FTransformOut);

            FHost.CreateColorOutput("Color", TSliceMode.Dynamic, TPinVisibility.True, out FColorOut);
            FColorOut.SetSubType(new RGBAColor(0.2, 0.2, 0.2, 1), true);

            FHost.CreateValueOutput("Value Output ", 2, null, TSliceMode.Dynamic, TPinVisibility.True, out FValueOut);
            FValueOut.SetSubType2D(0, 1, 0.01, 0, 0, false, false, false);

            FHost.CreateValueOutput("Active", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FActiveOut);
            FActiveOut.SetSubType(0, 1, 1, 0, false, true, false);

            FHost.CreateValueOutput("Hit", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FHitOut);
            FHitOut.SetSubType(0, 1, 1, 0, true, false, false);

            FHost.CreateValueOutput("Mouse Over", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FMouseOverOut);
            FMouseOverOut.SetSubType(0, 1, 1, 0, false, true, false);

            FHost.CreateValueOutput("Spread Counts", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FSpreadCountsOut);
            FSpreadCountsOut.SetSubType(0, double.MaxValue, 0.01, 0, false, false, true);

            //create config pin
            FHost.CreateValueConfig("Internal Value ", 2, null, TSliceMode.Dynamic, TPinVisibility.OnlyInspector, out FInternalValueConfig);
            FInternalValueConfig.SetSubType2D(0, 1, 0.01, 0, 0, false, false, false);

            FControllerGroups = new ArrayList();
        }