Skip to content

Commit 92a1af2

Browse files
authored
Merge pull request #492 from Unity-Technologies/v3.0.0-preview
v3.0.0-preview
2 parents 2516ea7 + 005696c commit 92a1af2

File tree

10 files changed

+66
-22
lines changed

10 files changed

+66
-22
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changes in Fbx Exporter
22

3+
## [3.0.0-preview.2] - 2020-01-13
4+
### Added
5+
- Added FBX Recorder to record animations from the Unity Recorder directly to FBX (adds dependency to Unity Recorder).
6+
- Export animated focal length and lens shift of cameras.
7+
8+
### Changed
9+
- Updated dependency to com.autodesk.fbx version 3.0.0-preview.1, which means we update to [FBX SDK 2020](http://help.autodesk.com/view/FBX/2020/ENU/).
10+
11+
### Fixed
12+
- Fixed camera aspect and gate fit exporting as incorrect values.
13+
14+
### Known Issues
15+
- Using the FBX Recorder to record animated characters is not supported yet, and fails in some cases.
316

417
## [2.0.3-preview.3] - 2019-09-24
518

com.unity.formats.fbx/Documentation~/TableOfContents.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* [FBX Linked Prefabs](prefabs)
44
* [Integration](integration)
55
* [FBX Export settings](options)
6+
* [FBX Recorder](recorder)
67
* [Limitations](knownissues)
78
* [Troubleshooting](troubleshooting)
89
* [Developer's guide](devguide)
18.4 KB
Loading
17.4 KB
Loading
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# FBX Recorder
2+
3+
With the FBX Exporter and the [Unity Recorder](https://docs.unity3d.com/Packages/[email protected]/index.html), it is possible to export animations (including [Cinemachine](https://docs.unity3d.com/Packages/[email protected]/manual/index.html) camera animations) directly to FBX in a few easy steps:
4+
5+
1. Open the Recorder window by selecting (Window > General > Recorder > Recorder Window)
6+
2. In the Recorder window add a new FBX recorder
7+
8+
![](images/FBXExporter_AddRecorder.png)
9+
10+
3. Set the GameObject to record as well as any other desired settings
11+
4. Click "Start Recording" in the Recorder Window
12+
13+
Alternatively, the FBX Recorder can be added as a track in the Timeline.
14+
15+
## Fbx Recorder Settings
16+
17+
![](images/FBXExporter_RecorderSettings.png)
18+
19+
| Property: | Function: |
20+
| :---------------------------- | :----------------------------------------------------------- |
21+
| __File Name__ | The filename for the exported FBX. |
22+
| __Path__ | The path to export the FBX to. Can be outside of the Assets folder. |
23+
| __Take Number__ | The take number can be set and used in the filename. It automatically increments after each recording. |
24+
| __Game Object__ | Set the Game Object in the scene to record. |
25+
| __Recorded Target(s)__ | Select which components of the selected GameObject to record. |
26+
| __Recorded Hierarchy__ | Check to record other objects in the hierarchy of the GameObject in addition to the selected GameObject. |

com.unity.formats.fbx/Documentation~/troubleshooting.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ This section covers the following issues:
88
* [Overwriting FBX files](#OverwritingFiles)
99
* [Tree primitive no longer editable after conversion](#EditableTree)
1010
* [Trail and line particles lose material after being converted](#ParticlesLoseMaterial)
11+
* [Uninstalling FBX Exporter breaks Unity Recorder](#BrokenRecorder)
1112

1213

1314

@@ -71,3 +72,16 @@ To avoid this, make sure to convert only the Tree when finished editing. Otherwi
7172

7273
If you lose Materials when converting trail or line particles, you need to re-apply the Materials to the FBX Linked Prefab after conversion.
7374

75+
76+
77+
<a name="BrokenRecorder"></a>
78+
79+
## Uninstalling FBX Exporter breaks Unity Recorder
80+
81+
If you are uninstalling the FBX Exporter package but would like to continue using the Unity Recorder make sure to first remove all existing FBX Recorders.
82+
You can do this by right clicking on the FBX recorders in the Recorder Window or Timeline and selecting "Delete".
83+
84+
If you have already uninstalled the FBX Exporter package and are now having issues with the Unity Recorder, follow these steps:
85+
1. Reinstall the FBX Exporter package
86+
2. Find and remove all FBX recorder instances (right click and Delete from the Recorder Window and Timeline(s))
87+
3. Uninstall the FBX Exporter from the Package Manager

com.unity.formats.fbx/Editor/Sources/Recorders/FbxRecorder/FbxRecorder.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ protected override void RecordFrame(RecordingSession ctx)
1616

1717
protected override void EndRecording(RecordingSession session)
1818
{
19+
if(session == null)
20+
{
21+
throw new System.ArgumentNullException("session");
22+
}
23+
1924
var settings = (FbxRecorderSettings)session.settings;
2025

2126
foreach (var input in m_Inputs)
@@ -58,10 +63,6 @@ protected override void EndRecording(RecordingSession session)
5863
AnimationUtility.SetAnimationClips(animator, new AnimationClip[] { clip });
5964
var exportSettings = new ExportModelSettingsSerialize();
6065
var toInclude = ExportSettings.Include.ModelAndAnim;
61-
if (!settings.ExportGeometry)
62-
{
63-
toInclude = ExportSettings.Include.Anim;
64-
}
6566
exportSettings.SetModelAnimIncludeOption(toInclude);
6667
ModelExporter.ExportObject(clipName, root, exportSettings);
6768

com.unity.formats.fbx/Editor/Sources/Recorders/FbxRecorder/FbxRecorderSettings.cs

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,8 @@
77
namespace UnityEditor.Formats.Fbx.Exporter
88
{
99
[RecorderSettings(typeof(FbxRecorder), "FBX", "fbx_recorder")]
10-
public class FbxRecorderSettings : RecorderSettings
10+
internal class FbxRecorderSettings : RecorderSettings
1111
{
12-
[SerializeField] bool m_exportGeometry = true;
13-
public bool ExportGeometry
14-
{
15-
get
16-
{
17-
return m_exportGeometry;
18-
}
19-
set
20-
{
21-
m_exportGeometry = value;
22-
}
23-
}
24-
2512
[SerializeField] AnimationInputSettings m_AnimationInputSettings = new AnimationInputSettings();
2613

2714
public AnimationInputSettings animationInputSettings
@@ -76,6 +63,10 @@ protected override bool ValidityCheck(List<string> errors)
7663
if (m_AnimationInputSettings.gameObject == null)
7764
{
7865
ok = false;
66+
if(errors == null)
67+
{
68+
throw new System.ArgumentNullException("errors");
69+
}
7970
errors.Add("No input object set");
8071
}
8172

com.unity.formats.fbx/Editor/Sources/Recorders/FbxRecorder/FbxRecorderSettingsEditor.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ protected override void FileTypeAndFormatGUI()
1414
EditorGUILayout.LabelField("Format", "FBX");
1515

1616
FbxRecorderSettings settings = target as FbxRecorderSettings;
17-
18-
settings.ExportGeometry = EditorGUILayout.Toggle("Export Geometry", settings.ExportGeometry);
1917
}
2018
}
2119
}

com.unity.formats.fbx/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "com.unity.formats.fbx",
33
"displayName": "FBX Exporter",
4-
"version": "2.0.3-preview.3",
4+
"version": "3.0.0-preview.2",
55
"dependencies": {
66
"com.unity.recorder": "2.1.0-preview.1",
77
"com.unity.timeline": "1.0.0",
8-
"com.autodesk.fbx": "2.0.1-preview.1"
8+
"com.autodesk.fbx": "3.0.0-preview.1"
99
},
1010
"unity": "2018.3",
1111
"unityRelease": "4f1",

0 commit comments

Comments
 (0)