Summary
Importing a FBX camera into sequencer via python (and BP), onto am existing spawnable camera does not import the focal length or manual focus distance keys (only transform) in 5.8.
- This same code/fbx file import as expected in 5.7.4
- This same code/fbx file will import as expected in 5.8 if you use a a possessable or custom binding camera instead of spawnable
- Right clicking on the spawnable camera in the sequencer editor → import FBX works as expected
- The same issue happens when using an editor blueprint instead of python
What Type of Bug are you experiencing?
Animation
Steps to Reproduce
- (You will need an FBX export containing a camera)
- Create an empty sequecner and open it
- Run the below python script (or equivillent in BP)
seq = unreal.LevelSequenceEditorBlueprintLibrary.get_focused_level_sequence()
# alternatively, this stilll caues the issue ----------------------
# seq = unreal.load_asset(<PATH TO SEQ>)
# # if you need to create the camrea must "open" the seq - otherwise you can get an existing spawnable binding ref will give the same result
# --------------------------------
spawnable_camera_bind, act = unreal.get_editor_subsystem(unreal.LevelSequenceEditorSubsystem).create_camera(True)
import_setts = unreal.MovieSceneUserImportFBXSettings()
import_setts.set_editor_properties(
{
"match_by_name_only": False,
"reduce_keys": False,
"create_cameras": False,
"replace_transform_track": True
}
)
unreal.SequencerTools.import_level_sequence_fbx(
unreal.get_editor_subsystem(unreal.UnrealEditorSubsystem).get_editor_world(),
seq,
[spawnable_camera_bind], # Also tried passing in the possessable component with no success
import_setts,
"PATH TO CAMERA FBX FILE"
)
#-------------------------
Expected Result
The camera actor has keys on the transform track, and the camera component has keys on the manual focus distance and focal length tracks
Observed Result
The camera only gets keys on the transform tracks
Affects Versions
5.8
Platform(s)
Windows
Additional Notes
CURRENT WORKAROUND (That can also interfere with debugging):
If you create a possessable/custom binding camera in the sequencer before runnning the import function, the import WILL WORK onto the spawnable binding and you can remove the other camera after.
Important to know this “hack” when you are testing!