diff options
-rw-r--r-- | doc/classes/SubViewport.xml | 51 | ||||
-rw-r--r-- | editor/icons/SubViewport.svg | 1 | ||||
-rw-r--r-- | scene/register_scene_types.cpp | 1 |
3 files changed, 53 insertions, 0 deletions
diff --git a/doc/classes/SubViewport.xml b/doc/classes/SubViewport.xml new file mode 100644 index 0000000000..561e5d1a15 --- /dev/null +++ b/doc/classes/SubViewport.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="SubViewport" inherits="Viewport" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="get_size" qualifiers="const"> + <return type="Vector2i"> + </return> + <description> + </description> + </method> + <method name="set_size"> + <return type="void"> + </return> + <argument index="0" name="size" type="Vector2i"> + </argument> + <description> + </description> + </method> + </methods> + <members> + <member name="arvr" type="bool" setter="set_use_arvr" getter="is_using_arvr" default="false"> + </member> + <member name="render_target_clear_mode" type="int" setter="set_clear_mode" getter="get_clear_mode" enum="SubViewport.ClearMode" default="0"> + </member> + <member name="render_target_update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="SubViewport.UpdateMode" default="2"> + </member> + </members> + <constants> + <constant name="UPDATE_DISABLED" value="0" enum="UpdateMode"> + </constant> + <constant name="UPDATE_ONCE" value="1" enum="UpdateMode"> + </constant> + <constant name="UPDATE_WHEN_VISIBLE" value="2" enum="UpdateMode"> + </constant> + <constant name="UPDATE_WHEN_PARENT_VISIBLE" value="3" enum="UpdateMode"> + </constant> + <constant name="UPDATE_ALWAYS" value="4" enum="UpdateMode"> + </constant> + <constant name="CLEAR_MODE_ALWAYS" value="0" enum="ClearMode"> + </constant> + <constant name="CLEAR_MODE_NEVER" value="1" enum="ClearMode"> + </constant> + <constant name="CLEAR_MODE_ONLY_NEXT_FRAME" value="2" enum="ClearMode"> + </constant> + </constants> +</class> diff --git a/editor/icons/SubViewport.svg b/editor/icons/SubViewport.svg new file mode 100644 index 0000000000..103b1006ad --- /dev/null +++ b/editor/icons/SubViewport.svg @@ -0,0 +1 @@ +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3 2c-.5304.0000801-1.0390625.2108475-1.4140625.5859375-.37509.37501-.5858575.8836225-.5859375 1.4140625v8c.0000803.5304.2108475 1.039063.5859375 1.414062.37501.375091.8836225.585858 1.4140625.585938h10c1.1046 0 2-.89543 2-2v-8c0-1.1046-.89543-2-2-2zm0 1h10c.55228.0000096.99999.44772 1 1v8c-.00001.55228-.44772.99999-1 1h-10c-.55228-.00001-.99999-.44772-1-1v-8c.0000096-.55228.44772-.99999 1-1zm3 1c-.5304.0001-1.0390625.2108375-1.4140625.5859375-.37509.375-.5858575.8836225-.5859375 1.4140625v4c.00008.5304.2108475 1.039062.5859375 1.414062.37501.3751.8836225.585838 1.4140625.585938h4c1.1046 0 2-.8954 2-2v-4c0-1.1046-.89543-2-2-2zm0 1h4c.55228 0 .99999.4477 1 1v4c-.00001.5523-.44772 1-1 1h-4c-.55228 0-.99999-.4477-1-1v-4c.00001-.5523.44772-1 1-1z" fill="#e0e0e0" fill-opacity=".996078"/></svg>
\ No newline at end of file diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp index e73e560656..22c000fae7 100644 --- a/scene/register_scene_types.cpp +++ b/scene/register_scene_types.cpp @@ -270,6 +270,7 @@ void register_scene_types() { ClassDB::register_virtual_class<InstancePlaceholder>(); ClassDB::register_virtual_class<Viewport>(); + ClassDB::register_class<SubViewport>(); ClassDB::register_class<ViewportTexture>(); ClassDB::register_class<HTTPRequest>(); ClassDB::register_class<Timer>(); |