# add CineCameraComponent to Spawnable CinecameraActor

**URL:** <https://forums.unrealengine.com/t/add-cinecameracomponent-to-spawnable-cinecameraactor/481841>\
**Category:** Editor Scripting\
**Tags:** Python, unreal-engine, question\
**Created:** [April 13, 2021, 1:30pm UTC](https://forums.unrealengine.com/t/add-cinecameracomponent-to-spawnable-cinecameraactor/481841 "2021-04-13T13:30:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tearcandy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@tearcandy](https://forums.unrealengine.com/u/tearcandy)\
**Post date:** [April 13, 2021, 1:30pm UTC](https://forums.unrealengine.com/t/add-cinecameracomponent-to-spawnable-cinecameraactor/481841/1 "2021-04-13T13:30:17Z")

</div>

I’m trying to add camera tracks to sequence.  
First, I created master Camera cut track and cineCameraActor using this below script.

> cineCamBinding =  
> unreal.MovieSceneSequenceExtensions.add\_spawnable\_from\_class(seqAsset,  
> unreal.CineCameraActor)

And then I don’t know how to add cineCameraComponent to the spawnable CineCamera.  
CineCamBinding seems doesn’t have any possible method to do it.

Any suggestions?

---

<div class="post-metadata">

**Author:** ![Max.Chen](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/max.chen/32/1194502_2.png) [@Max.Chen](https://forums.unrealengine.com/u/Max.Chen)\
**Post date:** [April 13, 2021, 3:25pm UTC](https://forums.unrealengine.com/t/add-cinecameracomponent-to-spawnable-cinecameraactor/481841/2 "2021-04-13T15:25:48Z")

</div>

The best way to do this is to create a camera, create a spawnable from it, and then get the camera component from the camera and add a possessable binding to it. Here’s an example which is in Engine\Plugins\MovieScene\SequencerScripting\Content\Python\sequencer\_examples.py:

```
def create_level_sequence_with_spawnable_camera(asset_name, package_path = '/Game/'):

	sequence = unreal.AssetToolsHelpers.get_asset_tools().create_asset(asset_name, package_path, unreal.LevelSequence, unreal.LevelSequenceFactoryNew())

	# Create a cine camera actor
	camera_actor = unreal.EditorLevelLibrary().spawn_actor_from_class(unreal.CineCameraActor, unreal.Vector(0,0,0), unreal.Rotator(0,0,0))

	# Add a spawnable using that cine camera actor
	camera_binding = sequence.add_spawnable_from_instance(camera_actor)
	
	# Add a cine camera component binding using the component of the camera actor
	camera_component_binding = sequence.add_possessable(camera_actor.get_cine_camera_component())
	camera_component_binding.set_parent(camera_binding)

	camera_component_binding.set_display_name('renamed')	

	# Add a focal length track and default it to 60
	focal_length_track = camera_component_binding.add_track(unreal.MovieSceneFloatTrack)
	focal_length_track.set_property_name_and_path('CurrentFocalLength', 'CurrentFocalLength')
	focal_length_section = focal_length_track.add_section()
	focal_length_section.set_start_frame_bounded(0)
	focal_length_section.set_end_frame_bounded(0)	
			
	for channel in focal_length_section.find_channels_by_type(unreal.MovieSceneScriptingFloatChannel):
		channel.set_default(60.0)
		
	# Add a transform track
	camera_transform_track = camera_binding.add_track(unreal.MovieScene3DTransformTrack)
	populate_track(sequence, camera_transform_track, 1, 5)
	
	return sequence

```

---

<div class="post-metadata">

**Author:** ![tearcandy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@tearcandy](https://forums.unrealengine.com/u/tearcandy)\
**Post date:** [April 14, 2021, 6:51am UTC](https://forums.unrealengine.com/t/add-cinecameracomponent-to-spawnable-cinecameraactor/481841/3 "2021-04-14T06:51:25Z")

</div>

Thank you for your solution and tips.

It helps me a lot.

Best regards!

---

<div class="post-metadata">

**Author:** ![raianlp](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@raianlp](https://forums.unrealengine.com/u/raianlp)\
**Post date:** [September 19, 2024, 6:00pm UTC](https://forums.unrealengine.com/t/add-cinecameracomponent-to-spawnable-cinecameraactor/481841/4 "2024-09-19T18:00:00Z")

</div>

Is there a way to avoid using a dummy scene actor (i.e. calling _spawn\_actor\_from\_class_)? I would like to use CameraComponent from CineActor from Camera Animation Sequence. I don’t want to create extra objects (cause it binding id will be invalid once I remove actor from the scene)
