Skip to content

Commit 95259c1

Browse files
author
ikrima
committed
FIX: Editor widgets SNodePanel/SGraphPanel/etc were referenced in non-editor builds
-Removing them by wrapping in WITH_EDITOR
1 parent ab09d02 commit 95259c1

7 files changed

Lines changed: 17 additions & 6 deletions

File tree

Source/UnrealEnginePython/Private/Slate/UEPySGraphEditor.h

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

33
#include "UnrealEnginePython.h"
44

5-
5+
#if WITH_EDITOR
66
#include "UEPySCompoundWidget.h"
77

88
#include "Editor/UnrealEd/Public/GraphEditor.h"
@@ -15,3 +15,4 @@ typedef struct {
1515
} ue_PySGraphEditor;
1616

1717
void ue_python_init_sgraph_editor(PyObject *);
18+
#endif

Source/UnrealEnginePython/Private/Slate/UEPySGraphPanel.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "UnrealEnginePythonPrivatePCH.h"
22

3+
#if WITH_EDITOR
34
#include "UEPySGraphPanel.h"
45

56
#define sw_graph_panel StaticCastSharedRef<SGraphPanel>(self->s_nodePanel.s_panel.s_widget)
@@ -131,4 +132,6 @@ void ue_python_init_sgraph_panel(PyObject *ue_module)
131132

132133
Py_INCREF(&ue_PySGraphPanelType);
133134
PyModule_AddObject(ue_module, "SGraphPanel", (PyObject *)&ue_PySGraphPanelType);
134-
}
135+
}
136+
137+
#endif

Source/UnrealEnginePython/Private/Slate/UEPySGraphPanel.h

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

33
#include "UnrealEnginePython.h"
44

5+
#if WITH_EDITOR
56
#include "UEPySNodePanel.h"
67

78
#include "Editor/GraphEditor/Public/SGraphPanel.h"
@@ -15,3 +16,4 @@ typedef struct {
1516

1617

1718
void ue_python_init_sgraph_panel(PyObject *);
19+
#endif

Source/UnrealEnginePython/Private/Slate/UEPySNodePanel.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
#include "UnrealEnginePythonPrivatePCH.h"
33

4+
#if WITH_EDITOR
45
#include "UEPySNodePanel.h"
56

67
#define sw_node_panel StaticCastSharedRef<SNodePanel>(self->s_panel.s_widget)
@@ -52,3 +53,5 @@ void ue_python_init_snode_panel(PyObject *ue_module)
5253
Py_INCREF(&ue_PySNodePanelType);
5354
PyModule_AddObject(ue_module, "SNodePanel", (PyObject *)&ue_PySNodePanelType);
5455
}
56+
57+
#endif

Source/UnrealEnginePython/Private/Slate/UEPySNodePanel.h

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

33
#include "UnrealEnginePython.h"
44

5+
#if WITH_EDITOR
56
#include "UEPySPanel.h"
67

78
#include "Editor/GraphEditor/Public/SNodePanel.h"
@@ -15,3 +16,4 @@ typedef struct {
1516

1617

1718
void ue_python_init_snode_panel(PyObject *);
19+
#endif

Source/UnrealEnginePython/Private/Slate/UEPySlate.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -832,11 +832,11 @@ void ue_python_init_slate(PyObject *module)
832832
ue_python_init_sspacer(module);
833833
ue_python_init_spython_widget(module);
834834
ue_python_init_soverlay(module);
835-
ue_python_init_snode_panel(module);
836-
ue_python_init_sgraph_panel(module);
837835

838836

839837
#if WITH_EDITOR
838+
ue_python_init_snode_panel(module);
839+
ue_python_init_sgraph_panel(module);
840840
ue_python_init_idetails_view(module);
841841
ue_python_init_seditor_viewport(module);
842842
ue_python_init_slevel_viewport(module);

Source/UnrealEnginePython/Private/Slate/UEPySlate.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@
5959
#include "UEPySSpacer.h"
6060
#include "UEPySPythonWidget.h"
6161
#include "UEPySOverlay.h"
62-
#include "UEPySNodePanel.h"
63-
#include "UEPySGraphPanel.h"
6462

6563
#include "UEPyFTabManager.h"
6664
#include "UEPyFTabSpawnerEntry.h"
@@ -88,6 +86,8 @@
8886
#include "UEPySAssetDropTarget.h"
8987
#include "UEPySObjectPropertyEntryBox.h"
9088
#include "UEPyIDetailsView.h"
89+
#include "UEPySNodePanel.h"
90+
#include "UEPySGraphPanel.h"
9191
#endif
9292

9393
#include "Runtime/Core/Public/Misc/Attribute.h"

0 commit comments

Comments
 (0)