Skip to content

Commit

Permalink
Merge pull request #37442 from YeldhamDev/subviewport_register
Browse files Browse the repository at this point in the history
Register SubViewport class
  • Loading branch information
akien-mga authored Mar 31, 2020
2 parents 8dd58a6 + 46a6751 commit 3a996fa
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
51 changes: 51 additions & 0 deletions doc/classes/SubViewport.xml
Original file line number Diff line number Diff line change
@@ -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>
1 change: 1 addition & 0 deletions editor/icons/SubViewport.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions scene/register_scene_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>();
Expand Down

0 comments on commit 3a996fa

Please sign in to comment.