1+ #if WITH_EDITOR
2+
3+ #include " UnrealEnginePythonPrivatePCH.h"
4+
5+ #include " UEPySViewport.h"
6+
7+
8+
9+ #define GET_s_editor_viewport SEditorViewport *s_editor_viewport = (SEditorViewport *)self->s_compound_widget.s_widget.s_widget
10+
11+ static PyObject *py_ue_seditor_viewport_enable_stereo_rendering (ue_PySEditorViewport *self, PyObject * args) {
12+ PyObject *py_bool;
13+ if (!PyArg_ParseTuple (args, " O:enable_stereo_rendering" , &py_bool)) {
14+ return NULL ;
15+ }
16+
17+ GET_s_editor_viewport;
18+
19+ s_editor_viewport->EnableStereoRendering (PyObject_IsTrue (py_bool) ? true : false );
20+
21+ Py_INCREF (self);
22+ return (PyObject *)self;
23+ }
24+
25+ static PyObject *ue_PySEditorViewport_str (ue_PySEditorViewport *self)
26+ {
27+ return PyUnicode_FromFormat (" <unreal_engine.SEditorViewport '%p'>" ,
28+ self->s_compound_widget .s_widget .s_widget );
29+ }
30+
31+ static PyMethodDef ue_PySEditorViewport_methods[] = {
32+ { " enable_stereo_rendering" , (PyCFunction)py_ue_seditor_viewport_enable_stereo_rendering, METH_VARARGS , " " },
33+ { NULL } /* Sentinel */
34+ };
35+
36+ PyTypeObject ue_PySEditorViewportType = {
37+ PyVarObject_HEAD_INIT (NULL , 0 )
38+ " unreal_engine.SEditorViewport" , /* tp_name */
39+ sizeof (ue_PySEditorViewport), /* tp_basicsize */
40+ 0 , /* tp_itemsize */
41+ 0 , /* tp_dealloc */
42+ 0 , /* tp_print */
43+ 0 , /* tp_getattr */
44+ 0 , /* tp_setattr */
45+ 0 , /* tp_reserved */
46+ 0 , /* tp_repr */
47+ 0 , /* tp_as_number */
48+ 0 , /* tp_as_sequence */
49+ 0 , /* tp_as_mapping */
50+ 0 , /* tp_hash */
51+ 0 , /* tp_call */
52+ (reprfunc)ue_PySEditorViewport_str, /* tp_str */
53+ 0 , /* tp_getattro */
54+ 0 , /* tp_setattro */
55+ 0 , /* tp_as_buffer */
56+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
57+ " Unreal Engine SEditorViewport" , /* tp_doc */
58+ 0 , /* tp_traverse */
59+ 0 , /* tp_clear */
60+ 0 , /* tp_richcompare */
61+ 0 , /* tp_weaklistoffset */
62+ 0 , /* tp_iter */
63+ 0 , /* tp_iternext */
64+ ue_PySEditorViewport_methods, /* tp_methods */
65+ };
66+
67+ void ue_python_init_seditor_viewport (PyObject *ue_module) {
68+ ue_PySEditorViewportType.tp_new = PyType_GenericNew;
69+
70+ ue_PySEditorViewportType.tp_base = &ue_PySCompoundWidgetType;
71+
72+ if (PyType_Ready (&ue_PySEditorViewportType) < 0 )
73+ return ;
74+
75+ Py_INCREF (&ue_PySEditorViewportType);
76+ PyModule_AddObject (ue_module, " SEditorViewport" , (PyObject *)&ue_PySEditorViewportType);
77+ }
78+
79+
80+ #endif
0 commit comments