@@ -121,28 +121,39 @@ PyObject *py_ue_sequencer_find_possessable(ue_PyUObject *self, PyObject * args)
121121 ue_py_check (self);
122122
123123 char *guid;
124- if (!PyArg_ParseTuple (args, " s:sequencer_find_possessable" , &guid))
124+ PyObject *py_parent = nullptr ;
125+ if (!PyArg_ParseTuple (args, " s|O:sequencer_find_possessable" , &guid, &py_parent))
125126 {
126- return NULL ;
127+ return nullptr ;
127128 }
128129
129- if (!self->ue_object ->IsA <ULevelSequence>())
130- return PyErr_Format (PyExc_Exception, " uobject is not a LevelSequence" );
130+ ULevelSequence *seq = ue_py_check_type<ULevelSequence>(self);
131+ if (!seq)
132+ {
133+ return PyErr_Format (PyExc_Exception, " uobject is not a ULevelSequence" );
134+ }
131135
132136 FGuid f_guid;
133137 if (!FGuid::Parse (FString (guid), f_guid))
134138 {
135139 return PyErr_Format (PyExc_Exception, " invalid GUID" );
136140 }
137141
138- ULevelSequence *seq = (ULevelSequence *)self->ue_object ;
139-
140142#if ENGINE_MINOR_VERSION < 15
141143 UObject *u_obj = seq->FindPossessableObject (f_guid, seq);
142144#else
145+ UObject *parent = nullptr ;
146+ if (py_parent)
147+ {
148+ parent = ue_py_check_type<UObject>(py_parent);
149+ if (!parent)
150+ {
151+ return PyErr_Format (PyExc_Exception, " argument is not a UObject" );
152+ }
153+ }
143154 UObject *u_obj = nullptr ;
144155 TArray<UObject *, TInlineAllocator<1 >> u_objects;
145- seq->LocateBoundObjects (f_guid, nullptr , u_objects);
156+ seq->LocateBoundObjects (f_guid, parent , u_objects);
146157 if (u_objects.Num () > 0 )
147158 {
148159 u_obj = u_objects[0 ];
@@ -152,7 +163,7 @@ PyObject *py_ue_sequencer_find_possessable(ue_PyUObject *self, PyObject * args)
152163 return PyErr_Format (PyExc_Exception, " unable to find uobject with GUID \" %s\" " , guid);
153164
154165 Py_RETURN_UOBJECT (u_obj);
155- }
166+ }
156167
157168PyObject *py_ue_sequencer_find_spawnable (ue_PyUObject *self, PyObject * args)
158169{
@@ -273,7 +284,7 @@ PyObject *py_ue_sequencer_add_actor(ue_PyUObject *self, PyObject * args)
273284 }
274285
275286 return PyUnicode_FromString (TCHAR_TO_UTF8 (*new_guid.ToString ()));
276- }
287+ }
277288
278289PyObject *py_ue_sequencer_add_actor_component (ue_PyUObject *self, PyObject * args)
279290{
@@ -395,6 +406,26 @@ PyObject *py_ue_sequencer_master_tracks(ue_PyUObject *self, PyObject * args)
395406 return py_tracks;
396407}
397408
409+ PyObject *py_ue_sequencer_get_camera_cut_track (ue_PyUObject *self, PyObject * args)
410+ {
411+
412+ ue_py_check (self);
413+
414+ if (!self->ue_object ->IsA <ULevelSequence>())
415+ return PyErr_Format (PyExc_Exception, " uobject is not a LevelSequence" );
416+
417+ ULevelSequence *seq = (ULevelSequence *)self->ue_object ;
418+ UMovieScene *scene = seq->GetMovieScene ();
419+
420+ UMovieSceneTrack *track = scene->GetCameraCutTrack ();
421+ if (!track)
422+ {
423+ return PyErr_Format (PyExc_Exception, " unable to find camera cut track" );
424+ }
425+
426+ Py_RETURN_UOBJECT (track);
427+ }
428+
398429PyObject *py_ue_sequencer_possessables (ue_PyUObject *self, PyObject * args)
399430{
400431
0 commit comments