1+
2+ #if WITH_EDITOR
3+
4+
5+ #include " UnrealEnginePythonPrivatePCH.h"
6+ #include " Runtime/Engine/Classes/EdGraph/EdGraphPin.h"
7+
8+ static PyObject *py_ue_edgraphpin_make_link_to (ue_PyEdGraphPin *self, PyObject * args) {
9+ Py_INCREF (Py_None);
10+ return Py_None;
11+ }
12+
13+ static PyMethodDef ue_PyEdGraphPin_methods[] = {
14+ { " make_link_to" , (PyCFunction)py_ue_edgraphpin_make_link_to, METH_VARARGS , " " },
15+ { NULL } /* Sentinel */
16+ };
17+
18+ static PyObject *py_ue_edgraphpin_get_name (ue_PyEdGraphPin *self, void *closure) {
19+ return PyUnicode_FromString (TCHAR_TO_UTF8 (*(self->pin ->PinName )));
20+ }
21+
22+ static PyGetSetDef ue_PyEdGraphPin_getseters[] = {
23+ { (char *)" name" , (getter)py_ue_edgraphpin_get_name, NULL , (char *)" " , NULL },
24+ { NULL } /* Sentinel */
25+ };
26+
27+ static PyObject *ue_PyEdGraphPin_str (ue_PyEdGraphPin *self)
28+ {
29+ return PyUnicode_FromFormat (" <unreal_engine.EdGraphPin {'name': '%s', 'type': '%s'}>" ,
30+ TCHAR_TO_UTF8 (*self->pin ->PinName ), TCHAR_TO_UTF8 (*self->pin ->PinType .PinCategory ));
31+ }
32+
33+ static PyTypeObject ue_PyEdGraphPinType = {
34+ PyVarObject_HEAD_INIT (NULL , 0 )
35+ " unreal_engine.EdGraphPin" , /* tp_name */
36+ sizeof (ue_PyEdGraphPin), /* tp_basicsize */
37+ 0 , /* tp_itemsize */
38+ 0 , /* tp_dealloc */
39+ 0 , /* tp_print */
40+ 0 , /* tp_getattr */
41+ 0 , /* tp_setattr */
42+ 0 , /* tp_reserved */
43+ 0 , /* tp_repr */
44+ 0 , /* tp_as_number */
45+ 0 , /* tp_as_sequence */
46+ 0 , /* tp_as_mapping */
47+ 0 , /* tp_hash */
48+ 0 , /* tp_call */
49+ (reprfunc)ue_PyEdGraphPin_str, /* tp_str */
50+ 0 , /* tp_getattro */
51+ 0 , /* tp_setattro */
52+ 0 , /* tp_as_buffer */
53+ Py_TPFLAGS_DEFAULT, /* tp_flags */
54+ " Unreal Engine Editor GraphPin" , /* tp_doc */
55+ 0 , /* tp_traverse */
56+ 0 , /* tp_clear */
57+ 0 , /* tp_richcompare */
58+ 0 , /* tp_weaklistoffset */
59+ 0 , /* tp_iter */
60+ 0 , /* tp_iternext */
61+ ue_PyEdGraphPin_methods, /* tp_methods */
62+ 0 ,
63+ ue_PyEdGraphPin_getseters,
64+ };
65+
66+
67+ void ue_python_init_edgraphpin (PyObject *ue_module) {
68+ ue_PyEdGraphPinType.tp_new = PyType_GenericNew;
69+
70+ if (PyType_Ready (&ue_PyEdGraphPinType) < 0 )
71+ return ;
72+
73+ Py_INCREF (&ue_PyEdGraphPinType);
74+ PyModule_AddObject (ue_module, " EdGraphPin" , (PyObject *)&ue_PyEdGraphPinType);
75+ }
76+
77+ PyObject *py_ue_new_edgraphpin (UEdGraphPin *pin) {
78+ ue_PyEdGraphPin *ret = (ue_PyEdGraphPin *)PyObject_New (ue_PyEdGraphPin, &ue_PyEdGraphPinType);
79+ ret->pin = pin;
80+ return (PyObject *)ret;
81+ }
82+
83+ ue_PyEdGraphPin *py_ue_is_edgraphpin (PyObject *obj) {
84+ if (!PyObject_IsInstance (obj, (PyObject *)&ue_PyEdGraphPinType))
85+ return nullptr ;
86+ return (ue_PyEdGraphPin *)obj;
87+ }
88+
89+ #endif
0 commit comments