@@ -163,7 +163,7 @@ PyObject *py_ue_sequencer_find_possessable(ue_PyUObject *self, PyObject * args)
163163 return PyErr_Format (PyExc_Exception, " unable to find uobject with GUID \" %s\" " , guid);
164164
165165 Py_RETURN_UOBJECT (u_obj);
166- }
166+ }
167167
168168PyObject *py_ue_sequencer_find_spawnable (ue_PyUObject *self, PyObject * args)
169169{
@@ -284,7 +284,7 @@ PyObject *py_ue_sequencer_add_actor(ue_PyUObject *self, PyObject * args)
284284 }
285285
286286 return PyUnicode_FromString (TCHAR_TO_UTF8 (*new_guid.ToString ()));
287- }
287+ }
288288
289289PyObject *py_ue_sequencer_add_actor_component (ue_PyUObject *self, PyObject * args)
290290{
@@ -702,9 +702,10 @@ PyObject *py_ue_sequencer_section_add_key(ue_PyUObject *self, PyObject * args)
702702 float time;
703703 PyObject *py_value;
704704 int interpolation = 0 ;
705- if (!PyArg_ParseTuple (args, " fO|i:sequencer_section_add_key" , &time, &py_value, &interpolation))
705+ PyObject *py_unwind = nullptr ;
706+ if (!PyArg_ParseTuple (args, " fO|iO:sequencer_section_add_key" , &time, &py_value, &interpolation, &py_unwind))
706707 {
707- return NULL ;
708+ return nullptr ;
708709 }
709710
710711 if (!self->ue_object ->IsA <UMovieSceneSection>())
@@ -740,7 +741,7 @@ PyObject *py_ue_sequencer_section_add_key(ue_PyUObject *self, PyObject * args)
740741 {
741742 if (ue_PyFTransform *py_transform = py_ue_is_ftransform (py_value))
742743 {
743- bool unwind = false ;
744+ bool unwind = (py_unwind && PyObject_IsTrue (py_unwind)) ;
744745 FTransform transform = py_transform->transform ;
745746
746747
@@ -751,9 +752,7 @@ PyObject *py_ue_sequencer_section_add_key(ue_PyUObject *self, PyObject * args)
751752 section_transform->AddKey (time, ty, (EMovieSceneKeyInterpolation)interpolation);
752753 section_transform->AddKey (time, tz, (EMovieSceneKeyInterpolation)interpolation);
753754
754- /* FTransformKey rx = FTransformKey(EKey3DTransformChannel::Rotation, EAxis::X, transform.GetRotation().Rotator().Roll, unwind);
755- FTransformKey ry = FTransformKey(EKey3DTransformChannel::Rotation, EAxis::Y, transform.GetRotation().Rotator().Pitch, unwind);
756- FTransformKey rz = FTransformKey(EKey3DTransformChannel::Rotation, EAxis::Z, transform.GetRotation().Rotator().Yaw, unwind);*/
755+
757756 FTransformKey rx = FTransformKey (EKey3DTransformChannel::Rotation, EAxis::X, transform.GetRotation ().Euler ().X , unwind);
758757 FTransformKey ry = FTransformKey (EKey3DTransformChannel::Rotation, EAxis::Y, transform.GetRotation ().Euler ().Y , unwind);
759758 FTransformKey rz = FTransformKey (EKey3DTransformChannel::Rotation, EAxis::Z, transform.GetRotation ().Euler ().Z , unwind);
0 commit comments