1+
2+ #include " UnrealEnginePythonPrivatePCH.h"
3+
4+ #if WITH_EDITOR
5+
6+ #include " UEPyFMaterialEditorUtilities.h"
7+
8+
9+
10+
11+ static PyObject *py_ue_paste_nodes_here (PyObject *cls, PyObject * args)
12+ {
13+ PyObject *py_graph;
14+ float x;
15+ float y;
16+
17+ if (!PyArg_ParseTuple (args, " O(ff):paste_nodes_here" , &py_graph, &x, &y))
18+ return nullptr ;
19+
20+ UEdGraph *Graph = ue_py_check_type<UEdGraph>(py_graph);
21+ if (!Graph)
22+ {
23+ return PyErr_Format (PyExc_Exception, " argument is not a UEdGraph" );
24+ }
25+
26+ FMaterialEditorUtilities::PasteNodesHere (Graph, FVector2D (x, y));
27+ Py_RETURN_NONE;
28+ }
29+
30+
31+ static PyMethodDef ue_PyFMaterialEditorUtilities_methods[] = {
32+ { " paste_nodes_here" , (PyCFunction)py_ue_paste_nodes_here, METH_VARARGS | METH_CLASS , " " },
33+ { NULL } /* Sentinel */
34+ };
35+
36+
37+ static PyTypeObject ue_PyFMaterialEditorUtilitiesType = {
38+ PyVarObject_HEAD_INIT (NULL , 0 )
39+ " unreal_engine.FMaterialEditorUtilities" , /* tp_name */
40+ sizeof (ue_PyFMaterialEditorUtilities), /* tp_basicsize */
41+ 0 , /* tp_itemsize */
42+ 0 , /* tp_dealloc */
43+ 0 , /* tp_print */
44+ 0 , /* tp_getattr */
45+ 0 , /* tp_setattr */
46+ 0 , /* tp_reserved */
47+ 0 , /* tp_repr */
48+ 0 , /* tp_as_number */
49+ 0 , /* tp_as_sequence */
50+ 0 , /* tp_as_mapping */
51+ 0 , /* tp_hash */
52+ 0 , /* tp_call */
53+ 0 , /* tp_str */
54+ 0 , /* tp_getattro */
55+ 0 , /* tp_setattro */
56+ 0 , /* tp_as_buffer */
57+ Py_TPFLAGS_DEFAULT, /* tp_flags */
58+ " Unreal Engine MaterialEditorUtilities" , /* tp_doc */
59+ 0 , /* tp_traverse */
60+ 0 , /* tp_clear */
61+ 0 , /* tp_richcompare */
62+ 0 , /* tp_weaklistoffset */
63+ 0 , /* tp_iter */
64+ 0 , /* tp_iternext */
65+ ue_PyFMaterialEditorUtilities_methods, /* tp_methods */
66+ 0 ,
67+ 0 ,
68+ };
69+
70+ static int py_ue_fmaterial_editor_utilities_init (ue_PyFMaterialEditorUtilities *self, PyObject * args)
71+ {
72+ PyErr_SetString (PyExc_Exception, " FMaterialEditorUtilities is a singleton" );
73+ return -1 ;
74+ }
75+
76+ void ue_python_init_fmaterial_editor_utilities (PyObject *ue_module)
77+ {
78+ ue_PyFMaterialEditorUtilitiesType.tp_new = PyType_GenericNew;
79+ ue_PyFMaterialEditorUtilitiesType.tp_init = (initproc)py_ue_fmaterial_editor_utilities_init;
80+
81+ if (PyType_Ready (&ue_PyFMaterialEditorUtilitiesType) < 0 )
82+ return ;
83+
84+ Py_INCREF (&ue_PyFMaterialEditorUtilitiesType);
85+ PyModule_AddObject (ue_module, " FMaterialEditorUtilities" , (PyObject *)&ue_PyFMaterialEditorUtilitiesType);
86+ }
87+
88+ #endif
0 commit comments