//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; FHost.CreateValueConfig("Number of Input Poses", 1, null, TSliceMode.Single, TPinVisibility.OnlyInspector, out FPoseCount); FPoseCount.SetSubType(2, 10, 1, 2, false, false, true); //create inputs FHost.CreateValueInput("Input", 1, null, TSliceMode.Single, TPinVisibility.True, out FInput); FInput.SetSubType(0.0, 1.0, 0.01, 0.0, false, false, false); INodeIn currPoseNode; for (int i = 0; i < 2; i++) { FHost.CreateNodeInput("Pose " + (i + 1), TSliceMode.Single, TPinVisibility.True, out currPoseNode); currPoseNode.SetSubType(guids, "Skeleton"); FPoseNodes.Add(currPoseNode); FPoses.Add(null); } // create outputs FHost.CreateNodeOutput("Mixed Pose", TSliceMode.Single, TPinVisibility.True, out FPoseOutput); FPoseOutput.SetSubType(guids, "Skeleton"); }
//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.CreateValueConfig("Number of Input Poses", 1, null, TSliceMode.Single, TPinVisibility.OnlyInspector, out FPoseCount); FPoseCount.SetSubType(2, 10, 1, 2, false, false, true); INodeIn currPoseNode; IValueIn currAmountNode; for (int i = 0; i < 2; i++) { FHost.CreateNodeInput("Pose " + (i + 1), TSliceMode.Single, TPinVisibility.True, out currPoseNode); currPoseNode.SetSubType(guids, "Skeleton"); poseNodes.Add(currPoseNode); FHost.CreateValueInput("Amount " + (i + 1), 1, null, TSliceMode.Single, TPinVisibility.True, out currAmountNode); currAmountNode.SetSubType(0.0, 1.0, 0.01, 0.0, false, false, false); amountNodes.Add(currAmountNode); poses.Add(null); amounts.Add(1 - i); } // create outputs FHost.CreateNodeOutput("Mixed Pose", TSliceMode.Single, TPinVisibility.True, out FPoseOutput); FPoseOutput.SetSubType(guids, "Skeleton"); }
//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"); }
public void OnImportsSatisfied() { var guids = new[] { SkeletonNodeIO.GUID }; FHost.CreateNodeInput("V1 Skeleton", TSliceMode.Single, TPinVisibility.True, out V1SkeletonIn); V1SkeletonIn.SetSubType(guids, "Skeleton"); }
public void Configurate(IPluginConfig Input) { //nothing to configure in this plugin //only used in conjunction with inputs of type cmpdConfigurate if (Input.Name == "Number of Input Poses") { IValueConfig valueInput = (IValueConfig)Input; valueInput.GetValue(0, out poseCount); FInput.SetSubType(0, poseCount - 1, 0.01, 0.0, false, false, false); int oldPoseCount = FPoseNodes.Count; for (int i = oldPoseCount - 1; i >= (int)poseCount; i--) { FHost.DeletePin(FPoseNodes[i]); } for (int i = oldPoseCount - 1; i >= (int)poseCount; i--) { FPoseNodes.RemoveAt(i); FPoses.RemoveAt(i); } var guids = new System.Guid[1]; guids[0] = SkeletonNodeIO.GUID; INodeIn currPoseNode; for (int i = oldPoseCount; i < (int)poseCount; i++) { FHost.CreateNodeInput("Pose " + (i + 1), TSliceMode.Single, TPinVisibility.True, out currPoseNode); currPoseNode.SetSubType(guids, "Skeleton"); FPoseNodes.Add(currPoseNode); FPoses.Add(null); } } }
//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; 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; 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(); }
public void Configurate(IPluginConfig Input) { if (Input.Name == "Children Count") { IValueConfig valueInput = (IValueConfig)Input; double pinCount; valueInput.GetValue(0, out pinCount); int oldChildrenCount = FChildPins.Count; for (int i = oldChildrenCount - 1; i >= (int)pinCount; i--) { FHost.DeletePin(FChildPins[i]); } for (int i = oldChildrenCount - 1; i >= (int)pinCount; i--) { FChildPins.RemoveAt(i); } var guids = new System.Guid[1]; guids[0] = SkeletonNodeIO.GUID; INodeIn node; for (int i = oldChildrenCount; i < pinCount; i++) { FHost.CreateNodeInput("Child" + (i + 1), TSliceMode.Single, TPinVisibility.True, out node); node.SetSubType(guids, "Skeleton"); FChildPins.Add(node); } } }
public static INodeIn CreateNodeInput(this IPluginHost host, InputAttribute attribute, Type type) { INodeIn result = null; host.CreateNodeInput(attribute.Name, (TSliceMode)attribute.SliceMode, (TPinVisibility)attribute.Visibility, out result); result.SetSubType2(type, new Guid[] { type.GUID }, type.GetCSharpName()); SetInputProperties(result, attribute); return(result); }
//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; FHost.CreateNodeInput("Skeleton", TSliceMode.Single, TPinVisibility.True, out FSkeletonInput); FSkeletonInput.SetSubType(guids, "Skeleton"); FHost.CreateStringConfig("Selection", TSliceMode.Dynamic, TPinVisibility.Hidden, out FSelectionInput); //create outputs FHost.CreateStringOutput("Joint Name", TSliceMode.Dynamic, TPinVisibility.True, out FJointNameOutput); }
//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("Skeleton", TSliceMode.Single, TPinVisibility.True, out FSkeletonInput); FSkeletonInput.SetSubType(guids, "Skeleton"); FHost.CreateStringConfig("Selection", TSliceMode.Dynamic, TPinVisibility.Hidden, out FSelectionInput); FHost.CreateStringOutput("Joint Name", TSliceMode.Dynamic, TPinVisibility.True, out FJointNameOutput); }
public void SetPluginHost(IPluginHost host) { if (host == null) { return; } // create inputs FHost = host; var guids = new System.Guid[1]; guids[0] = SkeletonNodeIO.GUID; FHost.CreateNodeInput("Skeleton", TSliceMode.Single, TPinVisibility.True, out FSkeletonInput); FSkeletonInput.SetSubType2(typeof(ISkeleton), guids, "Skeleton"); // create outputs FHost.CreateStringOutput("Joint Name", TSliceMode.Dynamic, TPinVisibility.True, out FJointNameOutput); FHost.CreateStringOutput("Parent Name", TSliceMode.Dynamic, TPinVisibility.True, out FParentNameOutput); }
public void Configurate(IPluginConfig Input) { //nothing to configure in this plugin //only used in conjunction with inputs of type cmpdConfigurate if (Input.Name == "Number of Input Poses") { System.Guid[] guids = new System.Guid[1]; guids[0] = new Guid("AB312E34-8025-40F2-8241-1958793F3D39"); IValueConfig valueInput = (IValueConfig)Input; valueInput.GetValue(0, out poseCount); int oldPoseCount = poseNodes.Count; for (int i = oldPoseCount - 1; i >= (int)poseCount; i--) { FHost.DeletePin(poseNodes[i]); FHost.DeletePin(amountNodes[i]); } for (int i = oldPoseCount - 1; i >= (int)poseCount; i--) { poseNodes.RemoveAt(i); amountNodes.RemoveAt(i); poses.RemoveAt(i); amounts.RemoveAt(i); } INodeIn currPoseNode; IValueIn currAmountNode; for (int i = oldPoseCount; i < (int)poseCount; i++) { FHost.CreateNodeInput("Pose " + (i + 1), TSliceMode.Single, TPinVisibility.True, out currPoseNode); currPoseNode.SetSubType(guids, "Skeleton"); poseNodes.Add(currPoseNode); FHost.CreateValueInput("Amount " + (i + 1), 1, null, TSliceMode.Single, TPinVisibility.True, out currAmountNode); currAmountNode.SetSubType(0.0, 1.0, 0.01, 0.0, false, false, false); amountNodes.Add(currAmountNode); poses.Add(null); amounts.Add(0.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); }
//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); }
public void OnImportsSatisfied() { PluginHost.CreateNodeInput("Input", TSliceMode.Dynamic, TPinVisibility.True, out Pin); Pin.SetSubType2(null, new Guid[] { }, "Variant"); }
public GenericInput(IPluginHost plgh, IOAttribute attr) { plgh.CreateNodeInput(attr.Name, (TSliceMode)attr.SliceMode, (TPinVisibility)attr.Visibility, out Pin); Pin.SetSubType2(null, new Guid[] { }, "Variant"); }
public GenericBinSizedInput(IPluginHost plgh, IOAttribute attr) { plgh.CreateNodeInput(attr.Name, (TSliceMode)attr.SliceMode, (TPinVisibility)attr.Visibility, out Pin); plgh.CreateValueInput(attr.Name + " Bin Size", 1, new[] { "X" }, TSliceMode.Dynamic, (TPinVisibility)attr.Visibility, out BinSizePin); Pin.SetSubType2(null, new Guid[] { }, "Variant"); }
} ~SkeletonGetJointListNode() { Dispose(false);