Skip to content

Commit

Permalink
Add OSCmoothLayer,Params
Browse files Browse the repository at this point in the history
  • Loading branch information
YukihoAA committed Aug 27, 2023
1 parent e815330 commit 5e9f8c7
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ VRC.Enums*
/Assets/Scenes/SampleScene.unity
/Assets/Scenes
/Assets/OSCmooth/Generated/Anims/Animator_354a5319244b7d64ca734626cd690e47
/Assets
/Assembly-CSharp.csproj
/Assembly-CSharp-Editor.csproj
/Packages
*.csproj
*.csproj
.history
25 changes: 25 additions & 0 deletions Assets/OSCmooth/Editor/OSCmoothLayer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using UnityEngine;

namespace OSCTools.OSCmooth.Types
{
[Serializable]
public class OSCmoothLayer : ScriptableObject
{
public List<OSCmoothParameter> parameters;
public OSCmoothParameter configuration;

public OSCmoothLayer()
{
parameters = new List<OSCmoothParameter>();
configuration = new OSCmoothParameter();
}
public OSCmoothLayer(List<OSCmoothParameter> parameters, OSCmoothParameter configuration)
{
this.parameters = parameters;
this.configuration = configuration;
}
}
}

50 changes: 50 additions & 0 deletions Assets/OSCmooth/Editor/OSCmoothParameter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
using System;
using System.Collections.Generic;
using UnityEngine;

namespace OSCTools.OSCmooth.Types
{
[Serializable]
public class OSCmoothParameter
{

// for Animation creation purposes:
public float localSmoothness = 0.1f;
public float remoteSmoothness = 0.7f;
public string paramName = "NewParam";

// This setting sets the output to controll the
// base parameter. This is useful if an OSC app
// doesn't need to directly control the base parameter,
// such as VRCFaceTracking binary parameters.
public bool flipInputOutput = false;

// This will convert all instances of the base parameter to the proxy in every blend tree.
// WARNING. Please be considerate with this setting.
public bool convertToProxy = true;

// Resolution of parameters for binaries and disable binary
public int binarySizeSelection = 0;
// Combined parameter for positive and negative
public bool combinedParameter = false;

// for Editor window visibility
public bool isVisible;

public OSCmoothParameter() { }
public OSCmoothParameter(string paramName)
{
this.paramName = paramName;
}
public OSCmoothParameter(string paramName, float localSmoothness, float remoteSmoothness, bool convertToProxy, bool flipInputOutput, int binarySizeSelection, bool combinedParameter)
{
this.paramName = paramName;
this.localSmoothness = localSmoothness;
this.remoteSmoothness = remoteSmoothness;
this.convertToProxy = convertToProxy;
this.flipInputOutput = flipInputOutput;
this.binarySizeSelection = binarySizeSelection;
this.combinedParameter = combinedParameter;
}
}
}

0 comments on commit 5e9f8c7

Please sign in to comment.