forked from EdyJ/blender-to-unity3d-importer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathEdysBlenderImporterOptions.cs
42 lines (34 loc) · 1.3 KB
/
EdysBlenderImporterOptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using UnityEngine;
public class EdysBlenderImporterOptions : ScriptableObject
{
public bool fixBlender = true;
public bool optimize = false;
public bool zReverse = false;
public bool animFix = true;
public bool floatFix = true;
public bool postMods = true;
public bool forceFixRoot = false;
public float floatFixThreshold = 1.53e-05f;
public override string ToString()
{
return
(fixBlender ? "fixBlender " : "") +
(optimize ? "optimize " : "") +
(zReverse ? "zReverse " : "") +
(animFix ? "animFix " : "") +
(floatFix ? "floatFix " : "") +
(postMods ? "postMods " : "") +
(forceFixRoot ? "forceFixRoot " : "");
}
#if UNITY_EDITOR
[UnityEditor.MenuItem ("Assets/Create/EdysBlenderImporter Options", false, 9999)]
static void CreateAsset ()
{
EdysBlenderImporterOptions asset = ScriptableObject.CreateInstance<EdysBlenderImporterOptions>();
UnityEditor.AssetDatabase.CreateAsset(asset, "Assets/New EdysBlenderImporterOptions.asset");
UnityEditor.AssetDatabase.SaveAssets();
UnityEditor.EditorUtility.FocusProjectWindow();
UnityEditor.Selection.activeObject = asset;
}
#endif
}