Skip to content

Slate sequencer upgrade pr #445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 93 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
52c2bfb
Merge remote-tracking branch 'upstream/master' into bebylon
Feb 9, 2018
87f17f9
Put back K&L specific changes
Feb 9, 2018
152540d
Add PyCalllable_Check_Extended macro to guard against "callable" uscr…
Feb 10, 2018
39906bf
Addd iseditor/isrunninggame/isrunningcommandlet/isrunningdedicatedserver
Feb 12, 2018
16b4b05
Merge remote-tracking branch 'upstream/master' into bebylon
Feb 12, 2018
5fc799f
Add back K&L specific build process workaround
Feb 13, 2018
4ebc878
SPythonTreeView extensions
Feb 14, 2018
9751d91
Python Plugin: Add ability to set styleset with slatestyle widgets
Feb 14, 2018
87b7056
UEPyEngine, UEPyEditor, UEPyModule: Added console exec function to UE…
Feb 16, 2018
e6de04b
FIX: Multicast delegate property should reference pointer in containe…
Feb 16, 2018
e14d936
Make explicit python FTransform a subchild of of UE4's FTransform so …
Feb 16, 2018
003d2ae
Rationalize struct allocation into ue_py_uscriptstruct_alloc()
Feb 16, 2018
f0d4022
Modify PyFVector & PyFTransform to be children of ue4's native FVecto…
Feb 17, 2018
dcf7ed1
Making PyFRotator derive from UE4's FRotator
Feb 17, 2018
2b044d7
Convert PyFQuat to UE4 FQuat base
Feb 17, 2018
477a5f5
FIX: Manually allocating ue_py_uscriptstruct in fquat_init & frotator…
Feb 17, 2018
f7784c7
Merge remote-tracking branch 'upstream/master' into bebylon
Feb 17, 2018
712027f
Merge remote-tracking branch 'upstream/master' into bebylon
Feb 18, 2018
d9fc320
FIX: GetPostGarbageCollect() does not exist in UE4.17; changing to Po…
Feb 20, 2018
db12097
FIX: Bug with order of FRotator initialization
Feb 20, 2018
eb212bc
Add save_package_helper: More robust than save_package
Feb 20, 2018
1299cbd
Add checks using TBaseStructure<FGuid>() instead of searching for FGu…
Feb 20, 2018
7546858
Demarcate K&L specific stuff
Feb 20, 2018
24b354f
Prep for pull-request: Remove K&L specific additions
Feb 20, 2018
acc38e8
Allow FRotator to be initialized with zero parameters
Feb 21, 2018
827f828
Merge remote-tracking branch 'upstream/master' into bebylon
Feb 21, 2018
f7191b6
Merge branch 'bebylon' into structref-makerobust
Feb 21, 2018
fa549ec
Remove memory debug
Feb 21, 2018
6d590d3
Extend SCheckBox & add support for CheckboxStyle
Feb 23, 2018
cc44b06
Python Plugin feature aadditions around Combobox/SSplitter
Feb 27, 2018
5ea3eaa
Merge remote-tracking branch 'upstream/master' into bebylon
Feb 27, 2018
32a4afd
Add autosize option to register_nomad_spawner
Feb 27, 2018
f7c00eb
Python: Extend create detail view to support EEditDefaultsOnlyNodeVis…
Feb 28, 2018
6bed3f9
Extend SScrollBox with remove_slot
Mar 1, 2018
721b2c3
Merge remote-tracking branch 'upstream/master' into bebylon
Mar 2, 2018
7901d4d
Adding SExpandableArea widget
Mar 8, 2018
e5ed452
Merge remote-tracking branch 'upstream/master' into bebylon
Mar 8, 2018
d0893f1
Missing build fixes from last sync
Mar 8, 2018
e558822
Build fix: Marking unreal_engine_py_init() as extern
Mar 9, 2018
473fa29
Merge remote-tracking branch 'upstream/master' into bebylon
Mar 9, 2018
5719a2a
FIX: Memory leak in menu_builder.make_widget()
Mar 9, 2018
68a2fdf
Sequencer & Editor & Slate Extensions:
Mar 11, 2018
6f24c05
Merge remote-tracking branch 'upstream/master' into bebylon
Mar 11, 2018
824d26f
Python Plugin: Add support for passing delegate function parameters
Mar 13, 2018
70ad3dc
Add set_game_mode for feditor_viewport_client_set_game_mode
Mar 14, 2018
a05a5e9
Merge remote-tracking branch 'upstream/master' into bebylon
Mar 14, 2018
977a076
Add missing WITH_EDITOR guards so packaged game builds correctly
Mar 15, 2018
1e617f0
Lots of fixes for 4.19
Mar 19, 2018
5d70ac5
Merge remote-tracking branch 'upstream/master' into bebylon
Mar 19, 2018
4f76b01
Build fixes to allow for standalone builds with python plugin in 4.19
Mar 22, 2018
c988d7c
Add IsCameraLocked, set_height_override, set_width_override to SBox &…
Mar 22, 2018
2ebee12
Add ETabRole, ue_remove_docktab_from_mapping
Mar 25, 2018
01fbbf7
Merge remote-tracking branch 'upstream/master' into bebylon
Mar 25, 2018
3e1be6a
Add support for restoring expanded state for treeview
Mar 26, 2018
d87a2ae
FIX: Add proper sdocktab support in the python layer and support pers…
Apr 3, 2018
692a7ad
Make invoke_tab take in TabManager as argument
Apr 8, 2018
92a9834
Missing comment
Apr 8, 2018
59c1e5b
Merge remote-tracking branch 'upstream/master' into bebylon
Apr 8, 2018
995df4e
Fix Non-editor build errors from py_unreal_engine_find_actor_by_label…
Apr 8, 2018
b9148b2
Extending Tab Management:
Apr 8, 2018
aa28f82
Massive Slate Extensions:
Apr 24, 2018
c622945
PYTHON FEATURE: Added enum property support to the subclassing API
May 1, 2018
03bb205
Adding expander arrow for multicolumn listview
May 12, 2018
8167bc2
Added set_metadata_on_property to UEPyObject to set metadata flags on…
May 18, 2018
99fd35a
Fix SlateIcon support to actually load textures from icons
May 18, 2018
5b555b1
exposed CLASS_HAS_NEWER_VERSION
May 27, 2018
31a7f0a
Add support for Data Validation Manager:
May 29, 2018
11fea2b
Merge remote-tracking branch 'upstream/slate_refactoring' into bebylon
May 29, 2018
ef941ce
FIX: Various regressions from upstream slate refactor
May 29, 2018
55f1eba
Add experimental support for GC'ing StaticSlateDelegates by attaching…
May 29, 2018
616cb31
REGRESSION FIX: Slate delegates are not tracked in slots bc of new lo…
May 30, 2018
7a6c42c
Prepare for merge of #b8f4f23f80edaeadf90b0e3cfc660007875a6e30
May 30, 2018
8637058
Merge commit 'b8f4f23f80edaeadf90b0e3cfc660007875a6e30' into bebylon
May 30, 2018
5674b8f
Merge remote-tracking branch 'upstream/no_pch' into bebylon
May 30, 2018
30f23a3
Merge commit '59ec6f90cd7f3472e6106af644e109f83665c326' into bebylon
May 30, 2018
770407e
Merge commit 'c21f72d362db2f55ed0e503f33963cb68027b182' into bebylon
May 30, 2018
fe605eb
Merge commit '33ac302e704bad6b4e424127b0a703e267eba937' into bebylon
May 30, 2018
f05b979
Merge commit '2bda69f1bc55a7eeaa5a262be3655ffdae5927dc' into bebylon
May 30, 2018
5f36fd6
Merge commit 'cb19b3859f52330ccae02cc04990ec14d686d19d' into bebylon
May 30, 2018
596986a
Merge commit 'acfb20f9567ba026fa4f6b09db8dddc01643a23a' into bebylon
May 30, 2018
437ae3b
Merge commit '551c3d08cf58a19790759e5fb14e2fdc453628c0' into bebylon
May 30, 2018
6571122
Merge commit '3ed29371e7e2a2ce75f425be254e02590ab3f0a5' into bebylon
May 30, 2018
1c99a74
Merge remote-tracking branch 'upstream/master' into bebylon
May 30, 2018
5491dc7
REGRESSION: Fix RunFile logic to work if it gets passed a fully quali…
May 30, 2018
8c653fc
Add is_valid() to fassetdata
May 30, 2018
fc36b3a
FIX: Making standalone builds compile
Jun 20, 2018
eea9766
FIX: Returning zero vector on error for FVector2D getters
Jun 20, 2018
e0b5617
FIX: Logic for get property_struct & is_child_of to properly handle s…
Jun 20, 2018
5a5cb21
Merge commit '7502c054aa36069e4fee8d6a8a2b1f189f4fe179' into bebylon
Jun 20, 2018
022bf7f
Python fixes with returning uninit FVector2D on Error
Jun 22, 2018
8e43026
Merge branch 'bebylon' into structref-makerobust
Jun 22, 2018
bc36054
Remove outdated K&L specific markers as 4.18 exports GetSelectedSections
Jun 22, 2018
8217094
FIX: Syntax error in in .uplugin file
Jun 22, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Source/PythonConsole/Private/PythonScriptFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

UPythonScriptFactory::UPythonScriptFactory(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer) {

Formats.Add(FString("py;Python Script"));

bCreateNew = false;
bEditAfterNew = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ static PyObject *py_ue_iconsole_manager_register_command(PyObject *cls, PyObject
return PyErr_Format(PyExc_Exception, "console object \"%s\" already exists", key);
}

TSharedRef<FPythonSmartConsoleDelegate> py_delegate = MakeShareable(new FPythonSmartConsoleDelegate);
TSharedRef<FPythonSmartConsoleDelegate> py_delegate = MakeShared<FPythonSmartConsoleDelegate>();
py_delegate->SetPyCallable(py_callable);
FConsoleCommandWithArgsDelegate console_delegate;
console_delegate.BindSP(py_delegate, &FPythonSmartConsoleDelegate::OnConsoleCommand);
Expand Down
9 changes: 3 additions & 6 deletions Source/UnrealEnginePython/Private/Fbx/UEPyFbxObject.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@

#include "UEPyFbxObject.h"

#if ENGINE_MINOR_VERSION > 12
#if WITH_EDITOR

#include "UEPyFbxObject.h"
#include "UEPyFbx.h"

#include "Runtime/Engine/Classes/Curves/RichCurve.h"
Expand Down Expand Up @@ -238,8 +235,8 @@ static PyObject *py_ue_fbx_object_key_get_tangent_mode(ue_PyFbxObject *self, PyO

ERichCurveTangentMode Mode = RCTM_Auto;
// Convert the interpolation type from FBX to Unreal.
if (fbx_anim_curve->KeyGetInterpolation(index) ==
FbxAnimCurveDef::eInterpolationCubic)
if ( fbx_anim_curve->KeyGetInterpolation(index) ==
FbxAnimCurveDef::eInterpolationCubic )
{
switch (fbx_anim_curve->KeyGetTangentMode(index))
{
Expand Down
10 changes: 10 additions & 0 deletions Source/UnrealEnginePython/Private/Fbx/UEPyFbxProperty.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ static PyObject *py_ue_fbx_property_get_string(ue_PyFbxProperty *self, PyObject
return PyUnicode_FromString(self->fbx_property.Get<FbxString>());
}

static PyObject *py_ue_fbx_property_get_bool(ue_PyFbxProperty *self, PyObject *args) {
return self->fbx_property.Get<FbxBool>() ? Py_True : Py_False;
}

static PyObject *py_ue_fbx_property_get_int(ue_PyFbxProperty *self, PyObject *args) {
return PyLong_FromLong(self->fbx_property.Get<FbxInt>());
}

static PyObject *py_ue_fbx_property_is_valid(ue_PyFbxProperty *self, PyObject *args) {
if (self->fbx_property.IsValid()) {
Py_RETURN_TRUE;
Expand Down Expand Up @@ -49,6 +57,8 @@ static PyMethodDef ue_PyFbxProperty_methods[] = {
{ "get_name", (PyCFunction)py_ue_fbx_property_get_name, METH_VARARGS, "" },
{ "get_double3", (PyCFunction)py_ue_fbx_property_get_double3, METH_VARARGS, "" },
{ "get_string", (PyCFunction)py_ue_fbx_property_get_string, METH_VARARGS, "" },
{ "get_bool", (PyCFunction)py_ue_fbx_property_get_bool, METH_VARARGS, "" },
{ "get_int", (PyCFunction)py_ue_fbx_property_get_int, METH_VARARGS, "" },
{ "is_valid", (PyCFunction)py_ue_fbx_property_is_valid, METH_VARARGS, "" },
{ "get_curve_node", (PyCFunction)py_ue_fbx_property_get_curve_node, METH_VARARGS, "" },
{ NULL } /* Sentinel */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@


#include "PythonBlueprintFunctionLibrary.h"
#include "UEPyModule.h"

void UPythonBlueprintFunctionLibrary::ExecutePythonScript(FString script)
{
Expand Down
10 changes: 4 additions & 6 deletions Source/UnrealEnginePython/Private/Slate/UEPyFMenuBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ static PyObject *py_ue_fmenu_builder_end_section(ue_PyFMenuBuilder *self, PyObje

static PyObject *py_ue_fmenu_builder_make_widget(ue_PyFMenuBuilder *self, PyObject * args)
{
ue_PySWidget *ret = (ue_PySWidget *)PyObject_New(ue_PySWidget, &ue_PySWidgetType);
new (&ret->Widget) TSharedRef<SWidget>(self->menu_builder.MakeWidget());
ue_PySWidget *ret = py_ue_new_swidget<ue_PySWidget>(self->menu_builder.MakeWidget(), &ue_PySWidgetType);
return (PyObject *)ret;
}

Expand All @@ -34,8 +33,8 @@ static PyObject *py_ue_fmenu_builder_add_menu_entry(ue_PyFMenuBuilder *self, PyO
char *tooltip;
PyObject *py_callable;
PyObject *py_obj = nullptr;
PyObject *py_uiaction_obj = nullptr;
if (!PyArg_ParseTuple(args, "ssO|OO:add_menu_entry", &label, &tooltip, &py_callable, &py_obj, &py_uiaction_obj))
int ui_action_type = EUserInterfaceActionType::Button;
if (!PyArg_ParseTuple(args, "ssO|Oi:add_menu_entry", &label, &tooltip, &py_callable, &py_obj, &ui_action_type))
return nullptr;

if (!PyCalllable_Check_Extended(py_callable))
Expand All @@ -57,9 +56,8 @@ static PyObject *py_ue_fmenu_builder_add_menu_entry(ue_PyFMenuBuilder *self, PyO
handler.BindSP(py_delegate, &FPythonSlateDelegate::SimpleExecuteAction);
}

ue_PyESlateEnums *py_uiaction_enum = py_uiaction_obj ? py_ue_is_eslate_enums(py_uiaction_obj) : nullptr;
self->menu_builder.AddMenuEntry(FText::FromString(UTF8_TO_TCHAR(label)), FText::FromString(UTF8_TO_TCHAR(tooltip)), FSlateIcon(), FUIAction(handler), NAME_None,
py_uiaction_enum ? (EUserInterfaceActionType::Type)(py_uiaction_enum->val) : EUserInterfaceActionType::Button);
(EUserInterfaceActionType::Type)ui_action_type);

Py_RETURN_NONE;
}
Expand Down
40 changes: 40 additions & 0 deletions Source/UnrealEnginePython/Private/Slate/UEPyFSlateIcon.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

#include "UEPyFSlateIcon.h"
#include "Engine/Texture2D.h"
#include "Engine/Engine.h"

static PyObject *py_ue_fslate_icon_get_icon(ue_PyFSlateIcon *self, PyObject * args)
{
Expand Down Expand Up @@ -64,6 +66,44 @@ static int ue_py_fslate_icon_init(ue_PyFSlateIcon *self, PyObject *args, PyObjec
PyErr_SetString(PyExc_ValueError, "you have not specified as style name");
return -1;
}

ISlateStyle const* const foundStyleSet = FSlateStyleRegistry::FindSlateStyle(FName(style_set));

const FSlateBrush * iconBrush = foundStyleSet->GetBrush(style);
FString Path = iconBrush->GetResourceName().ToString();

// Hack to load in the texture resource object of the icon brush in case it hasn't been already loaded
if (!Path.IsEmpty() && iconBrush->GetResourceObject() == nullptr)
{
if (Path.StartsWith(FSlateBrush::UTextureIdentifier()))
{
Path = Path.RightChop(FSlateBrush::UTextureIdentifier().Len());
}

UObject* TextureObject = LoadObject<UTexture2D>(NULL, *Path, NULL, LOAD_None, NULL);
FSlateBrush* Brush = const_cast<FSlateBrush*>(iconBrush);

// Set the texture object to a default texture to prevent constant loading of missing textures
if (!TextureObject)
{
UE_LOG(LogSlate, Warning, TEXT("Error loading loading UTexture from path: %s not found"), *Path);
if (GEngine)
{
TextureObject = GEngine->DefaultTexture;
}
}
else
{
// We do this here because this deprecated system of loading textures will not report references and we dont want the Slate RHI resource manager to manage references
TextureObject->AddToRoot();
}

if (TextureObject)
{
Brush->SetResourceObject(TextureObject);
}
}

new(&self->icon) FSlateIcon(FName(style_set), FName(style));
}
else
Expand Down
Loading