# Set focus method of spawned camera 

**URL:** <https://forums.unrealengine.com/t/set-focus-method-of-spawned-camera/2851881>\
**Category:** Cinematics & Media\
**Tags:** unreal-engine, Epic-Pro-Support, question\
**Created:** [October 7, 2026, 9:11am UTC](https://forums.unrealengine.com/t/set-focus-method-of-spawned-camera/2851881 "2026-10-07T09:11:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [October 7, 2026, 9:11am UTC](https://forums.unrealengine.com/t/set-focus-method-of-spawned-camera/2851881/1 "2026-10-07T09:11:43Z")

</div>

In Unreal engine 5.8 I have tried to set the focus method of a spawned camera (in a level sequence) using the python API but nothing seems to work. Could you provide a snippet how this could be achieved?

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [October 7, 2026, 9:11am UTC](https://forums.unrealengine.com/t/set-focus-method-of-spawned-camera/2851881/2 "2026-10-07T09:11:46Z")

</div>

**Steps to Reproduce**

In Unreal engine 5.8 I have tried to set the focus method of a spawned camera (in a level sequence) using the python API but nothing seems to work. Could you provide a snippet how this could be achieved?

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![DDeVoe](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ddevoe/32/1000886_2.png) [@DDeVoe](https://forums.unrealengine.com/u/DDeVoe)\
**Post date:** [October 7, 2026, 4:09pm UTC](https://forums.unrealengine.com/t/set-focus-method-of-spawned-camera/2851881/3 "2026-10-07T16:09:48Z")

</div>

Hey there,

Yep I can provide that.

```auto
import unreal
 
# Get a camera, below I make one.
# Get the subsystem
ls_subsystem = unreal.get_editor_subsystem(unreal.LevelSequenceEditorSubsystem)
camera_binding, camera_actor = ls_subsystem.create_camera(spawnable=True)
 
#Get the camera's cine camera component
comp = camera_actor.get_cine_camera_component()
#Get the focus settings.
focus = comp.focus_settings
 
#modify them using the unreal.CameraFocusMethod, Options are TRACKING, MANUAL, DISABLE, DO_NOT_OVERRIDE
focus.focus_method = unreal.CameraFocusMethod.TRACKING
 
#Set them back to the component
comp.set_editor_property("focus_settings", focus)
 
# You'll want to probably do this to the template object in sequencer as well. 
# All of the functions are the same but when you get the camera you'll also want 
# to get the template object.
template = camera_binding.get_object_template()

```

Hope this helps you out,

Dustin

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [October 8, 2026, 6:42am UTC](https://forums.unrealengine.com/t/set-focus-method-of-spawned-camera/2851881/4 "2026-10-08T06:42:08Z")

</div>

Hi,

Thank you for your quick reply.

However, my issue is that I get _ **None** _ when I try to get the CineCameraComponent.

What I need to do is to get the CineCameraComponent of an existing camera in a LevelSequence. I do not create the camera and then immediately try to get the component, instead I open up an existing sequence with an already created, spawnable camera and from that one try to get the camera component (to be able to set the focus method)

Below is a snippet of the script I am using:

```auto
seq = unreal.LevelSequenceEditorBlueprintLibrary.get_current_level_sequence()
 
for binding in seq.get_bindings():
 
    obj = binding.get_object_template()
    if not isinstance(obj, unreal.CineCameraActor):
        continue
    
    cine_camera_component = obj.get_cine_camera_component()
 
    print(obj)
    # Result -> <Object '/Game/spawnable_cam/LS_spawnable_cam.LS_spawnable_cam:MovieScene_0.CineCameraActor_1' (0x00000204CDBC2A00) Class 'CineCameraActor'>
    print(cine_camera_component)
   # Result -> None 
 
    ...

```

I get the CineCameraActor but when I try to get the component I get None?

What am I missing?

Thank you,

Regards,

Johan

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![DDeVoe](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ddevoe/32/1000886_2.png) [@DDeVoe](https://forums.unrealengine.com/u/DDeVoe)\
**Post date:** [October 8, 2026, 6:38pm UTC](https://forums.unrealengine.com/t/set-focus-method-of-spawned-camera/2851881/5 "2026-10-08T18:38:34Z")

</div>

Hey there,

Bindings can be tricky as well. When you get bindings you don’t just get a top level array, you’ll get all kinds of different things, and not every binding has an object template. Object Template are for spawnables only. So in your case above if for any the camera is not actually spawned or is not a spawnable, but is instead a possessable, this would fail. Also get\_current\_levelsequence can fail if you’re not working on the top level sequence but instead a subseqeunce. Overall a safer approach might be something like:

```auto
import unreal
 
lib = unreal.LevelSequenceEditorBlueprintLibrary
 
# Read bindings from the sequence Sequencer is actually focused on
seq = lib.get_focused_level_sequence()
 
for binding in seq.get_bindings():
    binding_id = seq.get_binding_id(binding)
    objs = lib.get_bound_objects(binding_id)
    for obj in objs:
        #note i'm checking the camera component here, a binding could be the component already.
        if not isinstance(obj, unreal.CineCameraComponent):
            continue
 
        obj.focus_settings
        #etc
 

```

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [October 9, 2026, 6:34am UTC](https://forums.unrealengine.com/t/set-focus-method-of-spawned-camera/2851881/6 "2026-10-09T06:34:11Z")

</div>

Hi Dustin,

Thank you so much!!!

The only thing I added was to mark the object as “dirty” to be able to save the edit.

```auto
obj.modify()
obj.set_editor_property('focus_settings', fs)

```

[Attachment Removed]
