Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
whiteflare committed Mar 9, 2020
2 parents 768dcd8 + 55b33d5 commit f2aa5bf
Show file tree
Hide file tree
Showing 121 changed files with 620 additions and 1,173 deletions.
3 changes: 3 additions & 0 deletions Editor/WF_Common.cs
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ internal static class WFI18N
{ "Blend Normal", "ノーマルマップ強度" },
// Lit
{ "Anti-Glare", "まぶしさ防止" },
{ "Darken (min value)", "暗さの最小値" },
{ "Lighten (max value)", "明るさの最大値" },
{ "Blend Light Color", "ライト色の混合強度" },
{ "Cast Shadows", "他の物体に影を落とす" },
// Alpha
Expand Down Expand Up @@ -344,6 +346,7 @@ internal static class WFI18N
{ "[LI] Line Color", "[LI] 線の色" },
{ "[LI] Line Width", "[LI] 線の太さ" },
{ "[LI] Line Type", "[LI] 線の種類" },
{ "[LI] Blend Base Color", "[LI] ベース色とのブレンド" },
{ "[LI] Outline Mask Texture", "[LI] マスクテクスチャ" },
{ "[LI] Z-shift (tweak)", "[LI] カメラから遠ざける" },
// Ambient Occlusion
Expand Down
111 changes: 78 additions & 33 deletions Editor/WF_ShaderToolWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ private void OnGUI() {
EditorGUILayout.Space();
EditorGUILayout.LabelField("UnlitWF / CleanUp material property", styleTitle);
EditorGUILayout.Space();
EditorGUILayout.HelpBox("This is EXPERIMENTAL tools. Do Backup please.\nこのツールは実験的機能です。バックアップを忘れずに。", MessageType.Warning);
EditorGUILayout.Space();

// メイン
Expand All @@ -97,6 +96,19 @@ private void OnGUI() {
EditorGUILayout.PropertyField(so.FindProperty("materials"), new GUIContent("list"), true);
EditorGUILayout.Space();

// マテリアルに UnlitWF 以外のシェーダが紛れている場合には警告
bool removeOther = false;
foreach (Material mm in param.materials) {
if (mm != null && mm.shader != null && !mm.shader.name.Contains("UnlitWF")) {
EditorGUILayout.HelpBox("Found Not-UnlitWF materials. Continue?\n(UnlitWF以外のマテリアルが紛れていますが大丈夫ですか?)", MessageType.Warning);
if (GUILayout.Button("Remove other materials")) {
removeOther = true;
}
break;
}
}
EditorGUILayout.Space();

// オプション
EditorGUILayout.LabelField("options", EditorStyles.boldLabel);
prop = so.FindProperty("resetUnused");
Expand All @@ -109,14 +121,13 @@ private void OnGUI() {
so.ApplyModifiedPropertiesWithoutUndo();
so.SetIsDifferentCacheDirty();

// マテリアルに UnlitWF 以外のシェーダが紛れている場合には警告
foreach (Material mm in param.materials) {
if (mm != null && mm.shader != null && !mm.shader.name.Contains("UnlitWF")) {
EditorGUILayout.HelpBox("Found Not-UnlitWF materials. Continue?\n(UnlitWF以外のマテリアルが紛れていますが大丈夫ですか?)", MessageType.Warning);
break;
}
// UnlitWF 以外のマテリアルを除去
if (removeOther) {
var newlist = new List<Material>();
newlist.AddRange(param.materials);
newlist.RemoveAll(mm => !mm.shader.name.Contains("UnlitWF"));
param.materials = newlist.ToArray();
}
EditorGUILayout.Space();

if (GUILayout.Button("CleanUp")) {
new WFMaterialEditUtility().CleanUpProperties(param);
Expand Down Expand Up @@ -187,7 +198,6 @@ private void OnGUI() {
EditorGUILayout.Space();
EditorGUILayout.LabelField("UnlitWF / Reset material property", styleTitle);
EditorGUILayout.Space();
EditorGUILayout.HelpBox("This is EXPERIMENTAL tools. Do Backup please.\nこのツールは実験的機能です。バックアップを忘れずに。", MessageType.Warning);
EditorGUILayout.Space();

// メイン
Expand All @@ -203,6 +213,19 @@ private void OnGUI() {
EditorGUILayout.PropertyField(so.FindProperty("materials"), new GUIContent("list"), true);
EditorGUILayout.Space();

// マテリアルに UnlitWF 以外のシェーダが紛れている場合には警告
bool removeOther = false;
foreach (Material mm in param.materials) {
if (mm != null && mm.shader != null && !mm.shader.name.Contains("UnlitWF")) {
EditorGUILayout.HelpBox("Found Not-UnlitWF materials. Continue?\n(UnlitWF以外のマテリアルが紛れていますが大丈夫ですか?)", MessageType.Warning);
if (GUILayout.Button("Remove other materials")) {
removeOther = true;
}
break;
}
}
EditorGUILayout.Space();

// 対象
EditorGUILayout.LabelField("reset target", EditorStyles.boldLabel);
prop = so.FindProperty("resetColor");
Expand All @@ -224,14 +247,13 @@ private void OnGUI() {
so.ApplyModifiedPropertiesWithoutUndo();
so.SetIsDifferentCacheDirty();

// マテリアルに UnlitWF 以外のシェーダが紛れている場合には警告
foreach (Material mm in param.materials) {
if (mm != null && mm.shader != null && !mm.shader.name.Contains("UnlitWF")) {
EditorGUILayout.HelpBox("Found Not-UnlitWF materials. Continue?\n(UnlitWF以外のマテリアルが紛れていますが大丈夫ですか?)", MessageType.Warning);
break;
}
// UnlitWF 以外のマテリアルを除去
if (removeOther) {
var newlist = new List<Material>();
newlist.AddRange(param.materials);
newlist.RemoveAll(mm => !mm.shader.name.Contains("UnlitWF"));
param.materials = newlist.ToArray();
}
EditorGUILayout.Space();

if (GUILayout.Button("Reset Values")) {
new WFMaterialEditUtility().ResetProperties(param);
Expand Down Expand Up @@ -304,7 +326,6 @@ private void OnGUI() {
EditorGUILayout.Space();
EditorGUILayout.LabelField("UnlitWF / Copy material property", styleTitle);
EditorGUILayout.Space();
EditorGUILayout.HelpBox("This is EXPERIMENTAL tools. Do Backup please.\nこのツールは実験的機能です。バックアップを忘れずに。", MessageType.Warning);
EditorGUILayout.Space();

// メイン
Expand All @@ -319,10 +340,29 @@ private void OnGUI() {
EditorGUILayout.LabelField("source materials", EditorStyles.boldLabel);
EditorGUILayout.PropertyField(so.FindProperty("materialSource"), new GUIContent("material"), true);
EditorGUILayout.Space();

if (param.materialSource != null && param.materialSource.shader != null && !param.materialSource.shader.name.Contains("UnlitWF")) {
EditorGUILayout.HelpBox("Found Not-UnlitWF materials. Continue?\n(UnlitWF以外のマテリアルが紛れていますが大丈夫ですか?)", MessageType.Warning);
EditorGUILayout.Space();
}

EditorGUILayout.LabelField("destination materials", EditorStyles.boldLabel);
EditorGUILayout.PropertyField(so.FindProperty("materialDestination"), new GUIContent("list"), true);
EditorGUILayout.Space();

// マテリアルに UnlitWF 以外のシェーダが紛れている場合には警告
bool removeOther = false;
foreach (Material mm in param.materialDestination) {
if (mm != null && mm.shader != null && !mm.shader.name.Contains("UnlitWF")) {
EditorGUILayout.HelpBox("Found Not-UnlitWF materials. Continue?\n(UnlitWF以外のマテリアルが紛れていますが大丈夫ですか?)", MessageType.Warning);
if (GUILayout.Button("Remove other materials")) {
removeOther = true;
}
break;
}
}
EditorGUILayout.Space();

// 対象
EditorGUILayout.LabelField("copy target", EditorStyles.boldLabel);
prop = so.FindProperty("copyColorChange");
Expand All @@ -343,17 +383,13 @@ private void OnGUI() {
so.ApplyModifiedPropertiesWithoutUndo();
so.SetIsDifferentCacheDirty();

// マテリアルに UnlitWF 以外のシェーダが紛れている場合には警告
var materials = new List<Material>();
materials.Add(param.materialSource);
materials.AddRange(param.materialDestination);
foreach (Material mm in materials) {
if (mm != null && mm.shader != null && !mm.shader.name.Contains("UnlitWF")) {
EditorGUILayout.HelpBox("Found Not-UnlitWF materials. Continue?\n(UnlitWF以外のマテリアルが紛れていますが大丈夫ですか?)", MessageType.Warning);
break;
}
// UnlitWF 以外のマテリアルを除去
if (removeOther) {
var newlist = new List<Material>();
newlist.AddRange(param.materialDestination);
newlist.RemoveAll(mm => !mm.shader.name.Contains("UnlitWF"));
param.materialDestination = newlist.ToArray();
}
EditorGUILayout.Space();

if (GUILayout.Button("Copy Values")) {
new WFMaterialEditUtility().CopyProperties(param);
Expand Down Expand Up @@ -416,7 +452,6 @@ private void OnGUI() {
EditorGUILayout.Space();
EditorGUILayout.LabelField("UnlitWF / Migration material", styleTitle);
EditorGUILayout.Space();
EditorGUILayout.HelpBox("This is EXPERIMENTAL tools. Do Backup please.\nこのツールは実験的機能です。バックアップを忘れずに。", MessageType.Warning);
EditorGUILayout.Space();

// メイン
Expand All @@ -432,20 +467,30 @@ private void OnGUI() {
EditorGUILayout.PropertyField(so.FindProperty("materials"), new GUIContent("list"), true);
EditorGUILayout.Space();

EditorGUILayout.Space();

so.ApplyModifiedPropertiesWithoutUndo();
so.SetIsDifferentCacheDirty();

// マテリアルに UnlitWF 以外のシェーダが紛れている場合には警告
bool removeOther = false;
foreach (Material mm in param.materials) {
if (mm != null && mm.shader != null && !mm.shader.name.Contains("UnlitWF")) {
EditorGUILayout.HelpBox("Found Not-UnlitWF materials. Continue?\n(UnlitWF以外のマテリアルが紛れていますが大丈夫ですか?)", MessageType.Warning);
if (GUILayout.Button("Remove other materials")) {
removeOther = true;
}
break;
}
}
EditorGUILayout.Space();

so.ApplyModifiedPropertiesWithoutUndo();
so.SetIsDifferentCacheDirty();

// UnlitWF 以外のマテリアルを除去
if (removeOther) {
var newlist = new List<Material>();
newlist.AddRange(param.materials);
newlist.RemoveAll(mm => !mm.shader.name.Contains("UnlitWF"));
param.materials = newlist.ToArray();
}

if (GUILayout.Button("Convert")) {
new WFMaterialEditUtility().RenameOldNameProperties(param);
}
Expand Down
8 changes: 0 additions & 8 deletions Examples/OldSample.meta

This file was deleted.

9 changes: 0 additions & 9 deletions Examples/OldSample/Anim.meta

This file was deleted.

Binary file removed Examples/OldSample/Anim/Spinner.anim
Binary file not shown.
9 changes: 0 additions & 9 deletions Examples/OldSample/Anim/Spinner.anim.meta

This file was deleted.

Binary file removed Examples/OldSample/Anim/Spinner.controller
Binary file not shown.
9 changes: 0 additions & 9 deletions Examples/OldSample/Anim/Spinner.controller.meta

This file was deleted.

9 changes: 0 additions & 9 deletions Examples/OldSample/Materials.meta

This file was deleted.

9 changes: 0 additions & 9 deletions Examples/OldSample/Materials/WF_FF.meta

This file was deleted.

Binary file not shown.
9 changes: 0 additions & 9 deletions Examples/OldSample/Materials/WF_FF/fur_transcutoff.mat.meta

This file was deleted.

Binary file not shown.
9 changes: 0 additions & 9 deletions Examples/OldSample/Materials/WF_FF/fur_transparent.mat.meta

This file was deleted.

9 changes: 0 additions & 9 deletions Examples/OldSample/Materials/WF_MS.meta

This file was deleted.

Binary file not shown.
9 changes: 0 additions & 9 deletions Examples/OldSample/Materials/WF_MS/mat10_cullback.mat.meta

This file was deleted.

Binary file not shown.
9 changes: 0 additions & 9 deletions Examples/OldSample/Materials/WF_MS/mat11_cullfront.mat.meta

This file was deleted.

Binary file removed Examples/OldSample/Materials/WF_MS/mat12_culloff.mat
Binary file not shown.
9 changes: 0 additions & 9 deletions Examples/OldSample/Materials/WF_MS/mat12_culloff.mat.meta

This file was deleted.

Binary file removed Examples/OldSample/Materials/WF_MS/mat1_color.mat
Binary file not shown.
9 changes: 0 additions & 9 deletions Examples/OldSample/Materials/WF_MS/mat1_color.mat.meta

This file was deleted.

Binary file not shown.
9 changes: 0 additions & 9 deletions Examples/OldSample/Materials/WF_MS/mat2_color_matcap.mat.meta

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file removed Examples/OldSample/Materials/WF_MS/mat4_tex.mat
Binary file not shown.
9 changes: 0 additions & 9 deletions Examples/OldSample/Materials/WF_MS/mat4_tex.mat.meta

This file was deleted.

Binary file not shown.
9 changes: 0 additions & 9 deletions Examples/OldSample/Materials/WF_MS/mat5_tex_matcap.mat.meta

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file removed Examples/OldSample/Materials/WF_MS/mat7_cutout.mat
Binary file not shown.
Loading

0 comments on commit f2aa5bf

Please sign in to comment.