From de68fc49ae80eeb41436605ff02c9569bc82d6e4 Mon Sep 17 00:00:00 2001 From: soupday <79094830+soupday@users.noreply.github.com> Date: Mon, 26 Jul 2021 10:29:11 +0100 Subject: [PATCH 1/2] 0.1.1 --- Editor/ImporterWindow.cs | 10 +++++++--- Editor/RL.cs | 13 ++----------- package.json | 4 ++-- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/Editor/ImporterWindow.cs b/Editor/ImporterWindow.cs index 2a1b67d..62616bc 100644 --- a/Editor/ImporterWindow.cs +++ b/Editor/ImporterWindow.cs @@ -383,7 +383,8 @@ private void OnGUIActionArea(Rect actionBlock) contextCharacter.logType = CharacterInfo.ProcessingType.HighQuality; contextCharacter.Write(); CreateTreeView(true); - } + } + GUI.enabled = true; GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); @@ -391,6 +392,7 @@ private void OnGUIActionArea(Rect actionBlock) GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); + if (contextCharacter.logType != CharacterInfo.ProcessingType.HighQuality) GUI.enabled = false; if (GUILayout.Button("Bake", GUILayout.Width(FUNCTION_BUTTON_WIDTH), GUILayout.Height(BUTTON_HEIGHT))) { if (contextCharacter.logType == CharacterInfo.ProcessingType.HighQuality) @@ -402,13 +404,15 @@ private void OnGUIActionArea(Rect actionBlock) contextCharacter.bakeIsBaked = true; contextCharacter.Write(); } - } - GUILayout.FlexibleSpace(); + } GUI.enabled = true; + GUILayout.FlexibleSpace(); + if (contextCharacter.logType == CharacterInfo.ProcessingType.None) GUI.enabled = false; if (GUILayout.Button("Animations", GUILayout.Width(FUNCTION_BUTTON_WIDTH), GUILayout.Height(BUTTON_HEIGHT))) { RL.SetAnimationImport(contextCharacter); } + GUI.enabled = true; GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); diff --git a/Editor/RL.cs b/Editor/RL.cs index 2378370..01f71c1 100644 --- a/Editor/RL.cs +++ b/Editor/RL.cs @@ -348,12 +348,7 @@ public static void HumanoidImportSettings(GameObject fbx, ModelImporter importer importer.humanDescription = human; } - - /* - * Create an Animator and apply an FBX animation to it. - * [in] kFbxObject: Fbx target object - * [in] assetPath: Fbx asset path - */ + public static void AutoCreateAnimator(GameObject fbx, string assetPath, ModelImporter importer) { string animatorPath = Path.GetDirectoryName(assetPath) + "/" + fbx.name + "_animator.controller"; @@ -398,11 +393,7 @@ public static void AutoCreateAnimator(GameObject fbx, string assetPath, ModelImp } } } - - /* - * Set the Animation parameters. - * [in] kImporter: Model import settings - */ + public static void SetAnimation(ModelImporter importer, string assetPath) { if (importer.defaultClipAnimations.Length > 0) diff --git a/package.json b/package.json index b1ecc1e..9c4d622 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "com.soupday.cc3_unity_tools", - "version": "0.1.0", + "version": "0.1.1", "displayName": "CC3 Unity Tools", "description": "This is a prototype of the Unity importer for Character Creator 3/iClone 7", "unity": "2020.3", @@ -18,7 +18,7 @@ "email": "user@noreply.com", "url": "https://github.com/soupday" }, - "type": "tool", + "type": "tool", "dependencies": { "com.unity.render-pipelines.high-definition": "10.5.0" } From b3880675b24b2643e67ab62cfbd13f0f5327ee3d Mon Sep 17 00:00:00 2001 From: soupday <79094830+soupday@users.noreply.github.com> Date: Mon, 26 Jul 2021 10:32:49 +0100 Subject: [PATCH 2/2] 0.1.1 --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96bd75f..d58fe63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ Changelog ========= -v 0.1.0 Initial release. \ No newline at end of file +### v 0.1.1 +- Bake button will not activate until the character has been imported and set-up with High-Quality materials. +- Animation button will not activate until the character has been imported and set-up with either Default or High-Quality materials. + +### v 0.1.0 +- Initial release. \ No newline at end of file