Skip to content

Commit 2aed2ab

Browse files
committed
remove setters for disable name selection + transfer anim
1 parent 47afe31 commit 2aed2ab

File tree

2 files changed

+25
-12
lines changed

2 files changed

+25
-12
lines changed

Assets/FbxExporters/Editor/ConvertToPrefabEditorWindow.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@ public class ConvertToPrefabEditorWindow : ExportOptionsEditorWindow
1919

2020
private float m_prefabExtLabelWidth;
2121

22+
protected override bool DisableNameSelection {
23+
get {
24+
return (ToExport != null && ToExport.Length > 1);
25+
}
26+
}
27+
protected override bool DisableTransferAnim {
28+
get {
29+
return ToExport == null || ToExport.Length > 1;
30+
}
31+
}
32+
2233
public static void Init (IEnumerable<GameObject> toConvert)
2334
{
2435
ConvertToPrefabEditorWindow window = CreateWindow<ConvertToPrefabEditorWindow> ();
@@ -46,8 +57,6 @@ protected void SetGameObjectsToConvert(IEnumerable<GameObject> toConvert){
4657
m_prefabFileName = "(automatic)";
4758
}
4859

49-
DisableTransferAnim = DisableNameSelection = ToExport.Length > 1;
50-
5160
this.SetFilename (m_prefabFileName);
5261
}
5362

Assets/FbxExporters/Editor/ExportModelEditorWindow.cs

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@ public abstract class ExportOptionsEditorWindow : EditorWindow
2828

2929
protected string m_exportFileName = "";
3030

31-
private bool m_disableTransferAnim = false;
32-
protected bool DisableTransferAnim { get { return m_disableTransferAnim; } set { m_disableTransferAnim = value; } }
33-
34-
private bool m_disableNameSelection = false;
35-
protected bool DisableNameSelection { get { return m_disableNameSelection; } set { m_disableNameSelection = value; } }
36-
3731
protected UnityEditor.Editor m_innerEditor;
3832
protected FbxExportPresetSelectorReceiver m_receiver;
3933

@@ -46,6 +40,9 @@ public abstract class ExportOptionsEditorWindow : EditorWindow
4640
protected GUIStyle m_fbxExtLabelStyle;
4741
protected float m_fbxExtLabelWidth;
4842

43+
protected abstract bool DisableTransferAnim { get; }
44+
protected abstract bool DisableNameSelection { get; }
45+
4946
protected abstract EditorTools.ExportOptionsSettingsSerializeBase SettingsObject { get; }
5047

5148
private UnityEngine.Object[] m_toExport;
@@ -367,6 +364,16 @@ protected bool OverwriteExistingFile(string filePath){
367364
public class ExportModelEditorWindow : ExportOptionsEditorWindow
368365
{
369366
protected override float MinWindowHeight { get { return 260; } }
367+
protected override bool DisableNameSelection {
368+
get {
369+
return IsPlayableDirector;
370+
}
371+
}
372+
protected override bool DisableTransferAnim {
373+
get {
374+
return ToExport == null || ToExport.Length > 1 || IsPlayableDirector;
375+
}
376+
}
370377

371378
private bool m_isTimelineAnim = false;
372379
protected bool IsTimelineAnim {
@@ -405,8 +412,6 @@ protected bool IsPlayableDirector {
405412
get { return m_isPlayableDirector; }
406413
set {
407414
m_isPlayableDirector = value;
408-
DisableNameSelection = m_isPlayableDirector;
409-
DisableTransferAnim = m_isPlayableDirector;
410415
}
411416
}
412417

@@ -442,8 +447,7 @@ protected int SetGameObjectsToExport(IEnumerable<UnityEngine.Object> toExport){
442447
TransferAnimationSource = go.transform;
443448
TransferAnimationDest = go.transform;
444449
}
445-
}
446-
DisableTransferAnim = ToExport.Length > 1;
450+
}
447451

448452
return ToExport.Length;
449453
}

0 commit comments

Comments
 (0)