Skip to content

Commit e5c23b8

Browse files
author
Roberto De Ioris
committed
first round of pch removal
1 parent 3589f03 commit e5c23b8

225 files changed

Lines changed: 1627 additions & 1334 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Source/UnrealEnginePython/Private/Blueprint/UEPyEdGraph.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "UnrealEnginePythonPrivatePCH.h"
1+
#include "UEPyEdGraph.h"
22

33
#if WITH_EDITOR
44

‎Source/UnrealEnginePython/Private/Blueprint/UEPyEdGraph.h‎

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

33

44

5-
#include "UnrealEnginePython.h"
5+
#include "UEPyModule.h"
6+
#include "UEPyCallable.h"
7+
8+
#include "UEPyEdGraphPin.h"
69

710
#if WITH_EDITOR
811
PyObject *py_ue_graph_add_node_call_function(ue_PyUObject *, PyObject *);

‎Source/UnrealEnginePython/Private/Blueprint/UEPyEdGraphPin.cpp‎

Lines changed: 53 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,81 @@
1+
#include "UEPyEdGraphPin.h"
12

23
#if WITH_EDITOR
34

4-
5-
#include "UnrealEnginePythonPrivatePCH.h"
65
#include "Runtime/Engine/Classes/EdGraph/EdGraphPin.h"
76
#include "Editor/UnrealEd/Public/Kismet2/BlueprintEditorUtils.h"
87

9-
static PyObject *py_ue_edgraphpin_make_link_to(ue_PyEdGraphPin *self, PyObject * args) {
8+
static PyObject *py_ue_edgraphpin_make_link_to(ue_PyEdGraphPin *self, PyObject * args)
9+
{
1010
PyObject *other_pin;
11-
if (!PyArg_ParseTuple(args, "O:make_link_to", &other_pin)) {
11+
if (!PyArg_ParseTuple(args, "O:make_link_to", &other_pin))
12+
{
1213
return NULL;
1314
}
1415

1516
ue_PyEdGraphPin *py_other_pin = py_ue_is_edgraphpin(other_pin);
16-
if (!py_other_pin) {
17+
if (!py_other_pin)
18+
{
1719
return PyErr_Format(PyExc_Exception, "argument is not a UEdGraphPin");
1820
}
1921

2022
self->pin->MakeLinkTo(py_other_pin->pin);
2123

22-
if (UBlueprint *bp = Cast<UBlueprint>(self->pin->GetOwningNode()->GetGraph()->GetOuter())) {
24+
if (UBlueprint *bp = Cast<UBlueprint>(self->pin->GetOwningNode()->GetGraph()->GetOuter()))
25+
{
2326
FBlueprintEditorUtils::MarkBlueprintAsStructurallyModified(bp);
2427
}
2528

2629
Py_INCREF(Py_None);
2730
return Py_None;
2831
}
2932

30-
static PyObject *py_ue_edgraphpin_connect(ue_PyEdGraphPin *self, PyObject * args) {
33+
static PyObject *py_ue_edgraphpin_connect(ue_PyEdGraphPin *self, PyObject * args)
34+
{
3135
PyObject *other_pin;
32-
if (!PyArg_ParseTuple(args, "O:connect", &other_pin)) {
36+
if (!PyArg_ParseTuple(args, "O:connect", &other_pin))
37+
{
3338
return NULL;
3439
}
3540

3641
ue_PyEdGraphPin *py_other_pin = py_ue_is_edgraphpin(other_pin);
37-
if (!py_other_pin) {
42+
if (!py_other_pin)
43+
{
3844
return PyErr_Format(PyExc_Exception, "argument is not a UEdGraphPin");
3945
}
4046

41-
if (!self->pin->GetSchema()->TryCreateConnection(self->pin, py_other_pin->pin)) {
47+
if (!self->pin->GetSchema()->TryCreateConnection(self->pin, py_other_pin->pin))
48+
{
4249
return PyErr_Format(PyExc_Exception, "unable to connect pins");
4350
}
4451

45-
if (UBlueprint *bp = Cast<UBlueprint>(self->pin->GetOwningNode()->GetGraph()->GetOuter())) {
52+
if (UBlueprint *bp = Cast<UBlueprint>(self->pin->GetOwningNode()->GetGraph()->GetOuter()))
53+
{
4654
FBlueprintEditorUtils::MarkBlueprintAsStructurallyModified(bp);
4755
}
4856

4957
Py_INCREF(Py_None);
5058
return Py_None;
5159
}
5260

53-
static PyObject *py_ue_edgraphpin_break_link_to(ue_PyEdGraphPin *self, PyObject * args) {
61+
static PyObject *py_ue_edgraphpin_break_link_to(ue_PyEdGraphPin *self, PyObject * args)
62+
{
5463
PyObject *other_pin;
55-
if (!PyArg_ParseTuple(args, "O:break_link_to", &other_pin)) {
64+
if (!PyArg_ParseTuple(args, "O:break_link_to", &other_pin))
65+
{
5666
return NULL;
5767
}
5868

5969
ue_PyEdGraphPin *py_other_pin = py_ue_is_edgraphpin(other_pin);
60-
if (!py_other_pin) {
70+
if (!py_other_pin)
71+
{
6172
return PyErr_Format(PyExc_Exception, "argument is not a UEdGraphPin");
6273
}
6374

6475
self->pin->BreakLinkTo(py_other_pin->pin);
6576

66-
if (UBlueprint *bp = Cast<UBlueprint>(self->pin->GetOwningNode()->GetGraph()->GetOuter())) {
77+
if (UBlueprint *bp = Cast<UBlueprint>(self->pin->GetOwningNode()->GetGraph()->GetOuter()))
78+
{
6779
FBlueprintEditorUtils::MarkBlueprintAsStructurallyModified(bp);
6880
}
6981

@@ -78,36 +90,42 @@ static PyMethodDef ue_PyEdGraphPin_methods[] = {
7890
{ NULL } /* Sentinel */
7991
};
8092

81-
static PyObject *py_ue_edgraphpin_get_name(ue_PyEdGraphPin *self, void *closure) {
93+
static PyObject *py_ue_edgraphpin_get_name(ue_PyEdGraphPin *self, void *closure)
94+
{
8295
#if ENGINE_MINOR_VERSION > 18
8396
return PyUnicode_FromString(TCHAR_TO_UTF8(*(self->pin->PinName.ToString())));
8497
#else
8598
return PyUnicode_FromString(TCHAR_TO_UTF8(*(self->pin->PinName)));
8699
#endif
87100
}
88101

89-
static PyObject *py_ue_edgraphpin_get_category(ue_PyEdGraphPin *self, void *closure) {
102+
static PyObject *py_ue_edgraphpin_get_category(ue_PyEdGraphPin *self, void *closure)
103+
{
90104
#if ENGINE_MINOR_VERSION > 18
91105
return PyUnicode_FromString(TCHAR_TO_UTF8(*(self->pin->PinType.PinCategory.ToString())));
92106
#else
93107
return PyUnicode_FromString(TCHAR_TO_UTF8(*(self->pin->PinType.PinCategory)));
94108
#endif
95109
}
96110

97-
static PyObject *py_ue_edgraphpin_get_sub_category(ue_PyEdGraphPin *self, void *closure) {
111+
static PyObject *py_ue_edgraphpin_get_sub_category(ue_PyEdGraphPin *self, void *closure)
112+
{
98113
#if ENGINE_MINOR_VERSION > 18
99114
return PyUnicode_FromString(TCHAR_TO_UTF8(*(self->pin->PinType.PinSubCategory.ToString())));
100115
#else
101116
return PyUnicode_FromString(TCHAR_TO_UTF8(*(self->pin->PinType.PinSubCategory)));
102117
#endif
103118
}
104119

105-
static PyObject *py_ue_edgraphpin_get_default_value(ue_PyEdGraphPin *self, void *closure) {
120+
static PyObject *py_ue_edgraphpin_get_default_value(ue_PyEdGraphPin *self, void *closure)
121+
{
106122
return PyUnicode_FromString(TCHAR_TO_UTF8(*(self->pin->DefaultValue)));
107123
}
108124

109-
static int py_ue_edgraphpin_set_default_value(ue_PyEdGraphPin *self, PyObject *value, void *closure) {
110-
if (value && PyUnicode_Check(value)) {
125+
static int py_ue_edgraphpin_set_default_value(ue_PyEdGraphPin *self, PyObject *value, void *closure)
126+
{
127+
if (value && PyUnicode_Check(value))
128+
{
111129
char *str = PyUnicode_AsUTF8(value);
112130
self->pin->DefaultValue = UTF8_TO_TCHAR(str);
113131
return 0;
@@ -116,16 +134,20 @@ static int py_ue_edgraphpin_set_default_value(ue_PyEdGraphPin *self, PyObject *v
116134
return -1;
117135
}
118136

119-
static PyObject *py_ue_edgraphpin_get_default_object(ue_PyEdGraphPin *self, void *closure) {
137+
static PyObject *py_ue_edgraphpin_get_default_object(ue_PyEdGraphPin *self, void *closure)
138+
{
120139
UObject *u_object = self->pin->DefaultObject;
121-
if (!u_object) {
140+
if (!u_object)
141+
{
122142
Py_RETURN_NONE;
123143
}
124144
Py_RETURN_UOBJECT(u_object);
125145
}
126146

127-
static int py_ue_edgraphpin_set_default_object(ue_PyEdGraphPin *self, PyObject *value, void *closure) {
128-
if (value && ue_is_pyuobject(value)) {
147+
static int py_ue_edgraphpin_set_default_object(ue_PyEdGraphPin *self, PyObject *value, void *closure)
148+
{
149+
if (value && ue_is_pyuobject(value))
150+
{
129151
ue_PyUObject *py_obj = (ue_PyUObject *)value;
130152
self->pin->DefaultObject = py_obj->ue_object;
131153
return 0;
@@ -187,7 +209,8 @@ static PyTypeObject ue_PyEdGraphPinType = {
187209
};
188210

189211

190-
void ue_python_init_edgraphpin(PyObject *ue_module) {
212+
void ue_python_init_edgraphpin(PyObject *ue_module)
213+
{
191214
ue_PyEdGraphPinType.tp_new = PyType_GenericNew;
192215

193216
if (PyType_Ready(&ue_PyEdGraphPinType) < 0)
@@ -197,13 +220,15 @@ void ue_python_init_edgraphpin(PyObject *ue_module) {
197220
PyModule_AddObject(ue_module, "EdGraphPin", (PyObject *)&ue_PyEdGraphPinType);
198221
}
199222

200-
PyObject *py_ue_new_edgraphpin(UEdGraphPin *pin) {
223+
PyObject *py_ue_new_edgraphpin(UEdGraphPin *pin)
224+
{
201225
ue_PyEdGraphPin *ret = (ue_PyEdGraphPin *)PyObject_New(ue_PyEdGraphPin, &ue_PyEdGraphPinType);
202226
ret->pin = pin;
203227
return (PyObject *)ret;
204228
}
205229

206-
ue_PyEdGraphPin *py_ue_is_edgraphpin(PyObject *obj) {
230+
ue_PyEdGraphPin *py_ue_is_edgraphpin(PyObject *obj)
231+
{
207232
if (!PyObject_IsInstance(obj, (PyObject *)&ue_PyEdGraphPinType))
208233
return nullptr;
209234
return (ue_PyEdGraphPin *)obj;

‎Source/UnrealEnginePython/Private/CollectionManager/UEPyICollectionManager.cpp‎

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
#if WITH_EDITOR
2-
#include "UnrealEnginePythonPrivatePCH.h"
3-
41
#include "UEPyICollectionManager.h"
52

3+
#if WITH_EDITOR
4+
65
#include "Developer/CollectionManager/Public/CollectionManagerModule.h"
76

87
static PyObject *py_ue_icollection_manager_get_collections(PyObject *cls, PyObject * args)
@@ -11,7 +10,8 @@ static PyObject *py_ue_icollection_manager_get_collections(PyObject *cls, PyObje
1110
ICollectionManager &CollectionManager = FCollectionManagerModule::GetModule().Get();
1211
TArray<FCollectionNameType> collections;
1312
CollectionManager.GetCollections(collections);
14-
for (FCollectionNameType name_type : collections) {
13+
for (FCollectionNameType name_type : collections)
14+
{
1515
PyList_Append(py_list, Py_BuildValue((char *)"(si)", TCHAR_TO_UTF8(*name_type.Name.ToString()), (int)name_type.Type));
1616
}
1717
return py_list;
@@ -41,7 +41,8 @@ static PyObject *py_ue_icollection_manager_get_root_collections(PyObject *cls, P
4141
ICollectionManager &CollectionManager = FCollectionManagerModule::GetModule().Get();
4242
TArray<FCollectionNameType> collections;
4343
CollectionManager.GetRootCollections(collections);
44-
for (FCollectionNameType name_type : collections) {
44+
for (FCollectionNameType name_type : collections)
45+
{
4546
PyList_Append(py_list, Py_BuildValue((char *)"(si)", TCHAR_TO_UTF8(*name_type.Name.ToString()), (int)name_type.Type));
4647
}
4748
return py_list;
@@ -59,7 +60,8 @@ static PyObject *py_ue_icollection_manager_get_child_collection_names(PyObject *
5960
ICollectionManager &CollectionManager = FCollectionManagerModule::GetModule().Get();
6061
TArray<FName> names;
6162
CollectionManager.GetChildCollectionNames(FName(UTF8_TO_TCHAR(name)), (ECollectionShareType::Type)type, (ECollectionShareType::Type)child_type, names);
62-
for (FName cname : names) {
63+
for (FName cname : names)
64+
{
6365
PyList_Append(py_list, PyUnicode_FromString(TCHAR_TO_UTF8(*cname.ToString())));
6466
}
6567
return py_list;
@@ -77,7 +79,8 @@ static PyObject *py_ue_icollection_manager_get_child_collections(PyObject *cls,
7779
ICollectionManager &CollectionManager = FCollectionManagerModule::GetModule().Get();
7880
TArray<FCollectionNameType> collections;
7981
CollectionManager.GetChildCollections(FName(UTF8_TO_TCHAR(name)), (ECollectionShareType::Type)type, collections);
80-
for (FCollectionNameType name_type : collections) {
82+
for (FCollectionNameType name_type : collections)
83+
{
8184
PyList_Append(py_list, Py_BuildValue((char *)"(si)", TCHAR_TO_UTF8(*name_type.Name.ToString()), (int)name_type.Type));
8285
}
8386
return py_list;
@@ -93,7 +96,8 @@ static PyObject *py_ue_icollection_manager_get_collection_names(PyObject *cls, P
9396
ICollectionManager &CollectionManager = FCollectionManagerModule::GetModule().Get();
9497
TArray<FName> names;
9598
CollectionManager.GetCollectionNames((ECollectionShareType::Type)type, names);
96-
for (FName name : names) {
99+
for (FName name : names)
100+
{
97101
PyList_Append(py_list, PyUnicode_FromString(TCHAR_TO_UTF8(*name.ToString())));
98102
}
99103
return py_list;
@@ -109,7 +113,8 @@ static PyObject *py_ue_icollection_manager_get_root_collection_names(PyObject *c
109113
ICollectionManager &CollectionManager = FCollectionManagerModule::GetModule().Get();
110114
TArray<FName> names;
111115
CollectionManager.GetRootCollectionNames((ECollectionShareType::Type)type, names);
112-
for (FName name : names) {
116+
for (FName name : names)
117+
{
113118
PyList_Append(py_list, PyUnicode_FromString(TCHAR_TO_UTF8(*name.ToString())));
114119
}
115120
return py_list;
@@ -394,7 +399,8 @@ static PyObject *py_ue_icollection_manager_get_assets_in_collection(PyObject *cl
394399
if (CollectionManager.GetAssetsInCollection(FName(UTF8_TO_TCHAR(name)), (ECollectionShareType::Type)type, paths, (ECollectionRecursionFlags::Flags)recursion))
395400
{
396401
PyObject *py_list = PyList_New(0);
397-
for (FName path : paths) {
402+
for (FName path : paths)
403+
{
398404
PyList_Append(py_list, PyUnicode_FromString(TCHAR_TO_UTF8(*path.ToString())));
399405
}
400406
return py_list;
@@ -418,7 +424,8 @@ static PyObject *py_ue_icollection_manager_get_objects_in_collection(PyObject *c
418424
if (CollectionManager.GetObjectsInCollection(FName(UTF8_TO_TCHAR(name)), (ECollectionShareType::Type)type, paths, (ECollectionRecursionFlags::Flags)recursion))
419425
{
420426
PyObject *py_list = PyList_New(0);
421-
for (FName path : paths) {
427+
for (FName path : paths)
428+
{
422429
PyList_Append(py_list, PyUnicode_FromString(TCHAR_TO_UTF8(*path.ToString())));
423430
}
424431
return py_list;
@@ -442,7 +449,8 @@ static PyObject *py_ue_icollection_manager_get_classes_in_collection(PyObject *c
442449
if (CollectionManager.GetClassesInCollection(FName(UTF8_TO_TCHAR(name)), (ECollectionShareType::Type)type, paths, (ECollectionRecursionFlags::Flags)recursion))
443450
{
444451
PyObject *py_list = PyList_New(0);
445-
for (FName path : paths) {
452+
for (FName path : paths)
453+
{
446454
PyList_Append(py_list, PyUnicode_FromString(TCHAR_TO_UTF8(*path.ToString())));
447455
}
448456
return py_list;

‎Source/UnrealEnginePython/Private/ConsoleManager/UEPyIConsoleManager.cpp‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
2-
#include "UnrealEnginePythonPrivatePCH.h"
3-
41
#include "UEPyIConsoleManager.h"
52

63
static PyObject *py_ue_iconsole_manager_add_history_entry(PyObject *cls, PyObject * args)

‎Source/UnrealEnginePython/Private/Fbx/UEPyFbxIOSettings.cpp‎

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
#include "UEPyFbxIOSettings.h"
2+
13
#if ENGINE_MINOR_VERSION > 12
2-
#include "UnrealEnginePythonPrivatePCH.h"
34

45
#if WITH_EDITOR
56

6-
#include "UEPyFbx.h"
7+
78

89
static PyMethodDef ue_PyFbxIOSettings_methods[] = {
910
{ NULL } /* Sentinel */
@@ -42,15 +43,18 @@ static PyTypeObject ue_PyFbxIOSettingsType = {
4243
0, /* tp_getset */
4344
};
4445

45-
static int py_ue_fbx_io_settings_init(ue_PyFbxIOSettings *self, PyObject * args) {
46+
static int py_ue_fbx_io_settings_init(ue_PyFbxIOSettings *self, PyObject * args)
47+
{
4648
PyObject *py_object;
4749
char *name;
48-
if (!PyArg_ParseTuple(args, "Os", &py_object, &name)) {
50+
if (!PyArg_ParseTuple(args, "Os", &py_object, &name))
51+
{
4952
return -1;
5053
}
5154

5255
ue_PyFbxManager *py_fbx_manager = py_ue_is_fbx_manager(py_object);
53-
if (!py_fbx_manager) {
56+
if (!py_fbx_manager)
57+
{
5458
PyErr_SetString(PyExc_Exception, "argument is not a FbxManager");
5559
return -1;
5660
}
@@ -59,7 +63,8 @@ static int py_ue_fbx_io_settings_init(ue_PyFbxIOSettings *self, PyObject * args)
5963
return 0;
6064
}
6165

62-
void ue_python_init_fbx_io_settings(PyObject *ue_module) {
66+
void ue_python_init_fbx_io_settings(PyObject *ue_module)
67+
{
6368
ue_PyFbxIOSettingsType.tp_new = PyType_GenericNew;;
6469
ue_PyFbxIOSettingsType.tp_init = (initproc)py_ue_fbx_io_settings_init;
6570
if (PyType_Ready(&ue_PyFbxIOSettingsType) < 0)
@@ -69,7 +74,8 @@ void ue_python_init_fbx_io_settings(PyObject *ue_module) {
6974
PyModule_AddObject(ue_module, "FbxIOSettings", (PyObject *)&ue_PyFbxIOSettingsType);
7075
}
7176

72-
ue_PyFbxIOSettings *py_ue_is_fbx_io_settings(PyObject *obj) {
77+
ue_PyFbxIOSettings *py_ue_is_fbx_io_settings(PyObject *obj)
78+
{
7379
if (!PyObject_IsInstance(obj, (PyObject *)&ue_PyFbxIOSettingsType))
7480
return nullptr;
7581
return (ue_PyFbxIOSettings *)obj;

‎Source/UnrealEnginePython/Private/Fbx/UEPyFbxImporter.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "UnrealEnginePythonPrivatePCH.h"
1+
#include "UEPyFbxImporter.h"
22

33
#if ENGINE_MINOR_VERSION > 12
44
#if WITH_EDITOR

0 commit comments

Comments
 (0)