Skip to content

Commit 256a6c6

Browse files
committed
修复一些报错
1 parent da974eb commit 256a6c6

5 files changed

Lines changed: 12 additions & 23 deletions

File tree

‎Source/UnrealEnginePython/Private/UObject/UEPyAnimSequence.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
#include "UEPyModule.h"
44
#include "Animation/AnimSequence.h"
5-
#include "Animation/BlendSpaceBase.h"
65
#include "Animation/AnimMontage.h"
76
#include "Wrappers/UEPyFRawAnimSequenceTrack.h"
87

‎Source/UnrealEnginePython/Private/UObject/UEPyCapture.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ struct FInEditorMultiCapture : TSharedFromThis<FInEditorMultiCapture>
139139
if (bIsDeviceValid)
140140
{
141141
TransientMasterVolume = AudioDevice->GetTransientMasterVolume();
142-
AudioDevice->SetTransientMasterVolume(0.0f);
142+
AudioDevice->SetTransientPrimaryVolume(0.0f);
143143
}
144144

145145
// play at the next tick
@@ -363,7 +363,7 @@ struct FInEditorMultiCapture : TSharedFromThis<FInEditorMultiCapture>
363363

364364
if (bIsDeviceValid)
365365
{
366-
AudioDevice->SetTransientMasterVolume(TransientMasterVolume);
366+
AudioDevice->SetTransientPrimaryVolume(TransientMasterVolume);
367367
}
368368

369369
CurrentCaptureObject->Close();

‎Source/UnrealEnginePython/Private/UObject/UEPySequencer.cpp‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
#else
3939
#include "Editor/UnrealEd/Public/FbxImporter.h"
4040
#endif
41-
#include "Editor/MovieSceneTools/Public/MatineeImportTools.h"
4241
#endif
4342

4443
#include "GameFramework/Actor.h"
@@ -824,7 +823,7 @@ PyObject *py_ue_sequencer_create_folder(ue_PyUObject *self, PyObject * args)
824823
else
825824
{
826825
scene->Modify();
827-
scene->GetRootFolders().Add(new_folder);
826+
scene->AddRootFolder(new_folder);
828827
}
829828

830829
Py_RETURN_UOBJECT(new_folder);
@@ -1196,6 +1195,7 @@ PyObject *py_ue_sequencer_section_add_key(ue_PyUObject *self, PyObject * args)
11961195
Py_DECREF(f_value);
11971196
#if !(ENGINE_MAJOR_VERSION == 5 || (ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION >= 20))
11981197
section_float->AddKey(time, value, (EMovieSceneKeyInterpolation)interpolation);
1198+
Py_RETURN_NONE;
11991199
#else
12001200
FMovieSceneFloatChannel& Channel = (FMovieSceneFloatChannel&)section_float->GetChannel();
12011201
int32 RetValue = -1;
@@ -1220,7 +1220,7 @@ PyObject *py_ue_sequencer_section_add_key(ue_PyUObject *self, PyObject * args)
12201220
}
12211221
return PyLong_FromLong(RetValue);
12221222
#endif
1223-
Py_RETURN_NONE;
1223+
12241224
}
12251225
}
12261226

@@ -1233,12 +1233,13 @@ PyObject *py_ue_sequencer_section_add_key(ue_PyUObject *self, PyObject * args)
12331233
value = true;
12341234
#if !(ENGINE_MAJOR_VERSION == 5 || (ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION >= 20))
12351235
section_bool->AddKey(time, value, (EMovieSceneKeyInterpolation)interpolation);
1236+
Py_RETURN_NONE;
12361237
#else
12371238
FMovieSceneBoolChannel& Channel = section_bool->GetChannel();
12381239
int32 RetValue = Channel.GetData().AddKey(FrameNumber, value);
12391240
return PyLong_FromLong(RetValue);
12401241
#endif
1241-
Py_RETURN_NONE;
1242+
12421243
}
12431244
}
12441245

@@ -1368,6 +1369,7 @@ PyObject *py_ue_sequencer_section_add_key(ue_PyUObject *self, PyObject * args)
13681369
section_vector->AddKey(time, vx, (EMovieSceneKeyInterpolation)interpolation);
13691370
section_vector->AddKey(time, vy, (EMovieSceneKeyInterpolation)interpolation);
13701371
section_vector->AddKey(time, vz, (EMovieSceneKeyInterpolation)interpolation);
1372+
Py_RETURN_NONE;
13711373
#else
13721374
int RetValueVX, RetValueVY, RetValueVZ = -1;
13731375

@@ -1406,8 +1408,6 @@ PyObject *py_ue_sequencer_section_add_key(ue_PyUObject *self, PyObject * args)
14061408
}
14071409
return Py_BuildValue("(iii)", RetValueVX, RetValueVY, RetValueVZ);
14081410
#endif
1409-
1410-
Py_RETURN_NONE;
14111411
}
14121412
}
14131413

‎Source/UnrealEnginePython/Private/UObject/UEPyWorld.cpp‎

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -348,10 +348,7 @@ PyObject *py_ue_world_create_folder(ue_PyUObject *self, PyObject * args)
348348
char *path;
349349
if (!PyArg_ParseTuple(args, "s:world_create_folder", &path))
350350
return nullptr;
351-
352-
if (!FActorFolders::IsAvailable())
353-
return PyErr_Format(PyExc_Exception, "FActorFolders is not available");
354-
351+
355352
UWorld *world = ue_get_uworld(self);
356353
if (!world)
357354
return PyErr_Format(PyExc_Exception, "unable to retrieve UWorld from uobject");
@@ -371,10 +368,7 @@ PyObject *py_ue_world_delete_folder(ue_PyUObject *self, PyObject * args)
371368
char *path;
372369
if (!PyArg_ParseTuple(args, "s:world_delete_folder", &path))
373370
return nullptr;
374-
375-
if (!FActorFolders::IsAvailable())
376-
return PyErr_Format(PyExc_Exception, "FActorFolders is not available");
377-
371+
378372
UWorld *world = ue_get_uworld(self);
379373
if (!world)
380374
return PyErr_Format(PyExc_Exception, "unable to retrieve UWorld from uobject");
@@ -396,9 +390,6 @@ PyObject *py_ue_world_rename_folder(ue_PyUObject *self, PyObject * args)
396390
if (!PyArg_ParseTuple(args, "ss:world_rename_folder", &path, &new_path))
397391
return nullptr;
398392

399-
if (!FActorFolders::IsAvailable())
400-
return PyErr_Format(PyExc_Exception, "FActorFolders is not available");
401-
402393
UWorld *world = ue_get_uworld(self);
403394
if (!world)
404395
return PyErr_Format(PyExc_Exception, "unable to retrieve UWorld from uobject");
@@ -417,9 +408,6 @@ PyObject *py_ue_world_folders(ue_PyUObject *self, PyObject * args)
417408

418409
ue_py_check(self);
419410

420-
if (!FActorFolders::IsAvailable())
421-
return PyErr_Format(PyExc_Exception, "FActorFolders is not available");
422-
423411
UWorld *world = ue_get_uworld(self);
424412
if (!world)
425413
return PyErr_Format(PyExc_Exception, "unable to retrieve UWorld from uobject");

‎Source/UnrealEnginePython/Private/UnrealEnginePython.cpp‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#include "ClassIconFinder.h"
1010
#endif
1111

12+
#include <clocale>
13+
1214
#include "Styling/SlateStyleRegistry.h"
1315
#if WITH_EDITOR
1416
#include "IPythonScriptPlugin.h"

0 commit comments

Comments
 (0)