The Big Rename

Closes: #84
This commit is contained in:
bd_ 2022-11-10 20:39:58 -08:00
parent b7e4409d6b
commit 318599ae3d
153 changed files with 128 additions and 88 deletions

View File

@ -10,7 +10,7 @@ on:
- '**'
env:
packageName: "net.fushizen.modular-avatar"
packageName: "nadena.dev.modular-avatar"
jobs:
build:

2
Packages/.gitignore vendored
View File

@ -1,4 +1,4 @@
/*/
!com.vrchat.core.*/
com.vrchat.*/
!net.fushizen.*/
!nadena.dev.*/

View File

@ -10,7 +10,7 @@
"com.unity.ugui": "1.0.0",
"com.unity.xr.oculus.standalone": "2.38.4",
"com.unity.xr.openvr.standalone": "2.0.5",
"net.fushizen.modular-avatar": "0.0.1",
"nadena.dev.modular-avatar": "0.0.1",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",
"com.unity.modules.animation": "1.0.0",

View File

@ -31,7 +31,7 @@ using UnityEngine;
using VRC.SDK3.Avatars.Components;
using Object = UnityEngine.Object;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
public class AnimatorCombiner
{

View File

@ -28,13 +28,13 @@ using UnityEngine.SceneManagement;
using VRC.SDK3.Avatars.Components;
using VRC.SDKBase.Editor.BuildPipeline;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
[InitializeOnLoad]
public static class ApplyOnPlay
{
private const string MENU_NAME = "Tools/Modular Avatar/Apply on Play";
/**
* We need to process avatars before lyuma's av3 emulator wakes up and processes avatars; it does this in Awake,
* so we have to do our processing in Awake as well. This seems to work fine when first entering play mode, but
@ -44,7 +44,7 @@ namespace net.fushizen.modular_avatar.core.editor
* all initially-enabled components have Awake called), we switch to processing from Start instead.
*/
private static RuntimeUtil.OnDemandSource armedSource = RuntimeUtil.OnDemandSource.Awake;
static ApplyOnPlay()
{
EditorApplication.playModeStateChanged += OnPlayModeStateChanged;

View File

@ -32,7 +32,7 @@ using VRC.SDKBase.Editor.BuildPipeline;
using VRC.SDKBase.Validation.Performance.Stats;
using Object = UnityEngine.Object;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
[InitializeOnLoad]
public class AvatarProcessor : IVRCSDKPreprocessAvatarCallback, IVRCSDKPostprocessAvatarCallback

View File

@ -7,7 +7,7 @@ using UnityEngine;
using VRC.SDK3.Avatars.Components;
using Object = UnityEngine.Object;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
/**
* Ensures that any blendshapes marked for syncing by BlendshapeSync propagate values in all animation clips.

View File

@ -24,7 +24,7 @@
using UnityEngine;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
internal class BoneProxyProcessor
{

View File

@ -30,7 +30,7 @@ using UnityEditor.PackageManager.Requests;
using UnityEngine;
using VRC.SDK3.Avatars.Components;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
[InitializeOnLoad]
internal static class ComponentAllowlistPatch

View File

@ -1,7 +1,7 @@
using UnityEditor;
using UnityEngine;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
public class EasySetupOutfit
{

View File

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

View File

@ -8,7 +8,7 @@ using VRC.SDK3.Avatars.Components;
using VRC.SDK3.Avatars.ScriptableObjects;
using VRC.SDKBase;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
class AvMenuTreeViewWindow : EditorWindow
{

View File

@ -2,7 +2,7 @@
using UnityEngine;
using VRC.SDK3.Avatars.Components;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
[CustomPropertyDrawer(typeof(AvatarObjectReference))]
public class AvatarObjectReferenceDrawer : PropertyDrawer
@ -10,7 +10,7 @@ namespace net.fushizen.modular_avatar.core.editor
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
if (CustomGUI(position, property, label)) return;
var xButtonSize = EditorStyles.miniButtonRight.CalcSize(new GUIContent("x"));
var xButtonRect = new Rect(position.xMax - xButtonSize.x, position.y, xButtonSize.x, position.height);
position = new Rect(position.x, position.y, position.width - xButtonSize.x, position.height);

View File

@ -6,10 +6,10 @@ using UnityEditor;
using UnityEditorInternal;
using UnityEngine;
using UnityEngine.Serialization;
using static net.fushizen.modular_avatar.core.editor.Localization;
using static nadena.dev.modular_avatar.core.editor.Localization;
using Debug = System.Diagnostics.Debug;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
[CustomEditor(typeof(ModularAvatarParameters))]
internal class AvatarParametersEditor : MAEditorBase

View File

@ -7,7 +7,7 @@ using UnityEditor.IMGUI.Controls;
using UnityEditor.PackageManager.UI;
using UnityEngine;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
public class BlendshapeSelectWindow : EditorWindow
{

View File

@ -8,9 +8,9 @@ using UnityEditorInternal;
using UnityEngine;
using UnityEngine.PlayerLoop;
using VRC.Core;
using static net.fushizen.modular_avatar.core.editor.Localization;
using static nadena.dev.modular_avatar.core.editor.Localization;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
[CustomEditor(typeof(ModularAvatarBlendshapeSync))]
[CanEditMultipleObjects]

View File

@ -1,8 +1,8 @@
using UnityEditor;
using UnityEngine;
using static net.fushizen.modular_avatar.core.editor.Localization;
using static nadena.dev.modular_avatar.core.editor.Localization;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
internal class TempObjRef : ScriptableObject
{

View File

@ -2,7 +2,7 @@
using UnityEditor;
using UnityEngine;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
[CustomEditor(typeof(ModularAvatarVisibleHeadAccessory))]
internal class FirstPersonVisibleEditor : MAEditorBase

View File

@ -2,7 +2,7 @@
using UnityEditor.Experimental.SceneManagement;
using UnityEngine;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
internal static class InspectorCommon
{

View File

@ -2,7 +2,7 @@
using UnityEditor;
using UnityEngine;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
internal static class LogoDisplay
{

View File

@ -5,7 +5,7 @@ using UnityEditor;
using UnityEditor.UIElements;
using UnityEngine.UIElements;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
// This class performs common setup for Modular Avatar editors, including ensuring that only one instance of the\
// logo is rendered per container.

View File

@ -4,9 +4,9 @@ using UnityEditor;
using UnityEngine;
using VRC.SDK3.Avatars.Components;
using VRC.SDK3.Avatars.ScriptableObjects;
using static net.fushizen.modular_avatar.core.editor.Localization;
using static nadena.dev.modular_avatar.core.editor.Localization;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
[CustomEditor(typeof(ModularAvatarMenuInstaller))]
[CanEditMultipleObjects]

View File

@ -1,9 +1,9 @@
using UnityEditor;
using UnityEngine;
using UnityEngine.UIElements;
using static net.fushizen.modular_avatar.core.editor.Localization;
using static nadena.dev.modular_avatar.core.editor.Localization;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
[CustomPropertyDrawer(typeof(MergeAnimatorPathMode))]
class PathModeDrawer : PropertyDrawer

View File

@ -1,9 +1,9 @@
using System;
using UnityEditor;
using UnityEngine;
using static net.fushizen.modular_avatar.core.editor.Localization;
using static nadena.dev.modular_avatar.core.editor.Localization;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
[CustomEditor(typeof(ModularAvatarMergeArmature))]
internal class MergeArmatureEditor : MAEditorBase

View File

@ -1,7 +1,7 @@
using System;
using UnityEditor;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
public class ZeroIndentScope : IDisposable
{

View File

@ -7,7 +7,7 @@ using Newtonsoft.Json;
using UnityEditor;
using UnityEngine;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
public static class Localization
{
@ -86,7 +86,7 @@ namespace net.fushizen.modular_avatar.core.editor
private static string GetSelectedLocalization()
{
return EditorPrefs.GetString("net.fushizen.modularavatar.lang", "en");
return EditorPrefs.GetString("nadena.dev.modularavatar.lang", "en");
}
public static void ShowLanguageUI()
@ -99,7 +99,7 @@ namespace net.fushizen.modular_avatar.core.editor
var newIndex = EditorGUILayout.Popup("Editor Language", curIndex, DisplayNames);
if (newIndex != curIndex)
{
EditorPrefs.SetString("net.fushizen.modularavatar.lang", SupportedLanguages[newIndex]);
EditorPrefs.SetString("nadena.dev.modularavatar.lang", SupportedLanguages[newIndex]);
Reload();
}
}

View File

@ -5,7 +5,7 @@ using UnityEngine;
using VRC.SDK3.Avatars.Components;
using VRC.SDK3.Avatars.ScriptableObjects;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
public class MenuInstallHook
{

View File

@ -30,7 +30,7 @@ using UnityEngine;
using VRC.SDK3.Avatars.Components;
using Object = UnityEngine.Object;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
internal class MergeAnimatorProcessor
{

View File

@ -31,7 +31,7 @@ using VRC.Dynamics;
using VRC.SDK3.Dynamics.PhysBone.Components;
using Object = UnityEngine.Object;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
public class MergeArmatureHook
{

View File

@ -28,7 +28,7 @@ using UnityEditor;
using UnityEngine;
using VRC.SDKBase.Editor.BuildPipeline;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
internal static class BoneDatabase
{
@ -73,7 +73,7 @@ namespace net.fushizen.modular_avatar.core.editor
return retargeted ? retargeted : (fallbackToOriginal ? bone : null);
}
}
internal class RetargetMeshes
{
internal void OnPreprocessAvatar(GameObject avatarGameObject)
@ -95,7 +95,7 @@ namespace net.fushizen.modular_avatar.core.editor
new MeshRetargeter(renderer).Retarget();
}
}
// Now remove retargeted bones
if (true)
{
@ -111,18 +111,18 @@ namespace net.fushizen.modular_avatar.core.editor
{
children.Add(child);
}
foreach (Transform child in children) {
foreach (Transform child in children)
{
child.SetParent(destBone, true);
}
UnityEngine.Object.DestroyImmediate(sourceBone.gameObject);
}
}
}
}
/**
* This class processes a given mesh, adjusting the bind poses for any bones that are to be merged to instead match
* the bind pose of the original avatar's bone.
@ -138,7 +138,7 @@ namespace net.fushizen.modular_avatar.core.editor
public Matrix4x4 localToBone;
public Matrix4x4 priorToNew;
}
public MeshRetargeter(SkinnedMeshRenderer renderer)
{
this.renderer = renderer;
@ -146,7 +146,6 @@ namespace net.fushizen.modular_avatar.core.editor
public void Retarget()
{
var avatar = RuntimeUtil.FindAvatarInParents(renderer.transform);
if (avatar == null) throw new System.Exception("Could not find avatar in parents of " + renderer.name);
var avatarTransform = avatar.transform;
@ -158,18 +157,18 @@ namespace net.fushizen.modular_avatar.core.editor
avatarTransform.position = Vector3.zero;
avatarTransform.rotation = Quaternion.identity;
avatarTransform.localScale = Vector3.one;
src = renderer.sharedMesh;
dst = Mesh.Instantiate(src);
dst.name = "RETARGETED: " + src.name;
RetargetBones();
AdjustShapeKeys();
avatarTransform.position = avPos;
avatarTransform.rotation = avRot;
avatarTransform.localScale = avScale;
avatarTransform.localScale = avScale;
AssetDatabase.CreateAsset(dst, Util.GenerateAssetPath());
}
@ -191,8 +190,9 @@ namespace net.fushizen.modular_avatar.core.editor
Transform newBindTarget = BoneDatabase.GetRetargetedBone(originalBones[i]);
if (newBindTarget == null) continue;
Matrix4x4 Bp = newBindTarget.worldToLocalMatrix * originalBones[i].localToWorldMatrix * originalBindPoses[i];
Matrix4x4 Bp = newBindTarget.worldToLocalMatrix * originalBones[i].localToWorldMatrix *
originalBindPoses[i];
newBones[i] = newBindTarget;
newBindPoses[i] = Bp;
}

View File

@ -25,19 +25,19 @@
using UnityEditor;
using UnityEngine;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
public static class ModularAvatarSettings
{
private const string PREFKEY_APPLY_ON_PLAY = "net.fushizen.modular-avatar.applyOnPlay";
private const string PREFKEY_APPLY_ON_PLAY = "nadena.dev.modular-avatar.applyOnPlay";
#if UNITY_EDITOR
public static bool applyOnPlay
{
get => EditorPrefs.GetBool(PREFKEY_APPLY_ON_PLAY, true);
set => EditorPrefs.SetBool(PREFKEY_APPLY_ON_PLAY, value);
}
#else
#else
public static bool applyOnPlay = false;
#endif
#endif
}
}

View File

@ -9,7 +9,7 @@ using VRC.SDK3.Avatars.ScriptableObjects;
using VRC.SDK3.Dynamics.Contact.Components;
using VRC.SDK3.Dynamics.PhysBone.Components;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
public struct DetectedParameter
{

View File

@ -26,7 +26,7 @@ using System.Collections.Generic;
using UnityEngine;
using VRC.SDKBase.Editor.BuildPipeline;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
public static class PathMappings
{

View File

@ -11,7 +11,7 @@ using VRC.SDK3.Dynamics.Contact.Components;
using VRC.SDK3.Dynamics.PhysBone.Components;
using Object = UnityEngine.Object;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
public class RenameParametersHook
{

View File

@ -28,7 +28,7 @@ using UnityEditor.Animations;
using UnityEngine;
using VRC.SDKBase.Editor.BuildPipeline;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
internal class CleanupTempAssets : IVRCSDKPostprocessAvatarCallback
{

View File

@ -24,7 +24,7 @@
using JetBrains.Annotations;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
[UsedImplicitly]
public static class Version

View File

@ -4,7 +4,7 @@ using Unity.Collections;
using UnityEditor;
using UnityEngine;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
/// <summary>
/// Many avatars have hair meshes which are partially painted to the Head bone, and partially to a bone we might

View File

@ -4,7 +4,7 @@ using UnityEngine.Animations;
using VRC.SDK3.Avatars.Components;
using VRC.SDK3.Dynamics.PhysBone.Components;
namespace net.fushizen.modular_avatar.core.editor
namespace nadena.dev.modular_avatar.core.editor
{
internal class VisibleHeadAccessoryProcessor
{

View File

@ -1,10 +1,10 @@
{
"name": "net.fushizen.modular-avatar.core.editor",
"name": "nadena.dev.modular-avatar.core.editor",
"references": [
"GUID:fc900867c0f47cd49b6e2ae4ef907300",
"GUID:5718fb738711cd34ea54e9553040911d",
"GUID:6e9c6119ac4eb334284fb7b4bc6d1f05",
"GUID:b906909fcc54f634db50f2cad0f988d9"
"GUID:fc900867c0f47cd49b6e2ae4ef907300",
"GUID:5718fb738711cd34ea54e9553040911d",
"GUID:6e9c6119ac4eb334284fb7b4bc6d1f05",
"GUID:b906909fcc54f634db50f2cad0f988d9"
],
"includePlatforms": [
"Editor"

View File

@ -1,7 +1,7 @@
using System;
using UnityEngine;
namespace net.fushizen.modular_avatar.core
namespace nadena.dev.modular_avatar.core
{
[Serializable]
public class AvatarObjectReference

View File

@ -25,7 +25,7 @@
using System;
using UnityEngine;
namespace net.fushizen.modular_avatar.core
namespace nadena.dev.modular_avatar.core
{
/**
* This abstract base class is injected into the VRCSDK avatar component allowlist to avoid

View File

@ -2,7 +2,7 @@
using System.Collections.Generic;
using UnityEngine;
namespace net.fushizen.modular_avatar.core
namespace nadena.dev.modular_avatar.core
{
[Serializable]
public struct BlendshapeBinding

View File

@ -26,7 +26,7 @@ using System;
using System.Collections.Generic;
using UnityEngine;
namespace net.fushizen.modular_avatar.core
namespace nadena.dev.modular_avatar.core
{
[ExecuteInEditMode]
[DisallowMultipleComponent]

View File

@ -2,7 +2,7 @@
using VRC.SDK3.Avatars.Components;
using VRC.SDK3.Avatars.ScriptableObjects;
namespace net.fushizen.modular_avatar.core
namespace nadena.dev.modular_avatar.core
{
[AddComponentMenu("Modular Avatar/MA Menu Installer")]
public class ModularAvatarMenuInstaller : AvatarTagComponent

View File

@ -25,7 +25,7 @@
using UnityEngine;
using VRC.SDK3.Avatars.Components;
namespace net.fushizen.modular_avatar.core
namespace nadena.dev.modular_avatar.core
{
public enum MergeAnimatorPathMode
{

Some files were not shown because too many files have changed in this diff Show More