File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -739,6 +739,29 @@ More infos here: https://api.unrealengine.com/INT/API/Editor/PropertyEditor/SObj
739739
740740## SPythonEditorViewport
741741
742+ This is probably tu funniest widget, an EditorViewportClient and a whole World all in a single SWidget:
743+
744+ ``` python
745+ from unreal_engine import SWindow, SPythonEditorViewport, FVector, FRotator
746+ from unreal_engine.classes import Blueprint
747+ import unreal_engine as ue
748+
749+ editor_viewport = SPythonEditorViewport()
750+ world = editor_viewport.get_world()
751+ world.actor_spawn(ue.load_object(Blueprint, ' /Game/ThirdPersonCPP/Blueprints/ThirdPersonCharacter' ).GeneratedClass)
752+ editor_viewport_client = editor_viewport.get_editor_viewport_client()
753+ editor_viewport_client.set_view_location(FVector(- 200 , 300 , 200 ))
754+ editor_viewport_client.set_view_rotation(FRotator(0 , - 30 , - 90 ))
755+
756+ window = SWindow(client_size = (512 , 256 ), title = ' Mannequin Properties' , sizing_rule = 0 )(
757+ (
758+ editor_viewport
759+ )
760+ )
761+ ```
762+
763+ ![ SPythonEditorViewport] ( https://github.com/20tab/UnrealEnginePython/raw/master/docs/screenshots/slate_SPythonEditorViewport.png )
764+
742765## Properties Editors
743766
744767``` python
You can’t perform that action at this time.
0 commit comments