| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent cab5988 commit 8e7b4e6
6 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -30,8 +30,13 @@ static PyObject *py_ue_fpaint_context_draw_line(ue_PyFPaintContext *self, PyObje | |||
| 30 | 30 | points.Add(FVector2D(x1, y1)); | |
| 31 | 31 | points.Add(FVector2D(x2, y2)); | |
| 32 | 32 | ||
| 33 | + #if ENGINE_MINOR_VERSION >= 17 | ||
| 34 | + FSlateDrawElement::MakeLines(context.OutDrawElements, context.MaxLayer, context.AllottedGeometry.ToPaintGeometry(), | ||
| 35 | + points, ESlateDrawEffect::None, tint, (py_antialias && !PyObject_IsTrue(py_antialias)), thickness); | ||
| 36 | + #else | ||
| 33 | 37 | FSlateDrawElement::MakeLines(context.OutDrawElements, context.MaxLayer, context.AllottedGeometry.ToPaintGeometry(), | |
| 34 | 38 | points, context.MyClippingRect, ESlateDrawEffect::None, tint, (py_antialias && !PyObject_IsTrue(py_antialias)), thickness); | |
| 39 | + #endif | ||
| 35 | 40 | ||
| 36 | 41 | Py_RETURN_NONE; | |
| 37 | 42 | } | |
@@ -73,8 +78,13 @@ static PyObject *py_ue_fpaint_context_draw_text(ue_PyFPaintContext *self, PyObje | |||
| 73 | 78 | ||
| 74 | 79 | context.MaxLayer++; | |
| 75 | 80 | ||
| 81 | + #if ENGINE_MINOR_VERSION >= 17 | ||
| 82 | + FSlateDrawElement::MakeText(context.OutDrawElements, context.MaxLayer, context.AllottedGeometry.ToOffsetPaintGeometry(position), | ||
| 83 | + FText::FromString(UTF8_TO_TCHAR(text)), font, ESlateDrawEffect::None, tint); | ||
| 84 | + #else | ||
| 76 | 85 | FSlateDrawElement::MakeText(context.OutDrawElements, context.MaxLayer, context.AllottedGeometry.ToOffsetPaintGeometry(position), | |
| 77 | 86 | FText::FromString(UTF8_TO_TCHAR(text)), font, context.MyClippingRect, ESlateDrawEffect::None, tint); | |
| 87 | + #endif | ||
| 78 | 88 | ||
| 79 | 89 | Py_RETURN_NONE; | |
| 80 | 90 | } | |
@@ -104,9 +114,15 @@ static PyObject *py_ue_fpaint_context_draw_spline(ue_PyFPaintContext *self, PyOb | |||
| 104 | 114 | ||
| 105 | 115 | context.MaxLayer++; | |
| 106 | 116 | ||
| 117 | + #if ENGINE_MINOR_VERSION >= 17 | ||
| 118 | + FSlateDrawElement::MakeSpline(context.OutDrawElements, context.MaxLayer, context.AllottedGeometry.ToPaintGeometry(), | ||
| 119 | + FVector2D(x1, y1), FVector2D(dx1, dy1), FVector2D(x2, y2), FVector2D(dx2, dy2), | ||
| 120 | + thickness, ESlateDrawEffect::None, tint); | ||
| 121 | + #else | ||
| 107 | 122 | FSlateDrawElement::MakeSpline(context.OutDrawElements, context.MaxLayer, context.AllottedGeometry.ToPaintGeometry(), | |
| 108 | 123 | FVector2D(x1, y1), FVector2D(dx1, dy1), FVector2D(x2, y2), FVector2D(dx2, dy2), | |
| 109 | 124 | context.MyClippingRect, thickness, ESlateDrawEffect::None, tint); | |
| 125 | + #endif | ||
| 110 | 126 | ||
| 111 | 127 | Py_RETURN_NONE; | |
| 112 | 128 | } | |
@@ -157,8 +173,13 @@ static PyObject *py_ue_fpaint_context_draw_lines(ue_PyFPaintContext *self, PyObj | |||
| 157 | 173 | ||
| 158 | 174 | context.MaxLayer++; | |
| 159 | 175 | ||
| 176 | + #if ENGINE_MINOR_VERSION >= 17 | ||
| 177 | + FSlateDrawElement::MakeLines(context.OutDrawElements, context.MaxLayer, context.AllottedGeometry.ToPaintGeometry(), | ||
| 178 | + points, ESlateDrawEffect::None, tint, (py_antialias && !PyObject_IsTrue(py_antialias)), thickness); | ||
| 179 | + #else | ||
| 160 | 180 | FSlateDrawElement::MakeLines(context.OutDrawElements, context.MaxLayer, context.AllottedGeometry.ToPaintGeometry(), | |
| 161 | 181 | points, context.MyClippingRect, ESlateDrawEffect::None, tint, (py_antialias && !PyObject_IsTrue(py_antialias)), thickness); | |
| 182 | + #endif | ||
| 162 | 183 | ||
| 163 | 184 | Py_RETURN_NONE; | |
| 164 | 185 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -143,8 +143,11 @@ PyTypeObject ue_PySWindowType = { | |||
| 143 | 143 | static int ue_py_swindow_init(ue_PySWindow *self, PyObject *args, PyObject *kwargs) { | |
| 144 | 144 | ||
| 145 | 145 | ue_py_slate_setup_farguments(SWindow); | |
| 146 | - | ||
| 146 | + #if ENGINE_MINOR_VERSION > 15 | ||
| 147 | + ue_py_slate_farguments_optional_enum("activation_policy", ActivationPolicy, EWindowActivationPolicy); | ||
| 148 | + #else | ||
| 147 | 149 | ue_py_slate_farguments_optional_bool("activate_when_first_shown", ActivateWhenFirstShown); | |
| 150 | + #endif | ||
| 148 | 151 | #if ENGINE_MINOR_VERSION > 15 | |
| 149 | 152 | ue_py_slate_farguments_optional_enum("auto_center", AutoCenter, EAutoCenter); | |
| 150 | 153 | #else | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -227,8 +227,12 @@ PyObject *py_unreal_engine_editor_play(PyObject * self, PyObject * args) { | |||
| 227 | 227 | r = rotator->rot; | |
| 228 | 228 | } | |
| 229 | 229 | ||
| 230 | - | ||
| 230 | + #if ENGINE_MINOR_VERSION >= 17 | ||
| 231 | + const FString mobile_device; | ||
| 232 | + GEditor->RequestPlaySession(&v, &r, false, false, mobile_device); | ||
| 233 | + #else | ||
| 231 | 234 | GEditor->RequestPlaySession(&v, &r, false, false); | |
| 235 | + #endif | ||
| 232 | 236 | ||
| 233 | 237 | Py_RETURN_NONE; | |
| 234 | 238 | } | |
@@ -1207,7 +1211,11 @@ PyObject *py_unreal_engine_blueprint_add_member_variable(PyObject * self, PyObje | |||
| 1207 | 1211 | #if ENGINE_MINOR_VERSION > 14 | |
| 1208 | 1212 | FEdGraphPinType pin; | |
| 1209 | 1213 | pin.PinCategory = UTF8_TO_TCHAR(in_type); | |
| 1214 | + #if ENGINE_MINOR_VERSION >= 17 | ||
| 1215 | + pin.ContainerType = is_array ? EPinContainerType::Array : EPinContainerType::None; | ||
| 1216 | + #else | ||
| 1210 | 1217 | pin.bIsArray = is_array; | |
| 1218 | + #endif | ||
| 1211 | 1219 | #else | |
| 1212 | 1220 | FEdGraphPinType pin(UTF8_TO_TCHAR(in_type), FString(""), nullptr, is_array, false); | |
| 1213 | 1221 | #endif | |
@@ -1656,7 +1664,7 @@ PyObject *py_unreal_engine_add_level_to_world(PyObject *self, PyObject * args) { | |||
| 1656 | 1664 | streaming_mode_class = ULevelStreamingAlwaysLoaded::StaticClass(); | |
| 1657 | 1665 | } | |
| 1658 | 1666 | ||
| 1659 | - ULevel *level = EditorLevelUtils::AddLevelToWorld(u_world, UTF8_TO_TCHAR(name), streaming_mode_class); | ||
| 1667 | + ULevel *level = (ULevel *)EditorLevelUtils::AddLevelToWorld(u_world, UTF8_TO_TCHAR(name), streaming_mode_class); | ||
| 1660 | 1668 | if (level) { | |
| 1661 | 1669 | // TODO: update levels list | |
| 1662 | 1670 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2404,7 +2404,11 @@ PyObject *py_ue_ufunction_call(UFunction *u_function, UObject *u_obj, PyObject * | |||
| 2404 | 2404 | FString default_key = FString("CPP_Default_") + prop->GetName(); | |
| 2405 | 2405 | FString default_key_value = u_function->GetMetaData(FName(*default_key)); | |
| 2406 | 2406 | if (!default_key_value.IsEmpty()) { | |
| 2407 | + #if ENGINE_MINOR_VERSION >= 17 | ||
| 2408 | + prop->ImportText(*default_key_value, prop->ContainerPtrToValuePtr<uint8>(buffer), PPF_None, NULL); | ||
| 2409 | + #else | ||
| 2407 | 2410 | prop->ImportText(*default_key_value, prop->ContainerPtrToValuePtr<uint8>(buffer), PPF_Localized, NULL); | |
| 2411 | + #endif | ||
| 2408 | 2412 | } | |
| 2409 | 2413 | #endif | |
| 2410 | 2414 | } | |
@@ -2774,7 +2778,12 @@ UFunction *unreal_engine_add_function(UClass *u_class, char *name, PyObject *py_ | |||
| 2774 | 2778 | UE_LOG(LogPython, Warning, TEXT("REGISTERED FUNCTION %s WITH %d PARAMS (size %d) %d"), *function->GetFName().ToString(), function->NumParms, function->ParmsSize, function->PropertiesSize); | |
| 2775 | 2779 | } | |
| 2776 | 2780 | ||
| 2781 | + | ||
| 2782 | + #if ENGINE_MINOR_VERSION >= 17 | ||
| 2783 | + function->FunctionFlags = (EFunctionFlags)function_flags; | ||
| 2784 | + #else | ||
| 2777 | 2785 | function->FunctionFlags = function_flags; | |
| 2786 | + #endif | ||
| 2778 | 2787 | ||
| 2779 | 2788 | function->SetNativeFunc((Native)&UPythonFunction::CallPythonCallable); | |
| 2780 | 2789 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,9 +31,11 @@ static PyObject *py_ue_fassetdata_get_asset_name(ue_PyFAssetData *self, void *cl | |||
| 31 | 31 | return PyUnicode_FromString(TCHAR_TO_UTF8(*self->asset_data.AssetName.ToString())); | |
| 32 | 32 | } | |
| 33 | 33 | ||
| 34 | + #if ENGINE_MINOR_VERSION < 17 | ||
| 34 | 35 | static PyObject *py_ue_fassetdata_get_group_names(ue_PyFAssetData *self, void *closure) { | |
| 35 | 36 | return PyUnicode_FromString(TCHAR_TO_UTF8(*self->asset_data.GroupNames.ToString())); | |
| 36 | 37 | } | |
| 38 | + #endif | ||
| 37 | 39 | ||
| 38 | 40 | static PyObject *py_ue_fassetdata_get_object_path(ue_PyFAssetData *self, void *closure) { | |
| 39 | 41 | return PyUnicode_FromString(TCHAR_TO_UTF8(*self->asset_data.ObjectPath.ToString())); | |
@@ -65,7 +67,9 @@ static PyObject *py_ue_fassetdata_get_tags_and_values(ue_PyFAssetData *self, voi | |||
| 65 | 67 | static PyGetSetDef ue_PyFAssetData_getseters[] = { | |
| 66 | 68 | { (char *)"asset_class", (getter)py_ue_fassetdata_get_asset_class, nullptr, (char *)"asset_class" }, | |
| 67 | 69 | { (char *)"asset_name", (getter)py_ue_fassetdata_get_asset_name, nullptr, (char *)"asset_name" }, | |
| 70 | + #if ENGINE_MINOR_VERSION < 17 | ||
| 68 | 71 | { (char *)"group_names", (getter)py_ue_fassetdata_get_group_names, nullptr, (char *)"group_names" }, | |
| 72 | + #endif | ||
| 69 | 73 | { (char *)"object_path",(getter)py_ue_fassetdata_get_object_path, nullptr, (char *)"object_path" }, | |
| 70 | 74 | { (char *)"package_flags",(getter)py_ue_fassetdata_get_package_flags, nullptr, (char *)"package_flags" }, | |
| 71 | 75 | { (char *)"package_name", (getter)py_ue_fassetdata_get_package_name, nullptr, (char *)"package_name" }, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,7 +10,7 @@ | |||
| 10 | 10 | "DocsURL": "", | |
| 11 | 11 | "MarketplaceURL": "", | |
| 12 | 12 | "SupportURL": "", | |
| 13 | - "EnabledByDefault": false, | ||
| 13 | + "EnabledByDefault": true, | ||
| 14 | 14 | "CanContainContent": true, | |
| 15 | 15 | "IsBetaVersion": true, | |
| 16 | 16 | "Installed": false, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments