-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit '86eabd4e18b1e3e23bbe7c522c2be0b5ec226ca4' into develop
- Loading branch information
Showing
7 changed files
with
296 additions
and
8 deletions.
There are no files selected for viewing
131 changes: 131 additions & 0 deletions
131
vvvv45/addonpack/lib/nodes/plugins/RGB (Color Join Vector) help.v4p
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
<!DOCTYPE PATCH SYSTEM "http://vvvv.org/versions/vvvv45alpha31.6.dtd" > | ||
<PATCH nodename="E:\develop\vvvv-sdk\vvvv45\addonpack\lib\nodes\plugins\RGB (Color Join Vector) help.v4p" systemname="RGB (Color Join Vector) help" filename="E:\develop\vvvv-sdk\vvvv45\addonpack\lib\nodes\plugins\RGB (Color Join Vector) help.v4p"> | ||
<BOUNDS type="Window" left="9900" top="5100" width="9000" height="6000"> | ||
</BOUNDS> | ||
<NODE systemname="RGB (Color Join Vector)" filename="%VVVV%\addonpack\lib\nodes\plugins\RGBVector.dll" nodename="RGB (Color Join Vector)" componentmode="Hidden" id="1"> | ||
<BOUNDS type="Node" left="1005" top="3180" width="100" height="100"> | ||
</BOUNDS> | ||
<PIN pinname="XYZW" visible="1"> | ||
</PIN> | ||
<BOUNDS type="Box" left="1005" top="3180"> | ||
</BOUNDS> | ||
<PIN pinname=" RGBA" visible="1"> | ||
</PIN> | ||
</NODE> | ||
<NODE nodename="IOBox (Color)" componentmode="InABox" id="2" systemname="IOBox (Color)"> | ||
<BOUNDS type="Box" left="1005" top="3960" width="2775" height="480"> | ||
</BOUNDS> | ||
<BOUNDS type="Node" left="1005" top="3960" width="0" height="0"> | ||
</BOUNDS> | ||
<PIN pinname="Color Output" visible="1"> | ||
</PIN> | ||
</NODE> | ||
<LINK srcnodeid="1" srcpinname="Output" dstnodeid="2" dstpinname="Color Input"> | ||
</LINK> | ||
<NODE componentmode="InABox" id="5" nodename="IOBox (String)" systemname="IOBox (String)"> | ||
<BOUNDS height="255" left="150" top="525" type="Node" width="570"> | ||
</BOUNDS> | ||
<BOUNDS height="705" left="150" top="525" type="Box" width="4515"> | ||
</BOUNDS> | ||
<BOUNDS height="160" left="2100" top="35640" type="Window" width="215"> | ||
</BOUNDS> | ||
<PIN pinname="Input String" slicecount="1" visible="0" values="|convenience and performance saving nodes to create a color by specifying red, green, blue and alpha directly as spread, and vice versa|"> | ||
</PIN> | ||
<PIN pinname="Output String" visible="0"> | ||
</PIN> | ||
<PIN pinname="Show Grid" slicecount="1" values="0"> | ||
</PIN> | ||
</NODE> | ||
<NODE componentmode="InABox" id="4" nodename="IOBox (String)" systemname="IOBox (String)"> | ||
<BOUNDS height="270" left="150" top="150" type="Node" width="915"> | ||
</BOUNDS> | ||
<BOUNDS height="375" left="150" top="150" type="Box" width="3765"> | ||
</BOUNDS> | ||
<BOUNDS height="160" left="2100" top="35640" type="Window" width="215"> | ||
</BOUNDS> | ||
<PIN pinname="Input String" slicecount="1" visible="0" values="|RGB - Color Join/Split Vector|"> | ||
</PIN> | ||
<PIN pinname="Output String" visible="0"> | ||
</PIN> | ||
<PIN pinname="Show Grid" slicecount="1" values="0"> | ||
</PIN> | ||
<PIN pinname="Size" slicecount="1" values="12"> | ||
</PIN> | ||
</NODE> | ||
<NODE systemname="RGB (Color Split Vector)" filename="%VVVV%\addonpack\lib\nodes\plugins\RGBVector.dll" nodename="RGB (Color Split Vector)" componentmode="Hidden" id="6"> | ||
<BOUNDS type="Node" left="4770" top="3180" width="100" height="100"> | ||
</BOUNDS> | ||
<PIN pinname="Input" visible="1"> | ||
</PIN> | ||
<BOUNDS type="Box" left="4770" top="3180"> | ||
</BOUNDS> | ||
<PIN pinname=" RGBA" visible="1"> | ||
</PIN> | ||
</NODE> | ||
<NODE nodename="IOBox (Value Advanced)" componentmode="InABox" id="7" systemname="IOBox (Value Advanced)"> | ||
<BOUNDS type="Box" left="4770" top="3960" width="2760" height="405"> | ||
</BOUNDS> | ||
<BOUNDS type="Node" left="4770" top="3960" width="0" height="0"> | ||
</BOUNDS> | ||
<PIN pinname="Units" slicecount="1" values="||"> | ||
</PIN> | ||
<PIN pinname="Precision" slicecount="1" values="4"> | ||
</PIN> | ||
<PIN pinname="Vector Size" slicecount="1" values="4"> | ||
</PIN> | ||
<PIN pinname="Rows" slicecount="1" values="1"> | ||
</PIN> | ||
<PIN pinname="Y Input Value" slicecount="1" visible="1" values="0"> | ||
</PIN> | ||
<PIN pinname="Columns" slicecount="1" values="4"> | ||
</PIN> | ||
<PIN pinname="Descriptive Name" slicecount="1" values="|R || G || B || A|"> | ||
</PIN> | ||
<PIN pinname="Show Grid" slicecount="1" values="1"> | ||
</PIN> | ||
</NODE> | ||
<NODE nodename="IOBox (Value Advanced)" componentmode="InABox" id="8" systemname="IOBox (Value Advanced)"> | ||
<BOUNDS type="Box" left="1005" top="2145" width="2760" height="405"> | ||
</BOUNDS> | ||
<BOUNDS type="Node" left="1005" top="2145" width="0" height="0"> | ||
</BOUNDS> | ||
<PIN pinname="Units" slicecount="1" values="||"> | ||
</PIN> | ||
<PIN pinname="Precision" slicecount="1" values="4"> | ||
</PIN> | ||
<PIN pinname="Vector Size" slicecount="1" values="4"> | ||
</PIN> | ||
<PIN pinname="Rows" slicecount="1" values="1"> | ||
</PIN> | ||
<PIN pinname="Y Input Value" slicecount="4" values="1,1,0,0"> | ||
</PIN> | ||
<PIN pinname="Columns" slicecount="1" values="4"> | ||
</PIN> | ||
<PIN pinname="Descriptive Name" slicecount="1" values="|R || G || B || A|"> | ||
</PIN> | ||
<PIN pinname="Show Grid" slicecount="1" values="1"> | ||
</PIN> | ||
<PIN pinname="Y Output Value" visible="1"> | ||
</PIN> | ||
<PIN pinname="SliceCount Mode" slicecount="1" values="ColsRowsPages"> | ||
</PIN> | ||
</NODE> | ||
<LINK srcnodeid="8" srcpinname="Y Output Value" dstnodeid="1" dstpinname="XYZW"> | ||
</LINK> | ||
<NODE nodename="IOBox (Color)" componentmode="InABox" id="9" systemname="IOBox (Color)"> | ||
<BOUNDS type="Box" left="4770" top="2145" width="2775" height="495"> | ||
</BOUNDS> | ||
<BOUNDS type="Node" left="4770" top="2145" width="0" height="0"> | ||
</BOUNDS> | ||
<PIN pinname="Color Input" visible="1" slicecount="1" values="|0.00000,1.00000,1.00000,0.00000|"> | ||
</PIN> | ||
<PIN pinname="Color Output" visible="1"> | ||
</PIN> | ||
</NODE> | ||
<LINK srcnodeid="9" srcpinname="Color Output" dstnodeid="6" dstpinname="Input"> | ||
</LINK> | ||
<LINK srcnodeid="8" srcpinname="Y Output Value" dstnodeid="1" dstpinname=" RGBA"> | ||
</LINK> | ||
<LINK srcnodeid="6" srcpinname=" RGBA" dstnodeid="7" dstpinname="Y Input Value"> | ||
</LINK> | ||
</PATCH> |
Binary file added
BIN
+1.22 KB
vvvv45/addonpack/lib/nodes/plugins/RGB (Color Split Vector) help.v4p.lnk
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
vvvv45/addonpack/src/nodes/plugins/Color/RGBVector/Properties/AssemblyInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#region Using directives | ||
|
||
using System; | ||
using System.Reflection; | ||
using System.Runtime.InteropServices; | ||
|
||
#endregion | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("RGBVectorPlugin")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("woei")] | ||
[assembly: AssemblyProduct("RGBVectorPlugin")] | ||
[assembly: AssemblyCopyright("Copyright 2013")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// This sets the default COM visibility of types in the assembly to invisible. | ||
// If you need to expose a type to COM, use [ComVisible(true)] on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The assembly version has following format : | ||
// | ||
// Major.Minor.Build.Revision | ||
// | ||
// You can specify all the values or you can use the default the Revision and | ||
// Build Numbers by using the '*' as shown below: | ||
[assembly: AssemblyVersion("1.0.*")] |
31 changes: 31 additions & 0 deletions
31
vvvv45/addonpack/src/nodes/plugins/Color/RGBVector/RGBVector.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build"> | ||
<Import Project="..\..\Default.Plugin.Project.settings" /> | ||
<PropertyGroup> | ||
<OutputType>Library</OutputType> | ||
<RootNamespace>VVVV.Nodes</RootNamespace> | ||
<AssemblyName>RGBVector</AssemblyName> | ||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> | ||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="System.ComponentModel.Composition.Codeplex"> | ||
<HintPath>..\..\..\..\..\..\lib\core\System.ComponentModel.Composition.Codeplex.dll</HintPath> | ||
</Reference> | ||
<Reference Include="VVVV.PluginInterfaces"> | ||
<HintPath>..\..\..\..\..\..\lib\core\VVVV.PluginInterfaces.dll</HintPath> | ||
</Reference> | ||
<Reference Include="VVVV.Utils"> | ||
<HintPath>..\..\..\..\..\..\lib\core\VVVV.Utils.dll</HintPath> | ||
</Reference> | ||
<Reference Include="VVVV.UtilsIL"> | ||
<HintPath>..\..\..\..\..\..\lib\core\VVVV.UtilsIL.dll</HintPath> | ||
</Reference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="RGBVectorNode.cs" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" /> | ||
</Project> |
78 changes: 78 additions & 0 deletions
78
vvvv45/addonpack/src/nodes/plugins/Color/RGBVector/RGBVectorNode.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
#region usings | ||
using System; | ||
using System.ComponentModel.Composition; | ||
|
||
using VVVV.PluginInterfaces.V1; | ||
using VVVV.PluginInterfaces.V2; | ||
using VVVV.Utils; | ||
using VVVV.Utils.VMath; | ||
#endregion usings | ||
|
||
namespace VVVV.Nodes | ||
{ | ||
#region PluginInfo | ||
[PluginInfo(Name = "RGB", Category = "Color", Version = "Split Vector", Help = "splits a color in a vector with red, green, blue and alpha components", Author = "woei")] | ||
#endregion PluginInfo | ||
public unsafe class RGBVectorSplitNode : IPluginEvaluate | ||
{ | ||
#region fields & pins | ||
[Input("Input")] | ||
IColorIn FInPin; | ||
|
||
[Output("", Dimension = 4, DimensionNames = new string[]{"R","G","B","A"})] | ||
IValueOut FOutPin; | ||
#endregion fields & pins | ||
|
||
//called when data for any output pin is requested | ||
public void Evaluate(int SpreadMax) | ||
{ | ||
int inCount; | ||
double* inData, outData; | ||
|
||
FInPin.GetColorPointer(out inCount, out inData); | ||
|
||
FOutPin.SliceCount = inCount; | ||
FOutPin.GetValuePointer(out outData); | ||
|
||
for (int i=0; i<inCount*4; i++) | ||
outData[i] = inData[i]; | ||
// Memory.Copy(outData, inData, (uint)(inCount*4*sizeof(double))); | ||
} | ||
|
||
#region PluginInfo | ||
[PluginInfo(Name = "RGB", Category = "Color", Version = "Join Vector", Help = "creates a colour out of the red, green, blue and alpha components of a vector", Author = "woei")] | ||
#endregion PluginInfo | ||
public unsafe class RGBVectorJoinNode : IPluginEvaluate | ||
{ | ||
#region fields & pins | ||
[Input("", Dimension = 4, DimensionNames = new string[]{"R","G","B","A"}, DefaultValues = new double[]{0,1,0,1})] | ||
IValueFastIn FInPin; | ||
|
||
[Output("Output")] | ||
IColorOut FOutPin; | ||
#endregion fields & pins | ||
|
||
//called when data for any output pin is requested | ||
public void Evaluate(int spreadMax) | ||
{ | ||
int inCount; | ||
double* inData, outData; | ||
|
||
FInPin.GetValuePointer(out inCount, out inData); | ||
spreadMax =(int)Math.Ceiling((double)inCount/4.0); | ||
|
||
FOutPin.SliceCount = spreadMax; | ||
FOutPin.GetColorPointer(out outData); | ||
|
||
int incr = 0; | ||
for (int i=0; i<spreadMax*4; i++) | ||
{ | ||
outData[i] = inData[incr]; | ||
incr++; | ||
if (incr >= inCount) | ||
incr=0; | ||
} | ||
} | ||
} | ||
} | ||
} |