fix bug from refactor
This commit is contained in:
parent
de222b1d91
commit
a0a7df3e08
|
@ -34,12 +34,12 @@ namespace godotVmcSharp
|
||||||
}
|
}
|
||||||
if (m.Data[0].Type != 's')
|
if (m.Data[0].Type != 's')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "name", 's', m.Data[0].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "name", 's', m.Data[0].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[1].Type != 'f')
|
if (m.Data[1].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "value", 'f', m.Data[1].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "value", 'f', m.Data[1].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var blendShape = (string)m.Data[0].Value;
|
var blendShape = (string)m.Data[0].Value;
|
||||||
|
@ -61,7 +61,7 @@ namespace godotVmcSharp
|
||||||
Value = (float)m.Data[1].Value;
|
Value = (float)m.Data[1].Value;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
GD.Print($"Invalid argument for {addr}. BlendShape \"{blendShape}\" not in list.");
|
GD.Print($"Invalid argument for {Addr}. BlendShape \"{blendShape}\" not in list.");
|
||||||
}
|
}
|
||||||
|
|
||||||
public VmcExtBlendVal(string name, float value) : base(new OscAddress("VMC/Ext/Blend/Val"))
|
public VmcExtBlendVal(string name, float value) : base(new OscAddress("VMC/Ext/Blend/Val"))
|
||||||
|
@ -84,7 +84,7 @@ namespace godotVmcSharp
|
||||||
Value = value;
|
Value = value;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
GD.Print($"Invalid argument for {addr}. BlendShape \"{name}\" not in list.");
|
GD.Print($"Invalid argument for {Addr}. BlendShape \"{name}\" not in list.");
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool IsVrm0BlendShape(string name)
|
private bool IsVrm0BlendShape(string name)
|
||||||
|
@ -134,7 +134,7 @@ namespace godotVmcSharp
|
||||||
}
|
}
|
||||||
public new OscMessage ToMessage()
|
public new OscMessage ToMessage()
|
||||||
{
|
{
|
||||||
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument> {
|
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument> {
|
||||||
new OscArgument(Name, 's'),
|
new OscArgument(Name, 's'),
|
||||||
new OscArgument(Value, 'f')
|
new OscArgument(Value, 'f')
|
||||||
});
|
});
|
||||||
|
|
|
@ -30,47 +30,47 @@ namespace godotVmcSharp
|
||||||
{
|
{
|
||||||
if (m.Data.Count != 8)
|
if (m.Data.Count != 8)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid number of arguments for {addr}. Expected 8, received {m.Data.Count}.");
|
GD.Print($"Invalid number of arguments for {Addr}. Expected 8, received {m.Data.Count}.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[0].Type != 's')
|
if (m.Data[0].Type != 's')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "name", 's', m.Data[0].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "name", 's', m.Data[0].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[1].Type != 'f')
|
if (m.Data[1].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.x", 'f', m.Data[1].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.x", 'f', m.Data[1].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[2].Type != 'f')
|
if (m.Data[2].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.y", 'f', m.Data[2].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.y", 'f', m.Data[2].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[3].Type != 'f')
|
if (m.Data[3].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.z", 'f', m.Data[3].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.z", 'f', m.Data[3].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[4].Type != 'f')
|
if (m.Data[4].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.x", 'f', m.Data[4].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.x", 'f', m.Data[4].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[5].Type != 'f')
|
if (m.Data[5].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.y", 'f', m.Data[5].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.y", 'f', m.Data[5].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[6].Type != 'f')
|
if (m.Data[6].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.z", 'f', m.Data[6].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.z", 'f', m.Data[6].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[7].Type != 'f')
|
if (m.Data[7].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.w", 'f', m.Data[7].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.w", 'f', m.Data[7].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Name = (string)m.Data[0].Value;
|
Name = (string)m.Data[0].Value;
|
||||||
|
@ -86,7 +86,7 @@ namespace godotVmcSharp
|
||||||
public new OscMessage ToMessage()
|
public new OscMessage ToMessage()
|
||||||
{
|
{
|
||||||
var quat = Transform.Basis.GetRotationQuaternion();
|
var quat = Transform.Basis.GetRotationQuaternion();
|
||||||
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{
|
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{
|
||||||
new OscArgument(Name, 's'),
|
new OscArgument(Name, 's'),
|
||||||
new OscArgument(Transform.Origin.X, 'f'),
|
new OscArgument(Transform.Origin.X, 'f'),
|
||||||
new OscArgument(Transform.Origin.Y, 'f'),
|
new OscArgument(Transform.Origin.Y, 'f'),
|
||||||
|
|
|
@ -37,42 +37,42 @@ namespace godotVmcSharp
|
||||||
}
|
}
|
||||||
if (m.Data[0].Type != 's')
|
if (m.Data[0].Type != 's')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "name", 's', m.Data[0].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "name", 's', m.Data[0].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[1].Type != 'f')
|
if (m.Data[1].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.x", 'f', m.Data[1].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.x", 'f', m.Data[1].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[2].Type != 'f')
|
if (m.Data[2].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.y", 'f', m.Data[2].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.y", 'f', m.Data[2].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[3].Type != 'f')
|
if (m.Data[3].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.z", 'f', m.Data[3].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.z", 'f', m.Data[3].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[4].Type != 'f')
|
if (m.Data[4].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.x", 'f', m.Data[4].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.x", 'f', m.Data[4].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[5].Type != 'f')
|
if (m.Data[5].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.y", 'f', m.Data[5].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.y", 'f', m.Data[5].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[6].Type != 'f')
|
if (m.Data[6].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.z", 'f', m.Data[6].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.z", 'f', m.Data[6].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[7].Type != 'f')
|
if (m.Data[7].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.w", 'f', m.Data[7].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.w", 'f', m.Data[7].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[8].Type != 'f')
|
if (m.Data[8].Type != 'f')
|
||||||
|
@ -95,7 +95,7 @@ namespace godotVmcSharp
|
||||||
public new OscMessage ToMessage()
|
public new OscMessage ToMessage()
|
||||||
{
|
{
|
||||||
var quat = Transform.Basis.GetRotationQuaternion();
|
var quat = Transform.Basis.GetRotationQuaternion();
|
||||||
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{
|
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{
|
||||||
new OscArgument(Name, 's'),
|
new OscArgument(Name, 's'),
|
||||||
new OscArgument(Transform.Origin.X, 'f'),
|
new OscArgument(Transform.Origin.X, 'f'),
|
||||||
new OscArgument(Transform.Origin.Y, 'f'),
|
new OscArgument(Transform.Origin.Y, 'f'),
|
||||||
|
|
|
@ -39,37 +39,37 @@ namespace godotVmcSharp
|
||||||
}
|
}
|
||||||
if (m.Data[0].Type != 'i')
|
if (m.Data[0].Type != 'i')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "active", 'i', m.Data[0].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "active", 'i', m.Data[0].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[1].Type != 's')
|
if (m.Data[1].Type != 's')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "name", 's', m.Data[1].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "name", 's', m.Data[1].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[2].Type != 'i')
|
if (m.Data[2].Type != 'i')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "IsLeft", 'i', m.Data[2].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "IsLeft", 'i', m.Data[2].Type));
|
||||||
}
|
}
|
||||||
if (m.Data[3].Type != 'i')
|
if (m.Data[3].Type != 'i')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "IsTouch", 'i', m.Data[3].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "IsTouch", 'i', m.Data[3].Type));
|
||||||
}
|
}
|
||||||
if (m.Data[4].Type != 'i')
|
if (m.Data[4].Type != 'i')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "IsAxis", 'i', m.Data[4].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "IsAxis", 'i', m.Data[4].Type));
|
||||||
}
|
}
|
||||||
if (m.Data[5].Type != 'f')
|
if (m.Data[5].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "Axis.x", 'f', m.Data[5].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "Axis.x", 'f', m.Data[5].Type));
|
||||||
}
|
}
|
||||||
if (m.Data[6].Type != 'f')
|
if (m.Data[6].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "Axis.y", 'f', m.Data[6].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "Axis.y", 'f', m.Data[6].Type));
|
||||||
}
|
}
|
||||||
if (m.Data[7].Type != 'f')
|
if (m.Data[7].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "Axis.z", 'f', m.Data[7].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "Axis.z", 'f', m.Data[7].Type));
|
||||||
}
|
}
|
||||||
if ((int)m.Data[0].Value < 0 || (int)m.Data[0].Value > 2)
|
if ((int)m.Data[0].Value < 0 || (int)m.Data[0].Value > 2)
|
||||||
{
|
{
|
||||||
|
@ -88,7 +88,7 @@ namespace godotVmcSharp
|
||||||
{
|
{
|
||||||
if (active < 0 || active > 2)
|
if (active < 0 || active > 2)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid value for \"active\" 'i' argument of {addr}. Expected 0-2, received {active}");
|
GD.Print($"Invalid value for \"active\" 'i' argument of {Addr}. Expected 0-2, received {active}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Active = active;
|
Active = active;
|
||||||
|
@ -101,7 +101,7 @@ namespace godotVmcSharp
|
||||||
|
|
||||||
public new OscMessage ToMessage()
|
public new OscMessage ToMessage()
|
||||||
{
|
{
|
||||||
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{
|
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{
|
||||||
new OscArgument(Active, 'i'),
|
new OscArgument(Active, 'i'),
|
||||||
new OscArgument(Name, 's'),
|
new OscArgument(Name, 's'),
|
||||||
new OscArgument(IsLeft, 'i'),
|
new OscArgument(IsLeft, 'i'),
|
||||||
|
|
|
@ -29,12 +29,12 @@ namespace godotVmcSharp
|
||||||
{
|
{
|
||||||
if (m.Data.Count != 1)
|
if (m.Data.Count != 1)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid number of arguments for {addr}. Expecting 1, received {m.Data.Count}");
|
GD.Print($"Invalid number of arguments for {Addr}. Expecting 1, received {m.Data.Count}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[0].Type != 's')
|
if (m.Data[0].Type != 's')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "path", 's', m.Data[0].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "path", 's', m.Data[0].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Path = (string)m.Data[0].Value;
|
Path = (string)m.Data[0].Value;
|
||||||
|
@ -47,7 +47,7 @@ namespace godotVmcSharp
|
||||||
|
|
||||||
public new OscMessage ToMessage()
|
public new OscMessage ToMessage()
|
||||||
{
|
{
|
||||||
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument> { new OscArgument(Path, 's') });
|
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument> { new OscArgument(Path, 's') });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -30,54 +30,54 @@ namespace godotVmcSharp
|
||||||
{
|
{
|
||||||
if (m.Data.Count != 8)
|
if (m.Data.Count != 8)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid number of arguments for {base.addr}. Expected 8, received {m.Data.Count}.");
|
GD.Print($"Invalid number of arguments for {base.Addr}. Expected 8, received {m.Data.Count}.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[0].Type != 's')
|
if (m.Data[0].Type != 's')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "serial", 's', m.Data[0].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "serial", 's', m.Data[0].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[1].Type != 'f')
|
if (m.Data[1].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.x", 'f', m.Data[1].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.x", 'f', m.Data[1].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[2].Type != 'f')
|
if (m.Data[2].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.y", 'f', m.Data[2].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.y", 'f', m.Data[2].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[3].Type != 'f')
|
if (m.Data[3].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.z", 'f', m.Data[3].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.z", 'f', m.Data[3].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[4].Type != 'f')
|
if (m.Data[4].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.x", 'f', m.Data[4].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.x", 'f', m.Data[4].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[5].Type != 'f')
|
if (m.Data[5].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.y", 'f', m.Data[5].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.y", 'f', m.Data[5].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[6].Type != 'f')
|
if (m.Data[6].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.z", 'f', m.Data[6].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.z", 'f', m.Data[6].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[7].Type != 'f')
|
if (m.Data[7].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.w", 'f', m.Data[7].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.w", 'f', m.Data[7].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Serial = (string)m.Data[0].Value;
|
Serial = (string)m.Data[0].Value;
|
||||||
Transform = new Transform3D(new Basis(new Quaternion((float)m.Data[4].Value, (float)m.Data[5].Value, (float)m.Data[6].Value, (float)m.Data[7].Value)), new Vector3((float)m.Data[1].Value, (float)m.Data[2].Value, (float)m.Data[3].Value));
|
Transform = new Transform3D(new Basis(new Quaternion((float)m.Data[4].Value, (float)m.Data[5].Value, (float)m.Data[6].Value, (float)m.Data[7].Value)), new Vector3((float)m.Data[1].Value, (float)m.Data[2].Value, (float)m.Data[3].Value));
|
||||||
}
|
}
|
||||||
|
|
||||||
public VmcExtDevicePos(OscAddress addr, string serial, Transform3D transform) : base(addr)
|
public VmcExtDevicePos(OscAddress Addr, string serial, Transform3D transform) : base(Addr)
|
||||||
{
|
{
|
||||||
Serial = serial;
|
Serial = serial;
|
||||||
Transform = transform;
|
Transform = transform;
|
||||||
|
@ -86,7 +86,7 @@ namespace godotVmcSharp
|
||||||
public new OscMessage ToMessage()
|
public new OscMessage ToMessage()
|
||||||
{
|
{
|
||||||
var quat = Transform.Basis.GetRotationQuaternion();
|
var quat = Transform.Basis.GetRotationQuaternion();
|
||||||
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{
|
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{
|
||||||
new OscArgument(Serial, 's'),
|
new OscArgument(Serial, 's'),
|
||||||
new OscArgument(Transform.Origin.X, 'f'),
|
new OscArgument(Transform.Origin.X, 'f'),
|
||||||
new OscArgument(Transform.Origin.Y, 'f'),
|
new OscArgument(Transform.Origin.Y, 'f'),
|
||||||
|
|
|
@ -30,22 +30,22 @@ namespace godotVmcSharp
|
||||||
{
|
{
|
||||||
if (m.Data[0].Type != 'i')
|
if (m.Data[0].Type != 'i')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "active", 'i', m.Data[0].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "active", 'i', m.Data[0].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[1].Type != 's')
|
if (m.Data[1].Type != 's')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "name", 's', m.Data[1].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "name", 's', m.Data[1].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[2].Type != 'i')
|
if (m.Data[2].Type != 'i')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "keycode", 'i', m.Data[2].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "keycode", 'i', m.Data[2].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((int)m.Data[0].Value < 0 || (int)m.Data[0].Value > 1)
|
if ((int)m.Data[0].Value < 0 || (int)m.Data[0].Value > 1)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid value for \"active\" 'i' argument of {addr}. Expected 0 or 1, received {(int)m.Data[0].Value}");
|
GD.Print($"Invalid value for \"active\" 'i' argument of {Addr}. Expected 0 or 1, received {(int)m.Data[0].Value}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Active = (int)m.Data[0].Value;
|
Active = (int)m.Data[0].Value;
|
||||||
|
@ -57,7 +57,7 @@ namespace godotVmcSharp
|
||||||
{
|
{
|
||||||
if (active < 0 || active > 1)
|
if (active < 0 || active > 1)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid value for \"active\" 'i' argument of {addr}. Expected 0 or 1, received {active}");
|
GD.Print($"Invalid value for \"active\" 'i' argument of {Addr}. Expected 0 or 1, received {active}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Active = active;
|
Active = active;
|
||||||
|
@ -67,7 +67,7 @@ namespace godotVmcSharp
|
||||||
|
|
||||||
public new OscMessage ToMessage()
|
public new OscMessage ToMessage()
|
||||||
{
|
{
|
||||||
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{
|
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{
|
||||||
new OscArgument(Active, 'i'),
|
new OscArgument(Active, 'i'),
|
||||||
new OscArgument(Name, 's'),
|
new OscArgument(Name, 's'),
|
||||||
new OscArgument(Keycode, 'i')
|
new OscArgument(Keycode, 'i')
|
||||||
|
|
|
@ -32,67 +32,67 @@ namespace godotVmcSharp
|
||||||
{
|
{
|
||||||
if (m.Data.Count != 12)
|
if (m.Data.Count != 12)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid number of arguments for {base.addr}. Expected 12, received {m.Data.Count}.");
|
GD.Print($"Invalid number of arguments for {base.Addr}. Expected 12, received {m.Data.Count}.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[0].Type != 's')
|
if (m.Data[0].Type != 's')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "name", 's', m.Data[0].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "name", 's', m.Data[0].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[1].Type != 'f')
|
if (m.Data[1].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.x", 'f', m.Data[1].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.x", 'f', m.Data[1].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[2].Type != 'f')
|
if (m.Data[2].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.y", 'f', m.Data[2].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.y", 'f', m.Data[2].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[3].Type != 'f')
|
if (m.Data[3].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.z", 'f', m.Data[3].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.z", 'f', m.Data[3].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[4].Type != 'f')
|
if (m.Data[4].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.x", 'f', m.Data[4].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.x", 'f', m.Data[4].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[5].Type != 'f')
|
if (m.Data[5].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.y", 'f', m.Data[5].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.y", 'f', m.Data[5].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[6].Type != 'f')
|
if (m.Data[6].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.z", 'f', m.Data[6].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.z", 'f', m.Data[6].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[7].Type != 'f')
|
if (m.Data[7].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.w", 'f', m.Data[7].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.w", 'f', m.Data[7].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[8].Type != 'f')
|
if (m.Data[8].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "color.red", 'f', m.Data[8].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "color.red", 'f', m.Data[8].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[9].Type != 'f')
|
if (m.Data[9].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "color.blue", 'f', m.Data[9].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "color.blue", 'f', m.Data[9].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[10].Type != 'f')
|
if (m.Data[10].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "color.green", 'f', m.Data[10].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "color.green", 'f', m.Data[10].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[11].Type != 'f')
|
if (m.Data[11].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "color.alpha", 'f', m.Data[11].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "color.alpha", 'f', m.Data[11].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Name = (string)m.Data[0].Value;
|
Name = (string)m.Data[0].Value;
|
||||||
|
@ -110,7 +110,7 @@ namespace godotVmcSharp
|
||||||
public new OscMessage ToMessage()
|
public new OscMessage ToMessage()
|
||||||
{
|
{
|
||||||
var quat = Transform.Basis.GetRotationQuaternion();
|
var quat = Transform.Basis.GetRotationQuaternion();
|
||||||
return new OscMessage(addr, new List<OscArgument>{
|
return new OscMessage(Addr, new List<OscArgument>{
|
||||||
new OscArgument(Name, 's'),
|
new OscArgument(Name, 's'),
|
||||||
new OscArgument(Transform.Origin.X, 'f'),
|
new OscArgument(Transform.Origin.X, 'f'),
|
||||||
new OscArgument(Transform.Origin.Y, 'f'),
|
new OscArgument(Transform.Origin.Y, 'f'),
|
||||||
|
|
|
@ -29,17 +29,17 @@ namespace godotVmcSharp
|
||||||
{
|
{
|
||||||
if (m.Data[0].Type != 'i')
|
if (m.Data[0].Type != 'i')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "knob", 'i', m.Data[0].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "knob", 'i', m.Data[0].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[1].Type != 'i')
|
if (m.Data[1].Type != 'i')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "active", 'i', m.Data[1].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "active", 'i', m.Data[1].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((int)m.Data[1].Value < 0 || (int)m.Data[1].Value > 1)
|
if ((int)m.Data[1].Value < 0 || (int)m.Data[1].Value > 1)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid value for \"active\" argument of {addr}. Expected 0 or 1, received {(int)m.Data[1].Value}.");
|
GD.Print($"Invalid value for \"active\" argument of {Addr}. Expected 0 or 1, received {(int)m.Data[1].Value}.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Knob = (int)m.Data[0].Value;
|
Knob = (int)m.Data[0].Value;
|
||||||
|
@ -50,7 +50,7 @@ namespace godotVmcSharp
|
||||||
{
|
{
|
||||||
if (active < 0 || active > 1)
|
if (active < 0 || active > 1)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid value for \"active\" argument of {addr}. Expected 0 or 1, received {active}.");
|
GD.Print($"Invalid value for \"active\" argument of {Addr}. Expected 0 or 1, received {active}.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Knob = knob;
|
Knob = knob;
|
||||||
|
@ -59,7 +59,7 @@ namespace godotVmcSharp
|
||||||
|
|
||||||
public new OscMessage ToMessage()
|
public new OscMessage ToMessage()
|
||||||
{
|
{
|
||||||
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{
|
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{
|
||||||
new OscArgument(Knob, 'i'),
|
new OscArgument(Knob, 'i'),
|
||||||
new OscArgument(Active, 'i')
|
new OscArgument(Active, 'i')
|
||||||
});
|
});
|
||||||
|
|
|
@ -29,12 +29,12 @@ namespace godotVmcSharp
|
||||||
{
|
{
|
||||||
if (m.Data[0].Type != 'i')
|
if (m.Data[0].Type != 'i')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "knob", 'i', m.Data[0].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "knob", 'i', m.Data[0].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[1].Type != 'f')
|
if (m.Data[1].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "value", 'f', m.Data[1].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "value", 'f', m.Data[1].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Knob = (int)m.Data[0].Value;
|
Knob = (int)m.Data[0].Value;
|
||||||
|
@ -49,7 +49,7 @@ namespace godotVmcSharp
|
||||||
|
|
||||||
public new OscMessage ToMessage()
|
public new OscMessage ToMessage()
|
||||||
{
|
{
|
||||||
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{
|
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{
|
||||||
new OscArgument(Knob, 'i'),
|
new OscArgument(Knob, 'i'),
|
||||||
new OscArgument(Value, 'f')
|
new OscArgument(Value, 'f')
|
||||||
});
|
});
|
||||||
|
|
|
@ -32,27 +32,27 @@ namespace godotVmcSharp
|
||||||
{
|
{
|
||||||
if (m.Data[0].Type != 'i')
|
if (m.Data[0].Type != 'i')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "active", 'i', m.Data[0].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "active", 'i', m.Data[0].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[1].Type != 'i')
|
if (m.Data[1].Type != 'i')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "channel", 'i', m.Data[1].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "channel", 'i', m.Data[1].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[2].Type != 'i')
|
if (m.Data[2].Type != 'i')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "note", 'i', m.Data[2].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "note", 'i', m.Data[2].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[3].Type != 'f')
|
if (m.Data[3].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "velocity", 'f', m.Data[4].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "velocity", 'f', m.Data[4].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((int)m.Data[0].Value < 0 || (int)m.Data[0].Value > 1)
|
if ((int)m.Data[0].Value < 0 || (int)m.Data[0].Value > 1)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid value for \"active\" 'i' argument of {addr}. Expected 0 or 1, received {(int)m.Data[0].Value}");
|
GD.Print($"Invalid value for \"active\" 'i' argument of {Addr}. Expected 0 or 1, received {(int)m.Data[0].Value}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Active = (int)m.Data[0].Value;
|
Active = (int)m.Data[0].Value;
|
||||||
|
@ -65,7 +65,7 @@ namespace godotVmcSharp
|
||||||
{
|
{
|
||||||
if (active < 0 || active > 1)
|
if (active < 0 || active > 1)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid value for \"active\" 'i' argument of {addr}. Expected 0 or 1, received {Active}.");
|
GD.Print($"Invalid value for \"active\" 'i' argument of {Addr}. Expected 0 or 1, received {Active}.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Active = active;
|
Active = active;
|
||||||
|
@ -76,7 +76,7 @@ namespace godotVmcSharp
|
||||||
|
|
||||||
public new OscMessage ToMessage()
|
public new OscMessage ToMessage()
|
||||||
{
|
{
|
||||||
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{
|
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{
|
||||||
new OscArgument(Active, 'i'),
|
new OscArgument(Active, 'i'),
|
||||||
new OscArgument(Channel, 'i'),
|
new OscArgument(Channel, 'i'),
|
||||||
new OscArgument(Note, 'i'),
|
new OscArgument(Note, 'i'),
|
||||||
|
|
|
@ -192,19 +192,19 @@ namespace godotVmcSharp
|
||||||
{
|
{
|
||||||
if (CalibrationState == null)
|
if (CalibrationState == null)
|
||||||
{
|
{
|
||||||
return new OscMessage(addr, new List<OscArgument>{
|
return new OscMessage(Addr, new List<OscArgument>{
|
||||||
new OscArgument(Loaded, 'i')
|
new OscArgument(Loaded, 'i')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (TrackingStatus == null)
|
if (TrackingStatus == null)
|
||||||
{
|
{
|
||||||
return new OscMessage(addr, new List<OscArgument>{
|
return new OscMessage(Addr, new List<OscArgument>{
|
||||||
new OscArgument(Loaded, 'i'),
|
new OscArgument(Loaded, 'i'),
|
||||||
new OscArgument(CalibrationState, 'i'),
|
new OscArgument(CalibrationState, 'i'),
|
||||||
new OscArgument(CalibrationMode, 'i')
|
new OscArgument(CalibrationMode, 'i')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return new OscMessage(addr, new List<OscArgument>{
|
return new OscMessage(Addr, new List<OscArgument>{
|
||||||
new OscArgument(Loaded, 'i'),
|
new OscArgument(Loaded, 'i'),
|
||||||
new OscArgument(CalibrationState, 'i'),
|
new OscArgument(CalibrationState, 'i'),
|
||||||
new OscArgument(CalibrationMode, 'i'),
|
new OscArgument(CalibrationMode, 'i'),
|
||||||
|
|
|
@ -29,12 +29,12 @@ namespace godotVmcSharp
|
||||||
{
|
{
|
||||||
if (m.Data.Count != 1)
|
if (m.Data.Count != 1)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid number of arguments for {addr}. Expecting 1, received {m.Data.Count}");
|
GD.Print($"Invalid number of arguments for {Addr}. Expecting 1, received {m.Data.Count}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[0].Type != 's')
|
if (m.Data[0].Type != 's')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "option", 's', m.Data[0].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "option", 's', m.Data[0].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
option = (string)m.Data[0].Value;
|
option = (string)m.Data[0].Value;
|
||||||
|
@ -47,7 +47,7 @@ namespace godotVmcSharp
|
||||||
|
|
||||||
public new OscMessage ToMessage()
|
public new OscMessage ToMessage()
|
||||||
{
|
{
|
||||||
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{new OscArgument(option, 's')});
|
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{new OscArgument(option, 's')});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -32,27 +32,27 @@ namespace godotVmcSharp
|
||||||
{
|
{
|
||||||
if (m.Data.Count > 3 || m.Data.Count < 2)
|
if (m.Data.Count > 3 || m.Data.Count < 2)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid number of arguments for {addr}. Expecting 2 or 3, received {m.Data.Count}");
|
GD.Print($"Invalid number of arguments for {Addr}. Expecting 2 or 3, received {m.Data.Count}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[0].Type != 'i')
|
if (m.Data[0].Type != 'i')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "enable", 'i', m.Data[0].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "enable", 'i', m.Data[0].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[1].Type != 'i')
|
if (m.Data[1].Type != 'i')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "port", 'i', m.Data[0].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "port", 'i', m.Data[0].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((int)m.Data[0].Value < 0 || (int)m.Data[0].Value > 1)
|
if ((int)m.Data[0].Value < 0 || (int)m.Data[0].Value > 1)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid value for \"enable\" argument of {addr}. Expected 0 or 1, received {(int)m.Data[0].Value}.");
|
GD.Print($"Invalid value for \"enable\" argument of {Addr}. Expected 0 or 1, received {(int)m.Data[0].Value}.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((int)m.Data[1].Value < 0 || (int)m.Data[1].Value > 65535)
|
if ((int)m.Data[1].Value < 0 || (int)m.Data[1].Value > 65535)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid value for \"port\" argument of {addr}. Expected 0-65535, received {(int)m.Data[1].Value}.");
|
GD.Print($"Invalid value for \"port\" argument of {Addr}. Expected 0-65535, received {(int)m.Data[1].Value}.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Enable = (int)m.Data[0].Value;
|
Enable = (int)m.Data[0].Value;
|
||||||
|
@ -64,7 +64,7 @@ namespace godotVmcSharp
|
||||||
}
|
}
|
||||||
if (m.Data[2].Type != 's')
|
if (m.Data[2].Type != 's')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "IpAddress", 's', m.Data[2].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "IpAddress", 's', m.Data[2].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
IpAddress = (string)m.Data[2].Value;
|
IpAddress = (string)m.Data[2].Value;
|
||||||
|
@ -74,12 +74,12 @@ namespace godotVmcSharp
|
||||||
{
|
{
|
||||||
if (enable < 0 || enable > 1)
|
if (enable < 0 || enable > 1)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid value for \"enable\" argument of {addr}. Expected 0 or 1, received {enable}.");
|
GD.Print($"Invalid value for \"enable\" argument of {Addr}. Expected 0 or 1, received {enable}.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (port < 0 || port > 65535)
|
if (port < 0 || port > 65535)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid value for \"port\" argument of {addr}. Expected 0-65535, received {port}.");
|
GD.Print($"Invalid value for \"port\" argument of {Addr}. Expected 0-65535, received {port}.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Enable = enable;
|
Enable = enable;
|
||||||
|
@ -91,12 +91,12 @@ namespace godotVmcSharp
|
||||||
{
|
{
|
||||||
if (enable < 0 || enable > 1)
|
if (enable < 0 || enable > 1)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid value for \"enable\" argument of {addr}. Expected 0 or 1, received {enable}.");
|
GD.Print($"Invalid value for \"enable\" argument of {Addr}. Expected 0 or 1, received {enable}.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (port < 0 || port > 65535)
|
if (port < 0 || port > 65535)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid value for \"port\" argument of {addr}. Expected 0-65535, received {port}.");
|
GD.Print($"Invalid value for \"port\" argument of {Addr}. Expected 0-65535, received {port}.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Enable = enable;
|
Enable = enable;
|
||||||
|
@ -108,12 +108,12 @@ namespace godotVmcSharp
|
||||||
{
|
{
|
||||||
if (IpAddress == "")
|
if (IpAddress == "")
|
||||||
{
|
{
|
||||||
return new OscMessage(addr, new List<OscArgument>{
|
return new OscMessage(Addr, new List<OscArgument>{
|
||||||
new OscArgument(Enable, 'i'),
|
new OscArgument(Enable, 'i'),
|
||||||
new OscArgument(Port, 'i'),
|
new OscArgument(Port, 'i'),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return new OscMessage(addr, new List<OscArgument>{
|
return new OscMessage(Addr, new List<OscArgument>{
|
||||||
new OscArgument(Enable, 'i'),
|
new OscArgument(Enable, 'i'),
|
||||||
new OscArgument(Port, 'i'),
|
new OscArgument(Port, 'i'),
|
||||||
new OscArgument(IpAddress, 's'),
|
new OscArgument(IpAddress, 's'),
|
||||||
|
|
|
@ -30,17 +30,17 @@ namespace godotVmcSharp
|
||||||
{
|
{
|
||||||
if (m.Data.Count != 2)
|
if (m.Data.Count != 2)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid number of arguments for {addr} message. Expected 2 but received {m.Data.Count}");
|
GD.Print($"Invalid number of arguments for {Addr} message. Expected 2 but received {m.Data.Count}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[0].Type != 's')
|
if (m.Data[0].Type != 's')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "service", 's', m.Data[0].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "service", 's', m.Data[0].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[1].Type != 's')
|
if (m.Data[1].Type != 's')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "json", 's', m.Data[1].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "json", 's', m.Data[1].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Service = (string)m.Data[0].Value;
|
Service = (string)m.Data[0].Value;
|
||||||
|
@ -55,7 +55,7 @@ namespace godotVmcSharp
|
||||||
|
|
||||||
public new OscMessage ToMessage()
|
public new OscMessage ToMessage()
|
||||||
{
|
{
|
||||||
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{
|
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{
|
||||||
new OscArgument(Service, 's'),
|
new OscArgument(Service, 's'),
|
||||||
new OscArgument(Json, 's')
|
new OscArgument(Json, 's')
|
||||||
});
|
});
|
||||||
|
|
|
@ -54,7 +54,7 @@ namespace godotVmcSharp
|
||||||
Offset = new Vector3((float)m.Data[11].Value, (float)m.Data[12].Value, (float)m.Data[13].Value);
|
Offset = new Vector3((float)m.Data[11].Value, (float)m.Data[12].Value, (float)m.Data[13].Value);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
GD.Print($"Invalid number of arguments for {addr}. Expected 8 or 14, received {m.Data.Count}.");
|
GD.Print($"Invalid number of arguments for {Addr}. Expected 8 or 14, received {m.Data.Count}.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -77,42 +77,42 @@ namespace godotVmcSharp
|
||||||
{
|
{
|
||||||
if (data[0].Type != 's')
|
if (data[0].Type != 's')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "name", 's', data[0].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "name", 's', data[0].Type));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (data[1].Type != 'f')
|
if (data[1].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.x", 'f', data[1].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.x", 'f', data[1].Type));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (data[2].Type != 'f')
|
if (data[2].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.y", 'f', data[2].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.y", 'f', data[2].Type));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (data[3].Type != 'f')
|
if (data[3].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.z", 'f', data[3].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.z", 'f', data[3].Type));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (data[4].Type != 'f')
|
if (data[4].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.x", 'f', data[4].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.x", 'f', data[4].Type));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (data[5].Type != 'f')
|
if (data[5].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.y", 'f', data[5].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.y", 'f', data[5].Type));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (data[6].Type != 'f')
|
if (data[6].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.z", 'f', data[6].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.z", 'f', data[6].Type));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (data[7].Type != 'f')
|
if (data[7].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "q.w", 'f', data[7].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "q.w", 'f', data[7].Type));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -126,32 +126,32 @@ namespace godotVmcSharp
|
||||||
}
|
}
|
||||||
if (data[8].Type != 'f')
|
if (data[8].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "s.x", 'f', data[8].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "s.x", 'f', data[8].Type));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (data[9].Type != 'f')
|
if (data[9].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "s.y", 'f', data[9].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "s.y", 'f', data[9].Type));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (data[10].Type != 'f')
|
if (data[10].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "s.z", 'f', data[10].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "s.z", 'f', data[10].Type));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (data[11].Type != 'f')
|
if (data[11].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "o.x", 'f', data[11].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "o.x", 'f', data[11].Type));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (data[12].Type != 'f')
|
if (data[12].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "o.y", 'f', data[12].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "o.y", 'f', data[12].Type));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (data[13].Type != 'f')
|
if (data[13].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "o.z", 'f', data[13].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "o.z", 'f', data[13].Type));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -162,7 +162,7 @@ namespace godotVmcSharp
|
||||||
var quat = Transform.Basis.GetRotationQuaternion();
|
var quat = Transform.Basis.GetRotationQuaternion();
|
||||||
if (!Scale.HasValue)
|
if (!Scale.HasValue)
|
||||||
{
|
{
|
||||||
return new OscMessage(addr, new List<OscArgument>{
|
return new OscMessage(Addr, new List<OscArgument>{
|
||||||
new OscArgument(Name, 's'),
|
new OscArgument(Name, 's'),
|
||||||
new OscArgument(Transform.Origin.X, 'f'),
|
new OscArgument(Transform.Origin.X, 'f'),
|
||||||
new OscArgument(Transform.Origin.Y, 'f'),
|
new OscArgument(Transform.Origin.Y, 'f'),
|
||||||
|
@ -173,7 +173,7 @@ namespace godotVmcSharp
|
||||||
new OscArgument(quat.W, 'f'),
|
new OscArgument(quat.W, 'f'),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return new OscMessage(addr, new List<OscArgument>{
|
return new OscMessage(Addr, new List<OscArgument>{
|
||||||
new OscArgument(Name, 's'),
|
new OscArgument(Name, 's'),
|
||||||
new OscArgument(Transform.Origin.X, 'f'),
|
new OscArgument(Transform.Origin.X, 'f'),
|
||||||
new OscArgument(Transform.Origin.Y, 'f'),
|
new OscArgument(Transform.Origin.Y, 'f'),
|
||||||
|
|
|
@ -29,12 +29,12 @@ namespace godotVmcSharp
|
||||||
{
|
{
|
||||||
if (m.Data.Count != 1)
|
if (m.Data.Count != 1)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid number of arguments for {addr}. Expecting 1, received {m.Data.Count}");
|
GD.Print($"Invalid number of arguments for {Addr}. Expecting 1, received {m.Data.Count}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[0].Type != 'i')
|
if (m.Data[0].Type != 'i')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "mode", 'i', m.Data[0].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "mode", 'i', m.Data[0].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((int)m.Data[0].Value < 0 || (int)m.Data[0].Value > 2)
|
if ((int)m.Data[0].Value < 0 || (int)m.Data[0].Value > 2)
|
||||||
|
@ -57,7 +57,7 @@ namespace godotVmcSharp
|
||||||
|
|
||||||
public new OscMessage ToMessage()
|
public new OscMessage ToMessage()
|
||||||
{
|
{
|
||||||
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{new OscArgument(Mode, 'i')});
|
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{new OscArgument(Mode, 'i')});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -29,12 +29,12 @@ namespace godotVmcSharp
|
||||||
{
|
{
|
||||||
if (m.Data.Count != 1)
|
if (m.Data.Count != 1)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid number of arguments for {addr}. Expecting 1, received {m.Data.Count}");
|
GD.Print($"Invalid number of arguments for {Addr}. Expecting 1, received {m.Data.Count}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[0].Type != 's')
|
if (m.Data[0].Type != 's')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "path", 's', m.Data[0].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "path", 's', m.Data[0].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Path = (string)m.Data[0].Value;
|
Path = (string)m.Data[0].Value;
|
||||||
|
@ -47,7 +47,7 @@ namespace godotVmcSharp
|
||||||
|
|
||||||
public new OscMessage ToMessage()
|
public new OscMessage ToMessage()
|
||||||
{
|
{
|
||||||
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{new OscArgument(Path, 's')});
|
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{new OscArgument(Path, 's')});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -30,27 +30,27 @@ namespace godotVmcSharp
|
||||||
{
|
{
|
||||||
if (m.Data.Count != 4)
|
if (m.Data.Count != 4)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid number of arguments for {addr}. Expecting 4, received {m.Data.Count}");
|
GD.Print($"Invalid number of arguments for {Addr}. Expecting 4, received {m.Data.Count}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[0].Type != 'i')
|
if (m.Data[0].Type != 'i')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "enable", 'i', m.Data[0].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "enable", 'i', m.Data[0].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[1].Type != 'f')
|
if (m.Data[1].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.x", 'f', m.Data[1].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.x", 'f', m.Data[1].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[2].Type != 'f')
|
if (m.Data[2].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.y", 'f', m.Data[2].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.y", 'f', m.Data[2].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[3].Type != 'f')
|
if (m.Data[3].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "p.z", 'f', m.Data[3].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "p.z", 'f', m.Data[3].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Enable = (int)m.Data[0].Value;
|
Enable = (int)m.Data[0].Value;
|
||||||
|
@ -65,7 +65,7 @@ namespace godotVmcSharp
|
||||||
|
|
||||||
public new OscMessage ToMessage()
|
public new OscMessage ToMessage()
|
||||||
{
|
{
|
||||||
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{
|
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{
|
||||||
new OscArgument(Enable, 'i'),
|
new OscArgument(Enable, 'i'),
|
||||||
new OscArgument(Position.X, 'f'),
|
new OscArgument(Position.X, 'f'),
|
||||||
new OscArgument(Position.Y, 'f'),
|
new OscArgument(Position.Y, 'f'),
|
||||||
|
|
|
@ -34,37 +34,37 @@ namespace godotVmcSharp
|
||||||
{
|
{
|
||||||
if (m.Data.Count != 6)
|
if (m.Data.Count != 6)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid number of arguments for {addr}. Expecting 6, received {m.Data.Count}");
|
GD.Print($"Invalid number of arguments for {Addr}. Expecting 6, received {m.Data.Count}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[0].Type != 'i')
|
if (m.Data[0].Type != 'i')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "status", 'i', m.Data[0].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "status", 'i', m.Data[0].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[1].Type != 'i')
|
if (m.Data[1].Type != 'i')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "root", 'i', m.Data[1].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "root", 'i', m.Data[1].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[2].Type != 'i')
|
if (m.Data[2].Type != 'i')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "bone", 'i', m.Data[2].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "bone", 'i', m.Data[2].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[3].Type != 'i')
|
if (m.Data[3].Type != 'i')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "blendShape", 'i', m.Data[3].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "blendShape", 'i', m.Data[3].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[4].Type != 'i')
|
if (m.Data[4].Type != 'i')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "camera", 'i', m.Data[4].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "camera", 'i', m.Data[4].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[5].Type != 'i')
|
if (m.Data[5].Type != 'i')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "devices", 'i', m.Data[5].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "devices", 'i', m.Data[5].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Status = (int)m.Data[0].Value;
|
Status = (int)m.Data[0].Value;
|
||||||
|
@ -87,7 +87,7 @@ namespace godotVmcSharp
|
||||||
|
|
||||||
public new OscMessage ToMessage()
|
public new OscMessage ToMessage()
|
||||||
{
|
{
|
||||||
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{
|
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{
|
||||||
new OscArgument(Status, 'i'),
|
new OscArgument(Status, 'i'),
|
||||||
new OscArgument(Root, 'i'),
|
new OscArgument(Root, 'i'),
|
||||||
new OscArgument(Bone, 'i'),
|
new OscArgument(Bone, 'i'),
|
||||||
|
|
|
@ -30,12 +30,12 @@ namespace godotVmcSharp
|
||||||
{
|
{
|
||||||
if (m.Data.Count != 1)
|
if (m.Data.Count != 1)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid number of arguments for {addr}. Expecting 1, received {m.Data.Count}");
|
GD.Print($"Invalid number of arguments for {Addr}. Expecting 1, received {m.Data.Count}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[0].Type != 's')
|
if (m.Data[0].Type != 's')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "response", 's', m.Data[0].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "response", 's', m.Data[0].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Response = (string)m.Data[0].Value;
|
Response = (string)m.Data[0].Value;
|
||||||
|
@ -48,7 +48,7 @@ namespace godotVmcSharp
|
||||||
|
|
||||||
public new OscMessage ToMessage()
|
public new OscMessage ToMessage()
|
||||||
{
|
{
|
||||||
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{new OscArgument(Response, 's')});
|
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{new OscArgument(Response, 's')});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -29,12 +29,12 @@ namespace godotVmcSharp
|
||||||
{
|
{
|
||||||
if (m.Data.Count != 1)
|
if (m.Data.Count != 1)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid number of arguments for {addr}. Expecting 1, received {m.Data.Count}");
|
GD.Print($"Invalid number of arguments for {Addr}. Expecting 1, received {m.Data.Count}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[0].Type != 's')
|
if (m.Data[0].Type != 's')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "shortcut", 's', m.Data[0].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "shortcut", 's', m.Data[0].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Shortcut = (string)m.Data[0].Value;
|
Shortcut = (string)m.Data[0].Value;
|
||||||
|
@ -47,7 +47,7 @@ namespace godotVmcSharp
|
||||||
|
|
||||||
public new OscMessage ToMessage()
|
public new OscMessage ToMessage()
|
||||||
{
|
{
|
||||||
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{new OscArgument(Shortcut, 's')});
|
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{new OscArgument(Shortcut, 's')});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -30,27 +30,27 @@ namespace godotVmcSharp
|
||||||
{
|
{
|
||||||
if (m.Data.Count != 4)
|
if (m.Data.Count != 4)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid number of arguments for {addr}. Expecting 4, received {m.Data.Count}");
|
GD.Print($"Invalid number of arguments for {Addr}. Expecting 4, received {m.Data.Count}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[0].Type != 'f')
|
if (m.Data[0].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "r", 'f', m.Data[0].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "r", 'f', m.Data[0].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[1].Type != 'f')
|
if (m.Data[1].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "g", 'f', m.Data[1].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "g", 'f', m.Data[1].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[2].Type != 'f')
|
if (m.Data[2].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "b", 'f', m.Data[2].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "b", 'f', m.Data[2].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[3].Type != 'f')
|
if (m.Data[3].Type != 'f')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "a", 'f', m.Data[3].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "a", 'f', m.Data[3].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Color = new Godot.Color((float)m.Data[0].Value, (float)m.Data[1].Value, (float)m.Data[2].Value, (float)m.Data[3].Value);
|
Color = new Godot.Color((float)m.Data[0].Value, (float)m.Data[1].Value, (float)m.Data[2].Value, (float)m.Data[3].Value);
|
||||||
|
@ -63,7 +63,7 @@ namespace godotVmcSharp
|
||||||
|
|
||||||
public OscMessage ToMessage()
|
public OscMessage ToMessage()
|
||||||
{
|
{
|
||||||
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{
|
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{
|
||||||
new OscArgument(Color.R, 'f'),
|
new OscArgument(Color.R, 'f'),
|
||||||
new OscArgument(Color.G, 'f'),
|
new OscArgument(Color.G, 'f'),
|
||||||
new OscArgument(Color.B, 'f'),
|
new OscArgument(Color.B, 'f'),
|
||||||
|
|
|
@ -32,47 +32,47 @@ namespace godotVmcSharp
|
||||||
{
|
{
|
||||||
if (m.Data.Count != 4)
|
if (m.Data.Count != 4)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid number of arguments for {addr}. Expecting 4, received {m.Data.Count}");
|
GD.Print($"Invalid number of arguments for {Addr}. Expecting 4, received {m.Data.Count}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[0].Type != 'i')
|
if (m.Data[0].Type != 'i')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "isTopMost", 'i', m.Data[0].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "isTopMost", 'i', m.Data[0].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[1].Type != 'i')
|
if (m.Data[1].Type != 'i')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "isTransparent", 'i', m.Data[1].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "isTransparent", 'i', m.Data[1].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[2].Type != 'i')
|
if (m.Data[2].Type != 'i')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "windowClickThrough", 'i', m.Data[2].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "windowClickThrough", 'i', m.Data[2].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[3].Type != 'i')
|
if (m.Data[3].Type != 'i')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "hideBorder", 'i', m.Data[3].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "hideBorder", 'i', m.Data[3].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((int)m.Data[0].Value < 0 || (int)m.Data[0].Value > 1)
|
if ((int)m.Data[0].Value < 0 || (int)m.Data[0].Value > 1)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid value for \"isTopMost\" 'i' argument of {addr}. Expected 0 or 1, received {(int)m.Data[0].Value}");
|
GD.Print($"Invalid value for \"isTopMost\" 'i' argument of {Addr}. Expected 0 or 1, received {(int)m.Data[0].Value}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((int)m.Data[1].Value < 0 || (int)m.Data[1].Value > 1)
|
if ((int)m.Data[1].Value < 0 || (int)m.Data[1].Value > 1)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid value for \"isTransparent\" 'i' argument of {addr}. Expected 0 or 1, received {(int)m.Data[1].Value}");
|
GD.Print($"Invalid value for \"isTransparent\" 'i' argument of {Addr}. Expected 0 or 1, received {(int)m.Data[1].Value}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((int)m.Data[2].Value < 0 || (int)m.Data[2].Value > 1)
|
if ((int)m.Data[2].Value < 0 || (int)m.Data[2].Value > 1)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid value for \"windowClickThrough\" 'i' argument of {addr}. Expected 0 or 1, received {(int)m.Data[2].Value}");
|
GD.Print($"Invalid value for \"windowClickThrough\" 'i' argument of {Addr}. Expected 0 or 1, received {(int)m.Data[2].Value}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((int)m.Data[3].Value < 0 || (int)m.Data[3].Value > 1)
|
if ((int)m.Data[3].Value < 0 || (int)m.Data[3].Value > 1)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid value for \"hideBorder\" 'i' argument of {addr}. Expected 0 or 1, received {(int)m.Data[3].Value}");
|
GD.Print($"Invalid value for \"hideBorder\" 'i' argument of {Addr}. Expected 0 or 1, received {(int)m.Data[3].Value}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
IsTopMost = (int)m.Data[0].Value;
|
IsTopMost = (int)m.Data[0].Value;
|
||||||
|
@ -85,22 +85,22 @@ namespace godotVmcSharp
|
||||||
{
|
{
|
||||||
if (isTopMost < 0 || isTopMost > 1)
|
if (isTopMost < 0 || isTopMost > 1)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid value for \"isTopMost\" 'i' argument of {addr}. Expected 0 or 1, received {isTopMost}");
|
GD.Print($"Invalid value for \"isTopMost\" 'i' argument of {Addr}. Expected 0 or 1, received {isTopMost}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (isTransparent < 0 || isTransparent > 1)
|
if (isTransparent < 0 || isTransparent > 1)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid value for \"isTransparent\" 'i' argument of {addr}. Expected 0 or 1, received {isTransparent}");
|
GD.Print($"Invalid value for \"isTransparent\" 'i' argument of {Addr}. Expected 0 or 1, received {isTransparent}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (windowClickThrough < 0 || windowClickThrough > 1)
|
if (windowClickThrough < 0 || windowClickThrough > 1)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid value for \"windowClickThrough\" 'i' argument of {addr}. Expected 0 or 1, received {windowClickThrough}");
|
GD.Print($"Invalid value for \"windowClickThrough\" 'i' argument of {Addr}. Expected 0 or 1, received {windowClickThrough}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (hideBorder < 0 || hideBorder > 1)
|
if (hideBorder < 0 || hideBorder > 1)
|
||||||
{
|
{
|
||||||
GD.Print($"Invalid value for \"hideBorder\" 'i' argument of {addr}. Expected 0 or 1, received {hideBorder}");
|
GD.Print($"Invalid value for \"hideBorder\" 'i' argument of {Addr}. Expected 0 or 1, received {hideBorder}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
IsTopMost = isTopMost;
|
IsTopMost = isTopMost;
|
||||||
|
@ -111,7 +111,7 @@ namespace godotVmcSharp
|
||||||
|
|
||||||
public new OscMessage ToMessage()
|
public new OscMessage ToMessage()
|
||||||
{
|
{
|
||||||
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{
|
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{
|
||||||
new OscArgument(IsTopMost, 'i'),
|
new OscArgument(IsTopMost, 'i'),
|
||||||
new OscArgument(IsTransparent, 'i'),
|
new OscArgument(IsTransparent, 'i'),
|
||||||
new OscArgument(WindowClickThrough, 'i'),
|
new OscArgument(WindowClickThrough, 'i'),
|
||||||
|
|
|
@ -46,7 +46,7 @@ namespace godotVmcSharp
|
||||||
|
|
||||||
public new OscMessage ToMessage()
|
public new OscMessage ToMessage()
|
||||||
{
|
{
|
||||||
return new OscMessage(addr, new System.Collections.Generic.List<OscArgument>{
|
return new OscMessage(Addr, new System.Collections.Generic.List<OscArgument>{
|
||||||
new OscArgument(Time, 'f')
|
new OscArgument(Time, 'f')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,12 +35,12 @@ namespace godotVmcSharp
|
||||||
case 2:
|
case 2:
|
||||||
if (m.Data[0].Type != 's')
|
if (m.Data[0].Type != 's')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "path", 's', m.Data[0].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "path", 's', m.Data[0].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[1].Type != 's')
|
if (m.Data[1].Type != 's')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "title", 's', m.Data[1].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "title", 's', m.Data[1].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Path = (string)m.Data[0].Value;
|
Path = (string)m.Data[0].Value;
|
||||||
|
@ -50,17 +50,17 @@ namespace godotVmcSharp
|
||||||
case 3:
|
case 3:
|
||||||
if (m.Data[0].Type != 's')
|
if (m.Data[0].Type != 's')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "path", 's', m.Data[0].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "path", 's', m.Data[0].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[1].Type != 's')
|
if (m.Data[1].Type != 's')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "title", 's', m.Data[1].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "title", 's', m.Data[1].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (m.Data[2].Type != 's')
|
if (m.Data[2].Type != 's')
|
||||||
{
|
{
|
||||||
GD.Print(InvalidArgumentType.GetErrorString(addr, "hash", 's', m.Data[1].Type));
|
GD.Print(InvalidArgumentType.GetErrorString(Addr, "hash", 's', m.Data[1].Type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Path = (string)m.Data[0].Value;
|
Path = (string)m.Data[0].Value;
|
||||||
|
@ -68,7 +68,7 @@ namespace godotVmcSharp
|
||||||
Hash = (string)m.Data[2].Value;
|
Hash = (string)m.Data[2].Value;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
GD.Print($"Invalid number of arguments for {addr} message. Expected 2 or 3 but received {m.Data.Count}");
|
GD.Print($"Invalid number of arguments for {Addr} message. Expected 2 or 3 but received {m.Data.Count}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -91,12 +91,12 @@ namespace godotVmcSharp
|
||||||
{
|
{
|
||||||
if (Hash == null)
|
if (Hash == null)
|
||||||
{
|
{
|
||||||
return new OscMessage(addr, new List<OscArgument>{
|
return new OscMessage(Addr, new List<OscArgument>{
|
||||||
new OscArgument(Path, 's'),
|
new OscArgument(Path, 's'),
|
||||||
new OscArgument(Title, 's')
|
new OscArgument(Title, 's')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return new OscMessage(addr, new List<OscArgument>{
|
return new OscMessage(Addr, new List<OscArgument>{
|
||||||
new OscArgument(Path, 's'),
|
new OscArgument(Path, 's'),
|
||||||
new OscArgument(Title, 's'),
|
new OscArgument(Title, 's'),
|
||||||
new OscArgument(Hash, 's')
|
new OscArgument(Hash, 's')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user