Skip to content

Commit 6c589b0

Browse files
committed
- fixe for Unreal Engine 4.27
TODO: - can't fix 2 functions: - UEPySequencer.cpp -> // commented out for now MovieSceneToolHelpers::CameraAdded(OwnerMovieScene, CameraGuid, sequencer->GetLocalTime().Time.FloorToFrame()); - UEPySCheckBox.cpp // commented out ue_py_slate_farguments_enum("click_method", ClickMethod, EButtonClickMethod::Type);
1 parent b77c30e commit 6c589b0

9 files changed

Lines changed: 16 additions & 10 deletions

File tree

Source/UnrealEnginePython/Private/Http/UEPyIHttpRequest.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "UEPyIHttpResponse.h"
55

66
#include "Runtime/Online/HTTP/Public/HttpManager.h"
7+
#include "Runtime/Online/HTTP/Public/HttpModule.h"
78

89
static PyObject *py_ue_ihttp_request_set_verb(ue_PyIHttpRequest *self, PyObject * args)
910
{
@@ -307,7 +308,8 @@ static int ue_py_ihttp_request_init(ue_PyIHttpRequest *self, PyObject *args, PyO
307308
{
308309
return -1;
309310
}
310-
new(&self->http_request) TSharedRef<IHttpRequest>(FHttpModule::Get().CreateRequest());
311+
new(&self->http_request) TSharedRef<IHttpRequest, ESPMode::ThreadSafe>(FHttpModule::Get().CreateRequest());
312+
//new(&self->http_request) TSharedRef<IHttpRequest>(FHttpModule::Get().CreateRequest());
311313
new(&self->on_process_request_complete) TSharedPtr<FPythonSmartHttpDelegate>(nullptr);
312314
new(&self->on_request_progress) TSharedPtr<FPythonSmartHttpDelegate>(nullptr);
313315
self->py_dict = PyDict_New();

Source/UnrealEnginePython/Private/Slate/UEPySCheckBox.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ static int ue_py_scheck_box_init(ue_PySCheckBox *self, PyObject *args, PyObject
103103
ue_py_slate_farguments_enum("is_checked", IsChecked, ECheckBoxState);
104104
ue_py_slate_farguments_optional_enum("h_align", HAlign, EHorizontalAlignment);
105105
ue_py_slate_farguments_struct("padding", Padding, FMargin);
106-
ue_py_slate_farguments_enum("click_method", ClickMethod, EButtonClickMethod::Type);
106+
107+
//ue_py_slate_farguments_enum("click_method", ClickMethod, EButtonClickMethod::Type);
108+
107109
ue_py_slate_farguments_optional_bool("is_focusable", IsFocusable);
108110
ue_py_slate_farguments_optional_struct_ptr("unchecked_image", UncheckedImage, FSlateBrush);
109111
ue_py_slate_farguments_optional_struct_ptr("unchecked_hoveredimage", UncheckedHoveredImage, FSlateBrush);

Source/UnrealEnginePython/Private/Slate/UEPySlate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1494,7 +1494,7 @@ PyObject *py_unreal_engine_invoke_tab(PyObject * self, PyObject * args)
14941494
return NULL;
14951495
}
14961496

1497-
FGlobalTabmanager::Get()->InvokeTab(FTabId(FName(UTF8_TO_TCHAR(name))));
1497+
FGlobalTabmanager::Get()->TryInvokeTab(FTabId(FName(UTF8_TO_TCHAR(name))));
14981498

14991499
Py_INCREF(Py_None);
15001500
return Py_None;

Source/UnrealEnginePython/Private/UEPyEngine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ PyObject *py_unreal_engine_object_path_to_package_name(PyObject * self, PyObject
215215
{
216216
return NULL;
217217
}
218-
return PyUnicode_FromString(TCHAR_TO_UTF8(*FPackageName::ObjectPathToPackageName(UTF8_TO_TCHAR(path))));
218+
return PyUnicode_FromString(TCHAR_TO_UTF8(*FPackageName::ObjectPathToPackageName( FString( UTF8_TO_TCHAR(path)))));
219219
}
220220

221221
PyObject *py_unreal_engine_get_path(PyObject * self, PyObject * args)

Source/UnrealEnginePython/Private/UObject/UEPyObject.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2784,7 +2784,8 @@ PyObject *py_ue_save_package(ue_PyUObject * self, PyObject * args)
27842784
}
27852785
}
27862786
// create a new package if it does not exist
2787-
package = CreatePackage(nullptr, UTF8_TO_TCHAR(name));
2787+
//package = CreatePackage(nullptr, UTF8_TO_TCHAR(name));
2788+
package = CreatePackage(UTF8_TO_TCHAR(name));
27882789
if (!package)
27892790
return PyErr_Format(PyExc_Exception, "unable to create package");
27902791

Source/UnrealEnginePython/Private/UObject/UEPySequencer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ PyObject *py_ue_sequencer_add_camera(ue_PyUObject *self, PyObject * args)
611611
UMovieSceneSequence* Sequence = sequencer->GetFocusedMovieSceneSequence();
612612
UMovieScene* OwnerMovieScene = Sequence->GetMovieScene();
613613

614-
MovieSceneToolHelpers::CameraAdded(OwnerMovieScene, CameraGuid, sequencer->GetLocalTime().Time.FloorToFrame());
614+
//MovieSceneToolHelpers::CameraAdded(OwnerMovieScene, CameraGuid, sequencer->GetLocalTime().Time.FloorToFrame());
615615

616616
}
617617
#else

Source/UnrealEnginePython/Private/UObject/UEPySkeletal.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1065,7 +1065,8 @@ PyObject *py_ue_skeletal_mesh_build_lod(ue_PyUObject *self, PyObject * args, PyO
10651065
build_settings.bComputeTangents = (py_compute_tangents && PyObject_IsTrue(py_compute_tangents));
10661066
build_settings.bRemoveDegenerateTriangles = true;
10671067

1068-
bool success = MeshUtilities.BuildSkeletalMesh(lod_model, mesh->RefSkeleton, influences, wedges, faces, points, points_to_map, build_settings);
1068+
//bool success = MeshUtilities.BuildSkeletalMesh(lod_model, mesh->RefSkeleton, influences, wedges, faces, points, points_to_map, build_settings);
1069+
bool success = MeshUtilities.BuildSkeletalMesh(lod_model, mesh->GetName(), mesh->GetRefSkeleton(), influences, wedges, faces, points, points_to_map, build_settings);
10691070

10701071
if (!success)
10711072
{

Source/UnrealEnginePython/Private/Voice/UEPyIVoiceCapture.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ static PyTypeObject ue_PyIVoiceCaptureType = {
131131
static int py_ue_ivoice_capture_init(ue_PyIVoiceCapture *self, PyObject * args)
132132
{
133133

134-
TSharedPtr<IVoiceCapture> voice_capture_ptr = FVoiceModule::Get().CreateVoiceCapture();
134+
TSharedPtr<IVoiceCapture> voice_capture_ptr = FVoiceModule::Get().CreateVoiceCapture("", 32000, 16);
135135
if (!voice_capture_ptr.IsValid())
136136
{
137137
PyErr_SetString(PyExc_Exception, "unable to create a new VoiceCapture");

Source/UnrealEnginePython/Private/Wrappers/UEPyFAssetData.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ static PyObject *py_ue_fassetdata_get_tags_and_values(ue_PyFAssetData *self, voi
122122
for (auto It = self->asset_data.TagsAndValues.CreateConstIterator(); It; ++It)
123123
{
124124
PyDict_SetItem(ret,
125-
PyUnicode_FromString(TCHAR_TO_UTF8(*It->Key.ToString())),
126-
PyUnicode_FromString(TCHAR_TO_UTF8(*It->Value)));
125+
PyUnicode_FromString(TCHAR_TO_UTF8(*It.Key().ToString())),
126+
PyUnicode_FromString(TCHAR_TO_UTF8(*It.Value().AsString() )));
127127
}
128128
return ret;
129129
}

0 commit comments

Comments
 (0)