Skip to content

Commit

Permalink
s
Browse files Browse the repository at this point in the history
  • Loading branch information
poi-vrc committed May 1, 2024
1 parent 6e2fd73 commit 86e212c
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,38 @@
* You should have received a copy of the GNU General Public License along with DressingFramework. If not, see <https://www.gnu.org/licenses/>.
*/

using Chocopoi.DressingTools.UI.Views;
using Chocopoi.AvatarLib.Animations;
using Chocopoi.DressingTools.Components.Modifiers;
using UnityEngine;
using UnityEngine.UIElements;

namespace Chocopoi.DressingTools.Configurator.Modules
{
internal class DTArmatureMappingModule : IArmatureMergingModule
{
public Transform TargetArmature { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
public Transform SourceArmature { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
public Transform TargetArmature
{
get => string.IsNullOrEmpty(_comp.TargetArmaturePath) ?
null :
_avatarGameObject.transform.Find(_comp.TargetArmaturePath);
set =>
_comp.TargetArmaturePath =
(value == null || value == _avatarGameObject.transform) ?
"" :
AnimationUtils.GetRelativePath(value.transform, _avatarGameObject.transform);
}
public Transform SourceArmature { get => _comp.SourceArmature; set => _comp.SourceArmature = value; }

private readonly GameObject _avatarGameObject;
private readonly DTArmatureMapping _comp;

public DTArmatureMappingModule(GameObject avatarGameObject, DTArmatureMapping comp)
{
_avatarGameObject = avatarGameObject;
_comp = comp;
}

public ElementView CreateView()
public VisualElement CreateView()
{
throw new System.NotImplementedException();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ namespace Chocopoi.DressingTools.Configurator.Modules
internal interface IArmatureMergingModule : IModule
{
Transform TargetArmature { get; set; }
Transform SourceArmature { get; set; }
Transform SourceArmature { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,25 @@
*/
#if DT_MA
using Chocopoi.DressingTools.UI.Views;
using nadena.dev.modular_avatar.core;
using UnityEngine;
using UnityEngine.UIElements;

namespace Chocopoi.DressingTools.Configurator.Modules
{
internal class MAMergeArmatureModule : IArmatureMergingModule
{
public Transform TargetArmature { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
public Transform SourceArmature { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
public Transform TargetArmature { get => _comp.mergeTargetObject != null ? _comp.mergeTargetObject.transform : null; set => _comp.mergeTarget.Set(value != null ? value.gameObject : null); }
public Transform SourceArmature { get => _comp.transform; }

public ElementView CreateView()
private readonly ModularAvatarMergeArmature _comp;

public MAMergeArmatureModule(ModularAvatarMergeArmature comp)
{
_comp = comp;
}

public VisualElement CreateView()
{
throw new System.NotImplementedException();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
using Chocopoi.DressingTools.Components.OneConf;
using Chocopoi.DressingTools.OneConf;
using Chocopoi.DressingTools.OneConf.Wearable.Modules.BuiltIn;
using Chocopoi.DressingTools.UI.Views;
using Chocopoi.DressingTools.UI.Views.Modules;
using UnityEngine;
using UnityEngine.UIElements;

namespace Chocopoi.DressingTools.Configurator.Modules
{
Expand Down Expand Up @@ -68,9 +69,9 @@ public OneConfArmatureMappingModule(GameObject avatarGameObject, DTWearable wear
{
}

public override ElementView CreateView()
public override VisualElement CreateView()
{
throw new System.NotImplementedException();
return new ArmatureMappingWearableModuleEditor(null, null, null);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
*/

using Chocopoi.DressingTools.UI.Views;
using UnityEngine;
using UnityEngine.UIElements;

namespace Chocopoi.DressingTools.Configurator.Modules
{
internal class DTBlendshapeSyncModule : IBlendshapeSyncModule
{
public ElementView CreateView()
public VisualElement CreateView()
{
throw new System.NotImplementedException();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@
* You should have received a copy of the GNU General Public License along with DressingFramework. If not, see <https://www.gnu.org/licenses/>.
*/
#if DT_MA
using Chocopoi.DressingTools.UI.Views;
using UnityEngine;
using UnityEngine.UIElements;

namespace Chocopoi.DressingTools.Configurator.Modules
{
internal class MABlendshapeSyncModule : IBlendshapeSyncModule
{
public ElementView CreateView()
public VisualElement CreateView()
{
throw new System.NotImplementedException();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@
* You should have received a copy of the GNU General Public License along with DressingFramework. If not, see <https://www.gnu.org/licenses/>.
*/

using Chocopoi.DressingTools.UI.Views;
using UnityEngine;
using UnityEngine.UIElements;

namespace Chocopoi.DressingTools.Configurator.Modules
{
internal class OneConfBlendshapeSyncModule : IBlendshapeSyncModule
{
public ElementView CreateView()
public VisualElement CreateView()
{
throw new System.NotImplementedException();
}
Expand Down
5 changes: 2 additions & 3 deletions Editor/Configurator/Modules/IModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@
* You should have received a copy of the GNU General Public License along with DressingFramework. If not, see <https://www.gnu.org/licenses/>.
*/

using Chocopoi.DressingTools.UI.Views;
using UnityEngine;
using UnityEngine.UIElements;

namespace Chocopoi.DressingTools.Configurator.Modules
{
internal interface IModule
{
ElementView CreateView();
VisualElement CreateView();
}
}
3 changes: 2 additions & 1 deletion Editor/Configurator/Modules/OneConfModuleBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
using Chocopoi.DressingTools.OneConf.Wearable;
using Chocopoi.DressingTools.UI.Views;
using UnityEngine;
using UnityEngine.UIElements;

namespace Chocopoi.DressingTools.Configurator.Modules
{
Expand All @@ -31,7 +32,7 @@ public OneConfModuleBase(GameObject avatarGameObject, DTWearable wearableComp)
_wearableComp = wearableComp;
}

public abstract ElementView CreateView();
public abstract VisualElement CreateView();

protected void ReadCabinetConfig(out DTCabinet comp, out CabinetConfig config)
{
Expand Down
6 changes: 4 additions & 2 deletions Editor/com.chocopoi.vrc.dressingtools.Editor.asmdef
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"name": "com.chocopoi.vrc.dressingtools.Editor",
"rootNamespace": "",
"references": [
"GUID:85e555d1cc87ace4d8e14fcfe9062453",
"GUID:97650872dc498bb4597e0bbf23109900",
"GUID:8eb5b149dedbba24490f0743a2ab1e61",
"GUID:dcaf16fd99f37914888e6e13bdf533ea"
"GUID:dcaf16fd99f37914888e6e13bdf533ea",
"GUID:fc900867c0f47cd49b6e2ae4ef907300"
],
"includePlatforms": [
"Editor"
Expand Down Expand Up @@ -33,4 +35,4 @@
}
],
"noEngineReferences": false
}
}

0 comments on commit 86e212c

Please sign in to comment.