Skip to content

Commit 87a78aa

Browse files
committed
Add export setting for converting to Maya compatible naming
1 parent 329cfd3 commit 87a78aa

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Assets/FbxExporters/Editor/FbxExportSettings.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,19 @@ public class ExportSettingsEditor : UnityEditor.Editor {
1111
public override void OnInspectorGUI() {
1212
ExportSettings exportSettings = (ExportSettings)target;
1313

14+
// Increasing the label width so that none of the text gets cut off
15+
EditorGUIUtility.labelWidth = 300;
16+
1417
exportSettings.weldVertices = EditorGUILayout.Toggle ("Weld Vertices:", exportSettings.weldVertices);
1518
exportSettings.embedTextures = EditorGUILayout.Toggle ("Embed Textures:", exportSettings.embedTextures);
19+
exportSettings.mayaCompatibleNames = EditorGUILayout.Toggle ("Convert to Maya Compatible Naming on export:",
20+
exportSettings.mayaCompatibleNames);
21+
22+
if (!exportSettings.mayaCompatibleNames) {
23+
EditorGUILayout.HelpBox (
24+
"Disabling this feature may result in lost material connections, and unexpected character replacements in Maya.",
25+
MessageType.Warning);
26+
}
1627

1728
if (GUI.changed) {
1829
EditorUtility.SetDirty (exportSettings);
@@ -26,6 +37,7 @@ public class ExportSettings : FbxExporters.EditorTools.ScriptableSingleton<Expor
2637
{
2738
public bool weldVertices = true;
2839
public bool embedTextures = false;
40+
public bool mayaCompatibleNames = true;
2941

3042
[MenuItem("Edit/Project Settings/Fbx Export", priority = 300)]
3143
static void ShowManager()

0 commit comments

Comments
 (0)