Ejemplo n.º 1
0
        public static IColorIn CreateColorInput(this IPluginHost host, InputAttribute attribute, Type type)
        {
            IColorIn result = null;

            host.CreateColorInput(attribute.Name, (TSliceMode)attribute.SliceMode, (TPinVisibility)attribute.Visibility, out result);
            result.SetSubType(new RGBAColor(attribute.DefaultColor), attribute.HasAlpha);
            SetInputProperties(result, attribute);
            return(result);
        }
Ejemplo n.º 2
0
        //this method is called by vvvv when the node is created
        public void SetPluginHost(IPluginHost Host)
        {
            //assign host
            FHost = Host;

            //create inputs
            FHost.CreateValueConfig("List Count", 1, null, TSliceMode.Single, TPinVisibility.OnlyInspector, out FListCount);
            FListCount.SetSubType(1, double.MaxValue, 1, 1, false, false, true);

            FHost.CreateValueConfig("Columns", 1, null, TSliceMode.Single, TPinVisibility.OnlyInspector, out FColumns);
            FColumns.SetSubType(1, double.MaxValue, 1, 1, false, false, true);

            FHost.CreateColorInput("List Item", TSliceMode.Dynamic, TPinVisibility.True, out FItems);
            FItems.SetSubType(VVVV.Utils.VColor.VColor.Green, true);

            FHost.CreateValueInput("Bin Size", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FBinSize);
            FBinSize.SetSubType(-1, double.MaxValue, 1, -1, false, false, true);

            FHost.CreateValueInput("Default Slice", 1, null, TSliceMode.Single, TPinVisibility.Hidden, out FDefault);
            FDefault.SetSubType(0, double.MaxValue, 1, 0, false, false, true);

            FHost.CreateValueInput("Select Item", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FSelectItem);
            FSelectItem.SetSubType(0, double.MaxValue, 1, 0, false, false, true);

            FHost.CreateValueInput("Do Select", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FDoSelect);
            FDoSelect.SetSubType(0, 1, 1, 0, true, false, false);


            //create outputs
            FHost.CreateValueOutput("Selected Index", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FSelectIndex);
            FSelectIndex.SetSubType(0, double.MaxValue, 0.01, 0, false, false, true);

            FHost.CreateColorOutput("Selected Color", TSliceMode.Dynamic, TPinVisibility.True, out FItem);
            FItem.SetSubType(VColor.White, true);

            FComboList.Add(startCombo);
        }
Ejemplo n.º 3
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();
        }
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
            FHost.CreateValueFastInput("X", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FXIn);
            FXIn.SetSubType(-1.0, 1.0, 0.01, 0, false, false, false);
            FHost.CreateValueFastInput("Y", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FYIn);
            FYIn.SetSubType(-1.0, 1.0, 0.01, 0, false, false, false);
            FHost.CreateColorInput("Color", TSliceMode.Dynamic, TPinVisibility.True, out FColorIn);
            FColorIn.SetSubType(VColor.White, false);
            FHost.CreateValueFastInput("Corner", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FCornerIn);
            FCornerIn.SetSubType(int.MinValue, int.MaxValue, 1.0, 0.0, false, false, true);
            FHost.CreateValueFastInput("Travel Blank", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FTravelBlankIn);
            FTravelBlankIn.SetSubType(int.MinValue, int.MaxValue, 1.0, 0.0, false, false, true);
            FHost.CreateValueFastInput("Frame Size", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FFrameSizeIn);
            FFrameSizeIn.SetSubType(int.MinValue, int.MaxValue, 1.0, -1.0, false, false, true);
            FHost.CreateValueFastInput("Frame", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FFrameIn);
            FFrameIn.SetSubType(1.0, int.MaxValue, 1.0, 1.0, false, false, true);
            FHost.CreateValueFastInput("Projection Zone", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FZoneIn);
            FZoneIn.SetSubType(1.0, 30.0, 1.0, 1.0, false, false, true);
            FHost.CreateValueFastInput("Frame Scan Rate", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FFrameScanRateIn);
            FFrameScanRateIn.SetSubType(-130.0, int.MaxValue, 1.0, 100.0, false, false, true);
            FHost.CreateValueFastInput("Animation Count", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FAnimationCountIn);
            FAnimationCountIn.SetSubType(0.0, int.MaxValue, 1.0, 0.0, false, false, true);
            FHost.CreateValueFastInput("Is Vector Frame", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FIsVectorFrameIn);
            FIsVectorFrameIn.SetSubType(0.0, 1.0, 1.0, 1.0, false, true, false);

            CreatePins(FVDPins);
            CreatePins(FSkewPins);

            FHost.CreateValueInput("Working Track", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FWorkingTrackIn);
            FWorkingTrackIn.SetSubType(-1.0, int.MaxValue, 1.0, 1.0, false, false, true);

            /*
             * FHost.CreateValueInput("Active Scanner", 1, null, TSliceMode.Dynamic, TPinVisibility.Hidden, out FActiveScannerIn);
             * FActiveScannerIn.SetSubType(-1.0, int.MaxValue, 1.0, -1.0, false, false, true);
             */
            FHost.CreateValueInput("Do Write", 1, null, TSliceMode.Single, TPinVisibility.True, out FDoWriteIn);
            FDoWriteIn.SetSubType(0.0, 1.0, 1.0, 0.0, false, true, false);

            //create configuration inputs
            FHost.CreateValueConfig("Scan Rate", 1, null, TSliceMode.Single, TPinVisibility.True, out FScanRateIn);
            FScanRateIn.SetSubType(25.0, 130000.0, 1.0, 30000.0, false, false, true);

            //create outputs
            FHost.CreateValueOutput("X", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FXOut);
            FXOut.SetSubType(-1.0, 1.0, 0.01, 0, false, false, false);
            FHost.CreateValueOutput("Y", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FYOut);
            FYOut.SetSubType(-1.0, 1.0, 0.01, 0, false, false, false);
            FHost.CreateColorOutput("Color", TSliceMode.Dynamic, TPinVisibility.True, out FColorOut);
            FColorOut.SetSubType(VColor.White, false);
            FHost.CreateValueOutput("Corner", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FCornerOut);
            FCornerOut.SetSubType(int.MinValue, int.MaxValue, 1.0, 0.0, false, false, true);
            FHost.CreateValueOutput("Frame Size", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FFrameSizeOut);
            FFrameSizeOut.SetSubType(int.MinValue, int.MaxValue, 1.0, -1.0, false, false, true);
            FHost.CreateValueOutput("Frame Scan Rate", 1, null, TSliceMode.Dynamic, TPinVisibility.OnlyInspector, out FFrameScanRateOut);
            FFrameScanRateOut.SetSubType(-130.0, int.MaxValue, 1.0, 100.0, false, false, true);
            FHost.CreateValueOutput("Projection Zone", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FZoneOut);
            FZoneOut.SetSubType(1.0, 30.0, 1.0, 1.0, false, false, true);
            FHost.CreateValueOutput("Animation Count", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FAnimationCountOut);
            FAnimationCountOut.SetSubType(0.0, int.MaxValue, 1.0, 0.0, false, false, true);
            FHost.CreateValueOutput("Is Vector Frame", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FIsVectorFrameOut);
            FIsVectorFrameOut.SetSubType(0.0, 1.0, 1.0, 0.0, false, true, false);
            FHost.CreateStringOutput("Status", TSliceMode.Single, TPinVisibility.True, out FStatusOut);

            RunLD();
        }