Przeglądaj źródła

Bind TextEdit.deselect and update documentation

Rémi Verschelde 7 lat temu
rodzic
commit
d03f35f1bc

+ 1 - 1
doc/classes/Animation.xml

@@ -321,7 +321,7 @@
 			<argument index="1" name="enabled" type="bool">
 			</argument>
 			<description>
-				Enables/disables the given track. Tracks are enabled by default.	
+				Enables/disables the given track. Tracks are enabled by default.
 			</description>
 		</method>
 		<method name="track_set_imported">

+ 77 - 0
doc/classes/BakedLightmap.xml

@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="BakedLightmap" inherits="VisualInstance" category="Core" version="3.0-beta">
+	<brief_description>
+	</brief_description>
+	<description>
+	</description>
+	<tutorials>
+	</tutorials>
+	<demos>
+	</demos>
+	<methods>
+		<method name="bake">
+			<return type="int" enum="BakedLightmap.BakeError">
+			</return>
+			<argument index="0" name="from_node" type="Node" default="null">
+			</argument>
+			<argument index="1" name="create_visual_debug" type="bool" default="false">
+			</argument>
+			<description>
+			</description>
+		</method>
+		<method name="debug_bake">
+			<return type="void">
+			</return>
+			<description>
+			</description>
+		</method>
+	</methods>
+	<members>
+		<member name="bake_mode" type="int" setter="set_bake_mode" getter="get_bake_mode" enum="BakedLightmap.BakeMode">
+		</member>
+		<member name="bake_quality" type="int" setter="set_bake_quality" getter="get_bake_quality" enum="BakedLightmap.BakeQuality">
+		</member>
+		<member name="bake_subdiv" type="int" setter="set_bake_subdiv" getter="get_bake_subdiv" enum="BakedLightmap.Subdiv">
+		</member>
+		<member name="capture_subdiv" type="int" setter="set_capture_subdiv" getter="get_capture_subdiv" enum="BakedLightmap.Subdiv">
+		</member>
+		<member name="energy" type="float" setter="set_energy" getter="get_energy">
+		</member>
+		<member name="extents" type="Vector3" setter="set_extents" getter="get_extents">
+		</member>
+		<member name="hdr" type="bool" setter="set_hdr" getter="is_hdr">
+		</member>
+		<member name="image_path" type="String" setter="set_image_path" getter="get_image_path">
+		</member>
+		<member name="light_data" type="BakedLightmapData" setter="set_light_data" getter="get_light_data">
+		</member>
+		<member name="propagation" type="float" setter="set_propagation" getter="get_propagation">
+		</member>
+	</members>
+	<constants>
+		<constant name="SUBDIV_128" value="0" enum="Subdiv">
+		</constant>
+		<constant name="SUBDIV_256" value="1" enum="Subdiv">
+		</constant>
+		<constant name="SUBDIV_512" value="2" enum="Subdiv">
+		</constant>
+		<constant name="SUBDIV_1024" value="3" enum="Subdiv">
+		</constant>
+		<constant name="SUBDIV_2048" value="4" enum="Subdiv">
+		</constant>
+		<constant name="SUBDIV_4096" value="5" enum="Subdiv">
+		</constant>
+		<constant name="SUBDIV_MAX" value="6" enum="Subdiv">
+		</constant>
+		<constant name="BAKE_QUALITY_LOW" value="0" enum="BakeQuality">
+		</constant>
+		<constant name="BAKE_QUALITY_MEDIUM" value="1" enum="BakeQuality">
+		</constant>
+		<constant name="BAKE_QUALITY_HIGH" value="2" enum="BakeQuality">
+		</constant>
+		<constant name="BAKE_MODE_CONE_TRACE" value="0" enum="BakeMode">
+		</constant>
+		<constant name="BAKE_MODE_RAY_TRACE" value="1" enum="BakeMode">
+		</constant>
+	</constants>
+</class>

+ 113 - 0
doc/classes/BakedLightmapData.xml

@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="BakedLightmapData" inherits="Resource" category="Core" version="3.0-beta">
+	<brief_description>
+	</brief_description>
+	<description>
+	</description>
+	<tutorials>
+	</tutorials>
+	<demos>
+	</demos>
+	<methods>
+		<method name="add_user">
+			<return type="void">
+			</return>
+			<argument index="0" name="path" type="NodePath">
+			</argument>
+			<argument index="1" name="lightmap" type="Texture">
+			</argument>
+			<description>
+			</description>
+		</method>
+		<method name="clear_users">
+			<return type="void">
+			</return>
+			<description>
+			</description>
+		</method>
+		<method name="get_bounds" qualifiers="const">
+			<return type="AABB">
+			</return>
+			<description>
+			</description>
+		</method>
+		<method name="get_cell_space_transform" qualifiers="const">
+			<return type="Transform">
+			</return>
+			<description>
+			</description>
+		</method>
+		<method name="get_cell_subdiv" qualifiers="const">
+			<return type="int">
+			</return>
+			<description>
+			</description>
+		</method>
+		<method name="get_octree" qualifiers="const">
+			<return type="PoolByteArray">
+			</return>
+			<description>
+			</description>
+		</method>
+		<method name="get_user_count" qualifiers="const">
+			<return type="int">
+			</return>
+			<description>
+			</description>
+		</method>
+		<method name="get_user_lightmap" qualifiers="const">
+			<return type="Texture">
+			</return>
+			<argument index="0" name="user_idx" type="int">
+			</argument>
+			<description>
+			</description>
+		</method>
+		<method name="get_user_path" qualifiers="const">
+			<return type="NodePath">
+			</return>
+			<argument index="0" name="user_idx" type="int">
+			</argument>
+			<description>
+			</description>
+		</method>
+		<method name="set_bounds">
+			<return type="void">
+			</return>
+			<argument index="0" name="bounds" type="AABB">
+			</argument>
+			<description>
+			</description>
+		</method>
+		<method name="set_cell_space_transform">
+			<return type="void">
+			</return>
+			<argument index="0" name="xform" type="Transform">
+			</argument>
+			<description>
+			</description>
+		</method>
+		<method name="set_cell_subdiv">
+			<return type="void">
+			</return>
+			<argument index="0" name="cell_subdiv" type="int">
+			</argument>
+			<description>
+			</description>
+		</method>
+		<method name="set_octree">
+			<return type="void">
+			</return>
+			<argument index="0" name="octree" type="PoolByteArray">
+			</argument>
+			<description>
+			</description>
+		</method>
+	</methods>
+	<members>
+		<member name="energy" type="float" setter="set_energy" getter="get_energy">
+		</member>
+	</members>
+	<constants>
+	</constants>
+</class>

+ 1 - 1
doc/classes/Curve.xml

@@ -107,9 +107,9 @@
 			<return type="float">
 			</return>
 			<argument index="0" name="offset" type="float">
-				Returns the y value for the point that would exist at x-position [code]offset[/code] along the curve using the baked cache. Bakes the curve's points if not already baked.
 			</argument>
 			<description>
+				Returns the y value for the point that would exist at x-position [code]offset[/code] along the curve using the baked cache. Bakes the curve's points if not already baked.
 			</description>
 		</method>
 		<method name="remove_point">

+ 2 - 1
doc/classes/HTTPClient.xml

@@ -26,7 +26,7 @@
 			</return>
 			<argument index="0" name="host" type="String">
 			</argument>
-			<argument index="1" name="port" type="int">
+			<argument index="1" name="port" type="int" default="-1">
 			</argument>
 			<argument index="2" name="use_ssl" type="bool" default="false">
 			</argument>
@@ -35,6 +35,7 @@
 			<description>
 				Connect to a host. This needs to be done before any requests are sent.
 				The host should not have http:// prepended but will strip the protocol identifier if provided.
+				If no [code]port[/code] is specified (or [code]-1[/code] is used), it is automatically set to 80 for HTTP and 443 for HTTPS (if [code]use_ssl[/code] is enabled).
 				[code]verify_host[/code] will check the SSL identity of the host if set to [code]true[/code].
 			</description>
 		</method>

+ 8 - 0
doc/classes/Light.xml

@@ -15,6 +15,8 @@
 	<members>
 		<member name="editor_only" type="bool" setter="set_editor_only" getter="is_editor_only">
 		</member>
+		<member name="light_bake_mode" type="int" setter="set_bake_mode" getter="get_bake_mode" enum="Light.BakeMode">
+		</member>
 		<member name="light_color" type="Color" setter="set_color" getter="get_color">
 		</member>
 		<member name="light_cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask">
@@ -71,5 +73,11 @@
 		</constant>
 		<constant name="PARAM_MAX" value="15" enum="Param">
 		</constant>
+		<constant name="BAKE_DISABLED" value="0" enum="BakeMode">
+		</constant>
+		<constant name="BAKE_INDIRECT" value="1" enum="BakeMode">
+		</constant>
+		<constant name="BAKE_ALL" value="2" enum="BakeMode">
+		</constant>
 	</constants>
 </class>

+ 2 - 2
doc/classes/PacketPeer.xml

@@ -18,7 +18,7 @@
 				Return the number of packets currently available in the ring-buffer.
 			</description>
 		</method>
-		<method name="get_packet" qualifiers="const">
+		<method name="get_packet">
 			<return type="PoolByteArray">
 			</return>
 			<description>
@@ -32,7 +32,7 @@
 				Return the error state of the last packet received (via [method get_packet] and [method get_var]).
 			</description>
 		</method>
-		<method name="get_var" qualifiers="const">
+		<method name="get_var">
 			<return type="Variant">
 			</return>
 			<description>

+ 8 - 0
doc/classes/SceneState.xml

@@ -88,6 +88,14 @@
 				Returns the list of group names associated with the node at [code]idx[/code].
 			</description>
 		</method>
+		<method name="get_node_index" qualifiers="const">
+			<return type="int">
+			</return>
+			<argument index="0" name="idx" type="int">
+			</argument>
+			<description>
+			</description>
+		</method>
 		<method name="get_node_instance" qualifiers="const">
 			<return type="PackedScene">
 			</return>

+ 10 - 0
doc/classes/ScriptEditor.xml

@@ -57,6 +57,16 @@
 				Returns an array with all [Script] objects which are currently open in editor.
 			</description>
 		</method>
+		<method name="open_script_create_dialog">
+			<return type="void">
+			</return>
+			<argument index="0" name="base_name" type="String">
+			</argument>
+			<argument index="1" name="base_path" type="String">
+			</argument>
+			<description>
+			</description>
+		</method>
 	</methods>
 	<signals>
 		<signal name="editor_script_changed">

+ 7 - 3
doc/classes/SpatialMaterial.xml

@@ -75,6 +75,8 @@
 		</member>
 		<member name="emission_energy" type="float" setter="set_emission_energy" getter="get_emission_energy">
 		</member>
+		<member name="emission_on_uv2" type="bool" setter="set_flag" getter="get_flag">
+		</member>
 		<member name="emission_operator" type="int" setter="set_emission_operator" getter="get_emission_operator" enum="SpatialMaterial.EmissionOperator">
 		</member>
 		<member name="emission_texture" type="Texture" setter="set_texture" getter="get_texture">
@@ -305,13 +307,15 @@
 		</constant>
 		<constant name="FLAG_AO_ON_UV2" value="10" enum="Flags">
 		</constant>
-		<constant name="FLAG_USE_ALPHA_SCISSOR" value="11" enum="Flags">
+		<constant name="FLAG_EMISSION_ON_UV2" value="11" enum="Flags">
+		</constant>
+		<constant name="FLAG_USE_ALPHA_SCISSOR" value="12" enum="Flags">
 		</constant>
 		<constant name="FLAG_TRIPLANAR_USE_WORLD" value="9" enum="Flags">
 		</constant>
-		<constant name="FLAG_ALBEDO_TEXTURE_FORCE_SRGB" value="12" enum="Flags">
+		<constant name="FLAG_ALBEDO_TEXTURE_FORCE_SRGB" value="13" enum="Flags">
 		</constant>
-		<constant name="FLAG_MAX" value="13" enum="Flags">
+		<constant name="FLAG_MAX" value="14" enum="Flags">
 		</constant>
 		<constant name="DIFFUSE_BURLEY" value="0" enum="DiffuseMode">
 		</constant>

+ 7 - 0
doc/classes/TextEdit.xml

@@ -109,6 +109,13 @@
 				Cut the current selection.
 			</description>
 		</method>
+		<method name="deselect">
+			<return type="void">
+			</return>
+			<description>
+				Clears the current selection.
+			</description>
+		</method>
 		<method name="fold_all_lines">
 			<return type="void">
 			</return>

+ 18 - 0
doc/classes/TileMap.xml

@@ -182,6 +182,24 @@
 			<description>
 			</description>
 		</method>
+		<method name="update_bitmask_area">
+			<return type="void">
+			</return>
+			<argument index="0" name="arg0" type="Vector2">
+			</argument>
+			<description>
+			</description>
+		</method>
+		<method name="update_bitmask_region">
+			<return type="void">
+			</return>
+			<argument index="0" name="start" type="Vector2" default="Vector2( 0, 0 )">
+			</argument>
+			<argument index="1" name="end" type="Vector2" default="Vector2( 0, 0 )">
+			</argument>
+			<description>
+			</description>
+		</method>
 		<method name="world_to_map" qualifiers="const">
 			<return type="Vector2">
 			</return>

+ 3 - 1
doc/classes/VisualServer.xml

@@ -2315,7 +2315,9 @@
 		</constant>
 		<constant name="INSTANCE_GI_PROBE" value="7" enum="InstanceType">
 		</constant>
-		<constant name="INSTANCE_MAX" value="8" enum="InstanceType">
+		<constant name="INSTANCE_LIGHTMAP_CAPTURE" value="8" enum="InstanceType">
+		</constant>
+		<constant name="INSTANCE_MAX" value="9" enum="InstanceType">
 			The max value for INSTANCE_* constants, used internally.
 		</constant>
 		<constant name="INSTANCE_GEOMETRY_MASK" value="30" enum="InstanceType">

+ 4 - 2
scene/gui/text_edit.cpp

@@ -5468,8 +5468,10 @@ void TextEdit::_bind_methods() {
 	ClassDB::bind_method(D_METHOD("cut"), &TextEdit::cut);
 	ClassDB::bind_method(D_METHOD("copy"), &TextEdit::copy);
 	ClassDB::bind_method(D_METHOD("paste"), &TextEdit::paste);
-	ClassDB::bind_method(D_METHOD("select_all"), &TextEdit::select_all);
+
 	ClassDB::bind_method(D_METHOD("select", "from_line", "from_column", "to_line", "to_column"), &TextEdit::select);
+	ClassDB::bind_method(D_METHOD("select_all"), &TextEdit::select_all);
+	ClassDB::bind_method(D_METHOD("deselect"), &TextEdit::deselect);
 
 	ClassDB::bind_method(D_METHOD("is_selection_active"), &TextEdit::is_selection_active);
 	ClassDB::bind_method(D_METHOD("get_selection_from_line"), &TextEdit::get_selection_from_line);
@@ -5681,4 +5683,4 @@ TextEdit::TextEdit() {
 }
 
 TextEdit::~TextEdit() {
-}
+}

+ 1 - 0
servers/visual_server.cpp

@@ -1820,6 +1820,7 @@ void VisualServer::_bind_methods() {
 	BIND_ENUM_CONSTANT(INSTANCE_LIGHT);
 	BIND_ENUM_CONSTANT(INSTANCE_REFLECTION_PROBE);
 	BIND_ENUM_CONSTANT(INSTANCE_GI_PROBE);
+	BIND_ENUM_CONSTANT(INSTANCE_LIGHTMAP_CAPTURE);
 	BIND_ENUM_CONSTANT(INSTANCE_MAX);
 	BIND_ENUM_CONSTANT(INSTANCE_GEOMETRY_MASK);
 

+ 0 - 1
servers/visual_server.h

@@ -751,7 +751,6 @@ public:
 		INSTANCE_GI_PROBE,
 		INSTANCE_LIGHTMAP_CAPTURE,
 		INSTANCE_MAX,
-		/*INSTANCE_BAKED_LIGHT_SAMPLER,*/
 
 		INSTANCE_GEOMETRY_MASK = (1 << INSTANCE_MESH) | (1 << INSTANCE_MULTIMESH) | (1 << INSTANCE_IMMEDIATE) | (1 << INSTANCE_PARTICLES)
 	};