Ejemplo n.º 1
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("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;
        }
Ejemplo n.º 2
0
        public static ITransformOut CreateTransformOutput(this IPluginHost host, OutputAttribute attribute, Type type)
        {
            ITransformOut result = null;

            host.CreateTransformOutput(attribute.Name, (TSliceMode)attribute.SliceMode, (TPinVisibility)attribute.Visibility, out result);
            result.Order = attribute.Order;
            return(result);
        }
Ejemplo n.º 3
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>();
        }
Ejemplo n.º 4
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.CreateStringInput("Joint Name", TSliceMode.Dynamic, TPinVisibility.True, out FJointNameInput);

            // create outputs
            FHost.CreateValueOutput("ID", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FJointIdOutput);
            FJointIdOutput.SetSubType(0, 500, 1, 0, false, false, true);
            FHost.CreateStringOutput("Parent Name", TSliceMode.Dynamic, TPinVisibility.True, out FParentNameOutput);
            FHost.CreateTransformOutput("Base Transform", TSliceMode.Dynamic, TPinVisibility.True, out FBaseTransformOutput);
            FHost.CreateTransformOutput("Animation Transform", TSliceMode.Dynamic, TPinVisibility.True, out FAnimationTransformOutput);
        }
Ejemplo n.º 5
0
        public PluginColladaMesh(
            IPluginHost host,
            [Config("Opaque=1?", IsSingle = true, DefaultValue = 1)]
            IDiffSpread <bool> opaqueIsOneInput)
        {
            //the nodes constructor
            FDeviceMeshes           = new Dictionary <Device, Mesh>();
            FSelectedInstanceMeshes = new List <Model.InstanceMesh>();

            host.CreateMeshOutput("Mesh", TSliceMode.Dynamic, TPinVisibility.True, out FMyMeshOutput);
            FMyMeshOutput.Order = int.MinValue;
            host.CreateTransformOutput("Transforms", TSliceMode.Dynamic, TPinVisibility.True, out FTransformOutput);
            FTransformOutput.Order = int.MinValue + 1;
            host.CreateTransformOutput("Skinning Transforms", TSliceMode.Dynamic, TPinVisibility.True, out FSkinningTransformOutput);
            FSkinningTransformOutput.Order = int.MinValue + 2;
            host.CreateTransformOutput("Inverse Bind Pose Transforms", TSliceMode.Dynamic, TPinVisibility.OnlyInspector, out FInvBindPoseTransformOutput);
            host.CreateTransformOutput("Bind Shape Transform", TSliceMode.Dynamic, TPinVisibility.OnlyInspector, out FBindShapeTransformOutput);

            FOpaqueIsOneInput          = opaqueIsOneInput;
            FOpaqueIsOneInput.Changed += new SpreadChangedEventHander <bool>(FOpaqueIsOneInput_Changed);
        }
Ejemplo n.º 6
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);
        }
Ejemplo n.º 7
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);
        }
Ejemplo n.º 8
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();
        }