Hello,
We have our own class of cameras that are in a sequencer but they are based off of a CineCameraActor. Going through all of the bindings in the sequence, I am able to find our assets, but they return as MovieSceneBindingProxy. I am trying to export these from the sequencer using unreal.Exporter.run_asset_export_task
but it throws this error.
LogPython: Error: TypeError: AssetExportTask: Failed to convert type ‘MovieSceneBindingProxy’ to property ‘Object’ (ObjectProperty) for attribute ‘object’ on ‘AssetExportTask’
LogPython: Error: TypeError: NativizeProperty: Cannot nativize ‘MovieSceneBindingProxy’ as ‘Object’ (ObjectProperty)
LogPython: Error: TypeError: NativizeObject: Cannot nativize ‘MovieSceneBindingProxy’ as ‘Object’ (allowed Class type: ‘Object’)
How can I get the Object of a MovieSceneBindingProxy so that I can export them? Or, is there another way I should be going about this?
Any help would be appreciated.
Here is an example of what the code looks like:
SEQ = unreal.EditorAssetLibrary.load_asset( path_to_selected_sequence )
def get_cameras():
cams = []
for binding in SEQ.get_bindings():
template = binding.get_object_template()
if type(template) == unreal.CCATCineCameraActor:
cams.append(binding)
return cams
for cam in get_cameras():
output_name = os.path.join( self.export_dir, '{0}.fbx'.format( cam.get_display_name()) )
export_options = unreal.FbxExportOption()
export_options.ascii = False
export_options.level_of_detail = False
export_options.collision = False
task = unreal.AssetExportTask()
task.set_editor_property("object", cam) # Unreal needs one object here
task.set_editor_property("filename", output_name)
task.set_editor_property("selected", True)
task.set_editor_property("automated", True)
task.set_editor_property("replace_identical", True)
task.set_editor_property("prompt", False)
task.set_editor_property("options", export_options)
success = unreal.Exporter.run_asset_export_task(task)