diff options
56 files changed, 7466 insertions, 1861 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index c66416ea6d..513c7a9470 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -597,7 +597,15 @@ void _OS::native_video_stop() { OS::get_singleton()->native_video_stop(); }; +bool _OS::is_debug_build() const { +#ifdef DEBUG_ENABLED + return true; +#else + return false; +#endif + +} String _OS::get_custom_level() const { return OS::get_singleton()->get_custom_level(); @@ -668,6 +676,8 @@ void _OS::_bind_methods() { ObjectTypeDB::bind_method(_MD("can_use_threads"),&_OS::can_use_threads); + ObjectTypeDB::bind_method(_MD("is_debug_build"),&_OS::is_debug_build); + //ObjectTypeDB::bind_method(_MD("get_mouse_button_state"),&_OS::get_mouse_button_state); ObjectTypeDB::bind_method(_MD("dump_memory_to_file","file"),&_OS::dump_memory_to_file); diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index 2d824955df..b3040a96ca 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -154,6 +154,8 @@ public: bool has_touchscreen_ui_hint() const; + bool is_debug_build() const; + String get_unique_ID() const; /* diff --git a/core/object.h b/core/object.h index 8e0164b13b..7ce07869a6 100644 --- a/core/object.h +++ b/core/object.h @@ -81,6 +81,7 @@ enum PropertyUsageFlags { PROPERTY_USAGE_BUNDLE=128, //used for optimized bundles PROPERTY_USAGE_CATEGORY=256, PROPERTY_USAGE_STORE_IF_NONZERO=512, //only store if nonzero + PROPERTY_USAGE_NO_INSTANCE_STATE=1024, PROPERTY_USAGE_DEFAULT=PROPERTY_USAGE_STORAGE|PROPERTY_USAGE_EDITOR|PROPERTY_USAGE_NETWORK, PROPERTY_USAGE_DEFAULT_INTL=PROPERTY_USAGE_STORAGE|PROPERTY_USAGE_EDITOR|PROPERTY_USAGE_NETWORK|PROPERTY_USAGE_INTERNATIONALIZED, diff --git a/core/undo_redo.cpp b/core/undo_redo.cpp index b78fd89883..2c4d9e16a8 100644 --- a/core/undo_redo.cpp +++ b/core/undo_redo.cpp @@ -243,6 +243,11 @@ void UndoRedo::_process_operation_list(List<Operation>::Element *E) { case Operation::TYPE_PROPERTY: { obj->set(op.name,op.args[0]); +#ifdef TOOLS_ENABLED + Resource* res = obj->cast_to<Resource>(); + if (res) + res->set_edited(true); +#endif } break; case Operation::TYPE_REFERENCE: { //do nothing diff --git a/doc/base/classes.xml b/doc/base/classes.xml index 527991d147..b28c050a61 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -9,271 +9,271 @@ </description> <methods> <method name="sin" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="s" type="real"> + <argument index="0" name="s" type="float"> </argument> <description> Standard sine function. </description> </method> <method name="cos" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="s" type="real"> + <argument index="0" name="s" type="float"> </argument> <description> Standard cosine function. </description> </method> <method name="tan" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="s" type="real"> + <argument index="0" name="s" type="float"> </argument> <description> Standard tangent function. </description> </method> <method name="sinh" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="s" type="real"> + <argument index="0" name="s" type="float"> </argument> <description> Hyperbolic sine. </description> </method> <method name="cosh" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="s" type="real"> + <argument index="0" name="s" type="float"> </argument> <description> Hyperbolic cosine. </description> </method> <method name="tanh" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="s" type="real"> + <argument index="0" name="s" type="float"> </argument> <description> Hyperbolic tangent. </description> </method> <method name="asin" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="s" type="real"> + <argument index="0" name="s" type="float"> </argument> <description> Arc-sine. </description> </method> <method name="acos" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="s" type="real"> + <argument index="0" name="s" type="float"> </argument> <description> Arc-cosine. </description> </method> <method name="atan" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="s" type="real"> + <argument index="0" name="s" type="float"> </argument> <description> Arc-tangent. </description> </method> <method name="atan2" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="x" type="real"> + <argument index="0" name="x" type="float"> </argument> - <argument index="1" name="y" type="real"> + <argument index="1" name="y" type="float"> </argument> <description> Arc-tangent that takes a 2D vector as argument, retuns the full -pi to +pi range. </description> </method> <method name="sqrt" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="s" type="real"> + <argument index="0" name="s" type="float"> </argument> <description> Square root. </description> </method> <method name="fmod" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="x" type="real"> + <argument index="0" name="x" type="float"> </argument> - <argument index="1" name="y" type="real"> + <argument index="1" name="y" type="float"> </argument> <description> Module (remainder of x/y). </description> </method> <method name="fposmod" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="x" type="real"> + <argument index="0" name="x" type="float"> </argument> - <argument index="1" name="y" type="real"> + <argument index="1" name="y" type="float"> </argument> <description> Module (remainder of x/y) that wraps equally in positive and negative. </description> </method> <method name="floor" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="s" type="real"> + <argument index="0" name="s" type="float"> </argument> <description> Floor (rounds down to nearest integer). </description> </method> <method name="ceil" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="s" type="real"> + <argument index="0" name="s" type="float"> </argument> <description> Ceiling (rounds up to nearest integer). </description> </method> <method name="round" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="s" type="real"> + <argument index="0" name="s" type="float"> </argument> <description> Round to nearest integer. </description> </method> <method name="abs" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="s" type="real"> + <argument index="0" name="s" type="float"> </argument> <description> Remove sign (works for integer and float). </description> </method> <method name="sign" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="s" type="real"> + <argument index="0" name="s" type="float"> </argument> <description> Return sign (-1 or +1). </description> </method> <method name="pow" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="x" type="real"> + <argument index="0" name="x" type="float"> </argument> - <argument index="1" name="y" type="real"> + <argument index="1" name="y" type="float"> </argument> <description> Power function, x elevate to y. </description> </method> <method name="log" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="s" type="real"> + <argument index="0" name="s" type="float"> </argument> <description> Natural logarithm. </description> </method> <method name="exp" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="s" type="real"> + <argument index="0" name="s" type="float"> </argument> <description> Exponential logarithm. </description> </method> <method name="isnan" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="s" type="real"> + <argument index="0" name="s" type="float"> </argument> <description> Return true if the float is not a number. </description> </method> <method name="isinf" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="s" type="real"> + <argument index="0" name="s" type="float"> </argument> <description> Return true if the float is infinite. </description> </method> <method name="ease" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="s" type="real"> + <argument index="0" name="s" type="float"> </argument> - <argument index="1" name="curve" type="real"> + <argument index="1" name="curve" type="float"> </argument> <description> Easing function, based on exponent. 0 is constant, 1 is linear, 0 to 1 is ease-in, 1+ is ease out. Negative values are in-out/out in. </description> </method> <method name="decimals" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="step" type="real"> + <argument index="0" name="step" type="float"> </argument> <description> Return the amount of decimals in the floating point value. </description> </method> <method name="stepify" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="s" type="real"> + <argument index="0" name="s" type="float"> </argument> - <argument index="1" name="step" type="real"> + <argument index="1" name="step" type="float"> </argument> <description> Snap float value to a given step. </description> </method> <method name="lerp" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="a" type="real"> + <argument index="0" name="a" type="float"> </argument> - <argument index="1" name="b" type="real"> + <argument index="1" name="b" type="float"> </argument> - <argument index="2" name="c" type="real"> + <argument index="2" name="c" type="float"> </argument> <description> </description> </method> <method name="dectime" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="value" type="real"> + <argument index="0" name="value" type="float"> </argument> - <argument index="1" name="amount" type="real"> + <argument index="1" name="amount" type="float"> </argument> - <argument index="2" name="step" type="real"> + <argument index="2" name="step" type="float"> </argument> <description> </description> @@ -297,18 +297,18 @@ </description> </method> <method name="randf" > - <return type="real"> + <return type="float"> </return> <description> Random value (0 to 1 float). </description> </method> <method name="rand_range" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="from" type="real"> + <argument index="0" name="from" type="float"> </argument> - <argument index="1" name="to" type="real"> + <argument index="1" name="to" type="float"> </argument> <description> Random range, any floating point value between @@ -318,78 +318,78 @@ <method name="rand_seed" > <return type="Array"> </return> - <argument index="0" name="seed" type="real"> + <argument index="0" name="seed" type="float"> </argument> <description> Random from seed, pass a seed and an array with both number and new seed is returned. </description> </method> <method name="deg2rad" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="deg" type="real"> + <argument index="0" name="deg" type="float"> </argument> <description> Convert from degrees to radians. </description> </method> <method name="rad2deg" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="rad" type="real"> + <argument index="0" name="rad" type="float"> </argument> <description> Convert from radias to degrees. </description> </method> <method name="linear2db" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="nrg" type="real"> + <argument index="0" name="nrg" type="float"> </argument> <description> Convert from linear energy to decibels (audio). </description> </method> <method name="db2linear" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="db" type="real"> + <argument index="0" name="db" type="float"> </argument> <description> Convert from decibels to linear energy (audio). </description> </method> <method name="max" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="a" type="real"> + <argument index="0" name="a" type="float"> </argument> - <argument index="1" name="b" type="real"> + <argument index="1" name="b" type="float"> </argument> <description> Return the maximum of two values. </description> </method> <method name="min" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="a" type="real"> + <argument index="0" name="a" type="float"> </argument> - <argument index="1" name="b" type="real"> + <argument index="1" name="b" type="float"> </argument> <description> Return the minimum of two values. </description> </method> <method name="clamp" > - <return type="real"> + <return type="float"> </return> - <argument index="0" name="val" type="real"> + <argument index="0" name="val" type="float"> </argument> - <argument index="1" name="min" type="real"> + <argument index="1" name="min" type="float"> </argument> - <argument index="2" name="max" type="real"> + <argument index="2" name="max" type="float"> </argument> <description> Clamp both values to a range. @@ -538,6 +538,14 @@ back into an instance. Useful for deserializing. </description> </method> + <method name="hash" > + <return type="int"> + </return> + <argument index="0" name="var:var" type="var"> + </argument> + <description> + </description> + </method> <method name="print_stack" > <return type="Nil"> </return> @@ -549,7 +557,7 @@ </methods> <constants> <constant name="PI" value="3.141593"> - Constant that represents how many times the diameter of a + Constant that represents how many times the diameter of a circumference fits around it's perimeter. </constant> </constants> @@ -568,79 +576,52 @@ <member name="Performance" type="Performance"> </member> <member name="Globals" type="Globals"> - The file engine.cfg is read into this singleton. </member> <member name="IP" type="IP"> - Global IP protocol functions (like hostname resolution). </member> <member name="Geometry" type="Geometry"> - Geometry helpers. </member> <member name="ResourceLoader" type="ResourceLoader"> - Singleton that loads resources (load() calls this) </member> <member name="ResourceSaver" type="ResourceSaver"> - Singleton that saves resources. </member> <member name="PathRemap" type="PathRemap"> - Uset to setup remaps for the filesystem. </member> <member name="OS" type="OS"> - Operating system functions. </member> <member name="Marshalls" type="Reference"> - Used to serialize and deserialize, helpers. </member> <member name="TranslationServer" type="TranslationServer"> - Server that takes care of translating between different - languages. </member> <member name="TS" type="TranslationServer"> - Short version for TranslationServer. </member> <member name="Input" type="Input"> - Global input variables and functions. </member> - <member name="SceneIO" type="SceneIO"> - Deprecaed. + <member name="InputMap" type="InputMap"> </member> <member name="VisualServer" type="VisualServer"> - Server that handles anything visual at low level. </member> <member name="VS" type="VisualServer"> - Short for VisualServer. </member> <member name="AudioServer" type="AudioServer"> - Server that handles anything audio at low level. </member> <member name="AS" type="AudioServer"> - Short for AudioServer. </member> <member name="PhysicsServer" type="PhysicsServer"> - Server that handles anything 3D physics at low level. </member> <member name="PS" type="PhysicsServer"> - Short for PhysicsServer. </member> <member name="Physics2DServer" type="Physics2DServer"> - Server that handles anything 2D physics at low level. </member> <member name="PS2D" type="Physics2DServer"> - Short for Physics2DServer. </member> <member name="SpatialSoundServer" type="SpatialSound2DServer"> - Server that handles spatial audio positioning in 3D at low - level. </member> <member name="SS" type="SpatialSound2DServer"> - Short for SpatialSoundServer. </member> <member name="SpatialSound2DServer" type="SpatialSound2DServer"> - Server that handles spatial audio positioning in 2D at low - level. </member> <member name="SS2D" type="SpatialSound2DServer"> - Short for SpatialSound2DServer. </member> </members> <constants> @@ -1443,20 +1424,38 @@ <constant name="PROPERTY_HINT_ENUM" value="3"> Property hint is an enumerated value, like "Hello,Something,Else". This is valid for integers, floats and strings properties. </constant> + <constant name="PROPERTY_HINT_EXP_EASING" value="4"> + </constant> <constant name="PROPERTY_HINT_LENGTH" value="5"> </constant> + <constant name="PROPERTY_HINT_KEY_ACCEL" value="6"> + </constant> <constant name="PROPERTY_HINT_FLAGS" value="7"> Property hint is a bitmask description, for bits 0,1,2,3 abd 5 the hint would be like "Bit0,Bit1,Bit2,Bit3,,Bit5". Valid only for integers. </constant> + <constant name="PROPERTY_HINT_ALL_FLAGS" value="8"> + </constant> <constant name="PROPERTY_HINT_FILE" value="9"> String property is a file (so pop up a file dialog when edited). Hint string can be a set of wildcards like "*.doc". </constant> <constant name="PROPERTY_HINT_DIR" value="10"> String property is a directory (so pop up a file dialog when edited). </constant> + <constant name="PROPERTY_HINT_GLOBAL_FILE" value="11"> + </constant> + <constant name="PROPERTY_HINT_GLOBAL_DIR" value="12"> + </constant> <constant name="PROPERTY_HINT_RESOURCE_TYPE" value="13"> String property is a resource, so open the resource popup menu when edited. </constant> + <constant name="PROPERTY_HINT_MULTILINE_TEXT" value="14"> + </constant> + <constant name="PROPERTY_HINT_COLOR_NO_ALPHA" value="15"> + </constant> + <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSY" value="16"> + </constant> + <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS" value="17"> + </constant> <constant name="PROPERTY_USAGE_STORAGE" value="1"> Property will be used as storage (default). </constant> @@ -1586,7 +1585,7 @@ </description> </method> <method name="get_area" > - <return type="real"> + <return type="float"> </return> <description> Get the area inside the [AABB] @@ -1617,7 +1616,7 @@ </description> </method> <method name="get_longest_axis_size" > - <return type="real"> + <return type="float"> </return> <description> Return the scalar length of the longest axis of the @@ -1640,7 +1639,7 @@ </description> </method> <method name="get_shortest_axis_size" > - <return type="real"> + <return type="float"> </return> <description> Return the scalar length of the shortest axis of the @@ -1660,7 +1659,7 @@ <method name="grow" > <return type="AABB"> </return> - <argument index="0" name="by" type="real"> + <argument index="0" name="by" type="float"> </argument> <description> Return a copy of the AABB grown a given a mount of @@ -1718,6 +1717,16 @@ Return true if the AABB is at both sides of a plane. </description> </method> + <method name="intersects_segment" > + <return type="bool"> + </return> + <argument index="0" name="from" type="Vector3"> + </argument> + <argument index="1" name="to" type="Vector3"> + </argument> + <description> + </description> + </method> <method name="merge" > <return type="AABB"> </return> @@ -1744,7 +1753,6 @@ <member name="size" type="Vector3"> </member> <member name="end" type="Vector3"> - Same as pos+size. </member> </members> <constants> @@ -1792,7 +1800,11 @@ <method name="add_button" > <return type="Button"> </return> - <argument index="0" name="text" type="String" default=""""> + <argument index="0" name="text" type="String"> + </argument> + <argument index="1" name="right" type="bool" default="false"> + </argument> + <argument index="2" name="action" type="String" default=""""> </argument> <description> </description> @@ -1933,7 +1945,7 @@ </argument> <description> Set the visible sprite frame index (from the list of - frames inside the [SpriteFrames] resource). + frames inside the [SpriteFrames] resource). </description> </method> <method name="get_frame" qualifiers="const" > @@ -1961,6 +1973,40 @@ <constants> </constants> </class> +<class name="AnimatedSprite3D" inherits="SpriteBase3D" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_sprite_frames" > + <argument index="0" name="sprite_frames" type="SpriteFrames"> + </argument> + <description> + </description> + </method> + <method name="get_sprite_frames" qualifiers="const" > + <return type="Texture"> + </return> + <description> + </description> + </method> + <method name="set_frame" > + <argument index="0" name="frame" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_frame" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> <class name="Animation" inherits="Resource" category="Core"> <brief_description> Contains data used to animate everything in the engine. @@ -2048,7 +2094,7 @@ </return> <argument index="0" name="idx" type="int"> </argument> - <argument index="1" name="time" type="real"> + <argument index="1" name="time" type="float"> </argument> <argument index="2" name="loc" type="Vector3"> </argument> @@ -2063,11 +2109,11 @@ <method name="track_insert_key" > <argument index="0" name="idx" type="int"> </argument> - <argument index="1" name="time" type="real"> + <argument index="1" name="time" type="float"> </argument> <argument index="2" name="key" type="var"> </argument> - <argument index="3" name="transition" type="real" default="1"> + <argument index="3" name="transition" type="float" default="1"> </argument> <description> Insert a generic key in a given track. @@ -2085,7 +2131,7 @@ <method name="track_remove_key_at_pos" > <argument index="0" name="idx" type="int"> </argument> - <argument index="1" name="pos" type="real"> + <argument index="1" name="pos" type="float"> </argument> <description> Remove a key by position (seconds) in a given track. @@ -2107,7 +2153,7 @@ </argument> <argument index="1" name="key_idx" type="int"> </argument> - <argument index="2" name="transition" type="real"> + <argument index="2" name="transition" type="float"> </argument> <description> Set the transition curve (easing) for a specific key (see built-in @@ -2115,7 +2161,7 @@ </description> </method> <method name="track_get_key_transition" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -2145,7 +2191,7 @@ </description> </method> <method name="track_get_key_time" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -2160,7 +2206,7 @@ </return> <argument index="0" name="idx" type="int"> </argument> - <argument index="1" name="time" type="real"> + <argument index="1" name="time" type="float"> </argument> <argument index="2" name="exact" type="bool" default="false"> </argument> @@ -2191,7 +2237,7 @@ </return> <argument index="0" name="idx" type="int"> </argument> - <argument index="1" name="time_sec" type="real"> + <argument index="1" name="time_sec" type="float"> </argument> <description> Return the interpolated value of a transform track at a given time (in seconds). An array consisting of 3 elements: position ([Vector3]), rotation ([Quat]) and scale ([Vector3]). @@ -2220,9 +2266,9 @@ </return> <argument index="0" name="idx" type="int"> </argument> - <argument index="1" name="time_sec" type="real"> + <argument index="1" name="time_sec" type="float"> </argument> - <argument index="2" name="delta" type="real"> + <argument index="2" name="delta" type="float"> </argument> <description> Return all the key indices of a value track, given a position and delta time. @@ -2233,9 +2279,9 @@ </return> <argument index="0" name="idx" type="int"> </argument> - <argument index="1" name="time_sec" type="real"> + <argument index="1" name="time_sec" type="float"> </argument> - <argument index="2" name="delta" type="real"> + <argument index="2" name="delta" type="float"> </argument> <description> Return all the key indices of a method track, given a position and delta time. @@ -2264,14 +2310,14 @@ </description> </method> <method name="set_length" > - <argument index="0" name="time_sec" type="real"> + <argument index="0" name="time_sec" type="float"> </argument> <description> Set the total length of the animation (in seconds). Note that length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping. </description> </method> <method name="get_length" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the total length of the animation (in seconds). @@ -2292,13 +2338,13 @@ </description> </method> <method name="set_step" > - <argument index="0" name="size_sec" type="real"> + <argument index="0" name="size_sec" type="float"> </argument> <description> </description> </method> <method name="get_step" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -2395,14 +2441,14 @@ </argument> <argument index="1" name="anim_to" type="String"> </argument> - <argument index="2" name="sec" type="real"> + <argument index="2" name="sec" type="float"> </argument> <description> Specify a blend time (in seconds) between two animations, referemced by their names. </description> </method> <method name="get_blend_time" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="anim_from" type="String"> </argument> @@ -2413,14 +2459,14 @@ </description> </method> <method name="set_default_blend_time" > - <argument index="0" name="sec" type="real"> + <argument index="0" name="sec" type="float"> </argument> <description> Set the default blend time between animations. </description> </method> <method name="get_default_blend_time" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the default blend time between animations. @@ -2429,9 +2475,9 @@ <method name="play" > <argument index="0" name="name" type="String" default=""""> </argument> - <argument index="1" name="custom_blend" type="real" default="-1"> + <argument index="1" name="custom_blend" type="float" default="-1"> </argument> - <argument index="2" name="custom_speed" type="real" default="1"> + <argument index="2" name="custom_speed" type="float" default="1"> </argument> <argument index="3" name="from_end" type="bool" default="false"> </argument> @@ -2501,14 +2547,14 @@ </description> </method> <method name="set_speed" > - <argument index="0" name="speed" type="real"> + <argument index="0" name="speed" type="float"> </argument> <description> Set a speed scaling ratio in a given animation channel (or channel 0 if none is provided). Default ratio is [i]1[/i] (no scaling). </description> </method> <method name="get_speed" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Get the speed scaling ratio in a given animation channel (or channel 0 if none is provided). Default ratio is [i]1[/i] (no scaling). @@ -2545,7 +2591,7 @@ </description> </method> <method name="seek" > - <argument index="0" name="pos_sec" type="real"> + <argument index="0" name="pos_sec" type="float"> </argument> <argument index="1" name="update" type="bool" default="false"> </argument> @@ -2557,7 +2603,7 @@ </description> </method> <method name="get_pos" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the playback position (in seconds) in an animation channel (or channel 0 if none is provided) @@ -2592,7 +2638,7 @@ </description> </method> <method name="get_current_animation_pos" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Get the position (in seconds) of the currently being @@ -2600,13 +2646,19 @@ </description> </method> <method name="get_current_animation_length" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Get the length (in seconds) of the currently being played animation. </description> </method> + <method name="advance" > + <argument index="0" name="delta" type="float"> + </argument> + <description> + </description> + </method> </methods> <signals> <signal name="animation_changed"> @@ -2627,11 +2679,11 @@ </signals> <constants> <constant name="ANIMATION_PROCESS_FIXED" value="0"> - Process animation on fixed process. This is specially useful + Process animation on fixed process. This is specially useful when animating kinematic bodies. </constant> <constant name="ANIMATION_PROCESS_IDLE" value="1"> - Process animation on idle process. + Process animation on idle process. </constant> </constants> </class> @@ -2742,13 +2794,13 @@ <method name="oneshot_node_set_fadein_time" > <argument index="0" name="id" type="String"> </argument> - <argument index="1" name="time_sec" type="real"> + <argument index="1" name="time_sec" type="float"> </argument> <description> </description> </method> <method name="oneshot_node_get_fadein_time" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="id" type="String"> </argument> @@ -2758,13 +2810,13 @@ <method name="oneshot_node_set_fadeout_time" > <argument index="0" name="id" type="String"> </argument> - <argument index="1" name="time_sec" type="real"> + <argument index="1" name="time_sec" type="float"> </argument> <description> </description> </method> <method name="oneshot_node_get_fadeout_time" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="id" type="String"> </argument> @@ -2782,7 +2834,7 @@ <method name="oneshot_node_set_autorestart_delay" > <argument index="0" name="id" type="String"> </argument> - <argument index="1" name="delay_sec" type="real"> + <argument index="1" name="delay_sec" type="float"> </argument> <description> </description> @@ -2790,7 +2842,7 @@ <method name="oneshot_node_set_autorestart_random_delay" > <argument index="0" name="id" type="String"> </argument> - <argument index="1" name="rand_sec" type="real"> + <argument index="1" name="rand_sec" type="float"> </argument> <description> </description> @@ -2804,7 +2856,7 @@ </description> </method> <method name="oneshot_node_get_autorestart_delay" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="id" type="String"> </argument> @@ -2812,7 +2864,7 @@ </description> </method> <method name="oneshot_node_get_autorestart_random_delay" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="id" type="String"> </argument> @@ -2852,13 +2904,13 @@ <method name="mix_node_set_amount" > <argument index="0" name="id" type="String"> </argument> - <argument index="1" name="ratio" type="real"> + <argument index="1" name="ratio" type="float"> </argument> <description> </description> </method> <method name="mix_node_get_amount" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="id" type="String"> </argument> @@ -2868,13 +2920,13 @@ <method name="blend2_node_set_amount" > <argument index="0" name="id" type="String"> </argument> - <argument index="1" name="blend" type="real"> + <argument index="1" name="blend" type="float"> </argument> <description> </description> </method> <method name="blend2_node_get_amount" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="id" type="String"> </argument> @@ -2894,13 +2946,13 @@ <method name="blend3_node_set_amount" > <argument index="0" name="id" type="String"> </argument> - <argument index="1" name="blend" type="real"> + <argument index="1" name="blend" type="float"> </argument> <description> </description> </method> <method name="blend3_node_get_amount" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="id" type="String"> </argument> @@ -2926,13 +2978,13 @@ <method name="timescale_node_set_scale" > <argument index="0" name="id" type="String"> </argument> - <argument index="1" name="scale" type="real"> + <argument index="1" name="scale" type="float"> </argument> <description> </description> </method> <method name="timescale_node_get_scale" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="id" type="String"> </argument> @@ -2942,7 +2994,7 @@ <method name="timeseek_node_seek" > <argument index="0" name="id" type="String"> </argument> - <argument index="1" name="pos_sec" type="real"> + <argument index="1" name="pos_sec" type="float"> </argument> <description> </description> @@ -2994,13 +3046,13 @@ <method name="transition_node_set_xfade_time" > <argument index="0" name="id" type="String"> </argument> - <argument index="1" name="time_sec" type="real"> + <argument index="1" name="time_sec" type="float"> </argument> <description> </description> </method> <method name="transition_node_get_xfade_time" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="id" type="String"> </argument> @@ -3182,37 +3234,37 @@ </description> </method> <method name="set_gravity" > - <argument index="0" name="gravity" type="real"> + <argument index="0" name="gravity" type="float"> </argument> <description> </description> </method> <method name="get_gravity" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="set_density" > - <argument index="0" name="density" type="real"> + <argument index="0" name="density" type="float"> </argument> <description> </description> </method> <method name="get_density" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="set_priority" > - <argument index="0" name="priority" type="real"> + <argument index="0" name="priority" type="float"> </argument> <description> </description> </method> <method name="get_priority" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -3319,37 +3371,37 @@ </description> </method> <method name="set_gravity" > - <argument index="0" name="gravity" type="real"> + <argument index="0" name="gravity" type="float"> </argument> <description> </description> </method> <method name="get_gravity" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="set_density" > - <argument index="0" name="density" type="real"> + <argument index="0" name="density" type="float"> </argument> <description> </description> </method> <method name="get_density" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="set_priority" > - <argument index="0" name="priority" type="real"> + <argument index="0" name="priority" type="float"> </argument> <description> </description> </method> <method name="get_priority" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -3793,7 +3845,7 @@ <method name="voice_set_volume" > <argument index="0" name="voice" type="RID"> </argument> - <argument index="1" name="volume" type="real"> + <argument index="1" name="volume" type="float"> </argument> <description> Change the volume of a currently playing voice."#10;"#9;"#9;"#9;Volume is expressed as linear gain where 0.0 is mute"#10;"#9;"#9;"#9;and 1.0 is default. @@ -3802,11 +3854,11 @@ <method name="voice_set_pan" > <argument index="0" name="voice" type="RID"> </argument> - <argument index="1" name="pan" type="real"> + <argument index="1" name="pan" type="float"> </argument> - <argument index="2" name="depth" type="real" default="0"> + <argument index="2" name="depth" type="float" default="0"> </argument> - <argument index="3" name="height" type="real" default="0"> + <argument index="3" name="height" type="float" default="0"> </argument> <description> Change the pan of a currently playing voice and,"#10;"#9;"#9;"#9;optionally, the depth and height for a positional/3D"#10;"#9;"#9;"#9;sound. Panning values are expressed within the -1 to"#10;"#9;"#9;"#9;+1 range. @@ -3817,11 +3869,11 @@ </argument> <argument index="1" name="type" type="int"> </argument> - <argument index="2" name="cutoff" type="real"> + <argument index="2" name="cutoff" type="float"> </argument> - <argument index="3" name="resonance" type="real"> + <argument index="3" name="resonance" type="float"> </argument> - <argument index="4" name="gain" type="real" default="0"> + <argument index="4" name="gain" type="float" default="0"> </argument> <description> Set a resonant filter post processing for the voice."#10;"#9;"#9;"#9;Filter type is a value from the FILTER_* enum. @@ -3830,7 +3882,7 @@ <method name="voice_set_chorus" > <argument index="0" name="voice" type="RID"> </argument> - <argument index="1" name="chorus" type="real"> + <argument index="1" name="chorus" type="float"> </argument> <description> Set chorus send post processing for the voice (from"#10;"#9;"#9;"#9;0 to 1). @@ -3841,7 +3893,7 @@ </argument> <argument index="1" name="room" type="int"> </argument> - <argument index="2" name="reverb" type="real"> + <argument index="2" name="reverb" type="float"> </argument> <description> Set the reverb send post processing for the voice (from"#10;"#9;"#9;"#9;0 to 1) and the reverb type, from the REVERB_* enum. @@ -3866,7 +3918,7 @@ </description> </method> <method name="voice_get_volume" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="voice" type="RID"> </argument> @@ -3875,7 +3927,7 @@ </description> </method> <method name="voice_get_pan" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="voice" type="RID"> </argument> @@ -3884,7 +3936,7 @@ </description> </method> <method name="voice_get_pan_height" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="voice" type="RID"> </argument> @@ -3893,7 +3945,7 @@ </description> </method> <method name="voice_get_pan_depth" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="voice" type="RID"> </argument> @@ -3911,7 +3963,7 @@ </description> </method> <method name="voice_get_filter_cutoff" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="voice" type="RID"> </argument> @@ -3920,7 +3972,7 @@ </description> </method> <method name="voice_get_filter_resonance" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="voice" type="RID"> </argument> @@ -3929,7 +3981,7 @@ </description> </method> <method name="voice_get_chorus" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="voice" type="RID"> </argument> @@ -3947,7 +3999,7 @@ </description> </method> <method name="voice_get_reverb" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="voice" type="RID"> </argument> @@ -3988,39 +4040,39 @@ </description> </method> <method name="set_stream_global_volume_scale" > - <argument index="0" name="scale" type="real"> + <argument index="0" name="scale" type="float"> </argument> <description> Set global scale for stream playback. Default is 1.0. </description> </method> <method name="get_stream_global_volume_scale" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the global scale for stream playback. </description> </method> <method name="set_fx_global_volume_scale" > - <argument index="0" name="scale" type="real"> + <argument index="0" name="scale" type="float"> </argument> <description> </description> </method> <method name="get_fx_global_volume_scale" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="set_event_voice_global_volume_scale" > - <argument index="0" name="scale" type="real"> + <argument index="0" name="scale" type="float"> </argument> <description> </description> </method> <method name="get_event_voice_global_volume_scale" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -4141,21 +4193,21 @@ </description> </method> <method name="seek_pos" > - <argument index="0" name="pos" type="real"> + <argument index="0" name="pos" type="float"> </argument> <description> Seek to a certain position (in seconds) in an audio"#10;"#9;"#9;"#9;stream. </description> </method> <method name="get_pos" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the current playing position (in seconds) of the audio"#10;"#9;"#9;"#9;stream (if supported). Since this value is updated"#10;"#9;"#9;"#9;internally, it may not be exact or updated"#10;"#9;"#9;"#9;continuosly. Accuracy depends on the sample buffer"#10;"#9;"#9;"#9;size of the audio driver. </description> </method> <method name="get_length" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -4208,42 +4260,42 @@ </description> </method> <method name="set_pitch_scale" > - <argument index="0" name="pitch_scale" type="real"> + <argument index="0" name="pitch_scale" type="float"> </argument> <description> Set pitch scale for the speech. Animating this value holds amusing results. </description> </method> <method name="get_pitch_scale" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the pitch scale. </description> </method> <method name="set_pitch_random_scale" > - <argument index="0" name="pitch_random_scale" type="real"> + <argument index="0" name="pitch_random_scale" type="float"> </argument> <description> Set the random scaling for the pitch. </description> </method> <method name="get_pitch_random_scale" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the pitch random scaling. </description> </method> <method name="set_xfade_time" > - <argument index="0" name="sec" type="real"> + <argument index="0" name="sec" type="float"> </argument> <description> Set the cross-fade time between random phonemes. </description> </method> <method name="get_xfade_time" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the cross-fade time between random phonemes. @@ -4329,6 +4381,374 @@ <constants> </constants> </class> +<class name="BakedLight" inherits="Resource" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_mode" > + <argument index="0" name="mode" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_mode" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_octree" > + <argument index="0" name="octree" type="RawArray"> + </argument> + <description> + </description> + </method> + <method name="get_octree" qualifiers="const" > + <return type="RawArray"> + </return> + <description> + </description> + </method> + <method name="set_light" > + <argument index="0" name="light" type="RawArray"> + </argument> + <description> + </description> + </method> + <method name="get_light" qualifiers="const" > + <return type="RawArray"> + </return> + <description> + </description> + </method> + <method name="set_sampler_octree" > + <argument index="0" name="sampler_octree" type="IntArray"> + </argument> + <description> + </description> + </method> + <method name="get_sampler_octree" qualifiers="const" > + <return type="IntArray"> + </return> + <description> + </description> + </method> + <method name="add_lightmap" > + <argument index="0" name="texture" type="Texture"> + </argument> + <argument index="1" name="gen_size" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="erase_lightmap" > + <argument index="0" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="clear_lightmaps" > + <description> + </description> + </method> + <method name="set_cell_subdivision" > + <argument index="0" name="cell_subdivision" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_cell_subdivision" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_initial_lattice_subdiv" > + <argument index="0" name="cell_subdivision" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_initial_lattice_subdiv" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_plot_size" > + <argument index="0" name="plot_size" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_plot_size" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_bounces" > + <argument index="0" name="bounces" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_bounces" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_cell_extra_margin" > + <argument index="0" name="cell_extra_margin" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_cell_extra_margin" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_edge_damp" > + <argument index="0" name="edge_damp" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_edge_damp" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_normal_damp" > + <argument index="0" name="normal_damp" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_normal_damp" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_tint" > + <argument index="0" name="tint" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_tint" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_saturation" > + <argument index="0" name="saturation" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_saturation" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_ao_radius" > + <argument index="0" name="ao_radius" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_ao_radius" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_ao_strength" > + <argument index="0" name="ao_strength" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_ao_strength" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_format" > + <argument index="0" name="format" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_format" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_transfer_lightmaps_only_to_uv2" > + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="get_transfer_lightmaps_only_to_uv2" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_energy_multiplier" > + <argument index="0" name="energy_multiplier" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_energy_multiplier" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_gamma_adjust" > + <argument index="0" name="gamma_adjust" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_gamma_adjust" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_bake_flag" > + <argument index="0" name="flag" type="int"> + </argument> + <argument index="1" name="enabled" type="bool"> + </argument> + <description> + </description> + </method> + <method name="get_bake_flag" qualifiers="const" > + <return type="bool"> + </return> + <argument index="0" name="flag" type="int"> + </argument> + <description> + </description> + </method> + </methods> + <constants> + <constant name="MODE_OCTREE" value="0"> + </constant> + <constant name="MODE_LIGHTMAPS" value="1"> + </constant> + <constant name="BAKE_DIFFUSE" value="0"> + </constant> + <constant name="BAKE_SPECULAR" value="1"> + </constant> + <constant name="BAKE_TRANSLUCENT" value="2"> + </constant> + <constant name="BAKE_CONSERVE_ENERGY" value="3"> + </constant> + <constant name="BAKE_MAX" value="5"> + </constant> + </constants> +</class> +<class name="BakedLightInstance" inherits="VisualInstance" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_baked_light" > + <argument index="0" name="baked_light" type="Object"> + </argument> + <description> + </description> + </method> + <method name="get_baked_light" qualifiers="const" > + <return type="Object"> + </return> + <description> + </description> + </method> + <method name="get_baked_light_instance" qualifiers="const" > + <return type="RID"> + </return> + <description> + </description> + </method> + </methods> + <signals> + <signal name="baked_light_changed"> + <description> + </description> + </signal> + </signals> + <constants> + </constants> +</class> +<class name="BakedLightSampler" inherits="VisualInstance" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_param" > + <argument index="0" name="param" type="int"> + </argument> + <argument index="1" name="value" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_param" qualifiers="const" > + <return type="float"> + </return> + <argument index="0" name="param" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_resolution" > + <argument index="0" name="resolution" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_resolution" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> + </methods> + <constants> + <constant name="PARAM_RADIUS" value="0"> + </constant> + <constant name="PARAM_STRENGTH" value="1"> + </constant> + <constant name="PARAM_ATTENUATION" value="2"> + </constant> + <constant name="PARAM_DETAIL_RATIO" value="3"> + </constant> + <constant name="PARAM_MAX" value="4"> + </constant> + </constants> +</class> <class name="BaseButton" inherits="Control" category="Core"> <brief_description> Provides a base class for different kinds of buttons. @@ -4351,6 +4771,12 @@ Return when the button is pressed (only if toggle_mode is active). </description> </method> + <method name="is_hovered" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> <method name="set_toggle_mode" > <argument index="0" name="enabled" type="bool"> </argument> @@ -4393,6 +4819,13 @@ Return the state of the click_on_press property (see [method set_click_on_press]). </description> </method> + <method name="get_draw_mode" qualifiers="const" > + <return type="int"> + </return> + <description> + Return the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overiding _draw() or connecting to "draw" signal. The visual state of the button is defined by the DRAW_* enum. + </description> + </method> </methods> <signals> <signal name="toggled"> @@ -4409,6 +4842,14 @@ </signal> </signals> <constants> + <constant name="DRAW_NORMAL" value="0"> + </constant> + <constant name="DRAW_PRESSED" value="1"> + </constant> + <constant name="DRAW_HOVER" value="2"> + </constant> + <constant name="DRAW_DISABLED" value="3"> + </constant> </constants> </class> <class name="BitMap" inherits="Resource" category="Core"> @@ -4594,6 +5035,30 @@ </methods> <constants> </constants> + <theme_items> + <theme_item name="hseparation" type="int"> + </theme_item> + <theme_item name="font_color_disabled" type="Color"> + </theme_item> + <theme_item name="font_color" type="Color"> + </theme_item> + <theme_item name="font_color_hover" type="Color"> + </theme_item> + <theme_item name="font_color_pressed" type="Color"> + </theme_item> + <theme_item name="font" type="Font"> + </theme_item> + <theme_item name="hover" type="StyleBox"> + </theme_item> + <theme_item name="pressed" type="StyleBox"> + </theme_item> + <theme_item name="focus" type="StyleBox"> + </theme_item> + <theme_item name="disabled" type="StyleBox"> + </theme_item> + <theme_item name="normal" type="StyleBox"> + </theme_item> + </theme_items> </class> <class name="ButtonArray" inherits="Control" category="Core"> <brief_description> @@ -4820,22 +5285,22 @@ </description> </method> <method name="set_perspective" > - <argument index="0" name="fov" type="real"> + <argument index="0" name="fov" type="float"> </argument> - <argument index="1" name="z_near" type="real"> + <argument index="1" name="z_near" type="float"> </argument> - <argument index="2" name="z_far" type="real"> + <argument index="2" name="z_far" type="float"> </argument> <description> Set the camera projection to perspective mode, by specifying a [i]FOV[/i] Y angle in degrees (FOV means Field of View), and the [i]near[/i] and [i]far[/i] clip planes in worldspace units. </description> </method> <method name="set_orthogonal" > - <argument index="0" name="size" type="real"> + <argument index="0" name="size" type="float"> </argument> - <argument index="1" name="z_near" type="real"> + <argument index="1" name="z_near" type="float"> </argument> - <argument index="2" name="z_far" type="real"> + <argument index="2" name="z_far" type="float"> </argument> <description> Set the camera projection to orthogonal mode, by specifying a"#10;"#9;"#9;"#9;width and the [i]near[/i] and [i]far[/i] clip planes in worldspace units. (As a hint, 2D games often use this projection, with values specified in pixels) @@ -4865,25 +5330,25 @@ </description> </method> <method name="get_fov" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="get_size" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="get_zfar" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="get_znear" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -4936,14 +5401,14 @@ <description> </description> </method> - <method name="set_use_vertical_aspect" > - <argument index="0" name="enable" type="bool"> + <method name="set_keep_aspect_mode" > + <argument index="0" name="mode" type="int"> </argument> <description> </description> </method> - <method name="is_using_vertical_aspect" qualifiers="const" > - <return type="bool"> + <method name="get_keep_aspect_mode" qualifiers="const" > + <return type="int"> </return> <description> </description> @@ -4956,6 +5421,10 @@ <constant name="PROJECTION_ORTHOGONAL" value="1"> Orthogonal Projection (objects remain the same size on the screen no matter how far away they are). </constant> + <constant name="KEEP_WIDTH" value="0"> + </constant> + <constant name="KEEP_HEIGHT" value="1"> + </constant> </constants> </class> <class name="Camera2D" inherits="Node2D" category="Core"> @@ -5067,25 +5536,25 @@ </description> </method> <method name="set_v_offset" > - <argument index="0" name="ofs" type="real"> + <argument index="0" name="ofs" type="float"> </argument> <description> </description> </method> <method name="get_v_offset" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="set_h_offset" > - <argument index="0" name="ofs" type="real"> + <argument index="0" name="ofs" type="float"> </argument> <description> </description> </method> <method name="get_h_offset" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -5093,14 +5562,14 @@ <method name="set_drag_margin" > <argument index="0" name="margin" type="int"> </argument> - <argument index="1" name="drag_margin" type="real"> + <argument index="1" name="drag_margin" type="float"> </argument> <description> Set the margins needed to drag the camera (relative to the screen size). Margin uses the MARGIN_* enum. Drag margins of 0,0,0,0 will keep the camera at the center of the screen, while drag margins of 1,1,1,1 will only move when the camera is at the edges. </description> </method> <method name="get_drag_margin" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="margin" type="int"> </argument> @@ -5134,13 +5603,13 @@ </description> </method> <method name="set_follow_smoothing" > - <argument index="0" name="follow_smoothing" type="real"> + <argument index="0" name="follow_smoothing" type="float"> </argument> <description> </description> </method> <method name="get_follow_smoothing" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -5189,7 +5658,7 @@ </description> </method> <method name="edit_rotate" > - <argument index="0" name="degrees" type="real"> + <argument index="0" name="degrees" type="float"> </argument> <description> Used for editing, handle rotation. @@ -5267,27 +5736,27 @@ </description> </method> <method name="set_opacity" > - <argument index="0" name="opacity" type="real"> + <argument index="0" name="opacity" type="float"> </argument> <description> Set canvas item opacity. This will affect the canvas item and all the children. </description> </method> <method name="get_opacity" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the canvas item opacity. This affects the canvas item and all the children. </description> </method> <method name="set_self_opacity" > - <argument index="0" name="self_opacity" type="real"> + <argument index="0" name="self_opacity" type="float"> </argument> <description> </description> </method> <method name="get_self_opacity" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Set canvas item self-opacity. This does not affect the opacity of children items. @@ -5312,7 +5781,7 @@ </argument> <argument index="2" name="color" type="Color"> </argument> - <argument index="3" name="width" type="real" default="1"> + <argument index="3" name="width" type="float" default="1"> </argument> <description> Draw a line from a 2D point to another, with a given color and width. @@ -5330,7 +5799,7 @@ <method name="draw_circle" > <argument index="0" name="pos" type="Vector2"> </argument> - <argument index="1" name="radius" type="real"> + <argument index="1" name="radius" type="float"> </argument> <argument index="2" name="color" type="Color"> </argument> @@ -5391,7 +5860,7 @@ </argument> <argument index="3" name="texture" type="Texture" default="Object()"> </argument> - <argument index="4" name="width" type="real" default="1"> + <argument index="4" name="width" type="float" default="1"> </argument> <description> Draw a custom primitive, 1 point for a point, 2 points for a line, 3 points for a triangle and 4 points for a quad. @@ -5402,11 +5871,9 @@ </argument> <argument index="1" name="colors" type="ColorArray"> </argument> - <argument index="2" name="uvs" type="Vector2Array"> - </argument> - <argument index="3" name="texture" type="Texture" default="Array()"> + <argument index="2" name="uvs" type="Vector2Array" default="Array()"> </argument> - <argument index="4" name="arg4" type="real" default="Object()"> + <argument index="3" name="texture" type="Texture" default="Object()"> </argument> <description> Draw a polygon of any amount of points, convex or concave. @@ -5415,13 +5882,11 @@ <method name="draw_colored_polygon" > <argument index="0" name="points" type="Vector2Array"> </argument> - <argument index="1" name="color" type="ColorArray"> - </argument> - <argument index="2" name="uvs" type="Vector2Array"> + <argument index="1" name="color" type="Color"> </argument> - <argument index="3" name="texture" type="Texture" default="Array()"> + <argument index="2" name="uvs" type="Vector2Array" default="Array()"> </argument> - <argument index="4" name="arg4" type="real" default="Object()"> + <argument index="3" name="texture" type="Texture" default="Object()"> </argument> <description> Draw a colored polygon of any amount of points, convex or concave. @@ -5443,7 +5908,7 @@ </description> </method> <method name="draw_char" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="font" type="Font"> </argument> @@ -5462,7 +5927,7 @@ <method name="draw_set_transform" > <argument index="0" name="pos" type="Vector2"> </argument> - <argument index="1" name="rot" type="real"> + <argument index="1" name="rot" type="float"> </argument> <argument index="2" name="scale" type="Vector2"> </argument> @@ -5506,12 +5971,6 @@ <description> </description> </method> - <method name="get_viewport" qualifiers="const" > - <return type="Object"> - </return> - <description> - </description> - </method> </methods> <signals> <signal name="item_rect_changed"> @@ -5548,6 +6007,8 @@ <constant name="BLEND_MODE_MUL" value="3"> Multiplicative blending mode. </constant> + <constant name="BLEND_MODE_PREMULT_ALPHA" value="4"> + </constant> <constant name="NOTIFICATION_DRAW" value="30"> CanvasItem is requested to draw. </constant> @@ -5616,14 +6077,14 @@ </description> </method> <method name="set_rotation" > - <argument index="0" name="rotation" type="real"> + <argument index="0" name="rotation" type="float"> </argument> <description> Set the base rotation for this layer (helper). </description> </method> <method name="get_rotation" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the base rotation for this layer (helper). @@ -5670,28 +6131,28 @@ </description> <methods> <method name="set_radius" > - <argument index="0" name="radius" type="real"> + <argument index="0" name="radius" type="float"> </argument> <description> Set the capsule radius. </description> </method> <method name="get_radius" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the capsule radius. </description> </method> <method name="set_height" > - <argument index="0" name="height" type="real"> + <argument index="0" name="height" type="float"> </argument> <description> Set the capsule height. </description> </method> <method name="get_height" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the capsule height. @@ -5710,28 +6171,28 @@ </description> <methods> <method name="set_radius" > - <argument index="0" name="radius" type="real"> + <argument index="0" name="radius" type="float"> </argument> <description> Radius of the [CapsuleShape2D]. </description> </method> <method name="get_radius" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the radius of the [CapsuleShape2D]. </description> </method> <method name="set_height" > - <argument index="0" name="height" type="real"> + <argument index="0" name="height" type="float"> </argument> <description> Height of the [CapsuleShape2D]. </description> </method> <method name="get_height" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the height of the [CapsuleShape2D]. @@ -5741,221 +6202,21 @@ <constants> </constants> </class> -<class name="CarBody" inherits="PhysicsBody" category="Core"> - <brief_description> - </brief_description> - <description> - </description> - <methods> - <method name="set_max_steer_angle" > - <argument index="0" name="value" type="real"> - </argument> - <description> - </description> - </method> - <method name="set_steer_rate" > - <argument index="0" name="rate" type="real"> - </argument> - <description> - </description> - </method> - <method name="set_drive_torque" > - <argument index="0" name="value" type="real"> - </argument> - <description> - </description> - </method> - <method name="get_max_steer_angle" qualifiers="const" > - <return type="real"> - </return> - <description> - </description> - </method> - <method name="get_steer_rate" qualifiers="const" > - <return type="real"> - </return> - <description> - </description> - </method> - <method name="get_drive_torque" qualifiers="const" > - <return type="real"> - </return> - <description> - </description> - </method> - <method name="set_target_steering" > - <argument index="0" name="amount" type="real"> - </argument> - <description> - </description> - </method> - <method name="set_target_accelerate" > - <argument index="0" name="amount" type="real"> - </argument> - <description> - </description> - </method> - <method name="set_hand_brake" > - <argument index="0" name="amount" type="real"> - </argument> - <description> - </description> - </method> - <method name="get_target_steering" qualifiers="const" > - <return type="real"> - </return> - <description> - </description> - </method> - <method name="get_target_accelerate" qualifiers="const" > - <return type="real"> - </return> - <description> - </description> - </method> - <method name="get_hand_brake" qualifiers="const" > - <return type="real"> - </return> - <description> - </description> - </method> - <method name="set_mass" > - <argument index="0" name="mass" type="real"> - </argument> - <description> - </description> - </method> - <method name="get_mass" qualifiers="const" > - <return type="real"> - </return> - <description> - </description> - </method> - <method name="set_friction" > - <argument index="0" name="friction" type="real"> - </argument> - <description> - </description> - </method> - <method name="get_friction" qualifiers="const" > - <return type="real"> - </return> - <description> - </description> - </method> - </methods> - <constants> - </constants> -</class> -<class name="CarWheel" inherits="Spatial" category="Core"> +<class name="CenterContainer" inherits="Container" category="Core"> <brief_description> + Keeps children controls centered. </brief_description> <description> + CenterContainer Keeps children controls centered. This container keeps all children to their minimum size, in the center. </description> <methods> - <method name="set_side_friction" > - <argument index="0" name="friction" type="real"> - </argument> - <description> - </description> - </method> - <method name="set_forward_friction" > - <argument index="0" name="friction" type="real"> - </argument> - <description> - </description> - </method> - <method name="set_travel" > - <argument index="0" name="distance" type="real"> - </argument> - <description> - </description> - </method> - <method name="set_radius" > - <argument index="0" name="radius" type="real"> - </argument> - <description> - </description> - </method> - <method name="set_resting_frac" > - <argument index="0" name="frac" type="real"> - </argument> - <description> - </description> - </method> - <method name="set_damping_frac" > - <argument index="0" name="frac" type="real"> - </argument> - <description> - </description> - </method> - <method name="set_num_rays" > - <argument index="0" name="amount" type="real"> - </argument> - <description> - </description> - </method> - <method name="get_side_friction" qualifiers="const" > - <return type="real"> - </return> - <description> - </description> - </method> - <method name="get_forward_friction" qualifiers="const" > - <return type="real"> - </return> - <description> - </description> - </method> - <method name="get_travel" qualifiers="const" > - <return type="real"> - </return> - <description> - </description> - </method> - <method name="get_radius" qualifiers="const" > - <return type="real"> - </return> - <description> - </description> - </method> - <method name="get_resting_frac" qualifiers="const" > - <return type="real"> - </return> - <description> - </description> - </method> - <method name="get_damping_frac" qualifiers="const" > - <return type="real"> - </return> - <description> - </description> - </method> - <method name="get_num_rays" qualifiers="const" > - <return type="int"> - </return> - <description> - </description> - </method> - <method name="set_type_drive" > - <argument index="0" name="enable" type="bool"> - </argument> - <description> - </description> - </method> - <method name="is_type_drive" qualifiers="const" > - <return type="bool"> - </return> - <description> - </description> - </method> - <method name="set_type_steer" > + <method name="set_use_top_left" > <argument index="0" name="enable" type="bool"> </argument> <description> </description> </method> - <method name="is_type_steer" qualifiers="const" > + <method name="is_using_top_left" qualifiers="const" > <return type="bool"> </return> <description> @@ -5965,18 +6226,6 @@ <constants> </constants> </class> -<class name="CenterContainer" inherits="Container" category="Core"> - <brief_description> - Keeps children controls centered. - </brief_description> - <description> - CenterContainer Keeps children controls centered. This container keeps all children to their minimum size, in the center. - </description> - <methods> - </methods> - <constants> - </constants> -</class> <class name="CheckButton" inherits="Button" category="Core"> <brief_description> Checkable button. @@ -5988,6 +6237,36 @@ </methods> <constants> </constants> + <theme_items> + <theme_item name="check_vadjust" type="int"> + </theme_item> + <theme_item name="hseparation" type="int"> + </theme_item> + <theme_item name="font_color_disabled" type="Color"> + </theme_item> + <theme_item name="font_color" type="Color"> + </theme_item> + <theme_item name="font_color_hover" type="Color"> + </theme_item> + <theme_item name="font_color_pressed" type="Color"> + </theme_item> + <theme_item name="off" type="Texture"> + </theme_item> + <theme_item name="on" type="Texture"> + </theme_item> + <theme_item name="font" type="Font"> + </theme_item> + <theme_item name="hover" type="StyleBox"> + </theme_item> + <theme_item name="pressed" type="StyleBox"> + </theme_item> + <theme_item name="focus" type="StyleBox"> + </theme_item> + <theme_item name="disabled" type="StyleBox"> + </theme_item> + <theme_item name="normal" type="StyleBox"> + </theme_item> + </theme_items> </class> <class name="CircleShape2D" inherits="Shape2D" category="Core"> <brief_description> @@ -5998,14 +6277,14 @@ </description> <methods> <method name="set_radius" > - <argument index="0" name="radius" type="real"> + <argument index="0" name="radius" type="float"> </argument> <description> Set the radius of the circle shape; </description> </method> <method name="get_radius" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the radius of the circle shape. @@ -6021,6 +6300,20 @@ <description> </description> <methods> + <method name="_input_event" qualifiers="virtual" > + <argument index="0" name="camera" type="Object"> + </argument> + <argument index="1" name="event" type="InputEvent"> + </argument> + <argument index="2" name="click_pos" type="Vector3"> + </argument> + <argument index="3" name="click_normal" type="Vector3"> + </argument> + <argument index="4" name="shape_idx" type="int"> + </argument> + <description> + </description> + </method> <method name="add_shape" > <argument index="0" name="shape" type="Shape"> </argument> @@ -6093,6 +6386,30 @@ <description> </description> </method> + <method name="set_ray_pickable" > + <argument index="0" name="ray_pickable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_ray_pickable" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_capture_input_on_drag" > + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="get_capture_input_on_drag" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> <method name="get_rid" qualifiers="const" > <return type="RID"> </return> @@ -6100,6 +6417,30 @@ </description> </method> </methods> + <signals> + <signal name="mouse_enter"> + <description> + </description> + </signal> + <signal name="input_event"> + <argument index="0" name="camera" type="Object"> + </argument> + <argument index="1" name="event" type="InputEvent"> + </argument> + <argument index="2" name="click_pos" type="Vector3"> + </argument> + <argument index="3" name="click_normal" type="Vector3"> + </argument> + <argument index="4" name="shape_idx" type="int"> + </argument> + <description> + </description> + </signal> + <signal name="mouse_exit"> + <description> + </description> + </signal> + </signals> <constants> </constants> </class> @@ -6201,6 +6542,52 @@ <constants> </constants> </class> +<class name="CollisionPolygon" inherits="Spatial" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_polygon" > + <argument index="0" name="polygon" type="Vector2Array"> + </argument> + <description> + </description> + </method> + <method name="get_polygon" qualifiers="const" > + <return type="Vector2Array"> + </return> + <description> + </description> + </method> + <method name="set_depth" > + <argument index="0" name="depth" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_depth" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_build_mode" > + <argument index="0" name="arg0" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_build_mode" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> <class name="CollisionPolygon2D" inherits="Node2D" category="Core"> <brief_description> Editor-Only class. @@ -6259,7 +6646,7 @@ </description> </method> <method name="gray" > - <return type="real"> + <return type="float"> </return> <description> Convert the color to gray. @@ -6277,7 +6664,7 @@ </return> <argument index="0" name="b" type="Color"> </argument> - <argument index="1" name="t" type="real"> + <argument index="1" name="t" type="float"> </argument> <description> Return the linear interpolation with another color. @@ -6307,24 +6694,38 @@ </description> </method> <method name="Color" > - <argument index="0" name="r" type="real"> + <argument index="0" name="r" type="float"> </argument> - <argument index="1" name="g" type="real"> + <argument index="1" name="g" type="float"> </argument> - <argument index="2" name="b" type="real"> + <argument index="2" name="b" type="float"> </argument> - <argument index="3" name="a" type="real"> + <argument index="3" name="a" type="float"> </argument> <description> Construct the color from an RGBA profile. </description> </method> <method name="Color" > - <argument index="0" name="r" type="real"> + <argument index="0" name="r" type="float"> + </argument> + <argument index="1" name="g" type="float"> </argument> - <argument index="1" name="g" type="real"> + <argument index="2" name="b" type="float"> </argument> - <argument index="2" name="b" type="real"> + <description> + Construct the color from an RGBA profile. + </description> + </method> + <method name="Color" > + <argument index="0" name="from" type="int"> + </argument> + <description> + Construct the color from an RGBA profile. + </description> + </method> + <method name="Color" > + <argument index="0" name="from" type="String"> </argument> <description> Construct the color from an RGBA profile. @@ -6332,19 +6733,19 @@ </method> </methods> <members> - <member name="r" type="real"> + <member name="r" type="float"> </member> - <member name="g" type="real"> + <member name="g" type="float"> </member> - <member name="b" type="real"> + <member name="b" type="float"> </member> - <member name="a" type="real"> + <member name="a" type="float"> </member> - <member name="h" type="real"> + <member name="h" type="float"> </member> - <member name="s" type="real"> + <member name="s" type="float"> </member> - <member name="v" type="real"> + <member name="v" type="float"> </member> </members> <constants> @@ -6466,6 +6867,18 @@ </signals> <constants> </constants> + <theme_items> + <theme_item name="value_width" type="int"> + </theme_item> + <theme_item name="value_height" type="int"> + </theme_item> + <theme_item name="color_width" type="int"> + </theme_item> + <theme_item name="label_width" type="int"> + </theme_item> + <theme_item name="hseparator" type="int"> + </theme_item> + </theme_items> </class> <class name="ColorPickerButton" inherits="Button" category="Core"> <brief_description> @@ -6508,6 +6921,30 @@ </signals> <constants> </constants> + <theme_items> + <theme_item name="hseparation" type="int"> + </theme_item> + <theme_item name="font_color_disabled" type="Color"> + </theme_item> + <theme_item name="font_color" type="Color"> + </theme_item> + <theme_item name="font_color_hover" type="Color"> + </theme_item> + <theme_item name="font_color_pressed" type="Color"> + </theme_item> + <theme_item name="font" type="Font"> + </theme_item> + <theme_item name="hover" type="StyleBox"> + </theme_item> + <theme_item name="pressed" type="StyleBox"> + </theme_item> + <theme_item name="focus" type="StyleBox"> + </theme_item> + <theme_item name="disabled" type="StyleBox"> + </theme_item> + <theme_item name="normal" type="StyleBox"> + </theme_item> + </theme_items> </class> <class name="ConcavePolygonShape" inherits="Shape" category="Core"> <brief_description> @@ -6561,6 +6998,44 @@ <constants> </constants> </class> +<class name="ConeTwistJoint" inherits="Joint" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_param" > + <argument index="0" name="param" type="int"> + </argument> + <argument index="1" name="value" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_param" qualifiers="const" > + <return type="float"> + </return> + <argument index="0" name="param" type="int"> + </argument> + <description> + </description> + </method> + </methods> + <constants> + <constant name="PARAM_SWING_SPAN" value="0"> + </constant> + <constant name="PARAM_TWIST_SPAN" value="1"> + </constant> + <constant name="PARAM_BIAS" value="2"> + </constant> + <constant name="PARAM_SOFTNESS" value="3"> + </constant> + <constant name="PARAM_RELAXATION" value="4"> + </constant> + <constant name="PARAM_MAX" value="5"> + </constant> + </constants> +</class> <class name="ConfigFile" inherits="Reference" category="Core"> <brief_description> </brief_description> @@ -6800,7 +7275,7 @@ <method name="set_margin" > <argument index="0" name="margin" type="int"> </argument> - <argument index="1" name="offset" type="real"> + <argument index="1" name="offset" type="float"> </argument> <description> Set a margin offset. Margin can be one of (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). Offset value being set depends on the anchor mode. @@ -6811,7 +7286,7 @@ </argument> <argument index="1" name="anchor_mode" type="int"> </argument> - <argument index="2" name="offset" type="real"> + <argument index="2" name="offset" type="float"> </argument> <description> Change the anchor (ANCHOR_BEGIN, ANCHOR_END, ANCHOR_RATIO) type for a margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM), and also set its offset. This is a helper (see [method set_anchor] and [method set_margin]). @@ -6859,7 +7334,7 @@ </description> </method> <method name="get_margin" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="margin" type="int"> </argument> @@ -6987,14 +7462,14 @@ </description> </method> <method name="set_stretch_ratio" > - <argument index="0" name="ratio" type="real"> + <argument index="0" name="ratio" type="float"> </argument> <description> Hint for containers, set the stretch ratio. This value is relative to other stretch ratio, so if this control has 2 and another has 1, this one will be twice as big. </description> </method> <method name="get_stretch_ratio" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Hint for containers, return the stretch ratio. This value is relative to other stretch ratio, so if this control has 2 and another has 1, this one will be twice as big. @@ -7282,6 +7757,8 @@ <constant name="ANCHOR_RATIO" value="2"> X and Y are a ratio (0 to 1) relative to the parent size 0 is left/top, 1 is right/bottom. </constant> + <constant name="ANCHOR_CENTER" value="3"> + </constant> <constant name="FOCUS_NONE" value="0"> Control can't acquire focus. </constant> @@ -7476,13 +7953,13 @@ </description> </method> <method name="set_lossy_storage_quality" > - <argument index="0" name="quality" type="real"> + <argument index="0" name="quality" type="float"> </argument> <description> </description> </method> <method name="get_lossy_storage_quality" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -7536,6 +8013,8 @@ </argument> <argument index="2" name="out" type="Vector2" default="Vector2(0,0)"> </argument> + <argument index="3" name="atpos" type="int" default="-1"> + </argument> <description> </description> </method> @@ -7598,50 +8077,48 @@ </return> <argument index="0" name="idx" type="int"> </argument> - <argument index="1" name="t" type="real"> + <argument index="1" name="t" type="float"> </argument> <description> </description> </method> - <method name="bake" qualifiers="const" > - <return type="Vector2Array"> + <method name="interpolatef" qualifiers="const" > + <return type="Vector2"> </return> - <argument index="0" name="subdivs" type="int" default="10"> + <argument index="0" name="fofs" type="float"> </argument> <description> </description> </method> - <method name="set_points_in" > - <argument index="0" name="arg0" type="Vector2Array"> - </argument> - <description> - </description> - </method> - <method name="set_points_out" > - <argument index="0" name="arg0" type="Vector2Array"> + <method name="set_bake_interval" > + <argument index="0" name="distance" type="float"> </argument> <description> </description> </method> - <method name="set_points_pos" > - <argument index="0" name="arg0" type="Vector2Array"> - </argument> + <method name="get_bake_interval" qualifiers="const" > + <return type="float"> + </return> <description> </description> </method> - <method name="get_points_in" qualifiers="const" > - <return type="Vector2Array"> + <method name="get_baked_length" qualifiers="const" > + <return type="float"> </return> <description> </description> </method> - <method name="get_points_out" qualifiers="const" > - <return type="Vector2Array"> + <method name="interpolate_baked" qualifiers="const" > + <return type="Vector2"> </return> + <argument index="0" name="offset" type="float"> + </argument> + <argument index="1" name="cubic" type="bool" default="false"> + </argument> <description> </description> </method> - <method name="get_points_pos" qualifiers="const" > + <method name="get_baked_points" qualifiers="const" > <return type="Vector2Array"> </return> <description> @@ -7694,13 +8171,13 @@ <method name="set_point_tilt" > <argument index="0" name="idx" type="int"> </argument> - <argument index="1" name="tilt" type="real"> + <argument index="1" name="tilt" type="float"> </argument> <description> </description> </method> <method name="get_point_tilt" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -7750,7 +8227,7 @@ </return> <argument index="0" name="idx" type="int"> </argument> - <argument index="1" name="t" type="real"> + <argument index="1" name="t" type="float"> </argument> <description> </description> @@ -7758,25 +8235,25 @@ <method name="interpolatef" qualifiers="const" > <return type="Vector3"> </return> - <argument index="0" name="fofs" type="real"> + <argument index="0" name="fofs" type="float"> </argument> <description> </description> </method> <method name="set_bake_interval" > - <argument index="0" name="distance" type="real"> + <argument index="0" name="distance" type="float"> </argument> <description> </description> </method> <method name="get_bake_interval" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="get_baked_length" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -7784,7 +8261,7 @@ <method name="interpolate_baked" qualifiers="const" > <return type="Vector3"> </return> - <argument index="0" name="offset" type="real"> + <argument index="0" name="offset" type="float"> </argument> <argument index="1" name="cubic" type="bool" default="false"> </argument> @@ -7816,56 +8293,56 @@ </description> <methods> <method name="set_length" > - <argument index="0" name="length" type="real"> + <argument index="0" name="length" type="float"> </argument> <description> Set the maximum length of the sprint joint. </description> </method> <method name="get_length" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the maximum length of the sprint joint. </description> </method> <method name="set_rest_length" > - <argument index="0" name="rest_length" type="real"> + <argument index="0" name="rest_length" type="float"> </argument> <description> Set the resting length of the sprint joint. The joint will always try to go to back this length when pulled apart. </description> </method> <method name="get_rest_length" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the resting length of the sprint joint. The joint will always try to go to back this length when pulled apart. </description> </method> <method name="set_stiffness" > - <argument index="0" name="stiffness" type="real"> + <argument index="0" name="stiffness" type="float"> </argument> <description> Set the stiffness of the spring joint. </description> </method> <method name="get_stiffness" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the stiffness of the spring joint. </description> </method> <method name="set_damping" > - <argument index="0" name="damping" type="real"> + <argument index="0" name="damping" type="float"> </argument> <description> Set the damping of the spring joint. </description> </method> <method name="get_damping" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the damping of the spring joint. @@ -7973,13 +8450,13 @@ <method name="set_shadow_param" > <argument index="0" name="param" type="int"> </argument> - <argument index="1" name="value" type="real"> + <argument index="1" name="value" type="float"> </argument> <description> </description> </method> <method name="get_shadow_param" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="param" type="int"> </argument> @@ -7992,7 +8469,9 @@ </constant> <constant name="SHADOW_PERSPECTIVE" value="1"> </constant> - <constant name="SHADOW_PARALLEL_SPLIT" value="2"> + <constant name="SHADOW_PARALLEL_2_SPLITS" value="2"> + </constant> + <constant name="SHADOW_PARALLEL_4_SPLITS" value="3"> </constant> <constant name="SHADOW_PARAM_MAX_DISTANCE" value="0"> </constant> @@ -8090,6 +8569,14 @@ <description> </description> </method> + <method name="dir_exists" > + <return type="bool"> + </return> + <argument index="0" name="name" type="String"> + </argument> + <description> + </description> + </method> <method name="get_space_left" > <return type="int"> </return> @@ -8128,38 +8615,6 @@ <constants> </constants> </class> -<class name="EditableShape" inherits="Spatial" category="Core"> - <brief_description> - </brief_description> - <description> - </description> - <methods> - </methods> - <constants> - </constants> -</class> -<class name="EditableSphere" inherits="EditableShape" category="Core"> - <brief_description> - </brief_description> - <description> - </description> - <methods> - <method name="set_radius" > - <argument index="0" name="radius" type="real"> - </argument> - <description> - </description> - </method> - <method name="get_radius" qualifiers="const" > - <return type="real"> - </return> - <description> - </description> - </method> - </methods> - <constants> - </constants> -</class> <class name="EditorImportPlugin" inherits="Reference" category="Core"> <brief_description> </brief_description> @@ -8488,67 +8943,97 @@ </constant> <constant name="BG_PARAM_ENERGY" value="3"> </constant> - <constant name="BG_PARAM_MAX" value="5"> + <constant name="BG_PARAM_GLOW" value="5"> </constant> - <constant name="FX_GLOW" value="0"> + <constant name="BG_PARAM_MAX" value="6"> </constant> - <constant name="FX_DOF_BLUR" value="1"> + <constant name="FX_AMBIENT_LIGHT" value="0"> </constant> - <constant name="FX_HDR" value="2"> + <constant name="FX_FXAA" value="1"> </constant> - <constant name="FX_FOG" value="3"> + <constant name="FX_GLOW" value="2"> </constant> - <constant name="FX_BCS" value="4"> + <constant name="FX_DOF_BLUR" value="3"> </constant> - <constant name="FX_GAMMA" value="5"> + <constant name="FX_HDR" value="4"> </constant> - <constant name="FX_MAX" value="6"> + <constant name="FX_FOG" value="5"> </constant> - <constant name="FX_PARAM_GLOW_BLUR_PASSES" value="0"> + <constant name="FX_BCS" value="6"> </constant> - <constant name="FX_PARAM_GLOW_BLOOM" value="1"> + <constant name="FX_SRGB" value="7"> </constant> - <constant name="FX_PARAM_GLOW_BLOOM_TRESHOLD" value="2"> + <constant name="FX_MAX" value="8"> </constant> - <constant name="FX_PARAM_DOF_BLUR_PASSES" value="3"> + <constant name="FX_BLUR_BLEND_MODE_ADDITIVE" value="0"> </constant> - <constant name="FX_PARAM_DOF_BLUR_BEGIN" value="4"> + <constant name="FX_BLUR_BLEND_MODE_SCREEN" value="1"> </constant> - <constant name="FX_PARAM_DOF_BLUR_RANGE" value="5"> + <constant name="FX_BLUR_BLEND_MODE_SOFTLIGHT" value="2"> </constant> - <constant name="FX_PARAM_HDR_EXPOSURE" value="6"> + <constant name="FX_HDR_TONE_MAPPER_LINEAR" value="0"> </constant> - <constant name="FX_PARAM_HDR_SCALAR" value="7"> + <constant name="FX_HDR_TONE_MAPPER_LOG" value="1"> </constant> - <constant name="FX_PARAM_HDR_GLOW_TRESHOLD" value="8"> + <constant name="FX_HDR_TONE_MAPPER_REINHARDT" value="2"> </constant> - <constant name="FX_PARAM_HDR_GLOW_SCALE" value="9"> + <constant name="FX_HDR_TONE_MAPPER_REINHARDT_AUTOWHITE" value="3"> </constant> - <constant name="FX_PARAM_HDR_MIN_LUMINANCE" value="10"> + <constant name="FX_PARAM_AMBIENT_LIGHT_COLOR" value="0"> </constant> - <constant name="FX_PARAM_HDR_MAX_LUMINANCE" value="11"> + <constant name="FX_PARAM_AMBIENT_LIGHT_ENERGY" value="1"> </constant> - <constant name="FX_PARAM_HDR_EXPOSURE_ADJUST_SPEED" value="12"> + <constant name="FX_PARAM_GLOW_BLUR_PASSES" value="2"> </constant> - <constant name="FX_PARAM_FOG_BEGIN" value="13"> + <constant name="FX_PARAM_GLOW_BLUR_SCALE" value="3"> </constant> - <constant name="FX_PARAM_FOG_ATTENUATION" value="16"> + <constant name="FX_PARAM_GLOW_BLUR_STRENGTH" value="4"> </constant> - <constant name="FX_PARAM_FOG_BEGIN_COLOR" value="14"> + <constant name="FX_PARAM_GLOW_BLUR_BLEND_MODE" value="5"> </constant> - <constant name="FX_PARAM_FOG_END_COLOR" value="15"> + <constant name="FX_PARAM_GLOW_BLOOM" value="6"> </constant> - <constant name="FX_PARAM_FOG_BG" value="17"> + <constant name="FX_PARAM_GLOW_BLOOM_TRESHOLD" value="7"> </constant> - <constant name="FX_PARAM_BCS_BRIGHTNESS" value="18"> + <constant name="FX_PARAM_DOF_BLUR_PASSES" value="8"> </constant> - <constant name="FX_PARAM_BCS_CONTRAST" value="19"> + <constant name="FX_PARAM_DOF_BLUR_BEGIN" value="9"> </constant> - <constant name="FX_PARAM_BCS_SATURATION" value="20"> + <constant name="FX_PARAM_DOF_BLUR_RANGE" value="10"> </constant> - <constant name="FX_PARAM_GAMMA" value="21"> + <constant name="FX_PARAM_HDR_TONEMAPPER" value="11"> </constant> - <constant name="FX_PARAM_MAX" value="22"> + <constant name="FX_PARAM_HDR_EXPOSURE" value="12"> + </constant> + <constant name="FX_PARAM_HDR_WHITE" value="13"> + </constant> + <constant name="FX_PARAM_HDR_GLOW_TRESHOLD" value="14"> + </constant> + <constant name="FX_PARAM_HDR_GLOW_SCALE" value="15"> + </constant> + <constant name="FX_PARAM_HDR_MIN_LUMINANCE" value="16"> + </constant> + <constant name="FX_PARAM_HDR_MAX_LUMINANCE" value="17"> + </constant> + <constant name="FX_PARAM_HDR_EXPOSURE_ADJUST_SPEED" value="18"> + </constant> + <constant name="FX_PARAM_FOG_BEGIN" value="19"> + </constant> + <constant name="FX_PARAM_FOG_ATTENUATION" value="22"> + </constant> + <constant name="FX_PARAM_FOG_BEGIN_COLOR" value="20"> + </constant> + <constant name="FX_PARAM_FOG_END_COLOR" value="21"> + </constant> + <constant name="FX_PARAM_FOG_BG" value="23"> + </constant> + <constant name="FX_PARAM_BCS_BRIGHTNESS" value="24"> + </constant> + <constant name="FX_PARAM_BCS_CONTRAST" value="25"> + </constant> + <constant name="FX_PARAM_BCS_SATURATION" value="26"> + </constant> + <constant name="FX_PARAM_MAX" value="27"> </constant> </constants> </class> @@ -8559,13 +9044,13 @@ </description> <methods> <method name="set_stream" > - <argument index="0" name="stream" type="Stream"> + <argument index="0" name="stream" type="EventStream"> </argument> <description> </description> </method> <method name="get_stream" qualifiers="const" > - <return type="Stream"> + <return type="EventStream"> </return> <description> </description> @@ -8609,49 +9094,49 @@ </description> </method> <method name="set_volume" > - <argument index="0" name="volume" type="real"> + <argument index="0" name="volume" type="float"> </argument> <description> </description> </method> <method name="get_volume" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="set_pitch_scale" > - <argument index="0" name="pitch_scale" type="real"> + <argument index="0" name="pitch_scale" type="float"> </argument> <description> </description> </method> <method name="get_pitch_scale" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="set_tempo_scale" > - <argument index="0" name="tempo_scale" type="real"> + <argument index="0" name="tempo_scale" type="float"> </argument> <description> </description> </method> <method name="get_tempo_scale" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="set_volume_db" > - <argument index="0" name="db" type="real"> + <argument index="0" name="db" type="float"> </argument> <description> </description> </method> <method name="get_volume_db" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -8669,13 +9154,13 @@ </description> </method> <method name="get_pos" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="seek_pos" > - <argument index="0" name="time" type="real"> + <argument index="0" name="time" type="float"> </argument> <description> </description> @@ -8695,13 +9180,13 @@ <method name="set_channel_volume" > <argument index="0" name="idx" type="int"> </argument> - <argument index="1" name="channel_volume" type="real"> + <argument index="1" name="channel_volume" type="float"> </argument> <description> </description> </method> <method name="get_channel_volumeidx" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="arg0" type="int"> </argument> @@ -8709,13 +9194,13 @@ </description> </method> <method name="get_length" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="get_channel_last_note_time" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="arg0" type="int"> </argument> @@ -8752,6 +9237,30 @@ <description> </description> <methods> + <method name="open_encrypted" > + <return type="int"> + </return> + <argument index="0" name="path" type="String"> + </argument> + <argument index="1" name="mode_flags" type="int"> + </argument> + <argument index="2" name="key" type="RawArray"> + </argument> + <description> + </description> + </method> + <method name="open_encrypted_with_pass" > + <return type="int"> + </return> + <argument index="0" name="path" type="String"> + </argument> + <argument index="1" name="mode_flags" type="int"> + </argument> + <argument index="2" name="pass" type="String"> + </argument> + <description> + </description> + </method> <method name="open" > <return type="int"> </return> @@ -8827,19 +9336,19 @@ </description> </method> <method name="get_float" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="get_double" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="get_real" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -8917,19 +9426,19 @@ </description> </method> <method name="store_float" > - <argument index="0" name="value" type="real"> + <argument index="0" name="value" type="float"> </argument> <description> </description> </method> <method name="store_double" > - <argument index="0" name="value" type="real"> + <argument index="0" name="value" type="float"> </argument> <description> </description> </method> <method name="store_real" > - <argument index="0" name="value" type="real"> + <argument index="0" name="value" type="float"> </argument> <description> </description> @@ -9123,6 +9632,12 @@ <constant name="ACCESS_FILESYSTEM" value="2"> </constant> </constants> + <theme_items> + <theme_item name="files_disabled" type="Color"> + </theme_item> + <theme_item name="folder" type="Texture"> + </theme_item> + </theme_items> </class> <class name="FixedMaterial" inherits="Material" category="Core"> <brief_description> @@ -9214,26 +9729,26 @@ Returns the special transform used to post-transform UV coordinates of the uv_xfrom tecoord mode: TEXCOORD_UV_TRANSFORM </description> </method> - <method name="set_point_size" > - <argument index="0" name="size" type="real"> + <method name="set_light_shader" > + <argument index="0" name="shader" type="int"> </argument> <description> </description> </method> - <method name="get_point_size" qualifiers="const" > - <return type="real"> + <method name="get_light_shader" qualifiers="const" > + <return type="int"> </return> <description> </description> </method> - <method name="set_detail_blend_mode" > - <argument index="0" name="mode" type="int"> + <method name="set_point_size" > + <argument index="0" name="size" type="float"> </argument> <description> </description> </method> - <method name="get_detail_blend_mode" qualifiers="const" > - <return type="int"> + <method name="get_point_size" qualifiers="const" > + <return type="float"> </return> <description> </description> @@ -9283,234 +9798,8 @@ </constant> <constant name="FLAG_USE_POINT_SIZE" value="2"> </constant> - </constants> -</class> -<class name="FollowCamera" inherits="Camera" category="Core"> - <brief_description> - </brief_description> - <description> - </description> - <methods> - <method name="set_orbit" > - <argument index="0" name="orbit" type="Vector2"> - </argument> - <description> - </description> - </method> - <method name="get_orbit" qualifiers="const" > - <return type="Vector2"> - </return> - <description> - </description> - </method> - <method name="set_orbit_x" > - <argument index="0" name="x" type="real"> - </argument> - <description> - </description> - </method> - <method name="set_orbit_y" > - <argument index="0" name="y" type="real"> - </argument> - <description> - </description> - </method> - <method name="set_min_orbit_x" > - <argument index="0" name="x" type="real"> - </argument> - <description> - </description> - </method> - <method name="get_min_orbit_x" qualifiers="const" > - <return type="real"> - </return> - <description> - </description> - </method> - <method name="set_max_orbit_x" > - <argument index="0" name="x" type="real"> - </argument> - <description> - </description> - </method> - <method name="get_max_orbit_x" qualifiers="const" > - <return type="real"> - </return> - <description> - </description> - </method> - <method name="set_height" > - <argument index="0" name="height" type="real"> - </argument> - <description> - </description> - </method> - <method name="get_height" qualifiers="const" > - <return type="real"> - </return> - <description> - </description> - </method> - <method name="set_inclination" > - <argument index="0" name="inclination" type="real"> - </argument> - <description> - </description> - </method> - <method name="get_inclination" qualifiers="const" > - <return type="real"> - </return> - <description> - </description> - </method> - <method name="rotate_orbit" > - <argument index="0" name="arg0" type="Vector2"> - </argument> - <description> - </description> - </method> - <method name="set_distance" > - <argument index="0" name="distance" type="real"> - </argument> - <description> - </description> - </method> - <method name="get_distance" qualifiers="const" > - <return type="real"> - </return> - <description> - </description> - </method> - <method name="set_max_distance" > - <argument index="0" name="max_distance" type="real"> - </argument> - <description> - </description> - </method> - <method name="get_max_distance" qualifiers="const" > - <return type="real"> - </return> - <description> - </description> - </method> - <method name="set_min_distance" > - <argument index="0" name="min_distance" type="real"> - </argument> - <description> - </description> - </method> - <method name="get_min_distance" qualifiers="const" > - <return type="real"> - </return> - <description> - </description> - </method> - <method name="set_clip" > - <argument index="0" name="enable" type="bool"> - </argument> - <description> - </description> - </method> - <method name="has_clip" qualifiers="const" > - <return type="bool"> - </return> - <description> - </description> - </method> - <method name="set_autoturn" > - <argument index="0" name="enable" type="bool"> - </argument> - <description> - </description> - </method> - <method name="has_autoturn" qualifiers="const" > - <return type="bool"> - </return> - <description> - </description> - </method> - <method name="set_autoturn_tolerance" > - <argument index="0" name="degrees" type="real"> - </argument> - <description> - </description> - </method> - <method name="get_autoturn_tolerance" qualifiers="const" > - <return type="real"> - </return> - <description> - </description> - </method> - <method name="set_autoturn_speed" > - <argument index="0" name="speed" type="real"> - </argument> - <description> - </description> - </method> - <method name="get_autoturn_speed" qualifiers="const" > - <return type="real"> - </return> - <description> - </description> - </method> - <method name="set_smoothing" > - <argument index="0" name="enable" type="bool"> - </argument> - <description> - </description> - </method> - <method name="has_smoothing" qualifiers="const" > - <return type="bool"> - </return> - <description> - </description> - </method> - <method name="set_rotation_smoothing" > - <argument index="0" name="amount" type="real"> - </argument> - <description> - </description> - </method> - <method name="get_rotation_smoothing" qualifiers="const" > - <return type="real"> - </return> - <description> - </description> - </method> - <method name="set_translation_smoothing" > - <argument index="0" name="amount" type="real"> - </argument> - <description> - </description> - </method> - <method name="get_translation_smoothing" qualifiers="const" > - <return type="real"> - </return> - <description> - </description> - </method> - <method name="set_use_lookat_target" > - <argument index="0" name="use" type="bool"> - </argument> - <argument index="1" name="lookat" type="Vector3" default="Vector3(0, 0, 0)"> - </argument> - <description> - </description> - </method> - <method name="set_up_vector" > - <argument index="0" name="vector" type="Vector3"> - </argument> - <description> - </description> - </method> - <method name="get_up_vector" qualifiers="const" > - <return type="Vector3"> - </return> - <description> - </description> - </method> - </methods> - <constants> + <constant name="FLAG_DISCARD_ALPHA" value="3"> + </constant> </constants> </class> <class name="Font" inherits="Resource" category="Core"> @@ -9522,35 +9811,35 @@ </description> <methods> <method name="set_height" > - <argument index="0" name="px" type="real"> + <argument index="0" name="px" type="float"> </argument> <description> Set the total font height (ascent plus descent) in pixels. </description> </method> <method name="get_height" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the total font height (ascent plus descent) in pixels. </description> </method> <method name="set_ascent" > - <argument index="0" name="px" type="real"> + <argument index="0" name="px" type="float"> </argument> <description> Set the font ascent (number of pixels above the baseline). </description> </method> <method name="get_ascent" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the font ascent (number of pixels above the baseline). </description> </method> <method name="get_descent" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the font descent (number of pixels below the baseline). @@ -9594,7 +9883,7 @@ </argument> <argument index="3" name="align" type="Vector2" default="Vector2(0,0)"> </argument> - <argument index="4" name="advance" type="real" default="-1"> + <argument index="4" name="advance" type="float" default="-1"> </argument> <description> Add a character to the font, where "character" is the unicode value, "texture" is the texture index, "rect" is the region in the texture (in pixels!), "align" is the (optional) alignment for the character and "advance" is the (optional) advance. @@ -9641,7 +9930,7 @@ </description> </method> <method name="draw_char" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="canvas_item" type="RID"> </argument> @@ -9709,6 +9998,28 @@ <constants> </constants> </class> +<class name="GDFunctionState" inherits="Reference" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="resume" > + <argument index="0" name="arg" type="var" default="NULL"> + </argument> + <description> + </description> + </method> + <method name="is_valid" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> <class name="GDNativeClass" inherits="Reference" category="Core"> <brief_description> </brief_description> @@ -9737,6 +10048,150 @@ <constants> </constants> </class> +<class name="Generic6DOFJoint" inherits="Joint" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_param_x" > + <argument index="0" name="param" type="int"> + </argument> + <argument index="1" name="value" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_param_x" qualifiers="const" > + <return type="float"> + </return> + <argument index="0" name="param" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_param_y" > + <argument index="0" name="param" type="int"> + </argument> + <argument index="1" name="value" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_param_y" qualifiers="const" > + <return type="float"> + </return> + <argument index="0" name="param" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_param_z" > + <argument index="0" name="param" type="int"> + </argument> + <argument index="1" name="value" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_param_z" qualifiers="const" > + <return type="float"> + </return> + <argument index="0" name="param" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_flag_x" > + <argument index="0" name="flag" type="int"> + </argument> + <argument index="1" name="value" type="bool"> + </argument> + <description> + </description> + </method> + <method name="get_flag_x" qualifiers="const" > + <return type="bool"> + </return> + <argument index="0" name="flag" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_flag_y" > + <argument index="0" name="flag" type="int"> + </argument> + <argument index="1" name="value" type="bool"> + </argument> + <description> + </description> + </method> + <method name="get_flag_y" qualifiers="const" > + <return type="bool"> + </return> + <argument index="0" name="flag" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_flag_z" > + <argument index="0" name="flag" type="int"> + </argument> + <argument index="1" name="value" type="bool"> + </argument> + <description> + </description> + </method> + <method name="get_flag_z" qualifiers="const" > + <return type="bool"> + </return> + <argument index="0" name="flag" type="int"> + </argument> + <description> + </description> + </method> + </methods> + <constants> + <constant name="PARAM_LINEAR_LOWER_LIMIT" value="0"> + </constant> + <constant name="PARAM_LINEAR_UPPER_LIMIT" value="1"> + </constant> + <constant name="PARAM_LINEAR_LIMIT_SOFTNESS" value="2"> + </constant> + <constant name="PARAM_LINEAR_RESTITUTION" value="3"> + </constant> + <constant name="PARAM_LINEAR_DAMPING" value="4"> + </constant> + <constant name="PARAM_ANGULAR_LOWER_LIMIT" value="5"> + </constant> + <constant name="PARAM_ANGULAR_UPPER_LIMIT" value="6"> + </constant> + <constant name="PARAM_ANGULAR_LIMIT_SOFTNESS" value="7"> + </constant> + <constant name="PARAM_ANGULAR_DAMPING" value="8"> + </constant> + <constant name="PARAM_ANGULAR_RESTITUTION" value="9"> + </constant> + <constant name="PARAM_ANGULAR_FORCE_LIMIT" value="10"> + </constant> + <constant name="PARAM_ANGULAR_ERP" value="11"> + </constant> + <constant name="PARAM_ANGULAR_MOTOR_TARGET_VELOCITY" value="12"> + </constant> + <constant name="PARAM_ANGULAR_MOTOR_FORCE_LIMIT" value="13"> + </constant> + <constant name="PARAM_MAX" value="14"> + </constant> + <constant name="FLAG_ENABLE_LINEAR_LIMIT" value="0"> + </constant> + <constant name="FLAG_ENABLE_ANGULAR_LIMIT" value="1"> + </constant> + <constant name="FLAG_ENABLE_MOTOR" value="2"> + </constant> + <constant name="FLAG_MAX" value="3"> + </constant> + </constants> +</class> <class name="Geometry" inherits="Object" category="Core"> <brief_description> </brief_description> @@ -9754,9 +10209,9 @@ <method name="build_cylinder_planes" > <return type="Array"> </return> - <argument index="0" name="radius" type="real"> + <argument index="0" name="radius" type="float"> </argument> - <argument index="1" name="height" type="real"> + <argument index="1" name="height" type="float"> </argument> <argument index="2" name="sides" type="int"> </argument> @@ -9768,9 +10223,9 @@ <method name="build_capsule_planes" > <return type="Array"> </return> - <argument index="0" name="radius" type="real"> + <argument index="0" name="radius" type="float"> </argument> - <argument index="1" name="height" type="real"> + <argument index="1" name="height" type="float"> </argument> <argument index="2" name="sides" type="int"> </argument> @@ -9782,7 +10237,7 @@ </description> </method> <method name="segment_intersects_circle" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="segment_from" type="Vector2"> </argument> @@ -9790,7 +10245,7 @@ </argument> <argument index="2" name="circle_pos" type="Vector2"> </argument> - <argument index="3" name="circle_radius" type="real"> + <argument index="3" name="circle_radius" type="float"> </argument> <description> </description> @@ -9847,6 +10302,14 @@ <description> </description> </method> + <method name="get_uv84_normal_bit" > + <return type="int"> + </return> + <argument index="0" name="normal" type="Vector3"> + </argument> + <description> + </description> + </method> <method name="ray_intersects_triangle" > <argument index="0" name="from" type="Vector3"> </argument> @@ -9884,7 +10347,7 @@ </argument> <argument index="2" name="spos" type="Vector3"> </argument> - <argument index="3" name="sradius" type="real"> + <argument index="3" name="sradius" type="float"> </argument> <description> </description> @@ -9896,9 +10359,9 @@ </argument> <argument index="1" name="to" type="Vector3"> </argument> - <argument index="2" name="height" type="real"> + <argument index="2" name="height" type="float"> </argument> - <argument index="3" name="radius" type="real"> + <argument index="3" name="radius" type="float"> </argument> <description> </description> @@ -9923,6 +10386,14 @@ <description> </description> </method> + <method name="make_atlas" > + <return type="Dictionary"> + </return> + <argument index="0" name="sizes" type="Vector2Array"> + </argument> + <description> + </description> + </method> </methods> <constants> </constants> @@ -9966,36 +10437,42 @@ </description> </method> <method name="set_draw_range_begin" > - <argument index="0" name="mode" type="real"> + <argument index="0" name="mode" type="float"> </argument> <description> </description> </method> <method name="get_draw_range_begin" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="set_draw_range_end" > - <argument index="0" name="mode" type="real"> + <argument index="0" name="mode" type="float"> </argument> <description> </description> </method> <method name="get_draw_range_end" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> - </methods> - <signals> - <signal name="visibility_changed"> + <method name="set_baked_light_texture_id" > + <argument index="0" name="id" type="int"> + </argument> <description> </description> - </signal> - </signals> + </method> + <method name="get_baked_light_texture_id" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> + </methods> <constants> <constant name="FLAG_VISIBLE" value="0"> </constant> @@ -10011,7 +10488,7 @@ </constant> <constant name="FLAG_VISIBLE_IN_ALL_ROOMS" value="6"> </constant> - <constant name="FLAG_MAX" value="7"> + <constant name="FLAG_MAX" value="8"> </constant> </constants> </class> @@ -10115,6 +10592,14 @@ <description> </description> </method> + <method name="load_resource_pack" > + <return type="bool"> + </return> + <argument index="0" name="arg0" type="String"> + </argument> + <description> + </description> + </method> </methods> <constants> </constants> @@ -10140,6 +10625,10 @@ </methods> <constants> </constants> + <theme_items> + <theme_item name="separation" type="int"> + </theme_item> + </theme_items> </class> <class name="GridMap" inherits="Spatial" category="Core"> <brief_description> @@ -10172,13 +10661,13 @@ </description> </method> <method name="set_cell_size" > - <argument index="0" name="size" type="real"> + <argument index="0" name="size" type="float"> </argument> <description> </description> </method> <method name="get_cell_size" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -10287,7 +10776,7 @@ <description> </description> </method> - <method name="crate_area" > + <method name="create_area" > <return type="int"> </return> <argument index="0" name="id" type="int"> @@ -10340,13 +10829,13 @@ <method name="area_set_portal_disable_distance" > <argument index="0" name="area" type="int"> </argument> - <argument index="1" name="distance" type="real"> + <argument index="1" name="distance" type="float"> </argument> <description> </description> </method> <method name="area_get_portal_disable_distance" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="area" type="int"> </argument> @@ -10385,6 +10874,18 @@ <description> </description> </method> + <method name="set_use_baked_light" > + <argument index="0" name="use" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_using_baked_light" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> <method name="clear" > <description> </description> @@ -10404,28 +10905,28 @@ </description> <methods> <method name="set_length" > - <argument index="0" name="length" type="real"> + <argument index="0" name="length" type="float"> </argument> <description> Set the length of the groove. </description> </method> <method name="get_length" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the length of the groove. </description> </method> <method name="set_initial_offset" > - <argument index="0" name="offset" type="real"> + <argument index="0" name="offset" type="float"> </argument> <description> Set the initial offset of the groove on body A. </description> </method> <method name="get_initial_offset" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Set the final offset of the groove on body A. @@ -10446,6 +10947,10 @@ </methods> <constants> </constants> + <theme_items> + <theme_item name="separation" type="int"> + </theme_item> + </theme_items> </class> <class name="HButtonArray" inherits="ButtonArray" category="Core"> <brief_description> @@ -10458,6 +10963,28 @@ </methods> <constants> </constants> + <theme_items> + <theme_item name="button_separator" type="int"> + </theme_item> + <theme_item name="icon_separator" type="int"> + </theme_item> + <theme_item name="font_color_selected" type="Color"> + </theme_item> + <theme_item name="font_color" type="Color"> + </theme_item> + <theme_item name="font_selected" type="Font"> + </theme_item> + <theme_item name="font" type="Font"> + </theme_item> + <theme_item name="hover" type="StyleBox"> + </theme_item> + <theme_item name="focus" type="StyleBox"> + </theme_item> + <theme_item name="selected" type="StyleBox"> + </theme_item> + <theme_item name="normal" type="StyleBox"> + </theme_item> + </theme_items> </class> <class name="HScrollBar" inherits="ScrollBar" category="Core"> <brief_description> @@ -10470,6 +10997,24 @@ </methods> <constants> </constants> + <theme_items> + <theme_item name="increment_hilite" type="Texture"> + </theme_item> + <theme_item name="decrement_hilite" type="Texture"> + </theme_item> + <theme_item name="increment" type="Texture"> + </theme_item> + <theme_item name="decrement" type="Texture"> + </theme_item> + <theme_item name="grabber_hilite" type="StyleBox"> + </theme_item> + <theme_item name="grabber" type="StyleBox"> + </theme_item> + <theme_item name="scroll_focus" type="StyleBox"> + </theme_item> + <theme_item name="scroll" type="StyleBox"> + </theme_item> + </theme_items> </class> <class name="HSeparator" inherits="Separator" category="Core"> <brief_description> @@ -10482,6 +11027,12 @@ </methods> <constants> </constants> + <theme_items> + <theme_item name="separation" type="int"> + </theme_item> + <theme_item name="separator" type="StyleBox"> + </theme_item> + </theme_items> </class> <class name="HSlider" inherits="Slider" category="Core"> <brief_description> @@ -10494,6 +11045,20 @@ </methods> <constants> </constants> + <theme_items> + <theme_item name="tick" type="Texture"> + </theme_item> + <theme_item name="grabber_hilite" type="Texture"> + </theme_item> + <theme_item name="grabber" type="Texture"> + </theme_item> + <theme_item name="grabber_hilite" type="StyleBox"> + </theme_item> + <theme_item name="slider" type="StyleBox"> + </theme_item> + <theme_item name="focus" type="StyleBox"> + </theme_item> + </theme_items> </class> <class name="HSplitContainer" inherits="SplitContainer" category="Core"> <brief_description> @@ -10506,6 +11071,16 @@ </methods> <constants> </constants> + <theme_items> + <theme_item name="autohide" type="int"> + </theme_item> + <theme_item name="separation" type="int"> + </theme_item> + <theme_item name="grabber" type="Texture"> + </theme_item> + <theme_item name="bg" type="StyleBox"> + </theme_item> + </theme_items> </class> <class name="HTTPClient" inherits="Reference" category="Core"> <brief_description> @@ -10520,6 +11095,10 @@ </argument> <argument index="1" name="port" type="int"> </argument> + <argument index="2" name="use_ssl" type="bool" default="false"> + </argument> + <argument index="3" name="arg3" type="bool" default="true"> + </argument> <description> </description> </method> @@ -10605,6 +11184,18 @@ <description> </description> </method> + <method name="set_blocking_mode" > + <argument index="0" name="enabled" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_blocking_mode_enabled" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> <method name="get_status" qualifiers="const" > <return type="int"> </return> @@ -10655,6 +11246,8 @@ </constant> <constant name="STATUS_CONNECTION_ERROR" value="8"> </constant> + <constant name="STATUS_SSL_HANDSHAKE_ERROR" value="9"> + </constant> <constant name="RESPONSE_CONTINUE" value="100"> </constant> <constant name="RESPONSE_SWITCHING_PROTOCOLS" value="101"> @@ -10755,6 +11348,72 @@ </constant> </constants> </class> +<class name="HingeJoint" inherits="Joint" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_param" > + <argument index="0" name="param" type="int"> + </argument> + <argument index="1" name="value" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_param" qualifiers="const" > + <return type="float"> + </return> + <argument index="0" name="param" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_flag" > + <argument index="0" name="flag" type="int"> + </argument> + <argument index="1" name="enabled" type="bool"> + </argument> + <description> + </description> + </method> + <method name="get_flag" qualifiers="const" > + <return type="bool"> + </return> + <argument index="0" name="flag" type="int"> + </argument> + <description> + </description> + </method> + </methods> + <constants> + <constant name="PARAM_BIAS" value="0"> + </constant> + <constant name="PARAM_LIMIT_UPPER" value="1"> + </constant> + <constant name="PARAM_LIMIT_LOWER" value="2"> + </constant> + <constant name="PARAM_LIMIT_BIAS" value="3"> + </constant> + <constant name="PARAM_LIMIT_SOFTNESS" value="4"> + </constant> + <constant name="PARAM_LIMIT_RELAXATION" value="5"> + </constant> + <constant name="PARAM_MOTOR_TARGET_VELOCITY" value="6"> + </constant> + <constant name="PARAM_MOTOR_MAX_IMPULSE" value="7"> + </constant> + <constant name="PARAM_MAX" value="8"> + </constant> + <constant name="FLAG_USE_LIMIT" value="0"> + </constant> + <constant name="FLAG_ENABLE_MOTOR" value="1"> + </constant> + <constant name="FLAG_MAX" value="2"> + </constant> + </constants> +</class> <class name="IP" inherits="Object" category="Core"> <brief_description> IP Protocol support functions. @@ -10806,6 +11465,12 @@ Erase a queue ID, removing it from the queue if needed. This should be used after a queue is completed to free it and enable more queries to happen. </description> </method> + <method name="get_local_addresses" qualifiers="const" > + <return type="Array"> + </return> + <description> + </description> + </method> </methods> <constants> <constant name="RESOLVER_STATUS_NONE" value="0"> @@ -10880,6 +11545,20 @@ <description> </description> </method> + <method name="converted" > + <return type="Image"> + </return> + <argument index="0" name="format" type="int" default="0"> + </argument> + <description> + </description> + </method> + <method name="decompressed" > + <return type="Image"> + </return> + <description> + </description> + </method> <method name="empty" > <return type="bool"> </return> @@ -10944,6 +11623,18 @@ <description> </description> </method> + <method name="put_pixel" > + <argument index="0" name="x" type="int"> + </argument> + <argument index="1" name="y" type="int"> + </argument> + <argument index="2" name="color" type="Color"> + </argument> + <argument index="3" name="mipmap_level" type="int" default="0"> + </argument> + <description> + </description> + </method> <method name="resized" > <return type="Image"> </return> @@ -11014,48 +11705,6 @@ </constant> </constants> </class> -<class name="ImagePathFinder" inherits="Resource" category="Core"> - <brief_description> - </brief_description> - <description> - </description> - <methods> - <method name="find_path" > - <return type="Vector2Array"> - </return> - <argument index="0" name="from" type="Vector2"> - </argument> - <argument index="1" name="to" type="Vector2"> - </argument> - <argument index="2" name="optimize" type="bool" default="false"> - </argument> - <description> - </description> - </method> - <method name="get_size" qualifiers="const" > - <return type="Vector2"> - </return> - <description> - </description> - </method> - <method name="is_solid" > - <return type="bool"> - </return> - <argument index="0" name="pos" type="Vector2"> - </argument> - <description> - </description> - </method> - <method name="create_from_image_alpha" > - <argument index="0" name="arg0" type="Image"> - </argument> - <description> - </description> - </method> - </methods> - <constants> - </constants> -</class> <class name="ImageTexture" inherits="Texture" category="Core"> <brief_description> </brief_description> @@ -11119,13 +11768,13 @@ </description> </method> <method name="set_lossy_storage_quality" > - <argument index="0" name="quality" type="real"> + <argument index="0" name="quality" type="float"> </argument> <description> </description> </method> <method name="get_lossy_storage_quality" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -11134,6 +11783,10 @@ <description> </description> </method> + <method name="premultiply_alpha" > + <description> + </description> + </method> <method name="set_size_override" > <argument index="0" name="size" type="Vector2"> </argument> @@ -11150,6 +11803,78 @@ </constant> </constants> </class> +<class name="ImmediateGeometry" inherits="GeometryInstance" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="begin" > + <argument index="0" name="primitive" type="int"> + </argument> + <argument index="1" name="texture" type="Texture"> + </argument> + <description> + </description> + </method> + <method name="set_normal" > + <argument index="0" name="normal" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="set_tangent" > + <argument index="0" name="tangent" type="Plane"> + </argument> + <description> + </description> + </method> + <method name="set_color" > + <argument index="0" name="color" type="Color"> + </argument> + <description> + </description> + </method> + <method name="set_uv" > + <argument index="0" name="uv" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="set_uv2" > + <argument index="0" name="uv" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="add_vertex" > + <argument index="0" name="color" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="add_sphere" > + <argument index="0" name="lats" type="int"> + </argument> + <argument index="1" name="lons" type="int"> + </argument> + <argument index="2" name="radius" type="float"> + </argument> + <description> + </description> + </method> + <method name="end" > + <description> + </description> + </method> + <method name="clear" > + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> <class name="Input" inherits="Object" category="Core"> <brief_description> </brief_description> @@ -11191,7 +11916,7 @@ </description> </method> <method name="get_joy_axis" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="device" type="int"> </argument> @@ -11200,6 +11925,14 @@ <description> </description> </method> + <method name="get_joy_name" > + <return type="String"> + </return> + <argument index="0" name="device" type="int"> + </argument> + <description> + </description> + </method> <method name="get_accelerometer" > <return type="Vector3"> </return> @@ -11239,7 +11972,23 @@ <description> </description> </method> + <method name="warp_mouse_pos" > + <argument index="0" name="to" type="Vector2"> + </argument> + <description> + </description> + </method> </methods> + <signals> + <signal name="joy_connection_changed"> + <argument index="0" name="index" type="int"> + </argument> + <argument index="1" name="connected" type="bool"> + </argument> + <description> + </description> + </signal> + </signals> <constants> <constant name="MOUSE_MODE_VISIBLE" value="0"> </constant> @@ -11420,7 +12169,7 @@ </member> <member name="pressed" type="bool"> </member> - <member name="pressure" type="real"> + <member name="pressure" type="float"> </member> </members> <constants> @@ -11480,7 +12229,7 @@ </member> <member name="axis" type="int"> </member> - <member name="value" type="real"> + <member name="value" type="float"> </member> </members> <constants> @@ -11722,9 +12471,9 @@ </member> <member name="relative_pos" type="Vector2"> </member> - <member name="speed_x" type="real"> + <member name="speed_x" type="float"> </member> - <member name="speed_y" type="real"> + <member name="speed_y" type="float"> </member> <member name="speed" type="Vector2"> </member> @@ -11786,21 +12535,21 @@ </member> <member name="index" type="int"> </member> - <member name="x" type="real"> + <member name="x" type="float"> </member> - <member name="y" type="real"> + <member name="y" type="float"> </member> <member name="pos" type="Vector2"> </member> - <member name="relative_x" type="real"> + <member name="relative_x" type="float"> </member> - <member name="relative_y" type="real"> + <member name="relative_y" type="float"> </member> <member name="relative_pos" type="Vector2"> </member> - <member name="speed_x" type="real"> + <member name="speed_x" type="float"> </member> - <member name="speed_y" type="real"> + <member name="speed_y" type="float"> </member> <member name="speed" type="Vector2"> </member> @@ -11862,9 +12611,9 @@ </member> <member name="index" type="int"> </member> - <member name="x" type="real"> + <member name="x" type="float"> </member> - <member name="y" type="real"> + <member name="y" type="float"> </member> <member name="pos" type="Vector2"> </member> @@ -11900,6 +12649,90 @@ Singleton that manages actions. InputMap has a list of the actions used in InputEvent, which can be modified. </description> <methods> + <method name="has_action" qualifiers="const" > + <return type="bool"> + </return> + <argument index="0" name="action" type="String"> + </argument> + <description> + </description> + </method> + <method name="get_action_id" qualifiers="const" > + <return type="int"> + </return> + <argument index="0" name="action" type="String"> + </argument> + <description> + </description> + </method> + <method name="get_action_from_id" qualifiers="const" > + <return type="String"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="add_action" > + <argument index="0" name="action" type="String"> + </argument> + <description> + </description> + </method> + <method name="erase_action" > + <argument index="0" name="action" type="String"> + </argument> + <description> + </description> + </method> + <method name="action_add_event" > + <argument index="0" name="action" type="String"> + </argument> + <argument index="1" name="event" type="InputEvent"> + </argument> + <description> + </description> + </method> + <method name="action_has_event" > + <return type="bool"> + </return> + <argument index="0" name="action" type="String"> + </argument> + <argument index="1" name="event" type="InputEvent"> + </argument> + <description> + </description> + </method> + <method name="action_erase_event" > + <argument index="0" name="action" type="String"> + </argument> + <argument index="1" name="event" type="InputEvent"> + </argument> + <description> + </description> + </method> + <method name="get_action_list" > + <return type="bool"> + </return> + <argument index="0" name="action" type="String"> + </argument> + <description> + </description> + </method> + <method name="event_is_action" qualifiers="const" > + <return type="bool"> + </return> + <argument index="0" name="event" type="InputEvent"> + </argument> + <argument index="1" name="action" type="String"> + </argument> + <description> + </description> + </method> + <method name="load_from_globals" > + <description> + </description> + </method> </methods> <constants> </constants> @@ -11981,19 +12814,19 @@ </description> </method> <method name="set_target" > - <argument index="0" name="target" type="Object"> + <argument index="0" name="target" type="Camera"> </argument> <description> </description> </method> <method name="set_speed" > - <argument index="0" name="speed" type="real"> + <argument index="0" name="speed" type="float"> </argument> <description> </description> </method> <method name="get_speed" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -12014,6 +12847,52 @@ <constants> </constants> </class> +<class name="Joint" inherits="Spatial" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_node_a" > + <argument index="0" name="node" type="NodePath"> + </argument> + <description> + </description> + </method> + <method name="get_node_a" qualifiers="const" > + <return type="NodePath"> + </return> + <description> + </description> + </method> + <method name="set_node_b" > + <argument index="0" name="node" type="NodePath"> + </argument> + <description> + </description> + </method> + <method name="get_node_b" qualifiers="const" > + <return type="NodePath"> + </return> + <description> + </description> + </method> + <method name="set_solver_priority" > + <argument index="0" name="priority" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_solver_priority" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> <class name="Joint2D" inherits="Node2D" category="Core"> <brief_description> Base node for all joint constraints in 2D phyisics. @@ -12051,13 +12930,143 @@ </description> </method> <method name="set_bias" > - <argument index="0" name="bias" type="real"> + <argument index="0" name="bias" type="float"> </argument> <description> </description> </method> <method name="get_bias" qualifiers="const" > - <return type="real"> + <return type="float"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> +<class name="KinematicBody" inherits="PhysicsBody" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="move" > + <return type="Vector3"> + </return> + <argument index="0" name="rel_vec" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="move_to" > + <return type="Vector3"> + </return> + <argument index="0" name="position" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="can_move_to" > + <return type="bool"> + </return> + <argument index="0" name="position" type="Vector3"> + </argument> + <argument index="1" name="arg1" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_colliding" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="get_collision_pos" qualifiers="const" > + <return type="Vector3"> + </return> + <description> + </description> + </method> + <method name="get_collision_normal" qualifiers="const" > + <return type="Vector3"> + </return> + <description> + </description> + </method> + <method name="get_collider_velocity" qualifiers="const" > + <return type="Vector3"> + </return> + <description> + </description> + </method> + <method name="get_collider" qualifiers="const" > + <description> + </description> + </method> + <method name="get_collider_shape" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_collide_with_static_bodies" > + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="can_collide_with_static_bodies" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_collide_with_kinematic_bodies" > + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="can_collide_with_kinematic_bodies" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_collide_with_rigid_bodies" > + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="can_collide_with_rigid_bodies" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_collide_with_character_bodies" > + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="can_collide_with_character_bodies" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_collision_margin" > + <argument index="0" name="pixels" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_collision_margin" qualifiers="const" > + <return type="float"> </return> <description> </description> @@ -12126,6 +13135,16 @@ <description> </description> </method> + <method name="get_collider_shape" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> + <method name="get_collider_metadata" qualifiers="const" > + <description> + </description> + </method> <method name="set_collide_with_static_bodies" > <argument index="0" name="enable" type="bool"> </argument> @@ -12175,13 +13194,13 @@ </description> </method> <method name="set_collision_margin" > - <argument index="0" name="pixels" type="real"> + <argument index="0" name="pixels" type="float"> </argument> <description> </description> </method> <method name="get_collision_margin" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -12291,13 +13310,13 @@ </description> </method> <method name="set_percent_visible" > - <argument index="0" name="percent_visible" type="real"> + <argument index="0" name="percent_visible" type="float"> </argument> <description> </description> </method> <method name="get_percent_visible" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -12329,6 +13348,20 @@ Align the whole text by spreading the rows. </constant> </constants> + <theme_items> + <theme_item name="shadow_offset_x" type="int"> + </theme_item> + <theme_item name="shadow_offset_y" type="int"> + </theme_item> + <theme_item name="shadow_as_outline" type="int"> + </theme_item> + <theme_item name="font_color" type="Color"> + </theme_item> + <theme_item name="font_color_shadow" type="Color"> + </theme_item> + <theme_item name="font" type="Font"> + </theme_item> + </theme_items> </class> <class name="LargeTexture" inherits="Texture" category="Core"> <brief_description> @@ -12337,6 +13370,8 @@ </description> <methods> <method name="add_piece" > + <return type="int"> + </return> <argument index="0" name="ofs" type="Vector2"> </argument> <argument index="1" name="texture" type="Texture"> @@ -12344,6 +13379,22 @@ <description> </description> </method> + <method name="set_piece_offset" > + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="ofs" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="set_piece_texture" > + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="texture" type="Texture"> + </argument> + <description> + </description> + </method> <method name="set_size" > <argument index="0" name="size" type="Vector2"> </argument> @@ -12391,13 +13442,13 @@ <method name="set_parameter" > <argument index="0" name="variable" type="int"> </argument> - <argument index="1" name="value" type="real"> + <argument index="1" name="value" type="float"> </argument> <description> </description> </method> <method name="get_parameter" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="arg0" type="int"> </argument> @@ -12456,6 +13507,42 @@ <description> </description> </method> + <method name="set_bake_mode" > + <argument index="0" name="bake_mode" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_bake_mode" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_enabled" > + <argument index="0" name="enabled" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_enabled" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_editor_only" > + <argument index="0" name="editor_only" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_editor_only" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> </methods> <constants> <constant name="PARAM_RADIUS" value="2"> @@ -12472,11 +13559,17 @@ </constant> <constant name="PARAM_SHADOW_Z_OFFSET" value="6"> </constant> - <constant name="COLOR_AMBIENT" value="0"> + <constant name="COLOR_DIFFUSE" value="0"> + </constant> + <constant name="COLOR_SPECULAR" value="1"> </constant> - <constant name="COLOR_DIFFUSE" value="1"> + <constant name="BAKE_MODE_DISABLED" value="0"> </constant> - <constant name="COLOR_SPECULAR" value="2"> + <constant name="BAKE_MODE_INDIRECT" value="1"> + </constant> + <constant name="BAKE_MODE_INDIRECT_AND_SHADOWS" value="2"> + </constant> + <constant name="BAKE_MODE_FULL" value="3"> </constant> </constants> </class> @@ -12575,9 +13668,11 @@ Return the [i]secret[/i] status of the [LineEdit] (see [method set_secret]). </description> </method> - <method name="select" qualifiers="const" > - <return type="bool"> - </return> + <method name="select" > + <argument index="0" name="from" type="int" default="0"> + </argument> + <argument index="1" name="to" type="int" default="-1"> + </argument> <description> </description> </method> @@ -12600,6 +13695,26 @@ </signals> <constants> </constants> + <theme_items> + <theme_item name="minimum_spaces" type="int"> + </theme_item> + <theme_item name="selection_color" type="Color"> + </theme_item> + <theme_item name="cursor_color" type="Color"> + </theme_item> + <theme_item name="font_color_selected" type="Color"> + </theme_item> + <theme_item name="font_color" type="Color"> + </theme_item> + <theme_item name="font" type="Font"> + </theme_item> + <theme_item name="read_only" type="StyleBox"> + </theme_item> + <theme_item name="focus" type="StyleBox"> + </theme_item> + <theme_item name="normal" type="StyleBox"> + </theme_item> + </theme_items> </class> <class name="LineShape2D" inherits="Shape2D" category="Core"> <brief_description> @@ -12624,14 +13739,14 @@ </description> </method> <method name="set_d" > - <argument index="0" name="d" type="real"> + <argument index="0" name="d" type="float"> </argument> <description> Set the line distance from the origin. </description> </method> <method name="get_d" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the line distance from the origin. @@ -12665,6 +13780,8 @@ </constant> <constant name="NOTIFICATION_WM_UNFOCUS_REQUEST" value="8"> </constant> + <constant name="NOTIFICATION_OS_MEMORY_WARNING" value="9"> + </constant> </constants> </class> <class name="MarginContainer" inherits="Container" category="Core"> @@ -12678,6 +13795,10 @@ </methods> <constants> </constants> + <theme_items> + <theme_item name="margin" type="int"> + </theme_item> + </theme_items> </class> <class name="Marshalls" inherits="Reference" category="Core"> <brief_description> @@ -12729,22 +13850,6 @@ Return a [Material] flag, which toggles on or off a behavior when rendering. See enumeration FLAG_* for a list. </description> </method> - <method name="set_hint" > - <argument index="0" name="hint" type="int"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> - <description> - </description> - </method> - <method name="get_hint" qualifiers="const" > - <return type="bool"> - </return> - <argument index="0" name="hint" type="int"> - </argument> - <description> - </description> - </method> <method name="set_blend_mode" > <argument index="0" name="mode" type="int"> </argument> @@ -12759,30 +13864,30 @@ Return blend mode for the material, which can be one of BLEND_MODE_MIX (default), BLEND_MODE_ADD, BLEND_MODE_SUB. Keep in mind that only BLEND_MODE_MIX ensures that the material [i]may[/i] be opaque, any other blend mode will render with alpha blending enabled in raster-based [VisualServer] implementations. </description> </method> - <method name="set_shade_model" > - <argument index="0" name="model" type="int"> + <method name="set_line_width" > + <argument index="0" name="width" type="float"> </argument> <description> + Set the line width for geometry drawn with FLAG_WIREFRAME enabled, or LINE primitives. Note that not all hardware or VisualServer backends support this (like DirectX). </description> </method> - <method name="get_shade_model" qualifiers="const" > - <return type="int"> + <method name="get_line_width" qualifiers="const" > + <return type="float"> </return> <description> + Return the line width for geometry drawn with FLAG_WIREFRAME enabled, or LINE primitives. Note that not all hardware or VisualServer backends support this (like DirectX). </description> </method> - <method name="set_line_width" > - <argument index="0" name="width" type="real"> + <method name="set_depth_draw_mode" > + <argument index="0" name="mode" type="int"> </argument> <description> - Set the line width for geometry drawn with FLAG_WIREFRAME enabled, or LINE primitives. Note that not all hardware or VisualServer backends support this (like DirectX). </description> </method> - <method name="get_line_width" qualifiers="const" > - <return type="real"> + <method name="get_depth_draw_mode" qualifiers="const" > + <return type="int"> </return> <description> - Return the line width for geometry drawn with FLAG_WIREFRAME enabled, or LINE primitives. Note that not all hardware or VisualServer backends support this (like DirectX). </description> </method> </methods> @@ -12801,40 +13906,20 @@ </constant> <constant name="FLAG_ONTOP" value="4"> </constant> - <constant name="FLAG_WIREFRAME" value="5"> - Triangle geometry is drawn as lines if this flag is enabled. + <constant name="FLAG_LIGHTMAP_ON_UV2" value="5"> </constant> - <constant name="FLAG_BILLBOARD_TOGGLE" value="6"> - Geometry world transform is computed as billboard if this flag is enabled, often used for impostors. + <constant name="FLAG_COLOR_ARRAY_SRGB" value="6"> </constant> <constant name="FLAG_MAX" value="7"> Maximum amount of flags </constant> - <constant name="HINT_DECAL" value="0"> - </constant> - <constant name="HINT_OPAQUE_PRE_PASS" value="1"> - </constant> - <constant name="HINT_NO_SHADOW" value="2"> - </constant> - <constant name="HINT_NO_DEPTH_DRAW" value="3"> - </constant> - <constant name="HINT_MAX" value="4"> - </constant> - <constant name="SHADE_MODEL_LAMBERT" value="0"> - </constant> - <constant name="SHADE_MODEL_LAMBERT_WRAP" value="1"> - </constant> - <constant name="SHADE_MODEL_FRESNEL" value="2"> + <constant name="DEPTH_DRAW_ALWAYS" value="0"> </constant> - <constant name="SHADE_MODEL_TOON" value="3"> + <constant name="DEPTH_DRAW_OPAQUE_ONLY" value="1"> </constant> - <constant name="SHADE_MODEL_CUSTOM_0" value="4"> + <constant name="DEPTH_DRAW_OPAQUE_PRE_PASS_ALPHA" value="2"> </constant> - <constant name="SHADE_MODEL_CUSTOM_1" value="5"> - </constant> - <constant name="SHADE_MODEL_CUSTOM_2" value="6"> - </constant> - <constant name="SHADE_MODEL_CUSTOM_3" value="7"> + <constant name="DEPTH_DRAW_NEVER" value="3"> </constant> <constant name="BLEND_MODE_MIX" value="0"> Use the regular alpha blending equation (source and dest colors are faded) (default). @@ -12845,6 +13930,10 @@ <constant name="BLEND_MODE_SUB" value="2"> Use substractive blending equation, often used for some smoke effects or types of glass. </constant> + <constant name="BLEND_MODE_MUL" value="3"> + </constant> + <constant name="BLEND_MODE_PREMULT_ALPHA" value="4"> + </constant> </constants> </class> <class name="Matrix3" category="Built-In Types"> @@ -12856,7 +13945,7 @@ </description> <methods> <method name="determinant" > - <return type="real"> + <return type="float"> </return> <description> Return the determinant of the matrix. @@ -12875,6 +13964,12 @@ <description> </description> </method> + <method name="get_scale" > + <return type="Vector3"> + </return> + <description> + </description> + </method> <method name="inverse" > <return type="Matrix3"> </return> @@ -12894,7 +13989,7 @@ </return> <argument index="0" name="axis" type="Vector3"> </argument> - <argument index="1" name="phi" type="real"> + <argument index="1" name="phi" type="float"> </argument> <description> Return the rotated version of the matrix, by a given axis and angle. @@ -12910,7 +14005,7 @@ </description> </method> <method name="tdotx" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="with" type="Vector3"> </argument> @@ -12919,7 +14014,7 @@ </description> </method> <method name="tdoty" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="with" type="Vector3"> </argument> @@ -12928,7 +14023,7 @@ </description> </method> <method name="tdotz" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="with" type="Vector3"> </argument> @@ -12975,7 +14070,7 @@ <method name="Matrix3" > <argument index="0" name="axis" type="Vector3"> </argument> - <argument index="1" name="phi" type="real"> + <argument index="1" name="phi" type="float"> </argument> <description> Create a matrix from 3 axis vectors. @@ -13014,6 +14109,22 @@ <description> </description> </method> + <method name="basis_xform" > + <return type="Matrix32"> + </return> + <argument index="0" name="v" type="var"> + </argument> + <description> + </description> + </method> + <method name="basis_xform_inv" > + <return type="Matrix32"> + </return> + <argument index="0" name="v" type="var"> + </argument> + <description> + </description> + </method> <method name="get_origin" > <return type="Vector2"> </return> @@ -13021,7 +14132,13 @@ </description> </method> <method name="get_rotation" > - <return type="real"> + <return type="float"> + </return> + <description> + </description> + </method> + <method name="get_scale" > + <return type="Vector2"> </return> <description> </description> @@ -13031,7 +14148,7 @@ </return> <argument index="0" name="m" type="Matrix32"> </argument> - <argument index="1" name="c" type="real"> + <argument index="1" name="c" type="float"> </argument> <description> </description> @@ -13051,7 +14168,7 @@ <method name="rotated" > <return type="Matrix32"> </return> - <argument index="0" name="phi" type="real"> + <argument index="0" name="phi" type="float"> </argument> <description> </description> @@ -13100,11 +14217,11 @@ </method> </methods> <members> - <member name="x" type="real"> + <member name="x" type="float"> </member> - <member name="y" type="real"> + <member name="y" type="float"> </member> - <member name="o" type="real"> + <member name="o" type="float"> </member> </members> <constants> @@ -13134,6 +14251,28 @@ </signals> <constants> </constants> + <theme_items> + <theme_item name="hseparation" type="int"> + </theme_item> + <theme_item name="font_color_disabled" type="Color"> + </theme_item> + <theme_item name="font_color" type="Color"> + </theme_item> + <theme_item name="font_color_hover" type="Color"> + </theme_item> + <theme_item name="font_color_pressed" type="Color"> + </theme_item> + <theme_item name="font" type="Font"> + </theme_item> + <theme_item name="hover" type="StyleBox"> + </theme_item> + <theme_item name="pressed" type="StyleBox"> + </theme_item> + <theme_item name="disabled" type="StyleBox"> + </theme_item> + <theme_item name="normal" type="StyleBox"> + </theme_item> + </theme_items> </class> <class name="Mesh" inherits="Resource" category="Core"> <brief_description> @@ -13280,6 +14419,22 @@ <description> </description> </method> + <method name="regen_normalmaps" > + <description> + </description> + </method> + <method name="set_custom_aabb" > + <argument index="0" name="aabb" type="AABB"> + </argument> + <description> + </description> + </method> + <method name="get_custom_aabb" qualifiers="const" > + <return type="AABB"> + </return> + <description> + </description> + </method> </methods> <constants> <constant name="NO_INDEX_ARRAY" value="-1"> @@ -13685,6 +14840,18 @@ Return the current [Mesh] resource for the instance. </description> </method> + <method name="set_skeleton_path" > + <argument index="0" name="skeleton_path" type="NodePath"> + </argument> + <description> + </description> + </method> + <method name="get_skeleton_path" > + <return type="NodePath"> + </return> + <description> + </description> + </method> <method name="get_aabb" qualifiers="const" > <return type="AABB"> </return> @@ -13947,6 +15114,172 @@ <constants> </constants> </class> +<class name="Navigation" inherits="Spatial" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="navmesh_create" > + <return type="int"> + </return> + <argument index="0" name="mesh" type="NavigationMesh"> + </argument> + <argument index="1" name="xform" type="Transform"> + </argument> + <argument index="2" name="owner" type="Object" default="NULL"> + </argument> + <description> + </description> + </method> + <method name="navmesh_set_transform" > + <argument index="0" name="id" type="int"> + </argument> + <argument index="1" name="xform" type="Transform"> + </argument> + <description> + </description> + </method> + <method name="navmesh_remove" > + <argument index="0" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_simple_path" > + <return type="Vector3Array"> + </return> + <argument index="0" name="start" type="Vector3"> + </argument> + <argument index="1" name="end" type="Vector3"> + </argument> + <argument index="2" name="optimize" type="bool" default="true"> + </argument> + <description> + </description> + </method> + <method name="get_closest_point_to_segment" > + <return type="Vector3"> + </return> + <argument index="0" name="start" type="Vector3"> + </argument> + <argument index="1" name="end" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="get_closest_point" > + <return type="Vector3"> + </return> + <argument index="0" name="to_point" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="get_closest_point_normal" > + <return type="Vector3"> + </return> + <argument index="0" name="to_point" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="set_up_vector" > + <argument index="0" name="up" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="get_up_vector" qualifiers="const" > + <return type="Vector3"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> +<class name="NavigationMesh" inherits="Resource" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_vertices" > + <argument index="0" name="vertices" type="Vector3Array"> + </argument> + <description> + </description> + </method> + <method name="get_vertices" qualifiers="const" > + <return type="Vector3Array"> + </return> + <description> + </description> + </method> + <method name="add_polygon" > + <argument index="0" name="polygon" type="IntArray"> + </argument> + <description> + </description> + </method> + <method name="get_polygon_count" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> + <method name="get_polygon" > + <return type="IntArray"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="clear_polygons" > + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> +<class name="NavigationMeshInstance" inherits="Spatial" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_navigation_mesh" > + <argument index="0" name="navmesh" type="Object"> + </argument> + <description> + </description> + </method> + <method name="get_navigation_mesh" qualifiers="const" > + <return type="Object"> + </return> + <description> + </description> + </method> + <method name="set_enabled" > + <argument index="0" name="enabled" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_enabled" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> <class name="Nil" category="Built-In Types"> <brief_description> </brief_description> @@ -13966,7 +15299,7 @@ </description> </method> <method name="Nil" > - <argument index="0" name="from" type="real"> + <argument index="0" name="from" type="float"> </argument> <description> </description> @@ -14152,7 +15485,7 @@ </description> </method> <method name="_fixed_process" qualifiers="virtual" > - <argument index="0" name="delta" type="real"> + <argument index="0" name="delta" type="float"> </argument> <description> Called for fixed processing (synced to the physics). @@ -14166,7 +15499,7 @@ </description> </method> <method name="_process" qualifiers="virtual" > - <argument index="0" name="delta" type="real"> + <argument index="0" name="delta" type="float"> </argument> <description> Called for processing. This is called every frame, with the delta time from the previous frame. @@ -14261,7 +15594,7 @@ <argument index="0" name="path" type="NodePath"> </argument> <description> - Fetch a node. NodePath must be valid (or else error will occur) and can be either the path to child node, a relative path (from the current node to another node), or an absolute path to a node.[br] Note: fetching absolute paths only works when the node is inside the scene tree (see [method is_inside_scene]). Examples. Assume your current node is Character and following tree:[br] + Fetch a node. NodePath must be valid (or else error will occur) and can be either the path to child node, a relative path (from the current node to another node), or an absolute path to a node.[br] Note: fetching absolute paths only works when the node is inside the scene tree (see [method is_inside_scene]). Examples. Assume your current node is Character and following tree:[br] root/[br] root/Character[br] root/Character/Sword[br] @@ -14375,6 +15708,12 @@ Move a child node to a different position (order) amongst the other children. Since calls, signals, etc are performed by tree order, changing the order of chilren nodes may be useful. </description> </method> + <method name="get_groups" qualifiers="const" > + <return type="Array"> + </return> + <description> + </description> + </method> <method name="raise" > <description> Move this node to the top of the array of nodes of the parent node. This is often useful on GUIs ([Control]), because their order of drawing fully depends on their order in the tree. @@ -14440,7 +15779,7 @@ </description> </method> <method name="get_fixed_process_delta_time" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the time elapsed since the last fixed frame. This is always the same in fixed proecssing unless the frames per second is changed in [OS]. @@ -14461,7 +15800,7 @@ </description> </method> <method name="get_process_delta_time" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the time elapsed (in seconds) since the last process callback. This is almost always different each time. @@ -14502,6 +15841,18 @@ Return true if the node is processing unhandled input (see [method set_process_unhandled_input]). </description> </method> + <method name="set_process_unhandled_key_input" > + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_processing_unhandled_key_input" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> <method name="set_pause_mode" > <argument index="0" name="mode" type="int"> </argument> @@ -14554,6 +15905,12 @@ Replace a node in a scene by a given one. Subscriptions that pass through this node will be lost. </description> </method> + <method name="get_viewport" qualifiers="const" > + <return type="Object"> + </return> + <description> + </description> + </method> <method name="queue_free" > <description> </description> @@ -14628,7 +15985,7 @@ </description> </method> <method name="set_rot" > - <argument index="0" name="rot" type="real"> + <argument index="0" name="rot" type="float"> </argument> <description> Set the rotation of the 2d node. @@ -14649,7 +16006,7 @@ </description> </method> <method name="get_rot" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the rotation of the 2D node. @@ -14662,6 +16019,28 @@ Return the scale of the 2D node. </description> </method> + <method name="rotate" > + <argument index="0" name="degrees" type="float"> + </argument> + <description> + </description> + </method> + <method name="move_local_x" > + <argument index="0" name="delta" type="float"> + </argument> + <argument index="1" name="scaled" type="bool" default="false"> + </argument> + <description> + </description> + </method> + <method name="move_local_y" > + <argument index="0" name="delta" type="float"> + </argument> + <argument index="1" name="scaled" type="bool" default="false"> + </argument> + <description> + </description> + </method> <method name="get_global_pos" qualifiers="const" > <return type="Vector2"> </return> @@ -14669,6 +16048,12 @@ Return the global position of the 2D node. </description> </method> + <method name="set_global_pos" > + <argument index="0" name="arg0" type="Vector2"> + </argument> + <description> + </description> + </method> <method name="set_transform" > <argument index="0" name="xform" type="Matrix32"> </argument> @@ -14857,6 +16242,30 @@ Return the amount of fixed iterations per second (for fixed process and physics). </description> </method> + <method name="set_target_fps" > + <argument index="0" name="target_fps" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_target_fps" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_time_scale" > + <argument index="0" name="time_scale" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_time_scale" > + <return type="float"> + </return> + <description> + </description> + </method> <method name="has_touchscreen_ui_hint" qualifiers="const" > <return type="bool"> </return> @@ -14900,6 +16309,8 @@ </argument> <argument index="2" name="blocking" type="bool"> </argument> + <argument index="3" name="output" type="Array" default="Array()"> + </argument> <description> Execute the binary file in given path, optionally blocking until it returns. A process ID is returned. </description> @@ -14921,6 +16332,12 @@ <description> </description> </method> + <method name="get_process_ID" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> <method name="get_environment" qualifiers="const" > <return type="String"> </return> @@ -15052,6 +16469,12 @@ <description> </description> </method> + <method name="is_debug_build" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> <method name="dump_memory_to_file" > <argument index="0" name="file" type="String"> </argument> @@ -15109,7 +16532,7 @@ </description> </method> <method name="get_frames_per_second" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -15118,11 +16541,19 @@ <description> </description> </method> + <method name="print_resources_by_type" > + <argument index="0" name="arg0" type="StringArray"> + </argument> + <description> + </description> + </method> <method name="native_video_play" > <return type="int"> </return> <argument index="0" name="arg0" type="String"> </argument> + <argument index="1" name="arg1" type="float"> + </argument> <description> </description> </method> @@ -15140,6 +16571,12 @@ <description> </description> </method> + <method name="set_use_file_access_save_and_swap" > + <argument index="0" name="enabled" type="bool"> + </argument> + <description> + </description> + </method> </methods> <constants> <constant name="DAY_SUNDAY" value="0"> @@ -15208,6 +16645,10 @@ Return the property list, array of dictionaries, dictionaries must countain: name:String, type:int (see TYPE_* enum in globals) and optionally: hint:int (see PROPERTY_HINT_* in globals), hint_string:String, usage:int (see PROPERTY_USAGE_* in globals). </description> </method> + <method name="_init" qualifiers="virtual" > + <description> + </description> + </method> <method name="_notification" qualifiers="virtual" > <argument index="0" name="what" type="int"> </argument> @@ -15419,6 +16860,8 @@ </description> </method> <method name="connect" > + <return type="int"> + </return> <argument index="0" name="signal" type="String"> </argument> <argument index="1" name="target" type="Object"> @@ -15479,9 +16922,9 @@ Set true if this object can translate strings (in calls to tr() ). Default is true. </description> </method> - <method name="can_translate_messages" > - <argument index="0" name="arg0" type="bool"> - </argument> + <method name="can_translate_messages" qualifiers="const" > + <return type="bool"> + </return> <description> Return true if this object can translate strings. </description> @@ -15716,6 +17159,72 @@ </signals> <constants> </constants> + <theme_items> + <theme_item name="hseparation" type="int"> + </theme_item> + <theme_item name="arrow_margin" type="int"> + </theme_item> + <theme_item name="font_color_disabled" type="Color"> + </theme_item> + <theme_item name="font_color" type="Color"> + </theme_item> + <theme_item name="font_color_hover" type="Color"> + </theme_item> + <theme_item name="font_color_pressed" type="Color"> + </theme_item> + <theme_item name="arrow" type="Texture"> + </theme_item> + <theme_item name="font" type="Font"> + </theme_item> + <theme_item name="hover" type="StyleBox"> + </theme_item> + <theme_item name="pressed" type="StyleBox"> + </theme_item> + <theme_item name="focus" type="StyleBox"> + </theme_item> + <theme_item name="disabled" type="StyleBox"> + </theme_item> + <theme_item name="normal" type="StyleBox"> + </theme_item> + </theme_items> +</class> +<class name="PCKPacker" inherits="Object" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="pck_start" > + <return type="int"> + </return> + <argument index="0" name="pck_name" type="String"> + </argument> + <argument index="1" name="alignment" type="int"> + </argument> + <description> + </description> + </method> + <method name="add_file" > + <return type="int"> + </return> + <argument index="0" name="pck_path" type="String"> + </argument> + <argument index="1" name="source_path" type="String"> + </argument> + <description> + </description> + </method> + <method name="flush" > + <return type="int"> + </return> + <argument index="0" name="arg0" type="bool"> + </argument> + <description> + </description> + </method> + </methods> + <constants> + </constants> </class> <class name="PHashTranslation" inherits="Translation" category="Core"> <brief_description> @@ -15830,6 +17339,12 @@ <description> </description> </method> + <method name="get_available_packet_count" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> </methods> <constants> </constants> @@ -15865,6 +17380,14 @@ </methods> <constants> </constants> + <theme_items> + <theme_item name="panelf" type="StyleBox"> + </theme_item> + <theme_item name="panel" type="StyleBox"> + </theme_item> + <theme_item name="panelnc" type="StyleBox"> + </theme_item> + </theme_items> </class> <class name="PanelContainer" inherits="Container" category="Core"> <brief_description> @@ -15877,6 +17400,10 @@ </methods> <constants> </constants> + <theme_items> + <theme_item name="panel" type="StyleBox"> + </theme_item> + </theme_items> </class> <class name="ParallaxBackground" inherits="CanvasLayer" category="Core"> <brief_description> @@ -16001,49 +17528,49 @@ </description> </method> <method name="set_radius" > - <argument index="0" name="radius" type="real"> + <argument index="0" name="radius" type="float"> </argument> <description> </description> </method> <method name="get_radius" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="set_disable_radius" > - <argument index="0" name="radius" type="real"> + <argument index="0" name="radius" type="float"> </argument> <description> </description> </method> <method name="get_disable_radius" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="set_gravity" > - <argument index="0" name="gravity" type="real"> + <argument index="0" name="gravity" type="float"> </argument> <description> </description> </method> <method name="get_gravity" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="set_absorption" > - <argument index="0" name="absorption" type="real"> + <argument index="0" name="absorption" type="float"> </argument> <description> </description> </method> <method name="get_absorption" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -16191,14 +17718,14 @@ <method name="set_variable" > <argument index="0" name="variable" type="int"> </argument> - <argument index="1" name="value" type="real"> + <argument index="1" name="value" type="float"> </argument> <description> Set a specific variable for the particle system (see VAR_* enum). </description> </method> <method name="get_variable" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="variable" type="int"> </argument> @@ -16209,14 +17736,14 @@ <method name="set_randomness" > <argument index="0" name="variable" type="int"> </argument> - <argument index="1" name="randomness" type="real"> + <argument index="1" name="randomness" type="float"> </argument> <description> Set the randomness for a specific variable of the particle system. Randomness produces small changes from the default each time a particle is emitted. </description> </method> <method name="get_randomness" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="arg0" type="int"> </argument> @@ -16227,14 +17754,14 @@ <method name="set_color_phase_pos" > <argument index="0" name="phase" type="int"> </argument> - <argument index="1" name="pos" type="real"> + <argument index="1" name="pos" type="float"> </argument> <description> Set the position of a color phase (0 to 1) </description> </method> <method name="get_color_phase_pos" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="phase" type="int"> </argument> @@ -16275,13 +17802,13 @@ </description> </method> <method name="set_emit_timeout" > - <argument index="0" name="arg0" type="real"> + <argument index="0" name="arg0" type="float"> </argument> <description> </description> </method> <method name="get_emit_timeout" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -16385,49 +17912,49 @@ </description> </method> <method name="set_lifetime" > - <argument index="0" name="lifetime" type="real"> + <argument index="0" name="lifetime" type="float"> </argument> <description> </description> </method> <method name="get_lifetime" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="set_time_scale" > - <argument index="0" name="time_scale" type="real"> + <argument index="0" name="time_scale" type="float"> </argument> <description> </description> </method> <method name="get_time_scale" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="set_pre_process_time" > - <argument index="0" name="time" type="real"> + <argument index="0" name="time" type="float"> </argument> <description> </description> </method> <method name="get_pre_process_time" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="set_emit_timeout" > - <argument index="0" name="value" type="real"> + <argument index="0" name="value" type="float"> </argument> <description> </description> </method> <method name="get_emit_timeout" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -16435,13 +17962,13 @@ <method name="set_param" > <argument index="0" name="param" type="int"> </argument> - <argument index="1" name="value" type="real"> + <argument index="1" name="value" type="float"> </argument> <description> </description> </method> <method name="get_param" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="param" type="int"> </argument> @@ -16451,13 +17978,13 @@ <method name="set_randomness" > <argument index="0" name="param" type="int"> </argument> - <argument index="1" name="value" type="real"> + <argument index="1" name="value" type="float"> </argument> <description> </description> </method> <method name="get_randomness" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="param" type="int"> </argument> @@ -16555,13 +18082,13 @@ <method name="set_color_phase_pos" > <argument index="0" name="phase" type="int"> </argument> - <argument index="1" name="pos" type="real"> + <argument index="1" name="pos" type="float"> </argument> <description> </description> </method> <method name="get_color_phase_pos" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="phase" type="int"> </argument> @@ -16569,7 +18096,7 @@ </description> </method> <method name="pre_process" > - <argument index="0" name="time" type="real"> + <argument index="0" name="time" type="float"> </argument> <description> </description> @@ -16599,13 +18126,13 @@ </description> </method> <method name="set_explosiveness" > - <argument index="0" name="amount" type="real"> + <argument index="0" name="amount" type="float"> </argument> <description> </description> </method> <method name="get_explosiveness" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -16640,13 +18167,13 @@ </constant> <constant name="PARAM_TANGENTIAL_ACCEL" value="8"> </constant> - <constant name="PARAM_INITIAL_SIZE" value="10"> + <constant name="PARAM_INITIAL_SIZE" value="11"> </constant> - <constant name="PARAM_FINAL_SIZE" value="11"> + <constant name="PARAM_FINAL_SIZE" value="12"> </constant> - <constant name="PARAM_HUE_VARIATION" value="12"> + <constant name="PARAM_HUE_VARIATION" value="13"> </constant> - <constant name="PARAM_MAX" value="13"> + <constant name="PARAM_MAX" value="14"> </constant> <constant name="MAX_COLOR_PHASES" value="4"> </constant> @@ -16703,49 +18230,49 @@ </description> <methods> <method name="set_offset" > - <argument index="0" name="offset" type="real"> + <argument index="0" name="offset" type="float"> </argument> <description> </description> </method> <method name="get_offset" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="set_h_offset" > - <argument index="0" name="h_offset" type="real"> + <argument index="0" name="h_offset" type="float"> </argument> <description> </description> </method> <method name="get_h_offset" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="set_v_offset" > - <argument index="0" name="v_offset" type="real"> + <argument index="0" name="v_offset" type="float"> </argument> <description> </description> </method> <method name="get_v_offset" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="set_unit_offset" > - <argument index="0" name="unit_offset" type="real"> + <argument index="0" name="unit_offset" type="float"> </argument> <description> </description> </method> <method name="get_unit_offset" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -16798,6 +18325,100 @@ </constant> </constants> </class> +<class name="PathFollow2D" inherits="Node2D" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_offset" > + <argument index="0" name="offset" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_offset" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_h_offset" > + <argument index="0" name="h_offset" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_h_offset" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_v_offset" > + <argument index="0" name="v_offset" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_v_offset" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_unit_offset" > + <argument index="0" name="unit_offset" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_unit_offset" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_rotate" > + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_rotating" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_cubic_interpolation" > + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="get_cubic_interpolation" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_loop" > + <argument index="0" name="loop" type="bool"> + </argument> + <description> + </description> + </method> + <method name="has_loop" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> <class name="PathRemap" inherits="Object" category="Core"> <brief_description> Singleton containing the list of remapped resources. @@ -16858,7 +18479,7 @@ </description> <methods> <method name="get_monitor" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="monitor" type="int"> </argument> @@ -16909,7 +18530,19 @@ </constant> <constant name="RENDER_VERTEX_MEM_USED" value="19"> </constant> - <constant name="MONITOR_MAX" value="21"> + <constant name="PHYSICS_2D_ACTIVE_OBJECTS" value="21"> + </constant> + <constant name="PHYSICS_2D_COLLISION_PAIRS" value="22"> + </constant> + <constant name="PHYSICS_2D_ISLAND_COUNT" value="23"> + </constant> + <constant name="PHYSICS_3D_ACTIVE_OBJECTS" value="24"> + </constant> + <constant name="PHYSICS_3D_COLLISION_PAIRS" value="25"> + </constant> + <constant name="PHYSICS_3D_ISLAND_COUNT" value="26"> + </constant> + <constant name="MONITOR_MAX" value="27"> </constant> </constants> </class> @@ -16929,21 +18562,21 @@ </description> </method> <method name="get_total_density" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the space density currently being applied to this body. </description> </method> <method name="get_inverse_mass" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the inverse of the mass of the body. </description> </method> <method name="get_inverse_inertia" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the inverse of the inertia of the body. @@ -16964,14 +18597,14 @@ </description> </method> <method name="set_angular_velocity" > - <argument index="0" name="velocity" type="real"> + <argument index="0" name="velocity" type="float"> </argument> <description> Change the angular velocity of the body. </description> </method> <method name="get_angular_velocity" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the angular velocity of the body. @@ -17083,6 +18716,12 @@ Return the collider shape index. </description> </method> + <method name="get_contact_collider_shape_metadata" qualifiers="const" > + <argument index="0" name="contact_idx" type="int"> + </argument> + <description> + </description> + </method> <method name="get_contact_collider_velocity_at_pos" qualifiers="const" > <return type="Vector2"> </return> @@ -17093,7 +18732,7 @@ </description> </method> <method name="get_step" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the timestep (delta) used for the simulation. @@ -17134,13 +18773,17 @@ </description> <methods> <method name="intersect_ray" > + <return type="Dictionary"> + </return> <argument index="0" name="from" type="Vector2"> </argument> <argument index="1" name="to" type="Vector2"> </argument> <argument index="2" name="exclude" type="Array" default="Array()"> </argument> - <argument index="3" name="umask" type="int" default="0"> + <argument index="3" name="layer_mask" type="int" default="2147483647"> + </argument> + <argument index="4" name="type_mask" type="int" default="15"> </argument> <description> Intersect a ray in a given space, the returned object is a dictionary with the following fields: [br] @@ -17155,36 +18798,56 @@ </description> </method> <method name="intersect_shape" > - <argument index="0" name="shape" type="RID"> - </argument> - <argument index="1" name="xform" type="Matrix32"> - </argument> - <argument index="2" name="result_max" type="int"> - </argument> - <argument index="3" name="exclude" type="Array" default="Array()"> + <return type="Array"> + </return> + <argument index="0" name="shape" type="Physics2DShapeQueryParameters"> </argument> - <argument index="4" name="umask" type="int" default="0"> + <argument index="1" name="max_results" type="int" default="32"> </argument> <description> Intersect a given shape (RID or [Shape2D]) against the space, the intersected shapes are returned in a special result object. </description> </method> <method name="cast_motion" > - <argument index="0" name="shape" type="RID"> - </argument> - <argument index="1" name="xform" type="Matrix32"> + <return type="Array"> + </return> + <argument index="0" name="shape" type="Physics2DShapeQueryParameters"> </argument> - <argument index="2" name="motion" type="int"> + <description> + </description> + </method> + <method name="collide_shape" > + <return type="Array"> + </return> + <argument index="0" name="shape" type="Physics2DShapeQueryParameters"> </argument> - <argument index="3" name="exclude" type="Array" default="Array()"> + <argument index="1" name="max_results" type="int" default="32"> </argument> - <argument index="4" name="umask" type="int" default="0"> + <description> + </description> + </method> + <method name="get_rest_info" > + <return type="Dictionary"> + </return> + <argument index="0" name="shape" type="Physics2DShapeQueryParameters"> </argument> <description> </description> </method> </methods> <constants> + <constant name="TYPE_MASK_STATIC_BODY" value="1"> + </constant> + <constant name="TYPE_MASK_KINEMATIC_BODY" value="2"> + </constant> + <constant name="TYPE_MASK_RIGID_BODY" value="4"> + </constant> + <constant name="TYPE_MASK_CHARACTER_BODY" value="8"> + </constant> + <constant name="TYPE_MASK_AREA" value="16"> + </constant> + <constant name="TYPE_MASK_COLLISION" value="15"> + </constant> </constants> </class> <class name="Physics2DServer" inherits="Object" category="Core"> @@ -17252,13 +18915,13 @@ </argument> <argument index="1" name="param" type="int"> </argument> - <argument index="2" name="value" type="real"> + <argument index="2" name="value" type="float"> </argument> <description> </description> </method> <method name="space_get_param" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="space" type="RID"> </argument> @@ -17316,20 +18979,20 @@ <method name="area_add_shape" > <argument index="0" name="area" type="RID"> </argument> - <argument index="1" name="shape" type="int"> + <argument index="1" name="shape" type="RID"> </argument> - <argument index="2" name="transform" type="RID" default="1,0, 0,1, 0,0"> + <argument index="2" name="transform" type="Matrix32" default="1,0, 0,1, 0,0"> </argument> <description> </description> </method> - <method name="area_set_shape" qualifiers="const" > - <return type="RID"> - </return> + <method name="area_set_shape" > <argument index="0" name="area" type="RID"> </argument> <argument index="1" name="shape_idx" type="int"> </argument> + <argument index="2" name="shape" type="RID"> + </argument> <description> </description> </method> @@ -17517,6 +19180,16 @@ <description> </description> </method> + <method name="body_set_shape_metadata" > + <argument index="0" name="body" type="RID"> + </argument> + <argument index="1" name="shape_idx" type="int"> + </argument> + <argument index="2" name="metadata" type="var"> + </argument> + <description> + </description> + </method> <method name="body_get_shape_count" qualifiers="const" > <return type="int"> </return> @@ -17545,6 +19218,14 @@ <description> </description> </method> + <method name="body_get_shape_metadata" qualifiers="const" > + <argument index="0" name="body" type="RID"> + </argument> + <argument index="1" name="shape_idx" type="int"> + </argument> + <description> + </description> + </method> <method name="body_remove_shape" > <argument index="0" name="body" type="RID"> </argument> @@ -17611,18 +19292,54 @@ <description> </description> </method> + <method name="body_set_layer_mask" > + <argument index="0" name="body" type="RID"> + </argument> + <argument index="1" name="mask" type="int"> + </argument> + <description> + </description> + </method> + <method name="body_get_layer_mask" qualifiers="const" > + <return type="int"> + </return> + <argument index="0" name="body" type="RID"> + </argument> + <argument index="1" name="arg1" type="int"> + </argument> + <description> + </description> + </method> + <method name="body_set_user_mask" > + <argument index="0" name="body" type="RID"> + </argument> + <argument index="1" name="mask" type="int"> + </argument> + <description> + </description> + </method> + <method name="body_get_user_mask" qualifiers="const" > + <return type="int"> + </return> + <argument index="0" name="body" type="RID"> + </argument> + <argument index="1" name="arg1" type="int"> + </argument> + <description> + </description> + </method> <method name="body_set_param" > <argument index="0" name="body" type="RID"> </argument> <argument index="1" name="param" type="int"> </argument> - <argument index="2" name="value" type="real"> + <argument index="2" name="value" type="float"> </argument> <description> </description> </method> <method name="body_get_param" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="body" type="RID"> </argument> @@ -17732,13 +19449,13 @@ </argument> <argument index="1" name="param" type="int"> </argument> - <argument index="2" name="value" type="real"> + <argument index="2" name="value" type="float"> </argument> <description> </description> </method> <method name="joint_get_param" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="joint" type="RID"> </argument> @@ -17794,13 +19511,13 @@ </argument> <argument index="1" name="param" type="int"> </argument> - <argument index="2" name="value" type="real" default="RID()"> + <argument index="2" name="value" type="float" default="RID()"> </argument> <description> </description> </method> <method name="damped_string_joint_get_param" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="joint" type="RID"> </argument> @@ -17829,6 +19546,14 @@ <description> </description> </method> + <method name="get_process_info" > + <return type="int"> + </return> + <argument index="0" name="arg0" type="int"> + </argument> + <description> + </description> + </method> </methods> <constants> <constant name="SHAPE_LINE" value="0"> @@ -17913,6 +19638,12 @@ </constant> <constant name="AREA_BODY_REMOVED" value="1"> </constant> + <constant name="INFO_ACTIVE_OBJECTS" value="0"> + </constant> + <constant name="INFO_COLLISION_PAIRS" value="1"> + </constant> + <constant name="INFO_ISLAND_COUNT" value="2"> + </constant> </constants> </class> <class name="Physics2DServerSW" inherits="Physics2DServer" category="Core"> @@ -17925,6 +19656,106 @@ <constants> </constants> </class> +<class name="Physics2DShapeQueryParameters" inherits="Reference" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_shape" > + <argument index="0" name="shape" type="Shape2D"> + </argument> + <description> + </description> + </method> + <method name="set_shape_rid" > + <argument index="0" name="shape" type="RID"> + </argument> + <description> + </description> + </method> + <method name="get_shape_rid" qualifiers="const" > + <return type="RID"> + </return> + <description> + </description> + </method> + <method name="set_transform" > + <argument index="0" name="transform" type="Matrix32"> + </argument> + <description> + </description> + </method> + <method name="get_transform" qualifiers="const" > + <return type="Matrix32"> + </return> + <description> + </description> + </method> + <method name="set_motion" > + <argument index="0" name="motion" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="get_motion" qualifiers="const" > + <return type="Vector2"> + </return> + <description> + </description> + </method> + <method name="set_margin" > + <argument index="0" name="margin" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_margin" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_layer_mask" > + <argument index="0" name="layer_mask" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_layer_mask" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_object_type_mask" > + <argument index="0" name="object_type_mask" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_object_type_mask" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_exclude" > + <argument index="0" name="exclude" type="Array"> + </argument> + <description> + </description> + </method> + <method name="get_exclude" qualifiers="const" > + <return type="Array"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> <class name="Physics2DShapeQueryResult" inherits="Reference" category="Core"> <brief_description> </brief_description> @@ -17981,6 +19812,30 @@ PhysicsBody is an abstract base class for implementing a physics body. All PhysicsBody types inherit from it. </description> <methods> + <method name="set_layer_mask" > + <argument index="0" name="mask" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_layer_mask" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> + <method name="add_collision_exception_with" > + <argument index="0" name="body" type="PhysicsBody"> + </argument> + <description> + </description> + </method> + <method name="remove_collision_exception_with" > + <argument index="0" name="body" type="PhysicsBody"> + </argument> + <description> + </description> + </method> </methods> <constants> </constants> @@ -17991,6 +19846,30 @@ <description> </description> <methods> + <method name="set_layer_mask" > + <argument index="0" name="mask" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_layer_mask" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> + <method name="add_collision_exception_with" > + <argument index="0" name="body" type="PhysicsBody2D"> + </argument> + <description> + </description> + </method> + <method name="remove_collision_exception_with" > + <argument index="0" name="body" type="PhysicsBody2D"> + </argument> + <description> + </description> + </method> </methods> <constants> </constants> @@ -18008,13 +19887,13 @@ </description> </method> <method name="get_total_density" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="get_inverse_mass" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -18069,6 +19948,14 @@ <description> </description> </method> + <method name="apply_impulse" > + <argument index="0" name="pos" type="Vector3"> + </argument> + <argument index="1" name="j" type="Vector3"> + </argument> + <description> + </description> + </method> <method name="set_sleep_state" > <argument index="0" name="enabled" type="bool"> </argument> @@ -18160,7 +20047,7 @@ </description> </method> <method name="get_step" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -18196,33 +20083,73 @@ </description> <methods> <method name="intersect_ray" > + <return type="Dictionary"> + </return> <argument index="0" name="from" type="Vector3"> </argument> <argument index="1" name="to" type="Vector3"> </argument> <argument index="2" name="exclude" type="Array" default="Array()"> </argument> - <argument index="3" name="umask" type="int" default="0"> + <argument index="3" name="layer_mask" type="int" default="2147483647"> + </argument> + <argument index="4" name="type_mask" type="int" default="15"> </argument> <description> </description> </method> <method name="intersect_shape" > - <argument index="0" name="shape" type="RID"> + <return type="Array"> + </return> + <argument index="0" name="shape" type="PhysicsShapeQueryParameters"> </argument> - <argument index="1" name="xform" type="Transform"> + <argument index="1" name="max_results" type="int" default="32"> </argument> - <argument index="2" name="result_max" type="int"> + <description> + </description> + </method> + <method name="cast_motion" > + <return type="Array"> + </return> + <argument index="0" name="shape" type="PhysicsShapeQueryParameters"> </argument> - <argument index="3" name="exclude" type="Array" default="Array()"> + <argument index="1" name="motion" type="Vector3"> </argument> - <argument index="4" name="umask" type="int" default="0"> + <description> + </description> + </method> + <method name="collide_shape" > + <return type="Array"> + </return> + <argument index="0" name="shape" type="PhysicsShapeQueryParameters"> + </argument> + <argument index="1" name="max_results" type="int" default="32"> + </argument> + <description> + </description> + </method> + <method name="get_rest_info" > + <return type="Dictionary"> + </return> + <argument index="0" name="shape" type="PhysicsShapeQueryParameters"> </argument> <description> </description> </method> </methods> <constants> + <constant name="TYPE_MASK_STATIC_BODY" value="1"> + </constant> + <constant name="TYPE_MASK_KINEMATIC_BODY" value="2"> + </constant> + <constant name="TYPE_MASK_RIGID_BODY" value="4"> + </constant> + <constant name="TYPE_MASK_CHARACTER_BODY" value="8"> + </constant> + <constant name="TYPE_MASK_AREA" value="16"> + </constant> + <constant name="TYPE_MASK_COLLISION" value="15"> + </constant> </constants> </class> <class name="PhysicsServer" inherits="Object" category="Core"> @@ -18288,13 +20215,13 @@ </argument> <argument index="1" name="param" type="int"> </argument> - <argument index="2" name="value" type="real"> + <argument index="2" name="value" type="float"> </argument> <description> </description> </method> <method name="space_get_param" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="space" type="RID"> </argument> @@ -18352,20 +20279,20 @@ <method name="area_add_shape" > <argument index="0" name="area" type="RID"> </argument> - <argument index="1" name="shape" type="int"> + <argument index="1" name="shape" type="RID"> </argument> - <argument index="2" name="transform" type="RID" default="Transform()"> + <argument index="2" name="transform" type="Transform" default="Transform()"> </argument> <description> </description> </method> - <method name="area_set_shape" qualifiers="const" > - <return type="RID"> - </return> + <method name="area_set_shape" > <argument index="0" name="area" type="RID"> </argument> <argument index="1" name="shape_idx" type="int"> </argument> + <argument index="2" name="shape" type="RID"> + </argument> <description> </description> </method> @@ -18421,19 +20348,21 @@ <description> </description> </method> - <method name="area_set_param" qualifiers="const" > + <method name="area_set_param" > <argument index="0" name="area" type="RID"> </argument> <argument index="1" name="param" type="int"> </argument> + <argument index="2" name="value" type="var"> + </argument> <description> </description> </method> - <method name="area_set_transform" qualifiers="const" > - <return type="Transform"> - </return> + <method name="area_set_transform" > <argument index="0" name="area" type="RID"> </argument> + <argument index="1" name="transform" type="Transform"> + </argument> <description> </description> </method> @@ -18479,6 +20408,22 @@ <description> </description> </method> + <method name="area_set_ray_pickable" > + <argument index="0" name="area" type="RID"> + </argument> + <argument index="1" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="area_is_ray_pickable" qualifiers="const" > + <return type="bool"> + </return> + <argument index="0" name="area" type="RID"> + </argument> + <description> + </description> + </method> <method name="body_create" > <return type="RID"> </return> @@ -18632,13 +20577,13 @@ </argument> <argument index="1" name="param" type="int"> </argument> - <argument index="2" name="value" type="real"> + <argument index="2" name="value" type="float"> </argument> <description> </description> </method> <method name="body_get_param" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="body" type="RID"> </argument> @@ -18647,14 +20592,6 @@ <description> </description> </method> - <method name="body_static_simulate_motion" > - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="new_xform" type="Transform"> - </argument> - <description> - </description> - </method> <method name="body_set_state" > <argument index="0" name="body" type="RID"> </argument> @@ -18691,6 +20628,22 @@ <description> </description> </method> + <method name="body_set_axis_lock" > + <argument index="0" name="body" type="RID"> + </argument> + <argument index="1" name="axis" type="int"> + </argument> + <description> + </description> + </method> + <method name="body_get_axis_lock" qualifiers="const" > + <return type="int"> + </return> + <argument index="0" name="body" type="RID"> + </argument> + <description> + </description> + </method> <method name="body_add_collision_exception" > <argument index="0" name="body" type="RID"> </argument> @@ -18751,6 +20704,296 @@ <description> </description> </method> + <method name="body_set_ray_pickable" > + <argument index="0" name="body" type="RID"> + </argument> + <argument index="1" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="body_is_ray_pickable" qualifiers="const" > + <return type="bool"> + </return> + <argument index="0" name="body" type="RID"> + </argument> + <description> + </description> + </method> + <method name="joint_create_pin" > + <return type="RID"> + </return> + <argument index="0" name="body_A" type="RID"> + </argument> + <argument index="1" name="local_A" type="Vector3"> + </argument> + <argument index="2" name="body_B" type="RID"> + </argument> + <argument index="3" name="local_B" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="pin_joint_set_param" > + <argument index="0" name="joint" type="RID"> + </argument> + <argument index="1" name="param" type="int"> + </argument> + <argument index="2" name="value" type="float"> + </argument> + <description> + </description> + </method> + <method name="pin_joint_get_param" qualifiers="const" > + <return type="float"> + </return> + <argument index="0" name="joint" type="RID"> + </argument> + <argument index="1" name="param" type="int"> + </argument> + <description> + </description> + </method> + <method name="pin_joint_set_local_A" > + <argument index="0" name="joint" type="RID"> + </argument> + <argument index="1" name="local_A" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="pin_joint_get_local_A" qualifiers="const" > + <return type="Vector3"> + </return> + <argument index="0" name="joint" type="RID"> + </argument> + <description> + </description> + </method> + <method name="pin_joint_set_local_B" > + <argument index="0" name="joint" type="RID"> + </argument> + <argument index="1" name="local_B" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="pin_joint_get_local_B" qualifiers="const" > + <return type="Vector3"> + </return> + <argument index="0" name="joint" type="RID"> + </argument> + <description> + </description> + </method> + <method name="joint_create_hinge" > + <return type="RID"> + </return> + <argument index="0" name="body_A" type="RID"> + </argument> + <argument index="1" name="hinge_A" type="Transform"> + </argument> + <argument index="2" name="body_B" type="RID"> + </argument> + <argument index="3" name="hinge_B" type="Transform"> + </argument> + <description> + </description> + </method> + <method name="hinge_joint_set_param" > + <argument index="0" name="joint" type="RID"> + </argument> + <argument index="1" name="param" type="int"> + </argument> + <argument index="2" name="value" type="float"> + </argument> + <description> + </description> + </method> + <method name="hinge_joint_get_param" qualifiers="const" > + <return type="float"> + </return> + <argument index="0" name="joint" type="RID"> + </argument> + <argument index="1" name="param" type="int"> + </argument> + <description> + </description> + </method> + <method name="hinge_joint_set_flag" > + <argument index="0" name="joint" type="RID"> + </argument> + <argument index="1" name="flag" type="int"> + </argument> + <argument index="2" name="enabled" type="bool"> + </argument> + <description> + </description> + </method> + <method name="hinge_joint_get_flag" qualifiers="const" > + <return type="bool"> + </return> + <argument index="0" name="joint" type="RID"> + </argument> + <argument index="1" name="flag" type="int"> + </argument> + <description> + </description> + </method> + <method name="joint_create_slider" > + <return type="RID"> + </return> + <argument index="0" name="body_A" type="RID"> + </argument> + <argument index="1" name="local_ref_A" type="Transform"> + </argument> + <argument index="2" name="body_B" type="RID"> + </argument> + <argument index="3" name="local_ref_B" type="Transform"> + </argument> + <description> + </description> + </method> + <method name="slider_joint_set_param" > + <argument index="0" name="joint" type="RID"> + </argument> + <argument index="1" name="param" type="int"> + </argument> + <argument index="2" name="value" type="float"> + </argument> + <description> + </description> + </method> + <method name="slider_joint_get_param" qualifiers="const" > + <return type="float"> + </return> + <argument index="0" name="joint" type="RID"> + </argument> + <argument index="1" name="param" type="int"> + </argument> + <description> + </description> + </method> + <method name="joint_create_cone_twist" > + <return type="RID"> + </return> + <argument index="0" name="body_A" type="RID"> + </argument> + <argument index="1" name="local_ref_A" type="Transform"> + </argument> + <argument index="2" name="body_B" type="RID"> + </argument> + <argument index="3" name="local_ref_B" type="Transform"> + </argument> + <description> + </description> + </method> + <method name="cone_twist_joint_set_param" > + <argument index="0" name="joint" type="RID"> + </argument> + <argument index="1" name="param" type="int"> + </argument> + <argument index="2" name="value" type="float"> + </argument> + <description> + </description> + </method> + <method name="cone_twist_joint_get_param" qualifiers="const" > + <return type="float"> + </return> + <argument index="0" name="joint" type="RID"> + </argument> + <argument index="1" name="param" type="int"> + </argument> + <description> + </description> + </method> + <method name="joint_get_type" qualifiers="const" > + <return type="int"> + </return> + <argument index="0" name="joint" type="RID"> + </argument> + <description> + </description> + </method> + <method name="joint_set_solver_priority" > + <argument index="0" name="joint" type="RID"> + </argument> + <argument index="1" name="priority" type="int"> + </argument> + <description> + </description> + </method> + <method name="joint_get_solver_priority" qualifiers="const" > + <return type="int"> + </return> + <argument index="0" name="joint" type="RID"> + </argument> + <description> + </description> + </method> + <method name="joint_create_generic_6dof" > + <return type="RID"> + </return> + <argument index="0" name="body_A" type="RID"> + </argument> + <argument index="1" name="local_ref_A" type="Transform"> + </argument> + <argument index="2" name="body_B" type="RID"> + </argument> + <argument index="3" name="local_ref_B" type="Transform"> + </argument> + <description> + </description> + </method> + <method name="generic_6dof_joint_set_param" > + <argument index="0" name="joint" type="RID"> + </argument> + <argument index="1" name="axis" type="int"> + </argument> + <argument index="2" name="param" type="int"> + </argument> + <argument index="3" name="value" type="float"> + </argument> + <description> + </description> + </method> + <method name="generic_6dof_joint_get_param" > + <return type="float"> + </return> + <argument index="0" name="joint" type="RID"> + </argument> + <argument index="1" name="axis" type="int"> + </argument> + <argument index="2" name="param" type="int"> + </argument> + <description> + </description> + </method> + <method name="generic_6dof_joint_set_flag" > + <argument index="0" name="joint" type="RID"> + </argument> + <argument index="1" name="axis" type="int"> + </argument> + <argument index="2" name="flag" type="int"> + </argument> + <argument index="3" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="generic_6dof_joint_get_flag" > + <return type="bool"> + </return> + <argument index="0" name="joint" type="RID"> + </argument> + <argument index="1" name="axis" type="int"> + </argument> + <argument index="2" name="flag" type="int"> + </argument> + <description> + </description> + </method> <method name="free" > <argument index="0" name="rid" type="RID"> </argument> @@ -18763,8 +21006,142 @@ <description> </description> </method> + <method name="get_process_info" > + <return type="int"> + </return> + <argument index="0" name="arg0" type="int"> + </argument> + <description> + </description> + </method> </methods> <constants> + <constant name="JOINT_PIN" value="0"> + </constant> + <constant name="JOINT_HINGE" value="1"> + </constant> + <constant name="JOINT_SLIDER" value="2"> + </constant> + <constant name="JOINT_CONE_TWIST" value="3"> + </constant> + <constant name="JOINT_6DOF" value="4"> + </constant> + <constant name="PIN_JOINT_BIAS" value="0"> + </constant> + <constant name="PIN_JOINT_DAMPING" value="1"> + </constant> + <constant name="PIN_JOINT_IMPULSE_CLAMP" value="2"> + </constant> + <constant name="HINGE_JOINT_BIAS" value="0"> + </constant> + <constant name="HINGE_JOINT_LIMIT_UPPER" value="1"> + </constant> + <constant name="HINGE_JOINT_LIMIT_LOWER" value="2"> + </constant> + <constant name="HINGE_JOINT_LIMIT_BIAS" value="3"> + </constant> + <constant name="HINGE_JOINT_LIMIT_SOFTNESS" value="4"> + </constant> + <constant name="HINGE_JOINT_LIMIT_RELAXATION" value="5"> + </constant> + <constant name="HINGE_JOINT_MOTOR_TARGET_VELOCITY" value="6"> + </constant> + <constant name="HINGE_JOINT_MOTOR_MAX_IMPULSE" value="7"> + </constant> + <constant name="HINGE_JOINT_FLAG_USE_LIMIT" value="0"> + </constant> + <constant name="HINGE_JOINT_FLAG_ENABLE_MOTOR" value="1"> + </constant> + <constant name="SLIDER_JOINT_LINEAR_LIMIT_UPPER" value="0"> + </constant> + <constant name="SLIDER_JOINT_LINEAR_LIMIT_LOWER" value="1"> + </constant> + <constant name="SLIDER_JOINT_LINEAR_LIMIT_SOFTNESS" value="2"> + </constant> + <constant name="SLIDER_JOINT_LINEAR_LIMIT_RESTITUTION" value="3"> + </constant> + <constant name="SLIDER_JOINT_LINEAR_LIMIT_DAMPING" value="4"> + </constant> + <constant name="SLIDER_JOINT_LINEAR_MOTION_SOFTNESS" value="5"> + </constant> + <constant name="SLIDER_JOINT_LINEAR_MOTION_RESTITUTION" value="6"> + </constant> + <constant name="SLIDER_JOINT_LINEAR_MOTION_DAMPING" value="7"> + </constant> + <constant name="SLIDER_JOINT_LINEAR_ORTHOGONAL_SOFTNESS" value="8"> + </constant> + <constant name="SLIDER_JOINT_LINEAR_ORTHOGONAL_RESTITUTION" value="9"> + </constant> + <constant name="SLIDER_JOINT_LINEAR_ORTHOGONAL_DAMPING" value="10"> + </constant> + <constant name="SLIDER_JOINT_ANGULAR_LIMIT_UPPER" value="11"> + </constant> + <constant name="SLIDER_JOINT_ANGULAR_LIMIT_LOWER" value="12"> + </constant> + <constant name="SLIDER_JOINT_ANGULAR_LIMIT_SOFTNESS" value="13"> + </constant> + <constant name="SLIDER_JOINT_ANGULAR_LIMIT_RESTITUTION" value="14"> + </constant> + <constant name="SLIDER_JOINT_ANGULAR_LIMIT_DAMPING" value="15"> + </constant> + <constant name="SLIDER_JOINT_ANGULAR_MOTION_SOFTNESS" value="16"> + </constant> + <constant name="SLIDER_JOINT_ANGULAR_MOTION_RESTITUTION" value="17"> + </constant> + <constant name="SLIDER_JOINT_ANGULAR_MOTION_DAMPING" value="18"> + </constant> + <constant name="SLIDER_JOINT_ANGULAR_ORTHOGONAL_SOFTNESS" value="19"> + </constant> + <constant name="SLIDER_JOINT_ANGULAR_ORTHOGONAL_RESTITUTION" value="20"> + </constant> + <constant name="SLIDER_JOINT_ANGULAR_ORTHOGONAL_DAMPING" value="21"> + </constant> + <constant name="SLIDER_JOINT_MAX" value="22"> + </constant> + <constant name="CONE_TWIST_JOINT_SWING_SPAN" value="0"> + </constant> + <constant name="CONE_TWIST_JOINT_TWIST_SPAN" value="1"> + </constant> + <constant name="CONE_TWIST_JOINT_BIAS" value="2"> + </constant> + <constant name="CONE_TWIST_JOINT_SOFTNESS" value="3"> + </constant> + <constant name="CONE_TWIST_JOINT_RELAXATION" value="4"> + </constant> + <constant name="G6DOF_JOINT_LINEAR_LOWER_LIMIT" value="0"> + </constant> + <constant name="G6DOF_JOINT_LINEAR_UPPER_LIMIT" value="1"> + </constant> + <constant name="G6DOF_JOINT_LINEAR_LIMIT_SOFTNESS" value="2"> + </constant> + <constant name="G6DOF_JOINT_LINEAR_RESTITUTION" value="3"> + </constant> + <constant name="G6DOF_JOINT_LINEAR_DAMPING" value="4"> + </constant> + <constant name="G6DOF_JOINT_ANGULAR_LOWER_LIMIT" value="5"> + </constant> + <constant name="G6DOF_JOINT_ANGULAR_UPPER_LIMIT" value="6"> + </constant> + <constant name="G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS" value="7"> + </constant> + <constant name="G6DOF_JOINT_ANGULAR_DAMPING" value="8"> + </constant> + <constant name="G6DOF_JOINT_ANGULAR_RESTITUTION" value="9"> + </constant> + <constant name="G6DOF_JOINT_ANGULAR_FORCE_LIMIT" value="10"> + </constant> + <constant name="G6DOF_JOINT_ANGULAR_ERP" value="11"> + </constant> + <constant name="G6DOF_JOINT_ANGULAR_MOTOR_TARGET_VELOCITY" value="12"> + </constant> + <constant name="G6DOF_JOINT_ANGULAR_MOTOR_FORCE_LIMIT" value="13"> + </constant> + <constant name="G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT" value="0"> + </constant> + <constant name="G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT" value="1"> + </constant> + <constant name="G6DOF_JOINT_FLAG_ENABLE_MOTOR" value="2"> + </constant> <constant name="SHAPE_PLANE" value="0"> </constant> <constant name="SHAPE_RAY" value="1"> @@ -18831,6 +21208,12 @@ </constant> <constant name="AREA_BODY_REMOVED" value="1"> </constant> + <constant name="INFO_ACTIVE_OBJECTS" value="0"> + </constant> + <constant name="INFO_COLLISION_PAIRS" value="1"> + </constant> + <constant name="INFO_ISLAND_COUNT" value="2"> + </constant> </constants> </class> <class name="PhysicsServerSW" inherits="PhysicsServer" category="Core"> @@ -18843,6 +21226,94 @@ <constants> </constants> </class> +<class name="PhysicsShapeQueryParameters" inherits="Reference" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_shape" > + <argument index="0" name="shape" type="Shape"> + </argument> + <description> + </description> + </method> + <method name="set_shape_rid" > + <argument index="0" name="shape" type="RID"> + </argument> + <description> + </description> + </method> + <method name="get_shape_rid" qualifiers="const" > + <return type="RID"> + </return> + <description> + </description> + </method> + <method name="set_transform" > + <argument index="0" name="transform" type="Transform"> + </argument> + <description> + </description> + </method> + <method name="get_transform" qualifiers="const" > + <return type="Transform"> + </return> + <description> + </description> + </method> + <method name="set_margin" > + <argument index="0" name="margin" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_margin" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_layer_mask" > + <argument index="0" name="layer_mask" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_layer_mask" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_object_type_mask" > + <argument index="0" name="object_type_mask" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_object_type_mask" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_exclude" > + <argument index="0" name="exclude" type="Array"> + </argument> + <description> + </description> + </method> + <method name="get_exclude" qualifiers="const" > + <return type="Array"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> <class name="PhysicsShapeQueryResult" inherits="Reference" category="Core"> <brief_description> Result of a shape query in Physics2DServer. @@ -18892,6 +21363,38 @@ <constants> </constants> </class> +<class name="PinJoint" inherits="Joint" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_param" > + <argument index="0" name="param" type="int"> + </argument> + <argument index="1" name="value" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_param" qualifiers="const" > + <return type="float"> + </return> + <argument index="0" name="param" type="int"> + </argument> + <description> + </description> + </method> + </methods> + <constants> + <constant name="PARAM_BIAS" value="0"> + </constant> + <constant name="PARAM_DAMPING" value="1"> + </constant> + <constant name="PARAM_IMPULSE_CLAMP" value="2"> + </constant> + </constants> +</class> <class name="PinJoint2D" inherits="Joint2D" category="Core"> <brief_description> Pin Joint for 2D Shapes. @@ -18919,7 +21422,7 @@ </description> </method> <method name="distance_to" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="point" type="Vector3"> </argument> @@ -18937,7 +21440,7 @@ </return> <argument index="0" name="point" type="Vector3"> </argument> - <argument index="1" name="epsilon" type="real" default="0.00001"> + <argument index="1" name="epsilon" type="float" default="0.00001"> </argument> <description> Returns true if "p" is inside the plane (by a very minimum treshold). @@ -19002,13 +21505,13 @@ </description> </method> <method name="Plane" > - <argument index="0" name="a" type="real"> + <argument index="0" name="a" type="float"> </argument> - <argument index="1" name="b" type="real"> + <argument index="1" name="b" type="float"> </argument> - <argument index="2" name="c" type="real"> + <argument index="2" name="c" type="float"> </argument> - <argument index="3" name="d" type="real"> + <argument index="3" name="d" type="float"> </argument> <description> </description> @@ -19026,7 +21529,7 @@ <method name="Plane" > <argument index="0" name="normal" type="Vector3"> </argument> - <argument index="1" name="d" type="real"> + <argument index="1" name="d" type="float"> </argument> <description> </description> @@ -19035,13 +21538,13 @@ <members> <member name="normal" type="Vector3"> </member> - <member name="x" type="real"> + <member name="x" type="float"> </member> - <member name="y" type="real"> + <member name="y" type="float"> </member> - <member name="z" type="real"> + <member name="z" type="float"> </member> - <member name="d" type="real"> + <member name="d" type="float"> </member> </members> <constants> @@ -19069,6 +21572,224 @@ <constants> </constants> </class> +<class name="Polygon2D" inherits="Node2D" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_polygon" > + <argument index="0" name="polygon" type="Vector2Array"> + </argument> + <description> + </description> + </method> + <method name="get_polygon" qualifiers="const" > + <return type="Vector2Array"> + </return> + <description> + </description> + </method> + <method name="set_uv" > + <argument index="0" name="uv" type="Vector2Array"> + </argument> + <description> + </description> + </method> + <method name="get_uv" qualifiers="const" > + <return type="Vector2Array"> + </return> + <description> + </description> + </method> + <method name="set_color" > + <argument index="0" name="color" type="Color"> + </argument> + <description> + </description> + </method> + <method name="get_color" qualifiers="const" > + <return type="Color"> + </return> + <description> + </description> + </method> + <method name="set_texture" > + <argument index="0" name="texture" type="Object"> + </argument> + <description> + </description> + </method> + <method name="get_texture" qualifiers="const" > + <return type="Object"> + </return> + <description> + </description> + </method> + <method name="set_texture_offset" > + <argument index="0" name="texture_offset" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="get_texture_offset" qualifiers="const" > + <return type="Vector2"> + </return> + <description> + </description> + </method> + <method name="set_texture_rotation" > + <argument index="0" name="texture_rotation" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_texture_rotation" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_texture_scale" > + <argument index="0" name="texture_scale" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="get_texture_scale" qualifiers="const" > + <return type="Vector2"> + </return> + <description> + </description> + </method> + <method name="set_texture_repeat" > + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="get_texture_repeat" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_invert" > + <argument index="0" name="invert" type="bool"> + </argument> + <description> + </description> + </method> + <method name="get_invert" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_invert_border" > + <argument index="0" name="invert_border" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_invert_border" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_offset" > + <argument index="0" name="offset" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="get_offset" qualifiers="const" > + <return type="Vector2"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> +<class name="PolygonPathFinder" inherits="Resource" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="setup" > + <argument index="0" name="points" type="Vector2Array"> + </argument> + <argument index="1" name="connections" type="IntArray"> + </argument> + <description> + </description> + </method> + <method name="find_path" > + <return type="Vector2Array"> + </return> + <argument index="0" name="from" type="Vector2"> + </argument> + <argument index="1" name="to" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="get_intersections" qualifiers="const" > + <return type="Vector2Array"> + </return> + <argument index="0" name="from" type="Vector2"> + </argument> + <argument index="1" name="to" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="get_closest_point" qualifiers="const" > + <return type="Vector2"> + </return> + <argument index="0" name="point" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="is_point_inside" qualifiers="const" > + <return type="bool"> + </return> + <argument index="0" name="point" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="set_point_penalty" > + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="penalty" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_point_penalty" qualifiers="const" > + <return type="float"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_bounds" qualifiers="const" > + <return type="Rect2"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> <class name="Popup" inherits="Control" category="Core"> <brief_description> Base container control for popups and dialogs. @@ -19085,7 +21806,7 @@ </description> </method> <method name="popup_centered_ratio" > - <argument index="0" name="ratio" type="real" default="0.75"> + <argument index="0" name="ratio" type="float" default="0.75"> </argument> <description> Popup (show the control in modal form) in the center of the screen, scalled at a ratio of size of the screen. @@ -19116,6 +21837,10 @@ </method> </methods> <signals> + <signal name="popup_hide"> + <description> + </description> + </signal> <signal name="about_to_show"> <description> This signal is emitted when a popup is about to be shown. (often used in [PopupMenu] for clearing the list of options and creating a new one according to the current context). @@ -19125,6 +21850,8 @@ <constants> <constant name="NOTIFICATION_POST_POPUP" value="80"> </constant> + <constant name="NOTIFICATION_POPUP_HIDE" value="81"> + </constant> </constants> </class> <class name="PopupDialog" inherits="Popup" category="Core"> @@ -19197,7 +21924,7 @@ <method name="add_submenu_item" > <argument index="0" name="label" type="String"> </argument> - <argument index="1" name="submenu" type="int"> + <argument index="1" name="submenu" type="String"> </argument> <argument index="2" name="id" type="int" default="-1"> </argument> @@ -19416,6 +22143,36 @@ </signals> <constants> </constants> + <theme_items> + <theme_item name="vseparation" type="int"> + </theme_item> + <theme_item name="hseparation" type="int"> + </theme_item> + <theme_item name="font_color_disabled" type="Color"> + </theme_item> + <theme_item name="font_color_accel" type="Color"> + </theme_item> + <theme_item name="font_color" type="Color"> + </theme_item> + <theme_item name="font_color_hover" type="Color"> + </theme_item> + <theme_item name="submenu" type="Texture"> + </theme_item> + <theme_item name="checked" type="Texture"> + </theme_item> + <theme_item name="unchecked" type="Texture"> + </theme_item> + <theme_item name="font" type="Font"> + </theme_item> + <theme_item name="hover" type="StyleBox"> + </theme_item> + <theme_item name="panel_disabled" type="StyleBox"> + </theme_item> + <theme_item name="panel" type="StyleBox"> + </theme_item> + <theme_item name="separator" type="StyleBox"> + </theme_item> + </theme_items> </class> <class name="PopupPanel" inherits="Popup" category="Core"> <brief_description> @@ -19427,6 +22184,10 @@ </methods> <constants> </constants> + <theme_items> + <theme_item name="panel" type="StyleBox"> + </theme_item> + </theme_items> </class> <class name="Portal" inherits="VisualInstance" category="Core"> <brief_description> @@ -19466,14 +22227,14 @@ </description> </method> <method name="set_disable_distance" > - <argument index="0" name="distance" type="real"> + <argument index="0" name="distance" type="float"> </argument> <description> Set the distance threshold for disabling the portal. Every time that the portal goes beyond "distance", it disables itself, becoming the opaque color (see [method set_disabled_color]). </description> </method> <method name="get_disable_distance" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the distance threshold for disabling the portal. Every time that the portal goes beyond "distance", it disables itself, becoming the opaque color (see [method set_disabled_color]). @@ -19494,14 +22255,14 @@ </description> </method> <method name="set_connect_range" > - <argument index="0" name="range" type="real"> + <argument index="0" name="range" type="float"> </argument> <description> Set the range for auto-connecting two portals from different rooms sharing the same space. </description> </method> <method name="get_connect_range" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the range for auto-connecting two portals from different rooms sharing the same space. @@ -19543,9 +22304,33 @@ General purpose progres bar. Shows fill percentage from right to left. </description> <methods> + <method name="set_percent_visible" > + <argument index="0" name="visible" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_percent_visible" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> </methods> <constants> </constants> + <theme_items> + <theme_item name="font_color" type="Color"> + </theme_item> + <theme_item name="font_color_shadow" type="Color"> + </theme_item> + <theme_item name="font" type="Font"> + </theme_item> + <theme_item name="fg" type="StyleBox"> + </theme_item> + <theme_item name="bg" type="StyleBox"> + </theme_item> + </theme_items> </class> <class name="ProximityGroup" inherits="Spatial" category="Core"> <brief_description> @@ -19676,13 +22461,13 @@ </argument> <argument index="2" name="post_b" type="Quat"> </argument> - <argument index="3" name="t" type="real"> + <argument index="3" name="t" type="float"> </argument> <description> </description> </method> <method name="dot" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="b" type="Quat"> </argument> @@ -19698,14 +22483,14 @@ </description> </method> <method name="length" > - <return type="real"> + <return type="float"> </return> <description> Returns the length of the quaternion. </description> </method> <method name="length_squared" > - <return type="real"> + <return type="float"> </return> <description> Returns the length of the quaternion, minus the square root. @@ -19723,7 +22508,7 @@ </return> <argument index="0" name="b" type="Quat"> </argument> - <argument index="1" name="t" type="real"> + <argument index="1" name="t" type="float"> </argument> <description> Perform a spherical-linear interpolation with another quaternion. @@ -19734,19 +22519,19 @@ </return> <argument index="0" name="b" type="Quat"> </argument> - <argument index="1" name="t" type="real"> + <argument index="1" name="t" type="float"> </argument> <description> </description> </method> <method name="Quat" > - <argument index="0" name="x" type="real"> + <argument index="0" name="x" type="float"> </argument> - <argument index="1" name="y" type="real"> + <argument index="1" name="y" type="float"> </argument> - <argument index="2" name="z" type="real"> + <argument index="2" name="z" type="float"> </argument> - <argument index="3" name="w" type="real"> + <argument index="3" name="w" type="float"> </argument> <description> </description> @@ -19759,13 +22544,13 @@ </method> </methods> <members> - <member name="x" type="real"> + <member name="x" type="float"> </member> - <member name="y" type="real"> + <member name="y" type="float"> </member> - <member name="z" type="real"> + <member name="z" type="float"> </member> - <member name="w" type="real"> + <member name="w" type="float"> </member> </members> <constants> @@ -19802,48 +22587,48 @@ </description> <methods> <method name="get_val" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the current value. </description> </method> <method name="get_value" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="get_min" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the minimum value. </description> </method> <method name="get_max" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the maximum value. </description> </method> <method name="get_step" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the stepping, if step is 0, stepping is disabled. </description> </method> <method name="get_page" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the page size, if page is 0, paging is disabled. </description> </method> <method name="get_unit_value" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return value mapped to 0 to 1 (unit) range. @@ -19856,46 +22641,46 @@ </description> </method> <method name="set_val" > - <argument index="0" name="value" type="real"> + <argument index="0" name="value" type="float"> </argument> <description> </description> </method> <method name="set_value" > - <argument index="0" name="value" type="real"> + <argument index="0" name="value" type="float"> </argument> <description> </description> </method> <method name="set_min" > - <argument index="0" name="minimum" type="real"> + <argument index="0" name="minimum" type="float"> </argument> <description> Set minimum value, clamped range value to it if it"apos;s less. </description> </method> <method name="set_max" > - <argument index="0" name="maximum" type="real"> + <argument index="0" name="maximum" type="float"> </argument> <description> </description> </method> <method name="set_step" > - <argument index="0" name="step" type="real"> + <argument index="0" name="step" type="float"> </argument> <description> Set step value. If step is 0, stepping will be disabled. </description> </method> <method name="set_page" > - <argument index="0" name="pagesize" type="real"> + <argument index="0" name="pagesize" type="float"> </argument> <description> Set page size. Page is mainly used for scrollbars or anything that controls text scrolling. </description> </method> <method name="set_unit_value" > - <argument index="0" name="value" type="real"> + <argument index="0" name="value" type="float"> </argument> <description> Set value mapped to 0 to 1 (unit) range, it will then be converted to the actual value within min and max. @@ -19932,7 +22717,7 @@ </methods> <signals> <signal name="value_changed"> - <argument index="0" name="value" type="real"> + <argument index="0" name="value" type="float"> </argument> <description> This signal is emitted when value changes. @@ -20135,6 +22920,46 @@ <description> </description> </method> + <method name="add_exception_rid" > + <argument index="0" name="rid" type="RID"> + </argument> + <description> + </description> + </method> + <method name="add_exception" > + <argument index="0" name="node" type="Object"> + </argument> + <description> + </description> + </method> + <method name="remove_exception_rid" > + <argument index="0" name="rid" type="RID"> + </argument> + <description> + </description> + </method> + <method name="remove_exception" > + <argument index="0" name="node" type="Object"> + </argument> + <description> + </description> + </method> + <method name="clear_exceptions" > + <description> + </description> + </method> + <method name="set_layer_mask" > + <argument index="0" name="mask" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_layer_mask" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> </methods> <constants> </constants> @@ -20146,13 +22971,13 @@ </description> <methods> <method name="set_length" > - <argument index="0" name="length" type="real"> + <argument index="0" name="length" type="float"> </argument> <description> </description> </method> <method name="get_length" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -20170,13 +22995,13 @@ </description> <methods> <method name="set_length" > - <argument index="0" name="length" type="real"> + <argument index="0" name="length" type="float"> </argument> <description> </description> </method> <method name="get_length" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -20194,7 +23019,7 @@ </description> <methods> <method name="get" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="idx" type="int"> </argument> @@ -20202,7 +23027,7 @@ </description> </method> <method name="push_back" > - <argument index="0" name="value" type="real"> + <argument index="0" name="value" type="float"> </argument> <description> </description> @@ -20216,7 +23041,7 @@ <method name="set" > <argument index="0" name="idx" type="int"> </argument> - <argument index="1" name="value" type="real"> + <argument index="1" name="value" type="float"> </argument> <description> </description> @@ -20268,7 +23093,7 @@ </description> </method> <method name="get_area" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -20276,7 +23101,7 @@ <method name="grow" > <return type="Rect2"> </return> - <argument index="0" name="by" type="real"> + <argument index="0" name="by" type="float"> </argument> <description> </description> @@ -20320,13 +23145,13 @@ </description> </method> <method name="Rect2" > - <argument index="0" name="x" type="real"> + <argument index="0" name="x" type="float"> </argument> - <argument index="1" name="y" type="real"> + <argument index="1" name="y" type="float"> </argument> - <argument index="2" name="width" type="real"> + <argument index="2" name="width" type="float"> </argument> - <argument index="3" name="height" type="real"> + <argument index="3" name="height" type="float"> </argument> <description> </description> @@ -20410,6 +23235,10 @@ </methods> <constants> </constants> + <theme_items> + <theme_item name="border" type="StyleBox"> + </theme_item> + </theme_items> </class> <class name="RegEx" inherits="Reference" category="Core"> <brief_description> @@ -20494,6 +23323,12 @@ Set the path of the resource. This is useful mainly for editors when saving/loading, and shouldn"apos;t be changed by anything else. </description> </method> + <method name="take_over_path" > + <argument index="0" name="path" type="String"> + </argument> + <description> + </description> + </method> <method name="get_path" qualifiers="const" > <return type="String"> </return> @@ -20836,6 +23671,18 @@ </method> </methods> <constants> + <constant name="FLAG_RELATIVE_PATHS" value="1"> + </constant> + <constant name="FLAG_BUNDLE_RESOURCES" value="2"> + </constant> + <constant name="FLAG_CHANGE_PATH" value="4"> + </constant> + <constant name="FLAG_OMIT_EDITOR_PROPERTIES" value="8"> + </constant> + <constant name="FLAG_SAVE_BIG_ENDIAN" value="16"> + </constant> + <constant name="FLAG_COMPRESS" value="32"> + </constant> </constants> </class> <class name="RichTextLabel" inherits="Control" category="Core"> @@ -20972,6 +23819,22 @@ Return true if selecting the text inside this richtext is allowed. </description> </method> + <method name="parse_bbcode" > + <return type="int"> + </return> + <argument index="0" name="bbcode" type="String"> + </argument> + <description> + </description> + </method> + <method name="append_bbcode" > + <return type="int"> + </return> + <argument index="0" name="bbcode" type="String"> + </argument> + <description> + </description> + </method> </methods> <signals> <signal name="meta_clicked"> @@ -21019,6 +23882,20 @@ <constant name="ITEM_META" value="10"> </constant> </constants> + <theme_items> + <theme_item name="line_separation" type="int"> + </theme_item> + <theme_item name="default_color" type="Color"> + </theme_item> + <theme_item name="selection_color" type="Color"> + </theme_item> + <theme_item name="font_color_selected" type="Color"> + </theme_item> + <theme_item name="default_font" type="Font"> + </theme_item> + <theme_item name="focus" type="StyleBox"> + </theme_item> + </theme_items> </class> <class name="RigidBody" inherits="PhysicsBody" category="Core"> <brief_description> @@ -21045,49 +23922,49 @@ </description> </method> <method name="set_mass" > - <argument index="0" name="mass" type="real"> + <argument index="0" name="mass" type="float"> </argument> <description> </description> </method> <method name="get_mass" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="set_weight" > - <argument index="0" name="weight" type="real"> + <argument index="0" name="weight" type="float"> </argument> <description> </description> </method> <method name="get_weight" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="set_friction" > - <argument index="0" name="friction" type="real"> + <argument index="0" name="friction" type="float"> </argument> <description> </description> </method> <method name="get_friction" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="set_bounce" > - <argument index="0" name="bounce" type="real"> + <argument index="0" name="bounce" type="float"> </argument> <description> </description> </method> <method name="get_bounce" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -21178,13 +24055,13 @@ <description> </description> </method> - <method name="set_active" > - <argument index="0" name="active" type="bool"> + <method name="set_sleeping" > + <argument index="0" name="sleeping" type="bool"> </argument> <description> </description> </method> - <method name="is_active" qualifiers="const" > + <method name="is_sleeping" qualifiers="const" > <return type="bool"> </return> <description> @@ -21202,6 +24079,18 @@ <description> </description> </method> + <method name="set_axis_lock" > + <argument index="0" name="axis_lock" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_axis_lock" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> </methods> <signals> <signal name="body_enter"> @@ -21284,56 +24173,56 @@ </description> </method> <method name="set_mass" > - <argument index="0" name="mass" type="real"> + <argument index="0" name="mass" type="float"> </argument> <description> Set the body mass. </description> </method> <method name="get_mass" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the body mass. </description> </method> <method name="set_weight" > - <argument index="0" name="weight" type="real"> + <argument index="0" name="weight" type="float"> </argument> <description> Set the body mass given standard earth-weight (gravity 9.8). Not really useful for 2D since most measuers for this node are in pixels. </description> </method> <method name="get_weight" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the body mass given standard earth-weight (gravity 9.8). </description> </method> <method name="set_friction" > - <argument index="0" name="friction" type="real"> + <argument index="0" name="friction" type="float"> </argument> <description> Set the body friction, from 0 (friction less) to 1 (full friction). </description> </method> <method name="get_friction" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the body friction. </description> </method> <method name="set_bounce" > - <argument index="0" name="bounce" type="real"> + <argument index="0" name="bounce" type="float"> </argument> <description> Set the body bounciness, from 0 (no bounce) to 1 (bounce). </description> </method> <method name="get_bounce" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the body bouncyness. @@ -21354,14 +24243,14 @@ </description> </method> <method name="set_angular_velocity" > - <argument index="0" name="angular_velocity" type="real"> + <argument index="0" name="angular_velocity" type="float"> </argument> <description> Set the body angular velocity. Can be used sporadically, but[b] DONT SET THIS IN EVERY FRAME [/b], because physics may be running in another thread and definitely runs at a different granularity. Use [_integrate_forces] as your process loop if you want to have precise control of the body state. </description> </method> <method name="get_angular_velocity" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the body angular velocity. This changes by physics granularity. See [set_angular_velocity]. @@ -21449,18 +24338,16 @@ <description> </description> </method> - <method name="set_active" > - <argument index="0" name="active" type="bool"> + <method name="set_sleeping" > + <argument index="0" name="sleeping" type="bool"> </argument> <description> - Change the body state between sleeping/active states. As a note, static bodies can never be active. </description> </method> - <method name="is_active" qualifiers="const" > + <method name="is_sleeping" qualifiers="const" > <return type="bool"> </return> <description> - Return the body state. As a note, static bodies are never active. </description> </method> <method name="set_can_sleep" > @@ -21799,13 +24686,13 @@ <method name="sample_set_volume_db" > <argument index="0" name="name" type="String"> </argument> - <argument index="1" name="db" type="real"> + <argument index="1" name="db" type="float"> </argument> <description> </description> </method> <method name="sample_get_volume_db" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="name" type="String"> </argument> @@ -21815,13 +24702,13 @@ <method name="sample_set_pitch_scale" > <argument index="0" name="name" type="String"> </argument> - <argument index="1" name="pitch" type="real"> + <argument index="1" name="pitch" type="float"> </argument> <description> </description> </method> <method name="sample_get_pitch_scale" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="name" type="String"> </argument> @@ -21900,7 +24787,7 @@ <method name="set_pitch_scale" > <argument index="0" name="voice" type="int"> </argument> - <argument index="1" name="ratio" type="real"> + <argument index="1" name="ratio" type="float"> </argument> <description> Scale the pitch (mix rate) of a voice by a ratio value "ratio". A ratio of 1.0 means the voice is unscaled. @@ -21909,7 +24796,7 @@ <method name="set_volume" > <argument index="0" name="voice" type="int"> </argument> - <argument index="1" name="nrg" type="real"> + <argument index="1" name="nrg" type="float"> </argument> <description> Set the volume of a voice, 0db is maximum volume (every about -6db, volume is reduced in half). "db" does in fact go from zero to negative. @@ -21918,7 +24805,7 @@ <method name="set_volume_db" > <argument index="0" name="voice" type="int"> </argument> - <argument index="1" name="nrg" type="real"> + <argument index="1" name="nrg" type="float"> </argument> <description> </description> @@ -21926,11 +24813,11 @@ <method name="set_pan" > <argument index="0" name="voice" type="int"> </argument> - <argument index="1" name="pan" type="real"> + <argument index="1" name="pan" type="float"> </argument> - <argument index="2" name="depth" type="real" default="0"> + <argument index="2" name="depth" type="float" default="0"> </argument> - <argument index="3" name="height" type="real" default="0"> + <argument index="3" name="height" type="float" default="0"> </argument> <description> Set the panning of a voice. Panning goes from -1 (left) to +1 (right). Optionally, if the hardware supports 3D sound, also set depth and height (also in range -1 to +1). @@ -21941,11 +24828,11 @@ </argument> <argument index="1" name="type" type="int"> </argument> - <argument index="2" name="cutoff_hz" type="real"> + <argument index="2" name="cutoff_hz" type="float"> </argument> - <argument index="3" name="resonance" type="real"> + <argument index="3" name="resonance" type="float"> </argument> - <argument index="4" name="gain" type="real" default="0"> + <argument index="4" name="gain" type="float" default="0"> </argument> <description> Set and enable a filter of a voice, with type "type" (see FILTER_* enum), cutoff (0 to 22khz) frequency and resonance (0+). @@ -21954,7 +24841,7 @@ <method name="set_chorus" > <argument index="0" name="voice" type="int"> </argument> - <argument index="1" name="send" type="real"> + <argument index="1" name="send" type="float"> </argument> <description> Set the chorus send level of a voice (0 to 1). For setting chorus parameters, see [AudioServer]. @@ -21965,7 +24852,7 @@ </argument> <argument index="1" name="room_type" type="int"> </argument> - <argument index="2" name="send" type="real"> + <argument index="2" name="send" type="float"> </argument> <description> Set the reverb send level and type of a voice (0 to 1). (see REVERB_* enum for type). @@ -21981,7 +24868,7 @@ </description> </method> <method name="get_pitch_scale" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="voice" type="int"> </argument> @@ -21990,7 +24877,7 @@ </description> </method> <method name="get_volume" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="voice" type="int"> </argument> @@ -21999,7 +24886,7 @@ </description> </method> <method name="get_volume_db" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="voice" type="int"> </argument> @@ -22007,7 +24894,7 @@ </description> </method> <method name="get_pan" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="voice" type="int"> </argument> @@ -22016,7 +24903,7 @@ </description> </method> <method name="get_pan_depth" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="voice" type="int"> </argument> @@ -22025,7 +24912,7 @@ </description> </method> <method name="get_pan_height" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="voice" type="int"> </argument> @@ -22043,7 +24930,7 @@ </description> </method> <method name="get_filter_cutoff" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="voice" type="int"> </argument> @@ -22052,7 +24939,7 @@ </description> </method> <method name="get_filter_resonance" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="voice" type="int"> </argument> @@ -22061,7 +24948,7 @@ </description> </method> <method name="get_filter_gain" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="voice" type="int"> </argument> @@ -22069,7 +24956,7 @@ </description> </method> <method name="get_chorus" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="voice" type="int"> </argument> @@ -22078,7 +24965,7 @@ </description> </method> <method name="get_reverb_room" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="voice" type="int"> </argument> @@ -22087,7 +24974,7 @@ </description> </method> <method name="get_reverb" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="voice" type="int"> </argument> @@ -22096,29 +24983,29 @@ </description> </method> <method name="set_default_pitch_scale" > - <argument index="0" name="ratio" type="real"> + <argument index="0" name="ratio" type="float"> </argument> <description> </description> </method> <method name="set_default_volume" > - <argument index="0" name="nrg" type="real"> + <argument index="0" name="nrg" type="float"> </argument> <description> </description> </method> <method name="set_default_volume_db" > - <argument index="0" name="db" type="real"> + <argument index="0" name="db" type="float"> </argument> <description> </description> </method> <method name="set_default_pan" > - <argument index="0" name="pan" type="real"> + <argument index="0" name="pan" type="float"> </argument> - <argument index="1" name="depth" type="real" default="0"> + <argument index="1" name="depth" type="float" default="0"> </argument> - <argument index="2" name="height" type="real" default="0"> + <argument index="2" name="height" type="float" default="0"> </argument> <description> </description> @@ -22126,17 +25013,17 @@ <method name="set_default_filter" > <argument index="0" name="type" type="int"> </argument> - <argument index="1" name="cutoff_hz" type="real"> + <argument index="1" name="cutoff_hz" type="float"> </argument> - <argument index="2" name="resonance" type="real"> + <argument index="2" name="resonance" type="float"> </argument> - <argument index="3" name="gain" type="real" default="0"> + <argument index="3" name="gain" type="float" default="0"> </argument> <description> </description> </method> <method name="set_default_chorus" > - <argument index="0" name="send" type="real"> + <argument index="0" name="send" type="float"> </argument> <description> </description> @@ -22144,43 +25031,43 @@ <method name="set_default_reverb" > <argument index="0" name="room_type" type="int"> </argument> - <argument index="1" name="send" type="real"> + <argument index="1" name="send" type="float"> </argument> <description> </description> </method> <method name="get_default_pitch_scale" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="get_default_volume" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="get_default_volume_db" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="get_default_pan" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="get_default_pan_depth" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="get_default_pan_height" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -22192,37 +25079,37 @@ </description> </method> <method name="get_default_filter_cutoff" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="get_default_filter_resonance" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="get_default_filter_gain" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="get_default_chorus" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="get_default_reverb_room" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="get_default_reverb" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -22331,7 +25218,7 @@ <method name="voice_set_pitch_scale" > <argument index="0" name="voice" type="int"> </argument> - <argument index="1" name="ratio" type="real"> + <argument index="1" name="ratio" type="float"> </argument> <description> Change the pitch scale of a currently playing voice. @@ -22340,7 +25227,7 @@ <method name="voice_set_volume_scale_db" > <argument index="0" name="voice" type="int"> </argument> - <argument index="1" name="db" type="real"> + <argument index="1" name="db" type="float"> </argument> <description> Change the volume scale of a currently playing voice (using dB). @@ -22368,13 +25255,13 @@ </description> </method> <method name="set_random_pitch_scale" > - <argument index="0" name="val" type="real"> + <argument index="0" name="val" type="float"> </argument> <description> </description> </method> <method name="get_random_pitch_scale" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -22388,80 +25275,6 @@ </constant> </constants> </class> -<class name="SceneIO" inherits="Object" category="Core"> - <brief_description> - </brief_description> - <description> - </description> - <methods> - <method name="load" > - <return type="Node"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <description> - </description> - </method> - <method name="save" > - <return type="int"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="scene" type="Node"> - </argument> - <argument index="2" name="flags" type="int" default="0"> - </argument> - <argument index="3" name="optimizer" type="OptimizedSaver" default="Object()"> - </argument> - <description> - </description> - </method> - <method name="load_interactive" > - <return type="SceneInteractiveLoader"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <description> - </description> - </method> - </methods> - <constants> - </constants> -</class> -<class name="SceneInteractiveLoader" inherits="Reference" category="Core"> - <brief_description> - </brief_description> - <description> - </description> - <methods> - <method name="get_scene" > - <return type="Object"> - </return> - <description> - </description> - </method> - <method name="poll" > - <return type="int"> - </return> - <description> - </description> - </method> - <method name="get_stage" qualifiers="const" > - <return type="int"> - </return> - <description> - </description> - </method> - <method name="get_stage_count" qualifiers="const" > - <return type="int"> - </return> - <description> - </description> - </method> - </methods> - <constants> - </constants> -</class> <class name="SceneMainLoop" inherits="MainLoop" category="Core"> <brief_description> Scene-Based implementation of the MainLoop. @@ -22531,6 +25344,18 @@ Return true if the scene is being run inside an editor. </description> </method> + <method name="set_edited_scene_root" > + <argument index="0" name="scene" type="Object"> + </argument> + <description> + </description> + </method> + <method name="get_edited_scene_root" qualifiers="const" > + <return type="Object"> + </return> + <description> + </description> + </method> <method name="set_pause" > <argument index="0" name="enable" type="bool"> </argument> @@ -22568,6 +25393,16 @@ Quit the application. </description> </method> + <method name="set_screen_stretch" > + <argument index="0" name="mode" type="int"> + </argument> + <argument index="1" name="aspect" type="int"> + </argument> + <argument index="2" name="minsize" type="Vector2"> + </argument> + <description> + </description> + </method> <method name="queue_delete" > <argument index="0" name="obj" type="Object"> </argument> @@ -22629,42 +25464,20 @@ <constant name="GROUP_CALL_UNIQUE" value="4"> Call a group only once, even if call is performed many times. </constant> - </constants> -</class> -<class name="ScenePreloader" inherits="Resource" category="Core"> - <brief_description> - </brief_description> - <description> - </description> - <methods> - <method name="load_scene" > - <return type="int"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <description> - </description> - </method> - <method name="get_scene_path" qualifiers="const" > - <return type="String"> - </return> - <description> - </description> - </method> - <method name="instance" qualifiers="const" > - <return type="Node"> - </return> - <description> - </description> - </method> - <method name="can_instance" qualifiers="const" > - <return type="bool"> - </return> - <description> - </description> - </method> - </methods> - <constants> + <constant name="STRETCH_MODE_DISABLED" value="0"> + </constant> + <constant name="STRETCH_MODE_2D" value="1"> + </constant> + <constant name="STRETCH_MODE_VIEWPORT" value="2"> + </constant> + <constant name="STRETCH_ASPECT_IGNORE" value="0"> + </constant> + <constant name="STRETCH_ASPECT_KEEP" value="1"> + </constant> + <constant name="STRETCH_ASPECT_KEEP_WIDTH" value="2"> + </constant> + <constant name="STRETCH_ASPECT_KEEP_HEIGHT" value="3"> + </constant> </constants> </class> <class name="Script" inherits="Resource" category="Core"> @@ -22732,13 +25545,13 @@ </description> <methods> <method name="set_custom_step" > - <argument index="0" name="step" type="real"> + <argument index="0" name="step" type="float"> </argument> <description> </description> </method> <method name="get_custom_step" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -22900,10 +25713,12 @@ </argument> <argument index="1" name="fcode" type="String"> </argument> - <argument index="2" name="vofs" type="int" default="0"> + <argument index="2" name="lcode" type="String"> </argument> <argument index="3" name="fofs" type="int" default="0"> </argument> + <argument index="4" name="lofs" type="int" default="0"> + </argument> <description> </description> </method> @@ -22919,6 +25734,12 @@ <description> </description> </method> + <method name="get_light_code" qualifiers="const" > + <return type="String"> + </return> + <description> + </description> + </method> <method name="has_param" qualifiers="const" > <return type="bool"> </return> @@ -22955,6 +25776,20 @@ <description> </description> </method> + <method name="set_shader_param" > + <argument index="0" name="param" type="String"> + </argument> + <argument index="1" name="value" type="var"> + </argument> + <description> + </description> + </method> + <method name="get_shader_param" qualifiers="const" > + <argument index="0" name="param" type="String"> + </argument> + <description> + </description> + </method> </methods> <constants> </constants> @@ -22978,14 +25813,14 @@ </description> <methods> <method name="set_custom_solver_bias" > - <argument index="0" name="bias" type="real"> + <argument index="0" name="bias" type="float"> </argument> <description> Use a custom solver bias. No need to change this unless you really know what you are doing. </description> </method> <method name="get_custom_solver_bias" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the custom solver bias. No need to change this unless you really know what you are doing. @@ -23032,10 +25867,14 @@ <method name="collide_with_motion_and_get_contacts" > <argument index="0" name="local_xform" type="Matrix32"> </argument> - <argument index="1" name="local_motion" type="Object"> + <argument index="1" name="local_motion" type="Vector2"> </argument> <argument index="2" name="with_shape" type="Shape2D"> </argument> + <argument index="3" name="shape_xform" type="Matrix32"> + </argument> + <argument index="4" name="shape_motion" type="Vector2"> + </argument> <description> </description> </method> @@ -23169,6 +26008,22 @@ Return the pose transform for bone "bone_idx". </description> </method> + <method name="set_bone_global_pose" > + <argument index="0" name="bone_idx" type="int"> + </argument> + <argument index="1" name="pose" type="Transform"> + </argument> + <description> + </description> + </method> + <method name="get_bone_global_pose" qualifiers="const" > + <return type="Transform"> + </return> + <argument index="0" name="bone_idx" type="int"> + </argument> + <description> + </description> + </method> <method name="get_bone_custom_pose" qualifiers="const" > <return type="Transform"> </return> @@ -23239,6 +26094,78 @@ <constants> </constants> </class> +<class name="SliderJoint" inherits="Joint" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_param" > + <argument index="0" name="param" type="int"> + </argument> + <argument index="1" name="value" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_param" qualifiers="const" > + <return type="float"> + </return> + <argument index="0" name="param" type="int"> + </argument> + <description> + </description> + </method> + </methods> + <constants> + <constant name="PARAM_LINEAR_LIMIT_UPPER" value="0"> + </constant> + <constant name="PARAM_LINEAR_LIMIT_LOWER" value="1"> + </constant> + <constant name="PARAM_LINEAR_LIMIT_SOFTNESS" value="2"> + </constant> + <constant name="PARAM_LINEAR_LIMIT_RESTITUTION" value="3"> + </constant> + <constant name="PARAM_LINEAR_LIMIT_DAMPING" value="4"> + </constant> + <constant name="PARAM_LINEAR_MOTION_SOFTNESS" value="5"> + </constant> + <constant name="PARAM_LINEAR_MOTION_RESTITUTION" value="6"> + </constant> + <constant name="PARAM_LINEAR_MOTION_DAMPING" value="7"> + </constant> + <constant name="PARAM_LINEAR_ORTHOGONAL_SOFTNESS" value="8"> + </constant> + <constant name="PARAM_LINEAR_ORTHOGONAL_RESTITUTION" value="9"> + </constant> + <constant name="PARAM_LINEAR_ORTHOGONAL_DAMPING" value="10"> + </constant> + <constant name="PARAM_ANGULAR_LIMIT_UPPER" value="11"> + </constant> + <constant name="PARAM_ANGULAR_LIMIT_LOWER" value="12"> + </constant> + <constant name="PARAM_ANGULAR_LIMIT_SOFTNESS" value="13"> + </constant> + <constant name="PARAM_ANGULAR_LIMIT_RESTITUTION" value="14"> + </constant> + <constant name="PARAM_ANGULAR_LIMIT_DAMPING" value="15"> + </constant> + <constant name="PARAM_ANGULAR_MOTION_SOFTNESS" value="16"> + </constant> + <constant name="PARAM_ANGULAR_MOTION_RESTITUTION" value="17"> + </constant> + <constant name="PARAM_ANGULAR_MOTION_DAMPING" value="18"> + </constant> + <constant name="PARAM_ANGULAR_ORTHOGONAL_SOFTNESS" value="19"> + </constant> + <constant name="PARAM_ANGULAR_ORTHOGONAL_RESTITUTION" value="20"> + </constant> + <constant name="PARAM_ANGULAR_ORTHOGONAL_DAMPING" value="21"> + </constant> + <constant name="PARAM_MAX" value="22"> + </constant> + </constants> +</class> <class name="SoundPlayer2D" inherits="Node2D" category="Core"> <brief_description> Base class for playing spatial 2D sound. @@ -23250,13 +26177,13 @@ <method name="set_param" > <argument index="0" name="param" type="int"> </argument> - <argument index="1" name="value" type="real"> + <argument index="1" name="value" type="float"> </argument> <description> </description> </method> <method name="get_param" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="param" type="int"> </argument> @@ -23288,13 +26215,13 @@ <method name="set_param" > <argument index="0" name="param" type="int"> </argument> - <argument index="1" name="value" type="real"> + <argument index="1" name="value" type="float"> </argument> <description> </description> </method> <method name="get_param" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="param" type="int"> </argument> @@ -23448,7 +26375,33 @@ <description> </description> </method> + <method name="show" > + <description> + </description> + </method> + <method name="hide" > + <description> + </description> + </method> + <method name="is_visible" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="is_hidden" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> </methods> + <signals> + <signal name="visibility_changed"> + <description> + </description> + </signal> + </signals> <constants> <constant name="NOTIFICATION_TRANSFORM_CHANGED" value="29"> Spatial nodes receive this notifacation with their global transform changes. This means that either the current or a parent node changed it's transform. @@ -23457,6 +26410,8 @@ </constant> <constant name="NOTIFICATION_EXIT_WORLD" value="42"> </constant> + <constant name="NOTIFICATION_VISIBILITY_CHANGED" value="43"> + </constant> </constants> </class> <class name="SpatialPlayer" inherits="Spatial" category="Core"> @@ -23468,13 +26423,13 @@ <method name="set_param" > <argument index="0" name="param" type="int"> </argument> - <argument index="1" name="value" type="real"> + <argument index="1" name="value" type="float"> </argument> <description> </description> </method> <method name="get_param" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="param" type="int"> </argument> @@ -23544,7 +26499,7 @@ <method name="voice_set_pitch_scale" > <argument index="0" name="voice" type="int"> </argument> - <argument index="1" name="ratio" type="real"> + <argument index="1" name="ratio" type="float"> </argument> <description> </description> @@ -23552,7 +26507,7 @@ <method name="voice_set_volume_scale_db" > <argument index="0" name="voice" type="int"> </argument> - <argument index="1" name="db" type="real"> + <argument index="1" name="db" type="float"> </argument> <description> </description> @@ -23682,13 +26637,13 @@ </description> </method> <method name="get_pos" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="seek_pos" > - <argument index="0" name="time" type="real"> + <argument index="0" name="time" type="float"> </argument> <description> </description> @@ -23704,13 +26659,13 @@ </description> <methods> <method name="set_radius" > - <argument index="0" name="radius" type="real"> + <argument index="0" name="radius" type="float"> </argument> <description> </description> </method> <method name="get_radius" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -23777,6 +26732,10 @@ </methods> <constants> </constants> + <theme_items> + <theme_item name="updown" type="Texture"> + </theme_item> + </theme_items> </class> <class name="SplitContainer" inherits="Container" category="Core"> <brief_description> @@ -24008,6 +26967,240 @@ <constants> </constants> </class> +<class name="Sprite3D" inherits="SpriteBase3D" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_texture" > + <argument index="0" name="texture" type="Texture"> + </argument> + <description> + </description> + </method> + <method name="get_texture" qualifiers="const" > + <return type="Texture"> + </return> + <description> + </description> + </method> + <method name="set_region" > + <argument index="0" name="enabled" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_region" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_region_rect" > + <argument index="0" name="rect" type="Rect2"> + </argument> + <description> + </description> + </method> + <method name="get_region_rect" qualifiers="const" > + <return type="Rect2"> + </return> + <description> + </description> + </method> + <method name="set_frame" > + <argument index="0" name="frame" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_frame" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_vframes" > + <argument index="0" name="vframes" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_vframes" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_hframes" > + <argument index="0" name="hframes" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_hframes" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> +<class name="SpriteBase3D" inherits="GeometryInstance" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_centered" > + <argument index="0" name="centered" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_centered" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_offset" > + <argument index="0" name="offset" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="get_offset" qualifiers="const" > + <return type="Vector2"> + </return> + <description> + </description> + </method> + <method name="set_flip_h" > + <argument index="0" name="flip_h" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_flipped_h" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_flip_v" > + <argument index="0" name="flip_v" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_flipped_v" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_modulate" > + <argument index="0" name="modulate" type="Color"> + </argument> + <description> + </description> + </method> + <method name="get_modulate" qualifiers="const" > + <return type="Color"> + </return> + <description> + </description> + </method> + <method name="set_opacity" > + <argument index="0" name="opacity" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_opacity" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_pixel_size" > + <argument index="0" name="pixel_size" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_pixel_size" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_axis" > + <argument index="0" name="axis" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_axis" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_draw_flag" > + <argument index="0" name="flag" type="int"> + </argument> + <argument index="1" name="enabled" type="bool"> + </argument> + <description> + </description> + </method> + <method name="get_draw_flag" qualifiers="const" > + <return type="bool"> + </return> + <argument index="0" name="flag" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_alpha_cut_mode" > + <argument index="0" name="mode" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_alpha_cut_mode" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> + <method name="get_item_rect" qualifiers="const" > + <return type="Rect2"> + </return> + <description> + </description> + </method> + </methods> + <constants> + <constant name="FLAG_TRANSPARENT" value="0"> + </constant> + <constant name="FLAG_SHADED" value="1"> + </constant> + <constant name="FLAG_MAX" value="2"> + </constant> + <constant name="ALPHA_CUT_DISABLED" value="0"> + </constant> + <constant name="ALPHA_CUT_DISCARD" value="1"> + </constant> + <constant name="ALPHA_CUT_OPAQUE_PREPASS" value="2"> + </constant> + </constants> +</class> <class name="SpriteFrames" inherits="Resource" category="Core"> <brief_description> Sprite frame library for AnimatedSprite. @@ -24073,18 +27266,6 @@ StaticBody implements a static collision [Node], by utilizing a rigid body in the [PhysicsServer]. Static bodies are used for static collision. For more information on physics body nodes, see [PhysicsBody]. </description> <methods> - <method name="set_simulate_motion" > - <argument index="0" name="enabled" type="bool"> - </argument> - <description> - </description> - </method> - <method name="is_simulating_motion" qualifiers="const" > - <return type="bool"> - </return> - <description> - </description> - </method> <method name="set_constant_linear_velocity" > <argument index="0" name="vel" type="Vector3"> </argument> @@ -24109,6 +27290,30 @@ <description> </description> </method> + <method name="set_friction" > + <argument index="0" name="friction" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_friction" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_bounce" > + <argument index="0" name="bounce" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_bounce" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> </methods> <constants> </constants> @@ -24131,7 +27336,7 @@ </description> </method> <method name="set_constant_angular_velocity" > - <argument index="0" name="vel" type="real"> + <argument index="0" name="vel" type="float"> </argument> <description> Set a constant angular velocity for the body. @@ -24145,32 +27350,32 @@ </description> </method> <method name="get_constant_angular_velocity" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the constant angular velocity for the body. </description> </method> <method name="set_friction" > - <argument index="0" name="friction" type="real"> + <argument index="0" name="friction" type="float"> </argument> <description> </description> </method> <method name="get_friction" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="set_bounce" > - <argument index="0" name="bounce" type="real"> + <argument index="0" name="bounce" type="float"> </argument> <description> </description> </method> <method name="get_bounce" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -24227,6 +27432,54 @@ <constants> </constants> </class> +<class name="StreamPeerSSL" inherits="StreamPeer" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="accept" > + <return type="int"> + </return> + <argument index="0" name="stream" type="StreamPeer"> + </argument> + <description> + </description> + </method> + <method name="connect" > + <return type="int"> + </return> + <argument index="0" name="stream" type="StreamPeer"> + </argument> + <argument index="1" name="validate_certs" type="bool" default="false"> + </argument> + <argument index="2" name="for_hostname" type="String" default=""""> + </argument> + <description> + </description> + </method> + <method name="get_status" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> + <method name="disconnect" > + <description> + </description> + </method> + </methods> + <constants> + <constant name="STATUS_DISCONNECTED" value="0"> + </constant> + <constant name="STATUS_CONNECTED" value="1"> + </constant> + <constant name="STATUS_ERROR_NO_CERTIFICATE" value="2"> + </constant> + <constant name="STATUS_ERROR_HOSTNAME_MISMATCH" value="3"> + </constant> + </constants> +</class> <class name="StreamPeerTCP" inherits="StreamPeer" category="Core"> <brief_description> TCP Stream peer. @@ -24251,6 +27504,12 @@ <description> </description> </method> + <method name="get_status" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> <method name="get_connected_host" qualifiers="const" > <return type="String"> </return> @@ -24269,6 +27528,14 @@ </method> </methods> <constants> + <constant name="STATUS_NONE" value="0"> + </constant> + <constant name="STATUS_CONNECTING" value="1"> + </constant> + <constant name="STATUS_CONNECTED" value="2"> + </constant> + <constant name="STATUS_ERROR" value="3"> + </constant> </constants> </class> <class name="StreamPlayer" inherits="Node" category="Core"> @@ -24330,25 +27597,25 @@ </description> </method> <method name="set_volume" > - <argument index="0" name="volume" type="real"> + <argument index="0" name="volume" type="float"> </argument> <description> </description> </method> <method name="get_volume" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="set_volume_db" > - <argument index="0" name="db" type="real"> + <argument index="0" name="db" type="float"> </argument> <description> </description> </method> <method name="get_volume_db" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -24366,13 +27633,13 @@ </description> </method> <method name="get_pos" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="seek_pos" > - <argument index="0" name="time" type="real"> + <argument index="0" name="time" type="float"> </argument> <description> </description> @@ -24390,7 +27657,7 @@ </description> </method> <method name="get_length" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -24600,6 +27867,18 @@ Do a simple, case insensitive, expression matching, using ? and * wildcards. </description> </method> + <method name="md5_buffer" > + <return type="RawArray"> + </return> + <description> + </description> + </method> + <method name="md5_text" > + <return type="String"> + </return> + <description> + </description> + </method> <method name="nocasecmp_to" > <return type="int"> </return> @@ -24746,7 +28025,7 @@ </description> </method> <method name="to_float" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -24863,14 +28142,14 @@ <method name="set_default_margin" > <argument index="0" name="margin" type="int"> </argument> - <argument index="1" name="offset" type="real"> + <argument index="1" name="offset" type="float"> </argument> <description> Set the default offset "offset" of the margin "margin" (see MARGIN_* enum) for a StyleBox, Controls that draw styleboxes with context inside need to know the margin, so the border of the stylebox is not occluded. </description> </method> <method name="get_default_margin" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="margin" type="int"> </argument> @@ -24879,7 +28158,7 @@ </description> </method> <method name="get_margin" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="margin" type="int"> </argument> @@ -25054,14 +28333,14 @@ <method name="set_expand_margin_size" > <argument index="0" name="margin" type="int"> </argument> - <argument index="1" name="size" type="real"> + <argument index="1" name="size" type="float"> </argument> <description> Set an expand margin size (from enum MARGIN_*). Parts of the image below the size of the margin (and in the direction of the margin) will not expand. </description> </method> <method name="get_expand_margin_size" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="arg0" type="int"> </argument> @@ -25096,13 +28375,13 @@ <method name="set_margin_size" > <argument index="0" name="margin" type="int"> </argument> - <argument index="1" name="size" type="real"> + <argument index="1" name="size" type="float"> </argument> <description> </description> </method> <method name="get_margin_size" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="arg0" type="int"> </argument> @@ -25112,13 +28391,13 @@ <method name="set_expand_margin_size" > <argument index="0" name="margin" type="int"> </argument> - <argument index="1" name="size" type="real"> + <argument index="1" name="size" type="float"> </argument> <description> </description> </method> <method name="get_expand_margin_size" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="arg0" type="int"> </argument> @@ -25203,6 +28482,12 @@ <description> </description> </method> + <method name="add_smooth_group" > + <argument index="0" name="smooth" type="bool"> + </argument> + <description> + </description> + </method> <method name="set_material" > <argument index="0" name="material" type="Material"> </argument> @@ -25217,15 +28502,7 @@ <description> </description> </method> - <method name="generate_flat_normals" > - <description> - </description> - </method> - <method name="generate_smooth_normals" > - <description> - </description> - </method> - <method name="generate_tangents" > + <method name="generate_normals" > <description> </description> </method> @@ -25392,6 +28669,38 @@ </signals> <constants> </constants> + <theme_items> + <theme_item name="label_valign_fg" type="int"> + </theme_item> + <theme_item name="hseparation" type="int"> + </theme_item> + <theme_item name="label_valign_bg" type="int"> + </theme_item> + <theme_item name="top_margin" type="int"> + </theme_item> + <theme_item name="side_margin" type="int"> + </theme_item> + <theme_item name="font_color_bg" type="Color"> + </theme_item> + <theme_item name="font_color_fg" type="Color"> + </theme_item> + <theme_item name="increment_hilite" type="Texture"> + </theme_item> + <theme_item name="decrement_hilite" type="Texture"> + </theme_item> + <theme_item name="increment" type="Texture"> + </theme_item> + <theme_item name="decrement" type="Texture"> + </theme_item> + <theme_item name="font" type="Font"> + </theme_item> + <theme_item name="tab_fg" type="StyleBox"> + </theme_item> + <theme_item name="tab_bg" type="StyleBox"> + </theme_item> + <theme_item name="panel" type="StyleBox"> + </theme_item> + </theme_items> </class> <class name="Tabs" inherits="Control" category="Core"> <brief_description> @@ -25457,6 +28766,14 @@ <description> </description> </method> + <method name="add_tab" > + <argument index="0" name="title" type="String"> + </argument> + <argument index="1" name="icon" type="Texture"> + </argument> + <description> + </description> + </method> </methods> <signals> <signal name="tab_changed"> @@ -25468,6 +28785,28 @@ </signals> <constants> </constants> + <theme_items> + <theme_item name="label_valign_fg" type="int"> + </theme_item> + <theme_item name="hseparation" type="int"> + </theme_item> + <theme_item name="label_valign_bg" type="int"> + </theme_item> + <theme_item name="top_margin" type="int"> + </theme_item> + <theme_item name="font_color_bg" type="Color"> + </theme_item> + <theme_item name="font_color_fg" type="Color"> + </theme_item> + <theme_item name="font" type="Font"> + </theme_item> + <theme_item name="tab_fg" type="StyleBox"> + </theme_item> + <theme_item name="tab_bg" type="StyleBox"> + </theme_item> + <theme_item name="panel" type="StyleBox"> + </theme_item> + </theme_items> </class> <class name="TestCube" inherits="GeometryInstance" category="Core"> <brief_description> @@ -25648,6 +28987,12 @@ Return the text inside the selection. </description> </method> + <method name="get_word_under_cursor" qualifiers="const" > + <return type="String"> + </return> + <description> + </description> + </method> <method name="search" qualifiers="const" > <return type="IntArray"> </return> @@ -25765,6 +29110,48 @@ Search from end to begining. </constant> </constants> + <theme_items> + <theme_item name="line_spacing" type="int"> + </theme_item> + <theme_item name="completion_lines" type="int"> + </theme_item> + <theme_item name="completion_max_width" type="int"> + </theme_item> + <theme_item name="completion_scroll_width" type="int"> + </theme_item> + <theme_item name="symbol_color" type="Color"> + </theme_item> + <theme_item name="cursor_color" type="Color"> + </theme_item> + <theme_item name="selection_color" type="Color"> + </theme_item> + <theme_item name="completion_existing" type="Color"> + </theme_item> + <theme_item name="breakpoint_color" type="Color"> + </theme_item> + <theme_item name="font_color_selected" type="Color"> + </theme_item> + <theme_item name="font_color" type="Color"> + </theme_item> + <theme_item name="completion_scroll_color" type="Color"> + </theme_item> + <theme_item name="current_line_color" type="Color"> + </theme_item> + <theme_item name="mark_color" type="Color"> + </theme_item> + <theme_item name="tab" type="Texture"> + </theme_item> + <theme_item name="font" type="Font"> + </theme_item> + <theme_item name="focus" type="StyleBox"> + </theme_item> + <theme_item name="normal" type="StyleBox"> + </theme_item> + <theme_item name="completion_selected" type="StyleBox"> + </theme_item> + <theme_item name="completion" type="StyleBox"> + </theme_item> + </theme_items> </class> <class name="Texture" inherits="Resource" category="Core"> <brief_description> @@ -25868,12 +29255,16 @@ <constant name="FLAG_FILTER" value="4"> Turn on magnifying filter. </constant> - <constant name="FLAG_VIDEO_SURFACE" value="16"> + <constant name="FLAG_VIDEO_SURFACE" value="4096"> Texture is a video surface </constant> <constant name="FLAGS_DEFAULT" value="7"> Default flags </constant> + <constant name="FLAG_ANISOTROPIC_FILTER" value="8"> + </constant> + <constant name="FLAG_CONVERT_TO_LINEAR" value="16"> + </constant> </constants> </class> <class name="TextureButton" inherits="BaseButton" category="Core"> @@ -26393,15 +29784,51 @@ Return the current tileset. </description> </method> + <method name="set_mode" > + <argument index="0" name="mode" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_mode" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_half_offset" > + <argument index="0" name="half_offset" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_half_offset" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_custom_transform" > + <argument index="0" name="custom_transform" type="Matrix32"> + </argument> + <description> + </description> + </method> + <method name="get_custom_transform" qualifiers="const" > + <return type="Matrix32"> + </return> + <description> + </description> + </method> <method name="set_cell_size" > - <argument index="0" name="size" type="int"> + <argument index="0" name="size" type="Vector2"> </argument> <description> Set the cell size. </description> </method> <method name="get_cell_size" qualifiers="const" > - <return type="int"> + <return type="Vector2"> </return> <description> Return the cell size. @@ -26449,6 +29876,42 @@ Return true if tiles are to be centered in y coordinate (by default this is false and they are drawn from upper left cell corner). </description> </method> + <method name="set_collision_layer_mask" > + <argument index="0" name="mask" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_collision_layer_mask" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_collision_friction" > + <argument index="0" name="value" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_collision_friction" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_collision_bounce" > + <argument index="0" name="value" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_collision_bounce" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> <method name="set_cell" > <argument index="0" name="x" type="int"> </argument> @@ -26502,11 +29965,47 @@ Clear all cells. </description> </method> + <method name="map_to_world" qualifiers="const" > + <return type="Vector2"> + </return> + <argument index="0" name="mappos" type="Vector2"> + </argument> + <argument index="1" name="ignore_half_ofs" type="bool" default="false"> + </argument> + <description> + </description> + </method> + <method name="world_to_map" qualifiers="const" > + <return type="Vector2"> + </return> + <argument index="0" name="worldpos" type="Vector2"> + </argument> + <description> + </description> + </method> </methods> + <signals> + <signal name="settings_changed"> + <description> + </description> + </signal> + </signals> <constants> <constant name="INVALID_CELL" value="-1"> Returned when a cell doesn't exist. </constant> + <constant name="MODE_SQUARE" value="0"> + </constant> + <constant name="MODE_ISOMETRIC" value="1"> + </constant> + <constant name="MODE_CUSTOM" value="2"> + </constant> + <constant name="HALF_OFFSET_X" value="0"> + </constant> + <constant name="HALF_OFFSET_Y" value="1"> + </constant> + <constant name="HALF_OFFSET_DISABLED" value="2"> + </constant> </constants> </class> <class name="TileSet" inherits="Resource" category="Core"> @@ -26690,14 +30189,14 @@ </description> <methods> <method name="set_wait_time" > - <argument index="0" name="time_sec" type="real"> + <argument index="0" name="time_sec" type="float"> </argument> <description> Set wait time. When the time is over, it will emit timeout signal. </description> </method> <method name="get_wait_time" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the wait time. When the time is over, it will emit timeout signal. @@ -26742,7 +30241,7 @@ </description> </method> <method name="get_time_left" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> Return the time left for timeout if the timer is active. @@ -26845,11 +30344,11 @@ </method> </methods> <signals> - <signal name="pressed"> + <signal name="released"> <description> </description> </signal> - <signal name="released"> + <signal name="pressed"> <description> </description> </signal> @@ -26899,7 +30398,7 @@ </return> <argument index="0" name="axis" type="Vector3"> </argument> - <argument index="1" name="phi" type="real"> + <argument index="1" name="phi" type="float"> </argument> <description> </description> @@ -27040,6 +30539,12 @@ Return all the messages (keys). </description> </method> + <method name="get_message_count" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> </methods> <constants> </constants> @@ -27083,6 +30588,10 @@ <description> </description> </method> + <method name="clear" > + <description> + </description> + </method> </methods> <constants> </constants> @@ -27310,6 +30819,66 @@ <constant name="SELECT_MULTI" value="2"> </constant> </constants> + <theme_items> + <theme_item name="item_margin" type="int"> + </theme_item> + <theme_item name="vseparation" type="int"> + </theme_item> + <theme_item name="guide_width" type="int"> + </theme_item> + <theme_item name="hseparation" type="int"> + </theme_item> + <theme_item name="button_margin" type="int"> + </theme_item> + <theme_item name="title_button_color" type="Color"> + </theme_item> + <theme_item name="guide_color" type="Color"> + </theme_item> + <theme_item name="cursor_color" type="Color"> + </theme_item> + <theme_item name="selection_color" type="Color"> + </theme_item> + <theme_item name="font_color_selected" type="Color"> + </theme_item> + <theme_item name="font_color" type="Color"> + </theme_item> + <theme_item name="arrow" type="Texture"> + </theme_item> + <theme_item name="updown" type="Texture"> + </theme_item> + <theme_item name="checked" type="Texture"> + </theme_item> + <theme_item name="arrow_collapsed" type="Texture"> + </theme_item> + <theme_item name="select_arrow" type="Texture"> + </theme_item> + <theme_item name="unchecked" type="Texture"> + </theme_item> + <theme_item name="title_button_font" type="Font"> + </theme_item> + <theme_item name="font" type="Font"> + </theme_item> + <theme_item name="title_button_normal" type="StyleBox"> + </theme_item> + <theme_item name="cursor" type="StyleBox"> + </theme_item> + <theme_item name="title_button_hover" type="StyleBox"> + </theme_item> + <theme_item name="selected_focus" type="StyleBox"> + </theme_item> + <theme_item name="bg_focus" type="StyleBox"> + </theme_item> + <theme_item name="button_pressed" type="StyleBox"> + </theme_item> + <theme_item name="cursor_unfocused" type="StyleBox"> + </theme_item> + <theme_item name="selected" type="StyleBox"> + </theme_item> + <theme_item name="bg" type="StyleBox"> + </theme_item> + <theme_item name="title_button_pressed" type="StyleBox"> + </theme_item> + </theme_items> </class> <class name="TreeItem" inherits="Object" category="Core"> <brief_description> @@ -27416,13 +30985,13 @@ <method name="set_range" > <argument index="0" name="column" type="int"> </argument> - <argument index="1" name="value" type="real"> + <argument index="1" name="value" type="float"> </argument> <description> </description> </method> <method name="get_range" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="column" type="int"> </argument> @@ -27432,11 +31001,11 @@ <method name="set_range_config" > <argument index="0" name="column" type="int"> </argument> - <argument index="1" name="min" type="real"> + <argument index="1" name="min" type="float"> </argument> - <argument index="2" name="max" type="real"> + <argument index="2" name="max" type="float"> </argument> - <argument index="3" name="step" type="real"> + <argument index="3" name="step" type="float"> </argument> <argument index="4" name="expr" type="bool" default="false"> </argument> @@ -27691,6 +31260,368 @@ </constant> </constants> </class> +<class name="Tween" inherits="Node" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="is_active" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_active" > + <argument index="0" name="active" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_repeat" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_repeat" > + <argument index="0" name="repeat" type="bool"> + </argument> + <description> + </description> + </method> + <method name="set_speed" > + <argument index="0" name="speed" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_speed" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_tween_process_mode" > + <argument index="0" name="mode" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_tween_process_mode" qualifiers="const" > + <return type="int"> + </return> + <description> + </description> + </method> + <method name="start" > + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="reset" > + <return type="bool"> + </return> + <argument index="0" name="node" type="Object"> + </argument> + <argument index="1" name="key" type="String"> + </argument> + <description> + </description> + </method> + <method name="reset_all" > + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="stop" > + <return type="bool"> + </return> + <argument index="0" name="node" type="Object"> + </argument> + <argument index="1" name="key" type="String"> + </argument> + <description> + </description> + </method> + <method name="stop_all" > + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="resume" > + <return type="bool"> + </return> + <argument index="0" name="node" type="Object"> + </argument> + <argument index="1" name="key" type="String"> + </argument> + <description> + </description> + </method> + <method name="resume_all" > + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="remove" > + <return type="bool"> + </return> + <argument index="0" name="node" type="Object"> + </argument> + <argument index="1" name="key" type="String"> + </argument> + <description> + </description> + </method> + <method name="remove_all" > + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="seek" > + <return type="bool"> + </return> + <argument index="0" name="time" type="float"> + </argument> + <description> + </description> + </method> + <method name="tell" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="get_runtime" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="interpolate_property" > + <return type="bool"> + </return> + <argument index="0" name="node" type="Object"> + </argument> + <argument index="1" name="property" type="String"> + </argument> + <argument index="2" name="initial_val" type="var"> + </argument> + <argument index="3" name="final_val" type="var"> + </argument> + <argument index="4" name="times_in_sec" type="float"> + </argument> + <argument index="5" name="trans_type" type="int"> + </argument> + <argument index="6" name="ease_type" type="int"> + </argument> + <argument index="7" name="delay" type="float" default="0"> + </argument> + <description> + </description> + </method> + <method name="interpolate_method" > + <return type="bool"> + </return> + <argument index="0" name="node" type="Object"> + </argument> + <argument index="1" name="method" type="String"> + </argument> + <argument index="2" name="initial_val" type="var"> + </argument> + <argument index="3" name="final_val" type="var"> + </argument> + <argument index="4" name="times_in_sec" type="float"> + </argument> + <argument index="5" name="trans_type" type="int"> + </argument> + <argument index="6" name="ease_type" type="int"> + </argument> + <argument index="7" name="delay" type="float" default="0"> + </argument> + <description> + </description> + </method> + <method name="interpolate_callback" > + <return type="bool"> + </return> + <argument index="0" name="node" type="Object"> + </argument> + <argument index="1" name="callback" type="String"> + </argument> + <argument index="2" name="times_in_sec" type="float"> + </argument> + <argument index="3" name="args" type="var" default="NULL"> + </argument> + <description> + </description> + </method> + <method name="follow_property" > + <return type="bool"> + </return> + <argument index="0" name="node" type="Object"> + </argument> + <argument index="1" name="property" type="String"> + </argument> + <argument index="2" name="initial_val" type="var"> + </argument> + <argument index="3" name="target" type="Object"> + </argument> + <argument index="4" name="target_property" type="String"> + </argument> + <argument index="5" name="times_in_sec" type="float"> + </argument> + <argument index="6" name="trans_type" type="int"> + </argument> + <argument index="7" name="ease_type" type="int"> + </argument> + <argument index="8" name="delay" type="float" default="0"> + </argument> + <description> + </description> + </method> + <method name="follow_method" > + <return type="bool"> + </return> + <argument index="0" name="node" type="Object"> + </argument> + <argument index="1" name="method" type="String"> + </argument> + <argument index="2" name="initial_val" type="var"> + </argument> + <argument index="3" name="target" type="Object"> + </argument> + <argument index="4" name="target_method" type="String"> + </argument> + <argument index="5" name="times_in_sec" type="float"> + </argument> + <argument index="6" name="trans_type" type="int"> + </argument> + <argument index="7" name="ease_type" type="int"> + </argument> + <argument index="8" name="delay" type="float" default="0"> + </argument> + <description> + </description> + </method> + <method name="targeting_property" > + <return type="bool"> + </return> + <argument index="0" name="node" type="Object"> + </argument> + <argument index="1" name="property" type="String"> + </argument> + <argument index="2" name="initial" type="Object"> + </argument> + <argument index="3" name="initial_val" type="String"> + </argument> + <argument index="4" name="final_val" type="var"> + </argument> + <argument index="5" name="times_in_sec" type="float"> + </argument> + <argument index="6" name="trans_type" type="int"> + </argument> + <argument index="7" name="ease_type" type="int"> + </argument> + <argument index="8" name="delay" type="float" default="0"> + </argument> + <description> + </description> + </method> + <method name="targeting_method" > + <return type="bool"> + </return> + <argument index="0" name="node" type="Object"> + </argument> + <argument index="1" name="method" type="String"> + </argument> + <argument index="2" name="initial" type="Object"> + </argument> + <argument index="3" name="initial_method" type="String"> + </argument> + <argument index="4" name="final_val" type="var"> + </argument> + <argument index="5" name="times_in_sec" type="float"> + </argument> + <argument index="6" name="trans_type" type="int"> + </argument> + <argument index="7" name="ease_type" type="int"> + </argument> + <argument index="8" name="delay" type="float" default="0"> + </argument> + <description> + </description> + </method> + </methods> + <signals> + <signal name="tween_complete"> + <argument index="0" name="node" type="Object"> + </argument> + <argument index="1" name="key" type="String"> + </argument> + <description> + </description> + </signal> + <signal name="tween_step"> + <argument index="0" name="node" type="Object"> + </argument> + <argument index="1" name="key" type="String"> + </argument> + <argument index="2" name="elapsed" type="float"> + </argument> + <argument index="3" name="value" type="Object"> + </argument> + <description> + </description> + </signal> + <signal name="tween_start"> + <argument index="0" name="node" type="Object"> + </argument> + <argument index="1" name="key" type="String"> + </argument> + <description> + </description> + </signal> + </signals> + <constants> + <constant name="TRANS_LINEAR" value="0"> + </constant> + <constant name="TRANS_SINE" value="1"> + </constant> + <constant name="TRANS_QUINT" value="2"> + </constant> + <constant name="TRANS_QUART" value="3"> + </constant> + <constant name="TRANS_QUAD" value="4"> + </constant> + <constant name="TRANS_EXPO" value="5"> + </constant> + <constant name="TRANS_ELASTIC" value="6"> + </constant> + <constant name="TRANS_CUBIC" value="7"> + </constant> + <constant name="TRANS_CIRC" value="8"> + </constant> + <constant name="TRANS_BOUNCE" value="9"> + </constant> + <constant name="TRANS_BACK" value="10"> + </constant> + <constant name="EASE_IN" value="0"> + </constant> + <constant name="EASE_OUT" value="1"> + </constant> + <constant name="EASE_IN_OUT" value="2"> + </constant> + <constant name="EASE_OUT_IN" value="3"> + </constant> + </constants> +</class> <class name="UnshadedMaterial" inherits="Material" category="Core"> <brief_description> </brief_description> @@ -27748,6 +31679,10 @@ </methods> <constants> </constants> + <theme_items> + <theme_item name="separation" type="int"> + </theme_item> + </theme_items> </class> <class name="VButtonArray" inherits="ButtonArray" category="Core"> <brief_description> @@ -27760,6 +31695,28 @@ </methods> <constants> </constants> + <theme_items> + <theme_item name="button_separator" type="int"> + </theme_item> + <theme_item name="icon_separator" type="int"> + </theme_item> + <theme_item name="font_color_selected" type="Color"> + </theme_item> + <theme_item name="font_color" type="Color"> + </theme_item> + <theme_item name="font_selected" type="Font"> + </theme_item> + <theme_item name="font" type="Font"> + </theme_item> + <theme_item name="hover" type="StyleBox"> + </theme_item> + <theme_item name="focus" type="StyleBox"> + </theme_item> + <theme_item name="selected" type="StyleBox"> + </theme_item> + <theme_item name="normal" type="StyleBox"> + </theme_item> + </theme_items> </class> <class name="VScrollBar" inherits="ScrollBar" category="Core"> <brief_description> @@ -27771,6 +31728,24 @@ </methods> <constants> </constants> + <theme_items> + <theme_item name="increment_hilite" type="Texture"> + </theme_item> + <theme_item name="decrement_hilite" type="Texture"> + </theme_item> + <theme_item name="increment" type="Texture"> + </theme_item> + <theme_item name="decrement" type="Texture"> + </theme_item> + <theme_item name="grabber_hilite" type="StyleBox"> + </theme_item> + <theme_item name="grabber" type="StyleBox"> + </theme_item> + <theme_item name="scroll_focus" type="StyleBox"> + </theme_item> + <theme_item name="scroll" type="StyleBox"> + </theme_item> + </theme_items> </class> <class name="VSeparator" inherits="Separator" category="Core"> <brief_description> @@ -27783,6 +31758,12 @@ </methods> <constants> </constants> + <theme_items> + <theme_item name="separation" type="int"> + </theme_item> + <theme_item name="separator" type="StyleBox"> + </theme_item> + </theme_items> </class> <class name="VSlider" inherits="Slider" category="Core"> <brief_description> @@ -27795,6 +31776,18 @@ </methods> <constants> </constants> + <theme_items> + <theme_item name="tick" type="Texture"> + </theme_item> + <theme_item name="grabber_hilite" type="Texture"> + </theme_item> + <theme_item name="grabber" type="Texture"> + </theme_item> + <theme_item name="grabber_hilite" type="StyleBox"> + </theme_item> + <theme_item name="slider" type="StyleBox"> + </theme_item> + </theme_items> </class> <class name="VSplitContainer" inherits="SplitContainer" category="Core"> <brief_description> @@ -27807,6 +31800,16 @@ </methods> <constants> </constants> + <theme_items> + <theme_item name="autohide" type="int"> + </theme_item> + <theme_item name="separation" type="int"> + </theme_item> + <theme_item name="grabber" type="Texture"> + </theme_item> + <theme_item name="bg" type="StyleBox"> + </theme_item> + </theme_items> </class> <class name="Vector2" category="Built-In Types"> <brief_description> @@ -27816,13 +31819,27 @@ </description> <methods> <method name="angle_to" > - <return type="real"> + <return type="float"> + </return> + <argument index="0" name="to" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="angle_to_point" > + <return type="float"> </return> <argument index="0" name="to" type="Vector2"> </argument> <description> </description> </method> + <method name="atan2" > + <return type="float"> + </return> + <description> + </description> + </method> <method name="cubic_interpolate" > <return type="Vector2"> </return> @@ -27832,13 +31849,13 @@ </argument> <argument index="2" name="post_b" type="Vector2"> </argument> - <argument index="3" name="t" type="real"> + <argument index="3" name="t" type="float"> </argument> <description> </description> </method> <method name="distance_squared_to" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="to" type="Vector2"> </argument> @@ -27846,7 +31863,7 @@ </description> </method> <method name="distance_to" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="to" type="Vector2"> </argument> @@ -27855,7 +31872,7 @@ </description> </method> <method name="dot" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="with" type="Vector2"> </argument> @@ -27877,20 +31894,20 @@ </description> </method> <method name="get_aspect" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="length" > - <return type="real"> + <return type="float"> </return> <description> Returns the length of the vector. </description> </method> <method name="length_squared" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -27900,7 +31917,7 @@ </return> <argument index="0" name="b" type="Vector2"> </argument> - <argument index="1" name="t" type="real"> + <argument index="1" name="t" type="float"> </argument> <description> Returns the result of the linear interpolation between this vector and "b", by amount "i". @@ -27914,7 +31931,7 @@ </description> </method> <method name="reflect" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="vec" type="Vector2"> </argument> @@ -27924,13 +31941,13 @@ <method name="rotated" > <return type="Vector2"> </return> - <argument index="0" name="phi" type="real"> + <argument index="0" name="phi" type="float"> </argument> <description> </description> </method> <method name="slide" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="vec" type="Vector2"> </argument> @@ -27952,22 +31969,22 @@ </description> </method> <method name="Vector2" > - <argument index="0" name="x" type="real"> + <argument index="0" name="x" type="float"> </argument> - <argument index="1" name="y" type="real"> + <argument index="1" name="y" type="float"> </argument> <description> </description> </method> </methods> <members> - <member name="x" type="real"> + <member name="x" type="float"> </member> - <member name="y" type="real"> + <member name="y" type="float"> </member> - <member name="width" type="real"> + <member name="width" type="float"> </member> - <member name="height" type="real"> + <member name="height" type="float"> </member> </members> <constants> @@ -28055,14 +32072,14 @@ </argument> <argument index="2" name="post_b" type="Vector3"> </argument> - <argument index="3" name="t" type="real"> + <argument index="3" name="t" type="float"> </argument> <description> Perform a cubic interpolation between vectors a,b,c,d (b is current), by the given amount (i). </description> </method> <method name="distance_squared_to" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="b" type="Vector3"> </argument> @@ -28071,7 +32088,7 @@ </description> </method> <method name="distance_to" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="b" type="Vector3"> </argument> @@ -28080,7 +32097,7 @@ </description> </method> <method name="dot" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="b" type="Vector3"> </argument> @@ -28096,14 +32113,14 @@ </description> </method> <method name="length" > - <return type="real"> + <return type="float"> </return> <description> Return the length of the vector. </description> </method> <method name="length_squared" > - <return type="real"> + <return type="float"> </return> <description> Return the length of the vector, without the square root step. @@ -28114,7 +32131,7 @@ </return> <argument index="0" name="b" type="Vector3"> </argument> - <argument index="1" name="t" type="real"> + <argument index="1" name="t" type="float"> </argument> <description> Linearly interpolates the vector to a given one (b), by the given amount (i) @@ -28139,12 +32156,28 @@ Return a copy of the normalized vector to unit length. This is the same as v / v.length() </description> </method> + <method name="reflect" > + <return type="Vector3"> + </return> + <argument index="0" name="by" type="Vector3"> + </argument> + <description> + </description> + </method> <method name="rotated" > <return type="Vector3"> </return> <argument index="0" name="axis" type="Vector3"> </argument> - <argument index="1" name="phi" type="real"> + <argument index="1" name="phi" type="float"> + </argument> + <description> + </description> + </method> + <method name="slide" > + <return type="Vector3"> + </return> + <argument index="0" name="by" type="Vector3"> </argument> <description> </description> @@ -28152,29 +32185,29 @@ <method name="snapped" > <return type="Vector3"> </return> - <argument index="0" name="by" type="real"> + <argument index="0" name="by" type="float"> </argument> <description> Return a copy of the vector, snapped to the lowest neared multiple. </description> </method> <method name="Vector3" > - <argument index="0" name="x" type="real"> + <argument index="0" name="x" type="float"> </argument> - <argument index="1" name="y" type="real"> + <argument index="1" name="y" type="float"> </argument> - <argument index="2" name="z" type="real"> + <argument index="2" name="z" type="float"> </argument> <description> </description> </method> </methods> <members> - <member name="x" type="real"> + <member name="x" type="float"> </member> - <member name="y" type="real"> + <member name="y" type="float"> </member> - <member name="z" type="real"> + <member name="z" type="float"> </member> </members> <constants> @@ -28236,6 +32269,206 @@ <constants> </constants> </class> +<class name="VehicleBody" inherits="PhysicsBody" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_mass" > + <argument index="0" name="mass" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_mass" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_friction" > + <argument index="0" name="friction" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_friction" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_engine_force" > + <argument index="0" name="engine_force" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_engine_force" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_brake" > + <argument index="0" name="brake" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_brake" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_steering" > + <argument index="0" name="steering" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_steering" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> +<class name="VehicleWheel" inherits="Spatial" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_radius" > + <argument index="0" name="length" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_radius" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_suspension_rest_length" > + <argument index="0" name="length" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_suspension_rest_length" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_suspension_travel" > + <argument index="0" name="length" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_suspension_travel" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_suspension_stiffness" > + <argument index="0" name="length" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_suspension_stiffness" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_suspension_max_force" > + <argument index="0" name="length" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_suspension_max_force" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_damping_compression" > + <argument index="0" name="length" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_damping_compression" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_damping_relaxation" > + <argument index="0" name="length" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_damping_relaxation" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_use_as_traction" > + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_used_as_traction" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_use_as_steering" > + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_used_as_steering" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_friction_slip" > + <argument index="0" name="length" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_friction_slip" qualifiers="const" > + <return type="float"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> <class name="VideoPlayer" inherits="Control" category="Core"> <brief_description> </brief_description> @@ -28281,25 +32514,25 @@ </description> </method> <method name="set_volume" > - <argument index="0" name="volume" type="real"> + <argument index="0" name="volume" type="float"> </argument> <description> </description> </method> <method name="get_volume" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> </method> <method name="set_volume_db" > - <argument index="0" name="db" type="real"> + <argument index="0" name="db" type="float"> </argument> <description> </description> </method> <method name="get_volume_db" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -28311,7 +32544,7 @@ </description> </method> <method name="get_pos" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <description> </description> @@ -28344,7 +32577,7 @@ <constants> </constants> </class> -<class name="VideoStream" inherits="AudioStreamResampled" category="Core"> +<class name="VideoStream" inherits="Resource" category="Core"> <brief_description> </brief_description> <description> @@ -28357,8 +32590,8 @@ </description> </method> <method name="pop_frame" > - <return type="Image"> - </return> + <argument index="0" name="arg0" type="Object"> + </argument> <description> </description> </method> @@ -28372,16 +32605,6 @@ <constants> </constants> </class> -<class name="VideoStreamTheora" inherits="VideoStream" category="Core"> - <brief_description> - </brief_description> - <description> - </description> - <methods> - </methods> - <constants> - </constants> -</class> <class name="Viewport" inherits="Node" category="Core"> <brief_description> Creates a sub-view into the screen. @@ -28540,6 +32763,42 @@ <description> </description> </method> + <method name="set_render_target_vflip" > + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="get_render_target_vflip" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_render_target_filter" > + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="get_render_target_filter" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_render_target_gen_mipmaps" > + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="get_render_target_gen_mipmaps" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> <method name="set_render_target_update_mode" > <argument index="0" name="mode" type="int"> </argument> @@ -28558,6 +32817,18 @@ <description> </description> </method> + <method name="set_physics_object_picking" > + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="get_physics_object_picking" > + <return type="bool"> + </return> + <description> + </description> + </method> <method name="get_viewport" qualifiers="const" > <return type="RID"> </return> @@ -28565,10 +32836,40 @@ Get the viewport RID from the visual server. </description> </method> + <method name="input" > + <argument index="0" name="local_event" type="InputEvent"> + </argument> + <description> + </description> + </method> + <method name="unhandled_input" > + <argument index="0" name="local_event" type="InputEvent"> + </argument> + <description> + </description> + </method> <method name="update_worlds" > <description> </description> </method> + <method name="set_use_own_world" > + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_using_own_world" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="get_camera" qualifiers="const" > + <return type="Camera"> + </return> + <description> + </description> + </method> <method name="set_as_audio_listener" > <argument index="0" name="enable" type="bool"> </argument> @@ -28593,6 +32894,12 @@ <description> </description> </method> + <method name="set_render_target_to_screen_rect" > + <argument index="0" name="arg0" type="Rect2"> + </argument> + <description> + </description> + </method> </methods> <signals> <signal name="size_changed"> @@ -28611,6 +32918,64 @@ </constant> </constants> </class> +<class name="ViewportSprite" inherits="Node2D" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_viewport_path" > + <argument index="0" name="path" type="NodePath"> + </argument> + <description> + </description> + </method> + <method name="get_viewport_path" qualifiers="const" > + <return type="NodePath"> + </return> + <description> + </description> + </method> + <method name="set_centered" > + <argument index="0" name="centered" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_centered" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_offset" > + <argument index="0" name="offset" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="get_offset" qualifiers="const" > + <return type="Vector2"> + </return> + <description> + </description> + </method> + <method name="set_modulate" > + <argument index="0" name="modulate" type="Color"> + </argument> + <description> + </description> + </method> + <method name="get_modulate" qualifiers="const" > + <return type="Color"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> <class name="VisibilityEnabler" inherits="VisibilityNotifier" category="Core"> <brief_description> </brief_description> @@ -28955,13 +33320,13 @@ <method name="material_set_line_width" > <argument index="0" name="arg0" type="RID"> </argument> - <argument index="1" name="arg1" type="real"> + <argument index="1" name="arg1" type="float"> </argument> <description> </description> </method> <method name="material_get_line_width" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="arg0" type="RID"> </argument> @@ -29205,13 +33570,13 @@ </argument> <argument index="1" name="arg1" type="int"> </argument> - <argument index="2" name="arg2" type="real"> + <argument index="2" name="arg2" type="float"> </argument> <description> </description> </method> <method name="particles_get_variable" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="arg0" type="RID"> </argument> @@ -29225,13 +33590,13 @@ </argument> <argument index="1" name="arg1" type="int"> </argument> - <argument index="2" name="arg2" type="real"> + <argument index="2" name="arg2" type="float"> </argument> <description> </description> </method> <method name="particles_get_randomness" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="arg0" type="RID"> </argument> @@ -29261,13 +33626,13 @@ </argument> <argument index="1" name="arg1" type="int"> </argument> - <argument index="2" name="arg2" type="real"> + <argument index="2" name="arg2" type="float"> </argument> <description> </description> </method> <method name="particles_get_color_phase_pos" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="arg0" type="RID"> </argument> @@ -29337,13 +33702,13 @@ </argument> <argument index="1" name="arg1" type="int"> </argument> - <argument index="2" name="arg2" type="real"> + <argument index="2" name="arg2" type="float"> </argument> <description> </description> </method> <method name="particles_get_attractor_strength" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="arg0" type="RID"> </argument> @@ -29467,13 +33832,13 @@ </argument> <argument index="1" name="arg1" type="int"> </argument> - <argument index="2" name="arg2" type="real"> + <argument index="2" name="arg2" type="float"> </argument> <description> </description> </method> <method name="light_get_var" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="arg0" type="RID"> </argument> @@ -29587,13 +33952,13 @@ <method name="portal_set_disable_distance" > <argument index="0" name="arg0" type="RID"> </argument> - <argument index="1" name="arg1" type="real"> + <argument index="1" name="arg1" type="float"> </argument> <description> </description> </method> <method name="portal_get_disable_distance" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="arg0" type="RID"> </argument> @@ -29625,11 +33990,11 @@ <method name="camera_set_perspective" > <argument index="0" name="arg0" type="RID"> </argument> - <argument index="1" name="arg1" type="real"> + <argument index="1" name="arg1" type="float"> </argument> - <argument index="2" name="arg2" type="real"> + <argument index="2" name="arg2" type="float"> </argument> - <argument index="3" name="arg3" type="real"> + <argument index="3" name="arg3" type="float"> </argument> <description> </description> @@ -29637,11 +34002,11 @@ <method name="camera_set_orthogonal" > <argument index="0" name="arg0" type="RID"> </argument> - <argument index="1" name="arg1" type="real"> + <argument index="1" name="arg1" type="float"> </argument> - <argument index="2" name="arg2" type="real"> + <argument index="2" name="arg2" type="float"> </argument> - <argument index="3" name="arg3" type="real"> + <argument index="3" name="arg3" type="float"> </argument> <description> </description> @@ -29865,11 +34230,9 @@ <method name="instances_cull_convex" qualifiers="const" > <return type="Array"> </return> - <argument index="0" name="arg0" type="Vector3"> + <argument index="0" name="arg0" type="Array"> </argument> - <argument index="1" name="arg1" type="Vector3"> - </argument> - <argument index="2" name="arg2" type="RID"> + <argument index="1" name="arg1" type="RID"> </argument> <description> </description> @@ -29953,17 +34316,17 @@ <method name="canvas_item_set_opacity" > <argument index="0" name="arg0" type="RID"> </argument> - <argument index="1" name="arg1" type="real"> + <argument index="1" name="arg1" type="float"> </argument> <description> </description> </method> <method name="canvas_item_get_opacity" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="arg0" type="RID"> </argument> - <argument index="1" name="arg1" type="real"> + <argument index="1" name="arg1" type="float"> </argument> <description> </description> @@ -29971,17 +34334,17 @@ <method name="canvas_item_set_self_opacity" > <argument index="0" name="arg0" type="RID"> </argument> - <argument index="1" name="arg1" type="real"> + <argument index="1" name="arg1" type="float"> </argument> <description> </description> </method> <method name="canvas_item_get_self_opacity" qualifiers="const" > - <return type="real"> + <return type="float"> </return> <argument index="0" name="arg0" type="RID"> </argument> - <argument index="1" name="arg1" type="real"> + <argument index="1" name="arg1" type="float"> </argument> <description> </description> @@ -29995,7 +34358,7 @@ </argument> <argument index="3" name="arg3" type="Color"> </argument> - <argument index="4" name="arg4" type="real" default="1"> + <argument index="4" name="arg4" type="float" default="1"> </argument> <description> </description> @@ -30057,7 +34420,7 @@ </argument> <argument index="1" name="arg1" type="Vector2"> </argument> - <argument index="2" name="arg2" type="real"> + <argument index="2" name="arg2" type="float"> </argument> <argument index="3" name="arg3" type="Color"> </argument> @@ -30087,7 +34450,7 @@ </description> </method> <method name="cursor_set_rotation" > - <argument index="0" name="arg0" type="real"> + <argument index="0" name="arg0" type="float"> </argument> <argument index="1" name="arg1" type="int"> </argument> @@ -30132,6 +34495,18 @@ <description> </description> </method> + <method name="black_bars_set_images" > + <argument index="0" name="left" type="RID"> + </argument> + <argument index="1" name="top" type="RID"> + </argument> + <argument index="2" name="right" type="RID"> + </argument> + <argument index="3" name="bottom" type="RID"> + </argument> + <description> + </description> + </method> <method name="make_sphere_mesh" > <return type="RID"> </return> @@ -30139,7 +34514,7 @@ </argument> <argument index="1" name="arg1" type="int"> </argument> - <argument index="2" name="arg2" type="real"> + <argument index="2" name="arg2" type="float"> </argument> <description> </description> @@ -30156,6 +34531,10 @@ <description> </description> </method> + <method name="flush" > + <description> + </description> + </method> <method name="free" > <argument index="0" name="arg0" type="RID"> </argument> @@ -30196,7 +34575,7 @@ </constant> <constant name="TEXTURE_FLAG_FILTER" value="4"> </constant> - <constant name="TEXTURE_FLAG_CUBEMAP" value="8"> + <constant name="TEXTURE_FLAG_CUBEMAP" value="2048"> </constant> <constant name="TEXTURE_FLAGS_DEFAULT" value="7"> </constant> @@ -30226,10 +34605,6 @@ </constant> <constant name="MATERIAL_FLAG_ONTOP" value="4"> </constant> - <constant name="MATERIAL_FLAG_WIREFRAME" value="5"> - </constant> - <constant name="MATERIAL_FLAG_BILLBOARD" value="6"> - </constant> <constant name="MATERIAL_FLAG_MAX" value="7"> </constant> <constant name="MATERIAL_BLEND_MODE_MIX" value="0"> @@ -30350,11 +34725,9 @@ </constant> <constant name="LIGHT_SPOT" value="2"> </constant> - <constant name="LIGHT_COLOR_AMBIENT" value="0"> - </constant> - <constant name="LIGHT_COLOR_DIFFUSE" value="1"> + <constant name="LIGHT_COLOR_DIFFUSE" value="0"> </constant> - <constant name="LIGHT_COLOR_SPECULAR" value="2"> + <constant name="LIGHT_COLOR_SPECULAR" value="1"> </constant> <constant name="LIGHT_PARAM_SPOT_ATTENUATION" value="0"> </constant> @@ -30366,7 +34739,7 @@ </constant> <constant name="LIGHT_PARAM_ATTENUATION" value="4"> </constant> - <constant name="LIGHT_PARAM_MAX" value="8"> + <constant name="LIGHT_PARAM_MAX" value="10"> </constant> <constant name="SCENARIO_DEBUG_DISABLED" value="0"> </constant> @@ -30378,15 +34751,15 @@ </constant> <constant name="INSTANCE_MULTIMESH" value="2"> </constant> - <constant name="INSTANCE_PARTICLES" value="3"> + <constant name="INSTANCE_PARTICLES" value="4"> </constant> - <constant name="INSTANCE_LIGHT" value="4"> + <constant name="INSTANCE_LIGHT" value="5"> </constant> - <constant name="INSTANCE_ROOM" value="5"> + <constant name="INSTANCE_ROOM" value="6"> </constant> - <constant name="INSTANCE_PORTAL" value="6"> + <constant name="INSTANCE_PORTAL" value="7"> </constant> - <constant name="INSTANCE_GEOMETRY_MASK" value="14"> + <constant name="INSTANCE_GEOMETRY_MASK" value="30"> </constant> <constant name="INFO_OBJECTS_IN_FRAME" value="0"> </constant> @@ -30442,6 +34815,26 @@ </methods> <constants> </constants> + <theme_items> + <theme_item name="close_h_ofs" type="int"> + </theme_item> + <theme_item name="titlebar_height" type="int"> + </theme_item> + <theme_item name="close_v_ofs" type="int"> + </theme_item> + <theme_item name="title_height" type="int"> + </theme_item> + <theme_item name="title_color" type="Color"> + </theme_item> + <theme_item name="close_hilite" type="Texture"> + </theme_item> + <theme_item name="close" type="Texture"> + </theme_item> + <theme_item name="title_font" type="Font"> + </theme_item> + <theme_item name="panel" type="StyleBox"> + </theme_item> + </theme_items> </class> <class name="World" inherits="Resource" category="Core"> <brief_description> @@ -30677,6 +35070,28 @@ </constant> </constants> </class> +<class name="YSort" inherits="Node2D" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_sort_enabled" > + <argument index="0" name="enabled" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_sort_enabled" qualifiers="const" > + <return type="bool"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> <class name="bool" category="Built-In Types"> <brief_description> Boolean built-in type @@ -30692,7 +35107,7 @@ </description> </method> <method name="bool" > - <argument index="0" name="from" type="real"> + <argument index="0" name="from" type="float"> </argument> <description> </description> @@ -30707,27 +35122,25 @@ <constants> </constants> </class> -<class name="int" category="Built-In Types"> +<class name="float" category="Built-In Types"> <brief_description> - Integer built-in type. </brief_description> <description> - Integer built-in type. </description> <methods> - <method name="int" > + <method name="float" > <argument index="0" name="from" type="bool"> </argument> <description> </description> </method> - <method name="int" > - <argument index="0" name="from" type="real"> + <method name="float" > + <argument index="0" name="from" type="int"> </argument> <description> </description> </method> - <method name="int" > + <method name="float" > <argument index="0" name="from" type="String"> </argument> <description> @@ -30737,27 +35150,27 @@ <constants> </constants> </class> -<class name="real" category="Built-In Types"> +<class name="int" category="Built-In Types"> <brief_description> - Real (float) built-in type. + Integer built-in type. </brief_description> <description> - Real (float) built-in type. + Integer built-in type. </description> <methods> - <method name="real" > + <method name="int" > <argument index="0" name="from" type="bool"> </argument> <description> </description> </method> - <method name="real" > - <argument index="0" name="from" type="int"> + <method name="int" > + <argument index="0" name="from" type="float"> </argument> <description> </description> </method> - <method name="real" > + <method name="int" > <argument index="0" name="from" type="String"> </argument> <description> diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp index bb0fd2e593..4044496953 100644 --- a/drivers/gles2/rasterizer_gles2.cpp +++ b/drivers/gles2/rasterizer_gles2.cpp @@ -360,17 +360,19 @@ void RasterizerGLES2::_draw_primitive(int p_points, const Vector3 *p_vertices, c /* TEXTURE API */ -Image RasterizerGLES2::_get_gl_image_and_format(const Image& p_image, Image::Format p_format, uint32_t p_flags,GLenum& r_gl_format,int &r_gl_components,bool &r_has_alpha_cache,bool &r_compressed) { +Image RasterizerGLES2::_get_gl_image_and_format(const Image& p_image, Image::Format p_format, uint32_t p_flags,GLenum& r_gl_format,GLenum& r_gl_internal_format,int &r_gl_components,bool &r_has_alpha_cache,bool &r_compressed) { r_has_alpha_cache=false; r_compressed=false; + r_gl_format=0; Image image=p_image; switch(p_format) { case Image::FORMAT_GRAYSCALE: { r_gl_components=1; - r_gl_format=(srgb_supported && p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)?_EXT_SLUMINANCE_NV:GL_LUMINANCE; + r_gl_format=GL_LUMINANCE; + r_gl_internal_format=(srgb_supported && p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)?_EXT_SLUMINANCE_NV:GL_LUMINANCE; } break; case Image::FORMAT_INTENSITY: { @@ -378,14 +380,16 @@ Image RasterizerGLES2::_get_gl_image_and_format(const Image& p_image, Image::For if (!image.empty()) image.convert(Image::FORMAT_RGBA); r_gl_components=4; - r_gl_format=(srgb_supported && p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)?_GL_SRGB_ALPHA_EXT:GL_RGBA; + r_gl_format=GL_RGBA; + r_gl_internal_format=(srgb_supported && p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)?_GL_SRGB_ALPHA_EXT:GL_RGBA; r_has_alpha_cache=true; } break; case Image::FORMAT_GRAYSCALE_ALPHA: { //image.convert(Image::FORMAT_RGBA); r_gl_components=2; - r_gl_format=(srgb_supported && p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)?_EXT_SLUMINANCE_ALPHA_NV:GL_LUMINANCE_ALPHA; + r_gl_format=GL_LUMINANCE_ALPHA; + r_gl_internal_format=(srgb_supported && p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)?_EXT_SLUMINANCE_ALPHA_NV:GL_LUMINANCE_ALPHA; r_has_alpha_cache=true; } break; @@ -394,7 +398,8 @@ Image RasterizerGLES2::_get_gl_image_and_format(const Image& p_image, Image::For if (!image.empty()) image.convert(Image::FORMAT_RGB); r_gl_components=3; - r_gl_format=(srgb_supported && p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)?_GL_SRGB_EXT:GL_RGB; + r_gl_format=GL_RGB; + r_gl_internal_format=(srgb_supported && p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)?_GL_SRGB_EXT:GL_RGB; } break; @@ -407,14 +412,15 @@ Image RasterizerGLES2::_get_gl_image_and_format(const Image& p_image, Image::For if (p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) { if (srgb_supported) { - r_gl_format=_GL_SRGB_ALPHA_EXT; - } else { r_gl_format=GL_RGBA; + r_gl_internal_format=_GL_SRGB_ALPHA_EXT; + } else { + r_gl_internal_format=GL_RGBA; if (!image.empty()) image.srgb_to_linear(); } } else { - r_gl_format=GL_RGBA; + r_gl_internal_format=GL_RGBA; } r_has_alpha_cache=true; @@ -426,14 +432,15 @@ Image RasterizerGLES2::_get_gl_image_and_format(const Image& p_image, Image::For if (p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) { if (srgb_supported) { - r_gl_format=_GL_SRGB_EXT; - } else { + r_gl_internal_format=_GL_SRGB_EXT; r_gl_format=GL_RGB; + } else { + r_gl_internal_format=GL_RGB; if (!image.empty()) image.srgb_to_linear(); } } else { - r_gl_format=GL_RGB; + r_gl_internal_format=GL_RGB; } } break; case Image::FORMAT_RGBA: { @@ -442,14 +449,16 @@ Image RasterizerGLES2::_get_gl_image_and_format(const Image& p_image, Image::For if (p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) { if (srgb_supported) { - r_gl_format=_GL_SRGB_ALPHA_EXT; - } else { + r_gl_internal_format=_GL_SRGB_ALPHA_EXT; r_gl_format=GL_RGBA; + //r_gl_internal_format=GL_RGBA; + } else { + r_gl_internal_format=GL_RGBA; if (!image.empty()) image.srgb_to_linear(); } } else { - r_gl_format=GL_RGBA; + r_gl_internal_format=GL_RGBA; } r_has_alpha_cache=true; @@ -465,21 +474,22 @@ Image RasterizerGLES2::_get_gl_image_and_format(const Image& p_image, Image::For if (p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) { if (srgb_supported) { - r_gl_format=_GL_SRGB_ALPHA_EXT; - } else { r_gl_format=GL_RGBA; + r_gl_internal_format=_GL_SRGB_ALPHA_EXT; + } else { + r_gl_internal_format=GL_RGBA; if (!image.empty()) image.srgb_to_linear(); } } else { - r_gl_format=GL_RGBA; + r_gl_internal_format=GL_RGBA; } r_has_alpha_cache=true; } else { r_gl_components=1; //doesn't matter much - r_gl_format=(srgb_supported && p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)?_EXT_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV:_EXT_COMPRESSED_RGBA_S3TC_DXT1_EXT; + r_gl_internal_format=(srgb_supported && p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)?_EXT_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV:_EXT_COMPRESSED_RGBA_S3TC_DXT1_EXT; r_compressed=true; }; @@ -495,20 +505,21 @@ Image RasterizerGLES2::_get_gl_image_and_format(const Image& p_image, Image::For if (p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) { if (srgb_supported) { - r_gl_format=_GL_SRGB_ALPHA_EXT; - } else { r_gl_format=GL_RGBA; + r_gl_internal_format=_GL_SRGB_ALPHA_EXT; + } else { + r_gl_internal_format=GL_RGBA; if (!image.empty()) image.srgb_to_linear(); } } else { - r_gl_format=GL_RGBA; + r_gl_internal_format=GL_RGBA; } r_has_alpha_cache=true; } else { r_gl_components=1; //doesn't matter much - r_gl_format=(srgb_supported && p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)?_EXT_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV:_EXT_COMPRESSED_RGBA_S3TC_DXT3_EXT; + r_gl_internal_format=(srgb_supported && p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)?_EXT_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV:_EXT_COMPRESSED_RGBA_S3TC_DXT3_EXT; r_has_alpha_cache=true; r_compressed=true; @@ -526,20 +537,21 @@ Image RasterizerGLES2::_get_gl_image_and_format(const Image& p_image, Image::For if (p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) { if (srgb_supported) { - r_gl_format=_GL_SRGB_ALPHA_EXT; - } else { r_gl_format=GL_RGBA; + r_gl_internal_format=_GL_SRGB_ALPHA_EXT; + } else { + r_gl_internal_format=GL_RGBA; if (!image.empty()) image.srgb_to_linear(); } } else { - r_gl_format=GL_RGBA; + r_gl_internal_format=GL_RGBA; } r_has_alpha_cache=true; } else { r_gl_components=1; //doesn't matter much - r_gl_format=(srgb_supported && p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)?_EXT_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV:_EXT_COMPRESSED_RGBA_S3TC_DXT5_EXT; + r_gl_internal_format=(srgb_supported && p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)?_EXT_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV:_EXT_COMPRESSED_RGBA_S3TC_DXT5_EXT; r_has_alpha_cache=true; r_compressed=true; }; @@ -556,20 +568,21 @@ Image RasterizerGLES2::_get_gl_image_and_format(const Image& p_image, Image::For if (p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) { if (srgb_supported) { - r_gl_format=_GL_SRGB_ALPHA_EXT; - } else { r_gl_format=GL_RGBA; + r_gl_internal_format=_GL_SRGB_ALPHA_EXT; + } else { + r_gl_internal_format=GL_RGBA; if (!image.empty()) image.srgb_to_linear(); } } else { - r_gl_format=GL_RGBA; + r_gl_internal_format=GL_RGBA; } r_has_alpha_cache=true; } else { - r_gl_format=_EXT_COMPRESSED_LUMINANCE_LATC1_EXT; + r_gl_internal_format=_EXT_COMPRESSED_LUMINANCE_LATC1_EXT; r_gl_components=1; //doesn't matter much r_compressed=true; }; @@ -586,19 +599,20 @@ Image RasterizerGLES2::_get_gl_image_and_format(const Image& p_image, Image::For if (p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) { if (srgb_supported) { - r_gl_format=_GL_SRGB_ALPHA_EXT; - } else { r_gl_format=GL_RGBA; + r_gl_internal_format=_GL_SRGB_ALPHA_EXT; + } else { + r_gl_internal_format=GL_RGBA; if (!image.empty()) image.srgb_to_linear(); } } else { - r_gl_format=GL_RGBA; + r_gl_internal_format=GL_RGBA; } r_has_alpha_cache=true; } else { - r_gl_format=_EXT_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT; + r_gl_internal_format=_EXT_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT; r_gl_components=1; //doesn't matter much r_compressed=true; }; @@ -614,21 +628,22 @@ Image RasterizerGLES2::_get_gl_image_and_format(const Image& p_image, Image::For if (p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) { if (srgb_supported) { - r_gl_format=_GL_SRGB_ALPHA_EXT; - } else { r_gl_format=GL_RGBA; + r_gl_internal_format=_GL_SRGB_ALPHA_EXT; + } else { + r_gl_internal_format=GL_RGBA; if (!image.empty()) image.srgb_to_linear(); } } else { - r_gl_format=GL_RGBA; + r_gl_internal_format=GL_RGBA; } r_has_alpha_cache=true; } else { - r_gl_format=(srgb_supported && p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)?_EXT_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT:_EXT_COMPRESSED_RGB_PVRTC_2BPPV1_IMG; + r_gl_internal_format=(srgb_supported && p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)?_EXT_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT:_EXT_COMPRESSED_RGB_PVRTC_2BPPV1_IMG; r_gl_components=1; //doesn't matter much r_compressed=true; @@ -645,22 +660,23 @@ Image RasterizerGLES2::_get_gl_image_and_format(const Image& p_image, Image::For if (p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) { if (srgb_supported) { - r_gl_format=_GL_SRGB_ALPHA_EXT; - } else { r_gl_format=GL_RGBA; + r_gl_internal_format=_GL_SRGB_ALPHA_EXT; + } else { + r_gl_internal_format=GL_RGBA; if (!image.empty()) image.srgb_to_linear(); } } else { - r_gl_format=GL_RGBA; + r_gl_internal_format=GL_RGBA; } r_has_alpha_cache=true; } else { - r_gl_format=_EXT_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG; - r_gl_format=(srgb_supported && p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)?_EXT_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT:_EXT_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG; + r_gl_internal_format=_EXT_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG; + r_gl_internal_format=(srgb_supported && p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)?_EXT_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT:_EXT_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG; r_gl_components=1; //doesn't matter much r_compressed=true; @@ -677,19 +693,20 @@ Image RasterizerGLES2::_get_gl_image_and_format(const Image& p_image, Image::For if (p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) { if (srgb_supported) { - r_gl_format=_GL_SRGB_ALPHA_EXT; - } else { r_gl_format=GL_RGBA; + r_gl_internal_format=_GL_SRGB_ALPHA_EXT; + } else { + r_gl_internal_format=GL_RGBA; if (!image.empty()) image.srgb_to_linear(); } } else { - r_gl_format=GL_RGBA; + r_gl_internal_format=GL_RGBA; } r_has_alpha_cache=true; } else { - r_gl_format=(srgb_supported && p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)?_EXT_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT:_EXT_COMPRESSED_RGB_PVRTC_4BPPV1_IMG; + r_gl_internal_format=(srgb_supported && p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)?_EXT_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT:_EXT_COMPRESSED_RGB_PVRTC_4BPPV1_IMG; r_gl_components=1; //doesn't matter much r_compressed=true; } @@ -705,19 +722,20 @@ Image RasterizerGLES2::_get_gl_image_and_format(const Image& p_image, Image::For if (p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) { if (srgb_supported) { - r_gl_format=_GL_SRGB_ALPHA_EXT; - } else { r_gl_format=GL_RGBA; + r_gl_internal_format=_GL_SRGB_ALPHA_EXT; + } else { + r_gl_internal_format=GL_RGBA; if (!image.empty()) image.srgb_to_linear(); } } else { - r_gl_format=GL_RGBA; + r_gl_internal_format=GL_RGBA; } r_has_alpha_cache=true; } else { - r_gl_format=(srgb_supported && p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)?_EXT_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT:_EXT_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG; + r_gl_internal_format=(srgb_supported && p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)?_EXT_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT:_EXT_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG; r_gl_components=1; //doesn't matter much r_compressed=true; } @@ -734,21 +752,22 @@ Image RasterizerGLES2::_get_gl_image_and_format(const Image& p_image, Image::For if (p_flags&VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) { if (srgb_supported) { - r_gl_format=_GL_SRGB_EXT; - } else { r_gl_format=GL_RGB; + r_gl_internal_format=_GL_SRGB_EXT; + } else { + r_gl_internal_format=GL_RGB; if (!image.empty()) image.srgb_to_linear(); } } else { - r_gl_format=GL_RGB; + r_gl_internal_format=GL_RGB; } - r_gl_format=GL_RGB; + r_gl_internal_format=GL_RGB; } else { - r_gl_format=_EXT_ETC1_RGB8_OES; + r_gl_internal_format=_EXT_ETC1_RGB8_OES; r_gl_components=1; //doesn't matter much r_compressed=true; } @@ -762,12 +781,12 @@ Image RasterizerGLES2::_get_gl_image_and_format(const Image& p_image, Image::For image.decompress(); } r_gl_components=3; - r_gl_format=GL_RGB; + r_gl_internal_format=GL_RGB; } else { - r_gl_format=_EXT_ATC_RGB_AMD; + r_gl_internal_format=_EXT_ATC_RGB_AMD; r_gl_components=1; //doesn't matter much r_compressed=true; } @@ -781,12 +800,12 @@ Image RasterizerGLES2::_get_gl_image_and_format(const Image& p_image, Image::For image.decompress(); } r_gl_components=4; - r_gl_format=GL_RGBA; + r_gl_internal_format=GL_RGBA; } else { - r_gl_format=_EXT_ATC_RGBA_EXPLICIT_ALPHA_AMD; + r_gl_internal_format=_EXT_ATC_RGBA_EXPLICIT_ALPHA_AMD; r_gl_components=1; //doesn't matter much r_compressed=true; } @@ -800,12 +819,12 @@ Image RasterizerGLES2::_get_gl_image_and_format(const Image& p_image, Image::For image.decompress(); } r_gl_components=4; - r_gl_format=GL_RGBA; + r_gl_internal_format=GL_RGBA; } else { - r_gl_format=_EXT_ATC_RGBA_INTERPOLATED_ALPHA_AMD; + r_gl_internal_format=_EXT_ATC_RGBA_INTERPOLATED_ALPHA_AMD; r_gl_components=1; //doesn't matter much r_compressed=true; } @@ -816,7 +835,7 @@ Image RasterizerGLES2::_get_gl_image_and_format(const Image& p_image, Image::For if (!image.empty()) image.convert(Image::FORMAT_RGB); - r_gl_format=GL_RGB; + r_gl_internal_format=GL_RGB; r_gl_components=3; } break; @@ -827,6 +846,10 @@ Image RasterizerGLES2::_get_gl_image_and_format(const Image& p_image, Image::For } } + if (r_gl_format==0) { + r_gl_format=r_gl_internal_format; + } + return image; } @@ -858,6 +881,7 @@ void RasterizerGLES2::texture_allocate(RID p_texture,int p_width, int p_height,I bool has_alpha_cache; int components; GLenum format; + GLenum internal_format; bool compressed; int po2_width = nearest_power_of_2(p_width); @@ -876,7 +900,7 @@ void RasterizerGLES2::texture_allocate(RID p_texture,int p_width, int p_height,I texture->flags=p_flags; texture->target = (p_flags & VS::TEXTURE_FLAG_CUBEMAP) ? GL_TEXTURE_CUBE_MAP : GL_TEXTURE_2D; - _get_gl_image_and_format(Image(),texture->format,texture->flags,format,components,has_alpha_cache,compressed); + _get_gl_image_and_format(Image(),texture->format,texture->flags,format,internal_format,components,has_alpha_cache,compressed); bool scale_textures = !compressed && !(p_flags&VS::TEXTURE_FLAG_VIDEO_SURFACE) && (!npo2_textures_available || p_flags&VS::TEXTURE_FLAG_MIPMAPS); @@ -894,6 +918,7 @@ void RasterizerGLES2::texture_allocate(RID p_texture,int p_width, int p_height,I texture->gl_components_cache=components; texture->gl_format_cache=format; + texture->gl_internal_format_cache=internal_format; texture->format_has_alpha=has_alpha_cache; texture->compressed=compressed; texture->has_alpha=false; //by default it doesn't have alpha unless something with alpha is blitteds @@ -908,7 +933,7 @@ void RasterizerGLES2::texture_allocate(RID p_texture,int p_width, int p_height,I if (p_flags&VS::TEXTURE_FLAG_VIDEO_SURFACE) { //prealloc if video - glTexImage2D(texture->target, 0, format, p_width, p_height, 0, format, GL_UNSIGNED_BYTE,NULL); + glTexImage2D(texture->target, 0, internal_format, p_width, p_height, 0, format, GL_UNSIGNED_BYTE,NULL); } texture->active=true; @@ -926,6 +951,7 @@ void RasterizerGLES2::texture_set_data(RID p_texture,const Image& p_image,VS::Cu int components; GLenum format; + GLenum internal_format; bool alpha; bool compressed; @@ -933,7 +959,7 @@ void RasterizerGLES2::texture_set_data(RID p_texture,const Image& p_image,VS::Cu texture->image[p_cube_side]=p_image; } - Image img = _get_gl_image_and_format(p_image, p_image.get_format(),texture->flags,format,components,alpha,compressed); + Image img = _get_gl_image_and_format(p_image, p_image.get_format(),texture->flags,format,internal_format,components,alpha,compressed); if (texture->alloc_width != img.get_width() || texture->alloc_height != img.get_height()) { @@ -1017,7 +1043,7 @@ void RasterizerGLES2::texture_set_data(RID p_texture,const Image& p_image,VS::Cu if (texture->flags&VS::TEXTURE_FLAG_VIDEO_SURFACE) { glTexSubImage2D( blit_target, i, 0,0,w,h,format,GL_UNSIGNED_BYTE,&read[ofs] ); } else { - glTexImage2D(blit_target, i, format, w, h, 0, format, GL_UNSIGNED_BYTE,&read[ofs]); + glTexImage2D(blit_target, i, internal_format, w, h, 0, format, GL_UNSIGNED_BYTE,&read[ofs]); } } diff --git a/drivers/gles2/rasterizer_gles2.h b/drivers/gles2/rasterizer_gles2.h index 91395054d9..27f7848b13 100644 --- a/drivers/gles2/rasterizer_gles2.h +++ b/drivers/gles2/rasterizer_gles2.h @@ -106,7 +106,7 @@ class RasterizerGLES2 : public Rasterizer { Vector<float> skel_default; - Image _get_gl_image_and_format(const Image& p_image, Image::Format p_format, uint32_t p_flags,GLenum& r_gl_format,int &r_gl_components,bool &r_has_alpha_cache,bool &r_compressed); + Image _get_gl_image_and_format(const Image& p_image, Image::Format p_format, uint32_t p_flags,GLenum& r_gl_format,GLenum& r_gl_internal_format,int &r_gl_components,bool &r_has_alpha_cache,bool &r_compressed); class RenderTarget; @@ -119,6 +119,7 @@ class RasterizerGLES2 : public Rasterizer { GLenum target; GLenum gl_format_cache; + GLenum gl_internal_format_cache; int gl_components_cache; int data_size; //original data size, useful for retrieving back bool has_alpha; diff --git a/drivers/png/image_loader_png.cpp b/drivers/png/image_loader_png.cpp index 316397ed80..6fc20f36f7 100644 --- a/drivers/png/image_loader_png.cpp +++ b/drivers/png/image_loader_png.cpp @@ -102,6 +102,9 @@ Error ImageLoaderPNG::_load_image(void *rf_up,png_rw_ptr p_func,Image *p_image) png_read_info(png, info); png_get_IHDR(png, info, &width, &height, &depth, &color, NULL, NULL, NULL); + png_textp t; + //https://svn.gov.pt/projects/ccidadao/repository/middleware-offline/trunk/_src/eidmw/FreeImagePTEiD/Source/FreeImage/PluginPNG.cpp + //png_get_text(png,info,) /* printf("Image width:%i\n", width); printf("Image Height:%i\n", height); diff --git a/drivers/png/resource_saver_png.cpp b/drivers/png/resource_saver_png.cpp index a898f6e618..9b394e8a8c 100644 --- a/drivers/png/resource_saver_png.cpp +++ b/drivers/png/resource_saver_png.cpp @@ -30,6 +30,7 @@ #include "scene/resources/texture.h" #include "drivers/png/png.h" #include "os/file_access.h" +#include "globals.h" static void _write_png_data(png_structp png_ptr,png_bytep data, png_size_t p_length) { @@ -165,6 +166,42 @@ Error ResourceSaverPNG::save(const String &p_path,const RES& p_resource,uint32_t memdelete(f); + if (true) { + + bool global_filter = Globals::get_singleton()->get("image_loader/filter"); + bool global_mipmaps = Globals::get_singleton()->get("image_loader/gen_mipmaps"); + bool global_repeat = Globals::get_singleton()->get("image_loader/repeat"); + + String text; + + if (global_filter!=bool(texture->get_flags()&Texture::FLAG_FILTER)) { + text+=bool(texture->get_flags()&Texture::FLAG_FILTER)?"filter=true\n":"filter=false\n"; + } + if (global_mipmaps!=bool(texture->get_flags()&Texture::FLAG_MIPMAPS)) { + text+=bool(texture->get_flags()&Texture::FLAG_FILTER)?"gen_mipmaps=true\n":"gen_mipmaps=false\n"; + } + if (global_repeat!=bool(texture->get_flags()&Texture::FLAG_REPEAT)) { + text+=bool(texture->get_flags()&Texture::FLAG_FILTER)?"repeat=true\n":"repeat=false\n"; + } + if (bool(texture->get_flags()&Texture::FLAG_ANISOTROPIC_FILTER)) { + text+="anisotropic=true\n"; + } + if (bool(texture->get_flags()&Texture::FLAG_CONVERT_TO_LINEAR)) { + text+="tolinear=true\n"; + } + + if (text!="" || FileAccess::exists(p_path+".flags")) { + + f = FileAccess::open(p_path+".flags",FileAccess::WRITE); + if (f) { + + f->store_string(text); + memdelete(f); + } + } + } + + /* cleanup heap allocation */ return OK; diff --git a/drivers/theoraplayer/video_stream_theoraplayer.cpp b/drivers/theoraplayer/video_stream_theoraplayer.cpp index b2ff8062cc..04210f0209 100644 --- a/drivers/theoraplayer/video_stream_theoraplayer.cpp +++ b/drivers/theoraplayer/video_stream_theoraplayer.cpp @@ -306,18 +306,28 @@ int VideoStreamTheoraplayer::get_pending_frame_count() const { if (!clip) return 0; - if (!frame.empty()) - return 1; + TheoraVideoFrame* f = clip->getNextFrame(); + return f ? 1 : 0; +}; + + +void VideoStreamTheoraplayer::pop_frame(Ref<ImageTexture> p_tex) { TheoraVideoFrame* f = clip->getNextFrame(); - if (!f) - return 0; + if (!f) { + return; + }; + +#ifdef GLES2_ENABLED +// RasterizerGLES2* r = RasterizerGLES2::get_singleton(); +// r->_texture_set_data(p_tex, f->mBpp == 3 ? Image::Format_RGB : Image::Format_RGBA, f->mBpp, w, h, f->getBuffer()); + +#endif float w=clip->getWidth(),h=clip->getHeight(); int imgsize = w * h * f->mBpp; int size = f->getStride() * f->getHeight() * f->mBpp; - DVector<uint8_t> data; data.resize(imgsize); DVector<uint8_t>::Write wr = data.write(); uint8_t* ptr = wr.ptr(); @@ -329,24 +339,32 @@ int VideoStreamTheoraplayer::get_pending_frame_count() const { copymem(ptr + dstofs, f->getBuffer() + dstofs, w * f->mBpp); }; */ - frame = Image(); + Image frame = Image(); frame.create(w, h, 0, f->mBpp == 3 ? Image::FORMAT_RGB : Image::FORMAT_RGBA, data); clip->popFrame(); - return 1; + if (p_tex->get_width() == 0) { + p_tex->create(frame.get_width(),frame.get_height(),frame.get_format(),Texture::FLAG_VIDEO_SURFACE|Texture::FLAG_FILTER); + p_tex->set_data(frame); + } else { + + p_tex->set_data(frame); + }; }; +/* Image VideoStreamTheoraplayer::pop_frame() { Image ret = frame; frame = Image(); return ret; }; +*/ Image VideoStreamTheoraplayer::peek_frame() const { - return frame; + return Image(); }; void VideoStreamTheoraplayer::update(float p_time) { @@ -386,7 +404,7 @@ void VideoStreamTheoraplayer::set_file(const String& p_file) { if (p_file.find(".mp4") != -1) { std::string file = p_file.replace("res://", "").utf8().get_data(); - clip = mgr->createVideoClip(file); + clip = mgr->createVideoClip(file, TH_BGRX, 16); memdelete(f); } else { diff --git a/drivers/theoraplayer/video_stream_theoraplayer.h b/drivers/theoraplayer/video_stream_theoraplayer.h index 063bf38953..67a2db710b 100644 --- a/drivers/theoraplayer/video_stream_theoraplayer.h +++ b/drivers/theoraplayer/video_stream_theoraplayer.h @@ -3,6 +3,7 @@ #include "scene/resources/video_stream.h" #include "io/resource_loader.h" +#include "scene/resources/texture.h" class TheoraVideoManager; class TheoraVideoClip; @@ -11,7 +12,7 @@ class VideoStreamTheoraplayer : public VideoStream { OBJ_TYPE(VideoStreamTheoraplayer,VideoStream); - mutable Image frame; + mutable DVector<uint8_t> data; TheoraVideoManager* mgr; TheoraVideoClip* clip; bool started; @@ -37,7 +38,7 @@ public: virtual float get_length() const; virtual int get_pending_frame_count() const; - virtual Image pop_frame(); + virtual void pop_frame(Ref<ImageTexture> p_tex); virtual Image peek_frame() const; void update(float p_time); diff --git a/modules/gdscript/gd_compiler.cpp b/modules/gdscript/gd_compiler.cpp index 4c56468297..5595db95de 100644 --- a/modules/gdscript/gd_compiler.cpp +++ b/modules/gdscript/gd_compiler.cpp @@ -65,18 +65,18 @@ bool GDCompiler::_create_unary_operator(CodeGen& codegen,const GDParser::Operato return true; } -bool GDCompiler::_create_binary_operator(CodeGen& codegen,const GDParser::OperatorNode *on,Variant::Operator op, int p_stack_level) { +bool GDCompiler::_create_binary_operator(CodeGen& codegen,const GDParser::OperatorNode *on,Variant::Operator op, int p_stack_level,bool p_initializer) { ERR_FAIL_COND_V(on->arguments.size()!=2,false); - int src_address_a = _parse_expression(codegen,on->arguments[0],p_stack_level); + int src_address_a = _parse_expression(codegen,on->arguments[0],p_stack_level,false,p_initializer); if (src_address_a<0) return false; if (src_address_a&GDFunction::ADDR_TYPE_STACK<<GDFunction::ADDR_BITS) p_stack_level++; //uses stack for return, increase stack - int src_address_b = _parse_expression(codegen,on->arguments[1],p_stack_level); + int src_address_b = _parse_expression(codegen,on->arguments[1],p_stack_level,false,p_initializer); if (src_address_b<0) return false; @@ -111,6 +111,7 @@ int GDCompiler::_parse_assign_right_expression(CodeGen& codegen,const GDParser:: Variant::Operator var_op=Variant::OP_MAX; + switch(p_expression->op) { case GDParser::OperatorNode::OP_ASSIGN_ADD: var_op=Variant::OP_ADD; break; @@ -123,6 +124,7 @@ int GDCompiler::_parse_assign_right_expression(CodeGen& codegen,const GDParser:: case GDParser::OperatorNode::OP_ASSIGN_BIT_AND: var_op=Variant::OP_BIT_AND; break; case GDParser::OperatorNode::OP_ASSIGN_BIT_OR: var_op=Variant::OP_BIT_OR; break; case GDParser::OperatorNode::OP_ASSIGN_BIT_XOR: var_op=Variant::OP_BIT_XOR; break; + case GDParser::OperatorNode::OP_INIT_ASSIGN: case GDParser::OperatorNode::OP_ASSIGN: { //none @@ -133,12 +135,14 @@ int GDCompiler::_parse_assign_right_expression(CodeGen& codegen,const GDParser:: } } + bool initializer = p_expression->op==GDParser::OperatorNode::OP_INIT_ASSIGN; + if (var_op==Variant::OP_MAX) { - return _parse_expression(codegen,p_expression->arguments[1],p_stack_level); + return _parse_expression(codegen,p_expression->arguments[1],p_stack_level,false,initializer); } - if (!_create_binary_operator(codegen,p_expression,var_op,p_stack_level)) + if (!_create_binary_operator(codegen,p_expression,var_op,p_stack_level,initializer)) return -1; int dst_addr=(p_stack_level)|(GDFunction::ADDR_TYPE_STACK<<GDFunction::ADDR_BITS); @@ -148,7 +152,7 @@ int GDCompiler::_parse_assign_right_expression(CodeGen& codegen,const GDParser:: } -int GDCompiler::_parse_expression(CodeGen& codegen,const GDParser::Node *p_expression, int p_stack_level,bool p_root) { +int GDCompiler::_parse_expression(CodeGen& codegen,const GDParser::Node *p_expression, int p_stack_level,bool p_root,bool p_initializer) { switch(p_expression->type) { @@ -165,17 +169,16 @@ int GDCompiler::_parse_expression(CodeGen& codegen,const GDParser::Node *p_expre StringName identifier = in->name; // TRY STACK! - if (codegen.stack_identifiers.has(identifier)) { + if (!p_initializer && codegen.stack_identifiers.has(identifier)) { int pos = codegen.stack_identifiers[identifier]; return pos|(GDFunction::ADDR_TYPE_STACK_VARIABLE<<GDFunction::ADDR_BITS); } - //TRY ARGUMENTS! + //TRY MEMBERS! if (!codegen.function_node || !codegen.function_node->_static) { // TRY MEMBER VARIABLES! - //static function if (codegen.script->member_indices.has(identifier)) { @@ -686,6 +689,7 @@ int GDCompiler::_parse_expression(CodeGen& codegen,const GDParser::Node *p_expre case GDParser::OperatorNode::OP_ASSIGN_BIT_AND: case GDParser::OperatorNode::OP_ASSIGN_BIT_OR: case GDParser::OperatorNode::OP_ASSIGN_BIT_XOR: + case GDParser::OperatorNode::OP_INIT_ASSIGN: case GDParser::OperatorNode::OP_ASSIGN: { ERR_FAIL_COND_V(on->arguments.size()!=2,-1); @@ -843,7 +847,7 @@ int GDCompiler::_parse_expression(CodeGen& codegen,const GDParser::Node *p_expre int slevel = p_stack_level; - int dst_address_a = _parse_expression(codegen,on->arguments[0],slevel); + int dst_address_a = _parse_expression(codegen,on->arguments[0],slevel,false,on->op==GDParser::OperatorNode::OP_INIT_ASSIGN); if (dst_address_a<0) return -1; diff --git a/modules/gdscript/gd_compiler.h b/modules/gdscript/gd_compiler.h index cda221dab0..b83d0ded4b 100644 --- a/modules/gdscript/gd_compiler.h +++ b/modules/gdscript/gd_compiler.h @@ -153,11 +153,11 @@ class GDCompiler { void _set_error(const String& p_error,const GDParser::Node *p_node); bool _create_unary_operator(CodeGen& codegen,const GDParser::OperatorNode *on,Variant::Operator op, int p_stack_level); - bool _create_binary_operator(CodeGen& codegen,const GDParser::OperatorNode *on,Variant::Operator op, int p_stack_level); + bool _create_binary_operator(CodeGen& codegen,const GDParser::OperatorNode *on,Variant::Operator op, int p_stack_level,bool p_initializer=false); //int _parse_subexpression(CodeGen& codegen,const GDParser::BlockNode *p_block,const GDParser::Node *p_expression); int _parse_assign_right_expression(CodeGen& codegen,const GDParser::OperatorNode *p_expression, int p_stack_level); - int _parse_expression(CodeGen& codegen,const GDParser::Node *p_expression, int p_stack_level,bool p_root=false); + int _parse_expression(CodeGen& codegen,const GDParser::Node *p_expression, int p_stack_level,bool p_root=false,bool p_initializer=false); Error _parse_block(CodeGen& codegen,const GDParser::BlockNode *p_block,int p_stack_level=0,int p_break_addr=-1,int p_continue_addr=-1); Error _parse_function(GDScript *p_script,const GDParser::ClassNode *p_class,const GDParser::FunctionNode *p_func); Error _parse_class(GDScript *p_script,GDScript *p_owner,const GDParser::ClassNode *p_class); diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp index d1f511b46e..b1db087fb3 100644 --- a/modules/gdscript/gd_editor.cpp +++ b/modules/gdscript/gd_editor.cpp @@ -33,6 +33,7 @@ void GDScriptLanguage::get_comment_delimiters(List<String> *p_delimiters) const { p_delimiters->push_back("#"); + p_delimiters->push_back("\"\"\""); } void GDScriptLanguage::get_string_delimiters(List<String> *p_delimiters) const { diff --git a/modules/gdscript/gd_parser.cpp b/modules/gdscript/gd_parser.cpp index 659e19a9d0..dc6b0ff962 100644 --- a/modules/gdscript/gd_parser.cpp +++ b/modules/gdscript/gd_parser.cpp @@ -2429,7 +2429,7 @@ void GDParser::_parse_class(ClassNode *p_class) { id->name=member.identifier; OperatorNode *op = alloc_node<OperatorNode>(); - op->op=OperatorNode::OP_ASSIGN; + op->op=OperatorNode::OP_INIT_ASSIGN; op->arguments.push_back(id); op->arguments.push_back(subexpr); diff --git a/modules/gdscript/gd_parser.h b/modules/gdscript/gd_parser.h index 16a9a85290..5fac34396c 100644 --- a/modules/gdscript/gd_parser.h +++ b/modules/gdscript/gd_parser.h @@ -215,6 +215,7 @@ public: OP_MOD, OP_SHIFT_LEFT, OP_SHIFT_RIGHT, + OP_INIT_ASSIGN, OP_ASSIGN, OP_ASSIGN_ADD, OP_ASSIGN_SUB, diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp index b20fc51a03..8738185d41 100644 --- a/modules/gdscript/gd_script.cpp +++ b/modules/gdscript/gd_script.cpp @@ -2448,6 +2448,7 @@ void GDScriptLanguage::get_reserved_words(List<String> *p_words) const { "if" , "in" , "null" , + "not" , "return" , "self" , "while" , diff --git a/modules/gdscript/gd_tokenizer.cpp b/modules/gdscript/gd_tokenizer.cpp index 0fa83b9eb4..0f6ee41616 100644 --- a/modules/gdscript/gd_tokenizer.cpp +++ b/modules/gdscript/gd_tokenizer.cpp @@ -239,8 +239,7 @@ void GDTokenizerText::_advance() { bool is_node_path = false; - bool is_string = false; - bool is_string_alt = false; + StringMode string_mode=STRING_DOUBLE_QUOTE; switch(GETCHAR(0)) { case 0: @@ -538,22 +537,35 @@ void GDTokenizerText::_advance() { is_node_path=true; case '\'': - is_string_alt = true; + string_mode=STRING_SINGLE_QUOTE; case '"': { - is_string = is_string_alt ? false : true; int i=1; + if (string_mode==STRING_DOUBLE_QUOTE && GETCHAR(i)=='"' && GETCHAR(i+1)=='"') { + i+=2; + string_mode=STRING_MULTILINE; + + } + + String str; while(true) { - if (CharType(GETCHAR(i)==0)) { + if (CharType(GETCHAR(i))==0) { _make_error("Unterminated String"); return; - } else if( CharType(GETCHAR(i)=='"') && is_string ) { + } else if( string_mode==STRING_DOUBLE_QUOTE && CharType(GETCHAR(i))=='"' ) { break; - } else if( CharType(GETCHAR(i)=='\'') && is_string_alt ) { - break; - } else if (CharType(GETCHAR(i)=='\\')) { + } else if( string_mode==STRING_SINGLE_QUOTE && CharType(GETCHAR(i))=='\'' ) { + break; + } else if( string_mode==STRING_MULTILINE && CharType(GETCHAR(i))=='\"' && CharType(GETCHAR(i+1))=='\"' && CharType(GETCHAR(i+2))=='\"') { + i+=2; + break; + } else if( string_mode!=STRING_MULTILINE && CharType(GETCHAR(i))=='\n') { + _make_error("Unexpected EOL at String."); + return; + + } else if (CharType(GETCHAR(i))=='\\') { //escaped characters... i++; CharType next = GETCHAR(i); diff --git a/modules/gdscript/gd_tokenizer.h b/modules/gdscript/gd_tokenizer.h index 4f9522fb56..fe7bfa73ca 100644 --- a/modules/gdscript/gd_tokenizer.h +++ b/modules/gdscript/gd_tokenizer.h @@ -122,6 +122,13 @@ public: }; protected: + + enum StringMode { + STRING_SINGLE_QUOTE, + STRING_DOUBLE_QUOTE, + STRING_MULTILINE + }; + static const char* token_names[TK_MAX]; public: static const char *get_token_name(Token p_token); diff --git a/platform/osx/audio_driver_osx.cpp b/platform/osx/audio_driver_osx.cpp index 8f28e8ff63..638ac7e504 100644 --- a/platform/osx/audio_driver_osx.cpp +++ b/platform/osx/audio_driver_osx.cpp @@ -101,7 +101,16 @@ OSStatus AudioDriverOSX::output_callback(void *inRefCon, AudioBuffer *abuf; AudioDriverOSX* ad = (AudioDriverOSX*)inRefCon; - if (!ad->active) { + bool mix = true; + + if (!ad->active) + mix = false; + else if (ad->mutex) { + mix = ad->mutex->try_lock() == OK; + }; + + + if (!mix) { for (unsigned int i = 0; i < ioData->mNumberBuffers; i++) { abuf = &ioData->mBuffers[i]; zeromem(abuf->mData, abuf->mDataByteSize); @@ -120,9 +129,9 @@ OSStatus AudioDriverOSX::output_callback(void *inRefCon, while (frames_left) { int frames = MIN(frames_left, ad->buffer_frames); - ad->lock(); + //ad->lock(); ad->audio_server_process(frames, ad->samples_in); - ad->unlock(); + //ad->unlock(); for(int i = 0; i < frames * ad->channels; i++) { @@ -134,6 +143,9 @@ OSStatus AudioDriverOSX::output_callback(void *inRefCon, }; }; + if (ad->mutex) + ad->mutex->unlock(); + return 0; }; @@ -149,12 +161,27 @@ AudioDriverSW::OutputFormat AudioDriverOSX::get_output_format() const { return OUTPUT_STEREO; }; -void AudioDriverOSX::lock() {}; -void AudioDriverOSX::unlock() {}; +void AudioDriverOSX::lock() { + if (active && mutex) + mutex->lock(); +}; +void AudioDriverOSX::unlock() { + if (active && mutex) + mutex->unlock(); +}; void AudioDriverOSX::finish() { memdelete_arr(samples_in); }; +AudioDriverOSX::AudioDriverOSX() { + + mutex=Mutex::create();//NULL; +}; + +AudioDriverOSX::~AudioDriverOSX() { + +}; + #endif diff --git a/platform/osx/audio_driver_osx.h b/platform/osx/audio_driver_osx.h index daa388fb86..c0336eb816 100644 --- a/platform/osx/audio_driver_osx.h +++ b/platform/osx/audio_driver_osx.h @@ -39,6 +39,7 @@ class AudioDriverOSX : public AudioDriverSW { AudioComponentInstance audio_unit; bool active; + Mutex *mutex; int channels; int32_t* samples_in; @@ -64,6 +65,9 @@ public: virtual void lock(); virtual void unlock(); virtual void finish(); + + AudioDriverOSX(); + ~AudioDriverOSX(); }; #endif diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 16f70b60d0..be92ee8f6d 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -209,6 +209,16 @@ def configure(env): env.Append(CPPFLAGS=['-DRTAUDIO_ENABLED'])
env.Append(CCFLAGS=['-DGLES2_ENABLED','-DGLES1_ENABLED','-DGLEW_ENABLED'])
env.Append(LIBS=['mingw32','opengl32', 'dsound', 'ole32', 'd3d9','winmm','gdi32','iphlpapi','wsock32','kernel32'])
+
+ if (env["bits"]=="32" and env["mingw64_for_32"]!="yes"):
+# env.Append(LIBS=['gcc_s'])
+ #--with-arch=i686
+ env.Append(CPPFLAGS=['-march=i686'])
+ env.Append(LINKFLAGS=['-march=i686'])
+
+
+
+
#'d3dx9d'
env.Append(CPPFLAGS=['-DMINGW_ENABLED'])
env.Append(LINKFLAGS=['-g'])
diff --git a/scene/2d/collision_object_2d.cpp b/scene/2d/collision_object_2d.cpp index e5d9872a28..56359e6015 100644 --- a/scene/2d/collision_object_2d.cpp +++ b/scene/2d/collision_object_2d.cpp @@ -156,13 +156,13 @@ bool CollisionObject2D::_get(const StringName& p_name,Variant &r_ret) const { void CollisionObject2D::_get_property_list( List<PropertyInfo> *p_list) const { - p_list->push_back( PropertyInfo(Variant::INT,"shape_count",PROPERTY_HINT_RANGE,"0,256,1",PROPERTY_USAGE_NOEDITOR) ); + p_list->push_back( PropertyInfo(Variant::INT,"shape_count",PROPERTY_HINT_RANGE,"0,256,1",PROPERTY_USAGE_NOEDITOR|PROPERTY_USAGE_NO_INSTANCE_STATE) ); for(int i=0;i<shapes.size();i++) { String path="shapes/"+itos(i)+"/"; - p_list->push_back( PropertyInfo(Variant::OBJECT,path+"shape",PROPERTY_HINT_RESOURCE_TYPE,"Shape2D",PROPERTY_USAGE_NOEDITOR) ); - p_list->push_back( PropertyInfo(Variant::TRANSFORM,path+"transform",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR) ); - p_list->push_back( PropertyInfo(Variant::BOOL,path+"trigger",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR) ); + p_list->push_back( PropertyInfo(Variant::OBJECT,path+"shape",PROPERTY_HINT_RESOURCE_TYPE,"Shape2D",PROPERTY_USAGE_NOEDITOR|PROPERTY_USAGE_NO_INSTANCE_STATE) ); + p_list->push_back( PropertyInfo(Variant::TRANSFORM,path+"transform",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR|PROPERTY_USAGE_NO_INSTANCE_STATE) ); + p_list->push_back( PropertyInfo(Variant::BOOL,path+"trigger",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR|PROPERTY_USAGE_NO_INSTANCE_STATE) ); } } diff --git a/scene/3d/body_shape.cpp b/scene/3d/body_shape.cpp index b291ce7c72..947acc6549 100644 --- a/scene/3d/body_shape.cpp +++ b/scene/3d/body_shape.cpp @@ -44,7 +44,6 @@ void CollisionShape::_update_body() { - if (get_parent() && get_parent()->cast_to<CollisionObject>()) get_parent()->cast_to<CollisionObject>()->_update_shapes_from_children(); @@ -72,7 +71,7 @@ void CollisionShape::make_convex_from_brothers() { } } - +/* void CollisionShape::_update_indicator() { @@ -300,9 +299,12 @@ void CollisionShape::_update_indicator() { } - +*/ void CollisionShape::_add_to_collision_object(Object* p_cshape) { + if (unparenting) + return; + CollisionObject *co=p_cshape->cast_to<CollisionObject>(); ERR_FAIL_COND(!co); @@ -318,22 +320,25 @@ void CollisionShape::_notification(int p_what) { switch(p_what) { - case NOTIFICATION_ENTER_WORLD: { - indicator_instance = VisualServer::get_singleton()->instance_create2(indicator,get_world()->get_scenario()); + case NOTIFICATION_ENTER_SCENE: { + unparenting=false; + + //indicator_instance = VisualServer::get_singleton()->instance_create2(indicator,get_world()->get_scenario()); } break; case NOTIFICATION_TRANSFORM_CHANGED: { - VisualServer::get_singleton()->instance_set_transform(indicator_instance,get_global_transform()); + // VisualServer::get_singleton()->instance_set_transform(indicator_instance,get_global_transform()); if (updating_body) { _update_body(); } } break; - case NOTIFICATION_EXIT_WORLD: { - if (indicator_instance.is_valid()) { + case NOTIFICATION_EXIT_SCENE: { + /* if (indicator_instance.is_valid()) { VisualServer::get_singleton()->free(indicator_instance); indicator_instance=RID(); - } + }*/ } break; case NOTIFICATION_UNPARENTED: { + unparenting=true; if (updating_body) _update_body(); } break; @@ -411,15 +416,16 @@ bool CollisionShape::is_trigger() const{ CollisionShape::CollisionShape() { - indicator = VisualServer::get_singleton()->mesh_create(); + //indicator = VisualServer::get_singleton()->mesh_create(); updating_body=true; + unparenting=false; trigger=false; } CollisionShape::~CollisionShape() { if (!shape.is_null()) shape->unregister_owner(this); - VisualServer::get_singleton()->free(indicator); + //VisualServer::get_singleton()->free(indicator); } #if 0 diff --git a/scene/3d/body_shape.h b/scene/3d/body_shape.h index d1cb229f70..b3fbaca178 100644 --- a/scene/3d/body_shape.h +++ b/scene/3d/body_shape.h @@ -37,19 +37,23 @@ class CollisionShape : public Spatial { OBJ_TYPE( CollisionShape, Spatial ); OBJ_CATEGORY("3D Physics Nodes"); + Ref<Shape> shape; + + /* RID _get_visual_instance_rid() const; - Ref<Shape> shape; void _update_indicator(); RID material; RID indicator; RID indicator_instance; + */ void resource_changed(RES res); bool updating_body; + bool unparenting; bool trigger; void _update_body(); diff --git a/scene/3d/collision_object.cpp b/scene/3d/collision_object.cpp index e9d3e73906..47d29cec1c 100644 --- a/scene/3d/collision_object.cpp +++ b/scene/3d/collision_object.cpp @@ -160,13 +160,13 @@ bool CollisionObject::_get(const StringName& p_name,Variant &r_ret) const { void CollisionObject::_get_property_list( List<PropertyInfo> *p_list) const { - p_list->push_back( PropertyInfo(Variant::INT,"shape_count",PROPERTY_HINT_RANGE,"0,256,1",PROPERTY_USAGE_NOEDITOR) ); + p_list->push_back( PropertyInfo(Variant::INT,"shape_count",PROPERTY_HINT_RANGE,"0,256,1",PROPERTY_USAGE_NOEDITOR|PROPERTY_USAGE_NO_INSTANCE_STATE) ); for(int i=0;i<shapes.size();i++) { String path="shapes/"+itos(i)+"/"; - p_list->push_back( PropertyInfo(Variant::OBJECT,path+"shape",PROPERTY_HINT_RESOURCE_TYPE,"Shape",PROPERTY_USAGE_NOEDITOR) ); - p_list->push_back( PropertyInfo(Variant::TRANSFORM,path+"transform",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR) ); - p_list->push_back( PropertyInfo(Variant::BOOL,path+"trigger",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR) ); + p_list->push_back( PropertyInfo(Variant::OBJECT,path+"shape",PROPERTY_HINT_RESOURCE_TYPE,"Shape",PROPERTY_USAGE_NOEDITOR|PROPERTY_USAGE_NO_INSTANCE_STATE) ); + p_list->push_back( PropertyInfo(Variant::TRANSFORM,path+"transform",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR|PROPERTY_USAGE_NO_INSTANCE_STATE) ); + p_list->push_back( PropertyInfo(Variant::BOOL,path+"trigger",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR|PROPERTY_USAGE_NO_INSTANCE_STATE) ); } } diff --git a/scene/3d/interpolated_camera.cpp b/scene/3d/interpolated_camera.cpp index 4d8c9cf7a5..f795f935ae 100644 --- a/scene/3d/interpolated_camera.cpp +++ b/scene/3d/interpolated_camera.cpp @@ -50,7 +50,7 @@ void InterpolatedCamera::_notification(int p_what) { float delta = speed*get_process_delta_time(); Transform target_xform = node->get_global_transform(); - Transform local_transform = get_transform(); + Transform local_transform = get_global_transform(); local_transform = local_transform.interpolate_with(target_xform,delta); set_global_transform(local_transform); @@ -136,7 +136,7 @@ void InterpolatedCamera::_bind_methods() { ObjectTypeDB::bind_method(_MD("set_target_path","target_path"),&InterpolatedCamera::set_target_path); ObjectTypeDB::bind_method(_MD("get_target_path"),&InterpolatedCamera::get_target_path); - ObjectTypeDB::bind_method(_MD("set_target","target"),&InterpolatedCamera::_set_target); + ObjectTypeDB::bind_method(_MD("set_target","target:Camera"),&InterpolatedCamera::_set_target); ObjectTypeDB::bind_method(_MD("set_speed","speed"),&InterpolatedCamera::set_speed); ObjectTypeDB::bind_method(_MD("get_speed"),&InterpolatedCamera::get_speed); diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index 7745ce11fc..cf9fcfa72a 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -346,6 +346,8 @@ bool BaseButton::get_click_on_press() const { } + + void BaseButton::_bind_methods() { ObjectTypeDB::bind_method(_MD("_input_event"),&BaseButton::_input_event); @@ -358,6 +360,7 @@ void BaseButton::_bind_methods() { ObjectTypeDB::bind_method(_MD("is_disabled"),&BaseButton::is_disabled); ObjectTypeDB::bind_method(_MD("set_click_on_press","enable"),&BaseButton::set_click_on_press); ObjectTypeDB::bind_method(_MD("get_click_on_press"),&BaseButton::get_click_on_press); + ObjectTypeDB::bind_method(_MD("get_draw_mode"),&BaseButton::get_draw_mode); ADD_SIGNAL( MethodInfo("pressed" ) ); ADD_SIGNAL( MethodInfo("toggled", PropertyInfo( Variant::BOOL,"pressed") ) ); @@ -365,6 +368,11 @@ void BaseButton::_bind_methods() { ADD_PROPERTY( PropertyInfo( Variant::BOOL, "toggle_mode"), _SCS("set_toggle_mode"), _SCS("is_toggle_mode")); ADD_PROPERTY( PropertyInfo( Variant::BOOL, "click_on_press"), _SCS("set_click_on_press"), _SCS("get_click_on_press")); + BIND_CONSTANT( DRAW_NORMAL ); + BIND_CONSTANT( DRAW_PRESSED ); + BIND_CONSTANT( DRAW_HOVER ); + BIND_CONSTANT( DRAW_DISABLED ); + } BaseButton::BaseButton() { diff --git a/scene/gui/base_button.h b/scene/gui/base_button.h index a2c640b9cf..a376591ebb 100644 --- a/scene/gui/base_button.h +++ b/scene/gui/base_button.h @@ -61,15 +61,8 @@ class BaseButton : public Control { protected: - enum DrawMode { - DRAW_NORMAL, - DRAW_PRESSED, - DRAW_HOVER, - DRAW_DISABLED, - }; - DrawMode get_draw_mode() const; virtual void pressed(); virtual void toggled(bool p_pressed); @@ -78,7 +71,16 @@ protected: void _notification(int p_what); public: - + + enum DrawMode { + DRAW_NORMAL, + DRAW_PRESSED, + DRAW_HOVER, + DRAW_DISABLED, + }; + + DrawMode get_draw_mode() const; + /* Signals */ bool is_pressed() const; ///< return wether button is pressed (toggled in) @@ -101,4 +103,6 @@ public: }; +VARIANT_ENUM_CAST( BaseButton::DrawMode ); + #endif diff --git a/scene/gui/video_player.cpp b/scene/gui/video_player.cpp index 9a1c070529..0d77560d7b 100644 --- a/scene/gui/video_player.cpp +++ b/scene/gui/video_player.cpp @@ -45,20 +45,15 @@ void VideoPlayer::_notification(int p_notification) { return; if (paused) return; + if (!stream->is_playing()) + return; stream->update(get_scene()->get_idle_process_time()); - while (stream->get_pending_frame_count()) { - - Image img = stream->pop_frame(); - if (texture->get_width() == 0) { - texture->create(img.get_width(),img.get_height(),img.get_format(),Texture::FLAG_VIDEO_SURFACE|Texture::FLAG_FILTER); - update(); - minimum_size_changed(); - } else { - - if (stream->get_pending_frame_count() == 0) - texture->set_data(img); - }; + int prev_width = texture->get_width(); + stream->pop_frame(texture); + if (prev_width == 0) { + update(); + minimum_size_changed(); }; } break; @@ -257,9 +252,9 @@ void VideoPlayer::_bind_methods() { VideoPlayer::VideoPlayer() { volume=1; - loops=false; - paused=false; - autoplay=false; + loops = false; + paused = false; + autoplay = false; expand = true; loops = false; }; diff --git a/scene/io/resource_format_image.cpp b/scene/io/resource_format_image.cpp index b0fcf9717b..16c2ec9706 100644 --- a/scene/io/resource_format_image.cpp +++ b/scene/io/resource_format_image.cpp @@ -131,14 +131,55 @@ RES ResourceFormatLoaderImage::load(const String &p_path,const String& p_origina uint32_t flags=0; - if (bool(GLOBAL_DEF("image_loader/filter",true))) + + FileAccess *f2 = FileAccess::open(p_path+".flags",FileAccess::READ); + Map<String,bool> flags_found; + if (f2) { + + while(!f2->eof_reached()) { + String l2 = f2->get_line(); + int eqpos = l2.find("="); + if (eqpos!=-1) { + String flag=l2.substr(0,eqpos).strip_edges(); + String val=l2.substr(eqpos+1,l2.length()).strip_edges().to_lower(); + flags_found[flag]=(val=="true" || val=="1")?true:false; + } + } + memdelete(f2); + } + + + if (flags_found.has("filter")) { + if (flags_found["filter"]) + flags|=Texture::FLAG_FILTER; + } else if (bool(GLOBAL_DEF("image_loader/filter",true))) { flags|=Texture::FLAG_FILTER; - if (bool(GLOBAL_DEF("image_loader/gen_mipmaps",true))) + } + + + if (flags_found.has("gen_mipmaps")) { + if (flags_found["gen_mipmaps"]) + flags|=Texture::FLAG_MIPMAPS; + } else if (bool(GLOBAL_DEF("image_loader/gen_mipmaps",true))) { flags|=Texture::FLAG_MIPMAPS; - if (bool(GLOBAL_DEF("image_loader/repeat",false))) + } + + if (flags_found.has("repeat")) { + if (flags_found["repeat"]) + flags|=Texture::FLAG_REPEAT; + } else if (bool(GLOBAL_DEF("image_loader/repeat",true))) { flags|=Texture::FLAG_REPEAT; + } + if (flags_found.has("anisotropic")) { + if (flags_found["anisotropic"]) + flags|=Texture::FLAG_ANISOTROPIC_FILTER; + } + if (flags_found.has("tolinear")) { + if (flags_found["tolinear"]) + flags|=Texture::FLAG_CONVERT_TO_LINEAR; + } if (debug_load_times) begtime=OS::get_singleton()->get_ticks_usec(); diff --git a/scene/main/node.cpp b/scene/main/node.cpp index e511a057c5..667b4639a9 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -1234,7 +1234,7 @@ void Node::generate_instance_state() { for( List<PropertyInfo>::Element *E=properties.front();E;E=E->next() ) { PropertyInfo &pi=E->get(); - if (!(pi.usage&PROPERTY_USAGE_EDITOR) || !(pi.usage&PROPERTY_USAGE_STORAGE)) + if ((pi.usage&PROPERTY_USAGE_NO_INSTANCE_STATE) || !(pi.usage&PROPERTY_USAGE_EDITOR) || !(pi.usage&PROPERTY_USAGE_STORAGE)) continue; data.instance_state[pi.name]=get(pi.name); @@ -1424,6 +1424,20 @@ Node *Node::duplicate_and_reown(const Map<Node*,Node*>& p_reown_map) const { node->set_name(get_name()); + List<PropertyInfo> plist; + + get_property_list(&plist); + + for(List<PropertyInfo>::Element *E=plist.front();E;E=E->next()) { + + if (!(E->get().usage&PROPERTY_USAGE_STORAGE)) + continue; + String name = E->get().name; + node->set( name, get(name) ); + + } + + for(int i=0;i<get_child_count();i++) { get_child(i)->_duplicate_and_reown(node,p_reown_map); diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 6b7ed66463..ac496cac4e 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -243,7 +243,7 @@ void Viewport::update_worlds() { void Viewport::_test_new_mouseover(ObjectID new_collider) { - +#ifndef _3D_DISABLED if (new_collider!=physics_object_over) { if (physics_object_over) { @@ -271,7 +271,7 @@ void Viewport::_test_new_mouseover(ObjectID new_collider) { physics_object_over=new_collider; } - +#endif } @@ -353,7 +353,7 @@ void Viewport::_notification(int p_what) { case NOTIFICATION_FIXED_PROCESS: { if (physics_object_picking) { - +#ifndef _3D_DISABLED Vector2 last_pos(1e20,1e20); CollisionObject *last_object; ObjectID last_id=0; @@ -499,6 +499,7 @@ void Viewport::_notification(int p_what) { } } +#endif } } break; diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp index f3b13f30bf..679f474ada 100644 --- a/scene/register_scene_types.cpp +++ b/scene/register_scene_types.cpp @@ -397,6 +397,13 @@ void register_scene_types() { ObjectTypeDB::register_type<BakedLightSampler>(); ObjectTypeDB::register_type<WorldEnvironment>(); + ObjectTypeDB::register_virtual_type<Joint>(); + ObjectTypeDB::register_type<PinJoint>(); + ObjectTypeDB::register_type<HingeJoint>(); + ObjectTypeDB::register_type<SliderJoint>(); + ObjectTypeDB::register_type<ConeTwistJoint>(); + ObjectTypeDB::register_type<Generic6DOFJoint>(); + //scenariofx OS::get_singleton()->yield(); //may take time to init @@ -405,6 +412,7 @@ void register_scene_types() { ObjectTypeDB::register_type<SpatialStreamPlayer>(); ObjectTypeDB::register_type<SoundRoomParams>(); + #endif ObjectTypeDB::register_type<MeshLibrary>(); AcceptDialog::set_swap_ok_cancel( GLOBAL_DEF("display/swap_ok_cancel",bool(OS::get_singleton()->get_swap_ok_cancel())) ); @@ -422,12 +430,6 @@ void register_scene_types() { //ObjectTypeDB::register_type<PhysicsJointPin>(); - ObjectTypeDB::register_virtual_type<Joint>(); - ObjectTypeDB::register_type<PinJoint>(); - ObjectTypeDB::register_type<HingeJoint>(); - ObjectTypeDB::register_type<SliderJoint>(); - ObjectTypeDB::register_type<ConeTwistJoint>(); - ObjectTypeDB::register_type<Generic6DOFJoint>(); ObjectTypeDB::register_type<StreamPlayer>(); diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp index e6359f920b..5561b5ef90 100644 --- a/scene/resources/animation.cpp +++ b/scene/resources/animation.cpp @@ -1266,7 +1266,7 @@ T Animation::_interpolate( const Vector< TKey<T> >& p_keys, float p_time, Inter } } else { // no loop - + if (idx>=0) { if ((idx+1) < len) { diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp index 3aeccdc551..f4bb3088c3 100644 --- a/scene/resources/mesh.cpp +++ b/scene/resources/mesh.cpp @@ -743,6 +743,225 @@ Ref<TriangleMesh> Mesh::generate_triangle_mesh() const { } +Ref<Mesh> Mesh::create_outline(float p_margin) const { + + + Array arrays; + int index_accum=0; + for(int i=0;i<get_surface_count();i++) { + + if (surface_get_primitive_type(i)!=PRIMITIVE_TRIANGLES) + continue; + + Array a = surface_get_arrays(i); + int vcount=0; + + if (i==0) { + arrays=a; + DVector<Vector3> v=a[ARRAY_VERTEX]; + index_accum+=v.size(); + } else { + + for(int j=0;j<arrays.size();j++) { + + if (arrays[j].get_type()==Variant::NIL || a[j].get_type()==Variant::NIL) { + //mismatch, do not use + arrays[j]=Variant(); + continue; + } + + switch(j) { + + case ARRAY_VERTEX: + case ARRAY_NORMAL: { + + DVector<Vector3> dst = arrays[j]; + DVector<Vector3> src = a[j]; + if (j==ARRAY_VERTEX) + vcount=src.size(); + if (dst.size()==0 || src.size()==0) { + arrays[j]=Variant(); + continue; + } + dst.append_array(src); + arrays[j]=dst; + } break; + case ARRAY_TANGENT: + case ARRAY_BONES: + case ARRAY_WEIGHTS: { + + DVector<real_t> dst = arrays[j]; + DVector<real_t> src = a[j]; + if (dst.size()==0 || src.size()==0) { + arrays[j]=Variant(); + continue; + } + dst.append_array(src); + arrays[j]=dst; + + } break; + case ARRAY_COLOR: { + DVector<Color> dst = arrays[j]; + DVector<Color> src = a[j]; + if (dst.size()==0 || src.size()==0) { + arrays[j]=Variant(); + continue; + } + dst.append_array(src); + arrays[j]=dst; + + } break; + case ARRAY_TEX_UV: + case ARRAY_TEX_UV2: { + DVector<Vector2> dst = arrays[j]; + DVector<Vector2> src = a[j]; + if (dst.size()==0 || src.size()==0) { + arrays[j]=Variant(); + continue; + } + dst.append_array(src); + arrays[j]=dst; + + } break; + case ARRAY_INDEX: { + DVector<int> dst = arrays[j]; + DVector<int> src = a[j]; + if (dst.size()==0 || src.size()==0) { + arrays[j]=Variant(); + continue; + } + { + int ss = src.size(); + DVector<int>::Write w = src.write(); + for(int k=0;k<ss;k++) { + w[k]+=index_accum; + } + + } + dst.append_array(src); + arrays[j]=dst; + index_accum+=vcount; + + } break; + + } + } + } + } + + { + int tc=0; + DVector<int>::Write ir; + DVector<int> indices =arrays[ARRAY_INDEX]; + bool has_indices=false; + DVector<Vector3> vertices =arrays[ARRAY_VERTEX]; + int vc = vertices.size(); + ERR_FAIL_COND_V(!vc,Ref<Mesh>()); + DVector<Vector3>::Write r=vertices.write(); + + + if (indices.size()) { + vc=indices.size(); + ir=indices.write(); + has_indices=true; + } + + Map<Vector3,Vector3> normal_accum; + + //fill normals with triangle normals + for(int i=0;i<vc;i+=3) { + + + Vector3 t[3]; + + if (has_indices) { + t[0]=r[ir[i+0]]; + t[1]=r[ir[i+1]]; + t[2]=r[ir[i+2]]; + } else { + t[0]=r[i+0]; + t[1]=r[i+1]; + t[2]=r[i+2]; + } + + Vector3 n = Plane(t[0],t[1],t[2]).normal; + + for(int j=0;j<3;j++) { + + Map<Vector3,Vector3>::Element *E=normal_accum.find(t[j]); + if (!E) { + normal_accum[t[j]]=n; + } else { + float d = n.dot(E->get()); + if (d<1.0) + E->get()+=n*(1.0-d); + //E->get()+=n; + } + } + } + + //normalize + + for (Map<Vector3,Vector3>::Element *E=normal_accum.front();E;E=E->next()) { + E->get().normalize(); + } + + + //displace normals + int vc2 = vertices.size(); + + for(int i=0;i<vc2;i++) { + + + Vector3 t=r[i]; + + Map<Vector3,Vector3>::Element *E=normal_accum.find(t); + ERR_CONTINUE(!E); + + t+=E->get()*p_margin; + r[i]=t; + } + + r = DVector<Vector3>::Write(); + arrays[ARRAY_VERTEX]=vertices; + + if (!has_indices) { + + DVector<int> new_indices; + new_indices.resize(vertices.size()); + DVector<int>::Write iw = new_indices.write(); + + for(int j=0;j<vc2;j+=3) { + + iw[j]=j; + iw[j+1]=j+2; + iw[j+2]=j+1; + } + + iw=DVector<int>::Write(); + arrays[ARRAY_INDEX]=new_indices; + + } else { + + for(int j=0;j<vc;j+=3) { + + SWAP(ir[j+1],ir[j+2]); + } + ir=DVector<int>::Write(); + arrays[ARRAY_INDEX]=indices; + + } + } + + + + + Ref<Mesh> newmesh = memnew( Mesh ); + newmesh->add_surface(PRIMITIVE_TRIANGLES,arrays); + return newmesh; +} + + void Mesh::_bind_methods() { ObjectTypeDB::bind_method(_MD("add_morph_target","name"),&Mesh::add_morph_target); diff --git a/scene/resources/mesh.h b/scene/resources/mesh.h index d6ab6a1198..5aacc8be57 100644 --- a/scene/resources/mesh.h +++ b/scene/resources/mesh.h @@ -166,6 +166,8 @@ public: Ref<Shape> create_trimesh_shape() const; Ref<Shape> create_convex_shape() const; + Ref<Mesh> create_outline(float p_margin) const; + void center_geometry(); void regen_normalmaps(); diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index 75a1b765ee..5883686f20 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -272,6 +272,10 @@ Error PackedScene::_parse_node(Node *p_owner,Node *p_node,int p_parent_idx, Map< continue; }*/ + if (E->get().usage & PROPERTY_USAGE_NO_INSTANCE_STATE) { + continue; + } + if (instance_state[name]==value) { continue; } diff --git a/scene/resources/video_stream.h b/scene/resources/video_stream.h index eafacce159..1bc8a5e5bc 100644 --- a/scene/resources/video_stream.h +++ b/scene/resources/video_stream.h @@ -30,7 +30,7 @@ #define VIDEO_STREAM_H #include "audio_stream_resampled.h" - +#include "scene/resources/texture.h" class VideoStream : public Resource { @@ -59,7 +59,7 @@ public: virtual void seek_pos(float p_time)=0; virtual int get_pending_frame_count() const=0; - virtual Image pop_frame()=0; + virtual void pop_frame(Ref<ImageTexture> p_tex)=0; virtual Image peek_frame() const=0; virtual void update(float p_time)=0; diff --git a/servers/physics_2d/body_2d_sw.cpp b/servers/physics_2d/body_2d_sw.cpp index fbad19f6be..591bf046ef 100644 --- a/servers/physics_2d/body_2d_sw.cpp +++ b/servers/physics_2d/body_2d_sw.cpp @@ -65,7 +65,13 @@ void Body2DSW::update_inertias() { float mass = area * this->mass / total_area; - _inertia += shape->get_moment_of_inertia(mass) + mass * get_shape_transform(i).get_origin().length_squared(); + Matrix32 mtx = get_shape_transform(i); + Vector2 scale = mtx.get_scale(); + _inertia += shape->get_moment_of_inertia(mass,scale) + mass * mtx.get_origin().length_squared(); + //Rect2 ab = get_shape_aabb(i); + //_inertia+=mass*ab.size.dot(ab.size)/12.0f; + + } diff --git a/servers/physics_2d/collision_solver_2d_sat.cpp b/servers/physics_2d/collision_solver_2d_sat.cpp index f73ed5732e..9ed594e0eb 100644 --- a/servers/physics_2d/collision_solver_2d_sat.cpp +++ b/servers/physics_2d/collision_solver_2d_sat.cpp @@ -1086,6 +1086,7 @@ static void _collision_rectangle_convex_polygon(const Shape2DSW* p_a,const Matri SeparatorAxisTest2D<RectangleShape2DSW,ConvexPolygonShape2DSW,castA,castB,withMargin> separator(rectangle_A,p_transform_a,convex_B,p_transform_b,p_collector,p_motion_a,p_motion_b,p_margin_A,p_margin_B); + if (!separator.test_previous_axis()) return; diff --git a/servers/physics_2d/shape_2d_sw.cpp b/servers/physics_2d/shape_2d_sw.cpp index 012c4ed404..336eec73b5 100644 --- a/servers/physics_2d/shape_2d_sw.cpp +++ b/servers/physics_2d/shape_2d_sw.cpp @@ -131,7 +131,7 @@ bool LineShape2DSW::intersect_segment(const Vector2& p_begin,const Vector2& p_en return true; } -real_t LineShape2DSW::get_moment_of_inertia(float p_mass) const { +real_t LineShape2DSW::get_moment_of_inertia(float p_mass, const Vector2 &p_scale) const { return 0; } @@ -180,7 +180,7 @@ bool RayShape2DSW::intersect_segment(const Vector2& p_begin,const Vector2& p_end } -real_t RayShape2DSW::get_moment_of_inertia(float p_mass) const { +real_t RayShape2DSW::get_moment_of_inertia(float p_mass, const Vector2 &p_scale) const { return 0; //rays are mass-less } @@ -237,10 +237,12 @@ bool SegmentShape2DSW::intersect_segment(const Vector2& p_begin,const Vector2& p return true; } -real_t SegmentShape2DSW::get_moment_of_inertia(float p_mass) const { +real_t SegmentShape2DSW::get_moment_of_inertia(float p_mass, const Vector2 &p_scale) const { - real_t l = b.distance_to(a); - Vector2 ofs = (a+b)*0.5; + Vector2 s[2]={a*p_scale,b*p_scale}; + + real_t l = s[1].distance_to(s[0]); + Vector2 ofs = (s[0]+s[1])*0.5; return p_mass*(l*l/12.0f + ofs.length_squared()); } @@ -312,9 +314,10 @@ bool CircleShape2DSW::intersect_segment(const Vector2& p_begin,const Vector2& p_ return true; } -real_t CircleShape2DSW::get_moment_of_inertia(float p_mass) const { +real_t CircleShape2DSW::get_moment_of_inertia(float p_mass, const Vector2 &p_scale) const { + + return (radius*radius)*(p_scale.x*0.5+p_scale.y*0.5); - return radius*radius; } void CircleShape2DSW::set_data(const Variant& p_data) { @@ -377,9 +380,9 @@ bool RectangleShape2DSW::intersect_segment(const Vector2& p_begin,const Vector2& return get_aabb().intersects_segment(p_begin,p_end,&r_point,&r_normal); } -real_t RectangleShape2DSW::get_moment_of_inertia(float p_mass) const { +real_t RectangleShape2DSW::get_moment_of_inertia(float p_mass,const Vector2& p_scale) const { - Vector2 he2=half_extents*2; + Vector2 he2=half_extents*2*p_scale; return p_mass*he2.dot(he2)/12.0f; } @@ -499,9 +502,9 @@ bool CapsuleShape2DSW::intersect_segment(const Vector2& p_begin,const Vector2& p return collided; //todo } -real_t CapsuleShape2DSW::get_moment_of_inertia(float p_mass) const { +real_t CapsuleShape2DSW::get_moment_of_inertia(float p_mass, const Vector2 &p_scale) const { - Vector2 he2(radius*2,height+radius*2); + Vector2 he2=Vector2(radius*2,height+radius*2)*p_scale; return p_mass*he2.dot(he2)/12.0f; } @@ -610,16 +613,16 @@ bool ConvexPolygonShape2DSW::intersect_segment(const Vector2& p_begin,const Vect return inters; //todo } -real_t ConvexPolygonShape2DSW::get_moment_of_inertia(float p_mass) const { +real_t ConvexPolygonShape2DSW::get_moment_of_inertia(float p_mass,const Vector2& p_scale) const { Rect2 aabb; - aabb.pos=points[0].pos; + aabb.pos=points[0].pos*p_scale; for(int i=0;i<point_count;i++) { - aabb.expand_to(points[i].pos); + aabb.expand_to(points[i].pos*p_scale); } - return p_mass*aabb.size.dot(aabb.size)/12.0f; + return p_mass*aabb.size.dot(aabb.size)/12.0f + p_mass * (aabb.pos+aabb.size*0.5).length_squared(); } void ConvexPolygonShape2DSW::set_data(const Variant& p_data) { diff --git a/servers/physics_2d/shape_2d_sw.h b/servers/physics_2d/shape_2d_sw.h index 8500a6194f..51ece9fc7e 100644 --- a/servers/physics_2d/shape_2d_sw.h +++ b/servers/physics_2d/shape_2d_sw.h @@ -84,7 +84,7 @@ public: virtual void get_supports(const Vector2& p_normal,Vector2 *r_supports,int & r_amount) const=0; virtual bool intersect_segment(const Vector2& p_begin,const Vector2& p_end,Vector2 &r_point, Vector2 &r_normal) const=0; - virtual real_t get_moment_of_inertia(float p_mass) const=0; + virtual real_t get_moment_of_inertia(float p_mass,const Vector2& p_scale) const=0; virtual void set_data(const Variant& p_data)=0; virtual Variant get_data() const=0; @@ -173,7 +173,7 @@ public: virtual void get_supports(const Vector2& p_normal,Vector2 *r_supports,int & r_amount) const; virtual bool intersect_segment(const Vector2& p_begin,const Vector2& p_end,Vector2 &r_point, Vector2 &r_normal) const; - virtual real_t get_moment_of_inertia(float p_mass) const; + virtual real_t get_moment_of_inertia(float p_mass,const Vector2& p_scale) const; virtual void set_data(const Variant& p_data); virtual Variant get_data() const; @@ -215,7 +215,7 @@ public: virtual void get_supports(const Vector2& p_normal,Vector2 *r_supports,int & r_amount) const; virtual bool intersect_segment(const Vector2& p_begin,const Vector2& p_end,Vector2 &r_point, Vector2 &r_normal) const; - virtual real_t get_moment_of_inertia(float p_mass) const; + virtual real_t get_moment_of_inertia(float p_mass,const Vector2& p_scale) const; virtual void set_data(const Variant& p_data); virtual Variant get_data() const; @@ -262,7 +262,7 @@ public: virtual void get_supports(const Vector2& p_normal,Vector2 *r_supports,int & r_amount) const; virtual bool intersect_segment(const Vector2& p_begin,const Vector2& p_end,Vector2 &r_point, Vector2 &r_normal) const; - virtual real_t get_moment_of_inertia(float p_mass) const; + virtual real_t get_moment_of_inertia(float p_mass,const Vector2& p_scale) const; virtual void set_data(const Variant& p_data); virtual Variant get_data() const; @@ -299,7 +299,7 @@ public: virtual void get_supports(const Vector2& p_normal,Vector2 *r_supports,int & r_amount) const; virtual bool intersect_segment(const Vector2& p_begin,const Vector2& p_end,Vector2 &r_point, Vector2 &r_normal) const; - virtual real_t get_moment_of_inertia(float p_mass) const; + virtual real_t get_moment_of_inertia(float p_mass,const Vector2& p_scale) const; virtual void set_data(const Variant& p_data); virtual Variant get_data() const; @@ -338,20 +338,25 @@ public: virtual void get_supports(const Vector2& p_normal,Vector2 *r_supports,int & r_amount) const; virtual bool intersect_segment(const Vector2& p_begin,const Vector2& p_end,Vector2 &r_point, Vector2 &r_normal) const; - virtual real_t get_moment_of_inertia(float p_mass) const; + virtual real_t get_moment_of_inertia(float p_mass,const Vector2& p_scale) const; virtual void set_data(const Variant& p_data); virtual Variant get_data() const; _FORCE_INLINE_ void project_range(const Vector2& p_normal, const Matrix32& p_transform, real_t &r_min, real_t &r_max) const { // no matter the angle, the box is mirrored anyway - Vector2 local_normal=p_transform.basis_xform_inv(p_normal); + r_max=-1e20; + r_min=1e20; + for(int i=0;i<4;i++) { - float length = local_normal.abs().dot(half_extents); - float distance = p_normal.dot( p_transform.get_origin() ); + real_t d=p_normal.dot(p_transform.xform(Vector2( ((i&1)*2-1)*half_extents.x, ((i>>1)*2-1)*half_extents.y ))); - r_min = distance - length; - r_max = distance + length; + if (d>r_max) + r_max=d; + if (d<r_min) + r_min=d; + + } } @@ -420,7 +425,7 @@ public: virtual void get_supports(const Vector2& p_normal,Vector2 *r_supports,int & r_amount) const; virtual bool intersect_segment(const Vector2& p_begin,const Vector2& p_end,Vector2 &r_point, Vector2 &r_normal) const; - virtual real_t get_moment_of_inertia(float p_mass) const; + virtual real_t get_moment_of_inertia(float p_mass,const Vector2& p_scale) const; virtual void set_data(const Variant& p_data); virtual Variant get_data() const; @@ -482,7 +487,7 @@ public: virtual void get_supports(const Vector2& p_normal,Vector2 *r_supports,int & r_amount) const; virtual bool intersect_segment(const Vector2& p_begin,const Vector2& p_end,Vector2 &r_point, Vector2 &r_normal) const; - virtual real_t get_moment_of_inertia(float p_mass) const; + virtual real_t get_moment_of_inertia(float p_mass,const Vector2& p_scale) const; virtual void set_data(const Variant& p_data); virtual Variant get_data() const; @@ -570,7 +575,7 @@ public: virtual bool intersect_segment(const Vector2& p_begin,const Vector2& p_end,Vector2 &r_point, Vector2 &r_normal) const; - virtual real_t get_moment_of_inertia(float p_mass) const { return 0; } + virtual real_t get_moment_of_inertia(float p_mass,const Vector2& p_scale) const { return 0; } virtual void set_data(const Variant& p_data); virtual Variant get_data() const; diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp index 13ecd49b68..af50b9b592 100644 --- a/servers/visual/visual_server_raster.cpp +++ b/servers/visual/visual_server_raster.cpp @@ -5621,7 +5621,7 @@ void VisualServerRaster::_process_sampled_light(const Transform& p_camera,Instan if (distance>r) distance=r; - float mult = powf(1.0-distance/r,att)*str; + float mult = Math::pow(1.0-distance/r,att)*str; if (mult>0) { col.r*=mult; col.g*=mult; diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 701704fbfa..b23f6c2765 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -1310,6 +1310,8 @@ void EditorNode::_edit_current() { p->add_item("Copy Params",OBJECT_COPY_PARAMS); p->add_item("Set Params",OBJECT_PASTE_PARAMS); p->add_separator(); + p->add_item("Make Resources Unique",OBJECT_UNIQUE_RESOURCES); + p->add_separator(); p->add_icon_item(gui_base->get_icon("Help","EditorIcons"),"Class Reference",OBJECT_REQUEST_HELP); List<MethodInfo> methods; current_obj->get_method_list(&methods); @@ -2023,6 +2025,47 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { editor_data.paste_object_params(current); editor_data.get_undo_redo().clear_history(); } break; + case OBJECT_UNIQUE_RESOURCES: { + + editor_data.apply_changes_in_editors();; + if (current) { + List<PropertyInfo> props; + current->get_property_list(&props); + Map<RES,RES> duplicates; + for (List<PropertyInfo>::Element *E=props.front();E;E=E->next()) { + + if (!(E->get().usage&PROPERTY_USAGE_STORAGE)) + continue; + + Variant v = current->get(E->get().name); + if (v.is_ref()) { + REF ref = v; + if (ref.is_valid()) { + + RES res = ref; + if (res.is_valid()) { + + if (!duplicates.has(res)) { + duplicates[res]=res->duplicate(); + } + res=duplicates[res]; + + current->set(E->get().name,res); + } + + } + } + + } + } + + editor_data.get_undo_redo().clear_history(); + if (editor_plugin_screen) { //reload editor plugin + editor_plugin_over->edit(NULL); + editor_plugin_over->edit(current); + } + + } break; case OBJECT_CALL_METHOD: { editor_data.apply_changes_in_editors();; @@ -3950,8 +3993,8 @@ EditorNode::EditorNode() { Ref<EditorSceneImportPlugin> _scene_import = memnew(EditorSceneImportPlugin(this) ); Ref<EditorSceneImporterCollada> _collada_import = memnew( EditorSceneImporterCollada); _scene_import->add_importer(_collada_import); - Ref<EditorSceneImporterFBXConv> _fbxconv_import = memnew( EditorSceneImporterFBXConv); - _scene_import->add_importer(_fbxconv_import); +// Ref<EditorSceneImporterFBXConv> _fbxconv_import = memnew( EditorSceneImporterFBXConv); +// _scene_import->add_importer(_fbxconv_import); editor_import_export->add_import_plugin( _scene_import); editor_import_export->add_import_plugin( Ref<EditorSceneAnimationImportPlugin>( memnew(EditorSceneAnimationImportPlugin(this)))); editor_import_export->add_import_plugin( Ref<EditorMeshImportPlugin>( memnew(EditorMeshImportPlugin(this)))); diff --git a/tools/editor/editor_node.h b/tools/editor/editor_node.h index 2cec301cf6..7b66a7809e 100644 --- a/tools/editor/editor_node.h +++ b/tools/editor/editor_node.h @@ -133,6 +133,7 @@ class EditorNode : public Node { RESOURCE_COPY, OBJECT_COPY_PARAMS, OBJECT_PASTE_PARAMS, + OBJECT_UNIQUE_RESOURCES, OBJECT_CALL_METHOD, OBJECT_REQUEST_HELP, RUN_PLAY, diff --git a/tools/editor/io_plugins/editor_import_collada.cpp b/tools/editor/io_plugins/editor_import_collada.cpp index e86356ebe9..3fb45d1870 100644 --- a/tools/editor/io_plugins/editor_import_collada.cpp +++ b/tools/editor/io_plugins/editor_import_collada.cpp @@ -61,6 +61,7 @@ struct ColladaImport { Color ambient; bool found_directional; bool force_make_tangents; + float bake_fps; @@ -95,6 +96,7 @@ struct ColladaImport { found_ambient=false; found_directional=false; force_make_tangents=false; + bake_fps=15; } }; @@ -1835,7 +1837,7 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones Vector<float> base_snapshots; float f=0; - float snapshot_interval = 1.0/20.0; //should be customizable somewhere... + float snapshot_interval = 1.0/bake_fps; //should be customizable somewhere... float anim_length=collada.state.animation_length; if (p_clip>=0 && collada.state.animation_clips[p_clip].end) @@ -2142,14 +2144,14 @@ void EditorSceneImporterCollada::get_extensions(List<String> *r_extensions) cons r_extensions->push_back("dae"); } -Node* EditorSceneImporterCollada::import_scene(const String& p_path, uint32_t p_flags, List<String> *r_missing_deps, Error* r_err) { - +Node* EditorSceneImporterCollada::import_scene(const String& p_path, uint32_t p_flags,int p_bake_fps, List<String> *r_missing_deps, Error* r_err) { ColladaImport state; uint32_t flags=Collada::IMPORT_FLAG_SCENE; if (p_flags&IMPORT_ANIMATION) flags|=Collada::IMPORT_FLAG_ANIMATION; + state.bake_fps=p_bake_fps; Error err = state.load(p_path,flags,p_flags&EditorSceneImporter::IMPORT_GENERATE_TANGENT_ARRAYS); @@ -2174,7 +2176,7 @@ Node* EditorSceneImporterCollada::import_scene(const String& p_path, uint32_t p_ if (p_flags&IMPORT_ANIMATION) { - state.create_animations(p_flags&IMPORT_ANIMATION_FORCE_TRACKS_IN_ALL_BONES); + state.create_animations(p_flags&IMPORT_ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS); AnimationPlayer *ap = memnew( AnimationPlayer ); for(int i=0;i<state.animations.size();i++) { String name; @@ -2213,7 +2215,7 @@ Ref<Animation> EditorSceneImporterCollada::import_animation(const String& p_path ERR_FAIL_COND_V(err!=OK,RES()); - state.create_animations(p_flags&EditorSceneImporter::IMPORT_ANIMATION_FORCE_TRACKS_IN_ALL_BONES); + state.create_animations(p_flags&EditorSceneImporter::IMPORT_ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS); if (state.scene) memdelete(state.scene); diff --git a/tools/editor/io_plugins/editor_import_collada.h b/tools/editor/io_plugins/editor_import_collada.h index 9580f42ed0..ae4cedeff6 100644 --- a/tools/editor/io_plugins/editor_import_collada.h +++ b/tools/editor/io_plugins/editor_import_collada.h @@ -40,7 +40,7 @@ public: virtual uint32_t get_import_flags() const; virtual void get_extensions(List<String> *r_extensions) const; - virtual Node* import_scene(const String& p_path,uint32_t p_flags,List<String> *r_missing_deps=NULL,Error* r_err=NULL); + virtual Node* import_scene(const String& p_path,uint32_t p_flags,int p_bake_fps,List<String> *r_missing_deps=NULL,Error* r_err=NULL); virtual Ref<Animation> import_animation(const String& p_path,uint32_t p_flags); EditorSceneImporterCollada(); diff --git a/tools/editor/io_plugins/editor_mesh_import_plugin.cpp b/tools/editor/io_plugins/editor_mesh_import_plugin.cpp index d76a778433..6ebdb6cc41 100644 --- a/tools/editor/io_plugins/editor_mesh_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_mesh_import_plugin.cpp @@ -425,7 +425,7 @@ Error EditorMeshImportPlugin::import(const String& p_path, const Ref<ResourceImp ERR_FAIL_COND_V(v.size()<3,ERR_INVALID_DATA); Vector2 uv; uv.x=v[1].to_float(); - uv.y=v[2].to_float(); + uv.y=1.0-v[2].to_float(); uvs.push_back(uv); } else if (l.begins_with("vn ")) { diff --git a/tools/editor/io_plugins/editor_scene_import_plugin.cpp b/tools/editor/io_plugins/editor_scene_import_plugin.cpp index 27400344d3..d7f0bd470c 100644 --- a/tools/editor/io_plugins/editor_scene_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_scene_import_plugin.cpp @@ -78,12 +78,23 @@ class EditorImportAnimationOptions : public VBoxContainer { OBJ_TYPE( EditorImportAnimationOptions, VBoxContainer ); + + TreeItem *fps; + TreeItem *clips_base; + TextEdit *filters; + Vector<TreeItem*> clips; + Tree *flags; + Tree *clips_tree; Vector<TreeItem*> items; bool updating; + bool validating; void _changed(); + void _item_edited(); + void _button_action(Object *p_obj,int p_col,int p_id); + protected: static void _bind_methods(); void _notification(int p_what); @@ -93,6 +104,14 @@ public: void set_flags(uint32_t p_flags); uint32_t get_flags() const; + void set_fps(int p_fps); + int get_fps() const; + + void setup_clips(const Array& p_clips); + Array get_clips() const; + + void set_filter(const String& p_filter); + String get_filter() const; EditorImportAnimationOptions(); @@ -141,6 +160,9 @@ class EditorSceneImportDialog : public ConfirmationDialog { Map<Ref<Mesh>,Ref<Shape> > collision_map; ConfirmationDialog *error_dialog; + OptionButton *this_import; + OptionButton *next_import; + void _choose_file(const String& p_path); void _choose_save_file(const String& p_path); void _choose_script(const String& p_path); @@ -178,7 +200,7 @@ static const char *anim_flag_names[]={ "Detect Loop (-loop,-cycle)", "Keep Value Tracks", "Optimize", - "Force Tracks in All Bones", + "Force All Tracks in All Clips", NULL }; @@ -223,9 +245,101 @@ void EditorImportAnimationOptions::_changed() { } +void EditorImportAnimationOptions::_button_action(Object *p_obj,int p_col,int p_id) { + + memdelete(p_obj); + +} + + +void EditorImportAnimationOptions::_item_edited() { + + if (validating) + return; + + if (clips.size()==0) + return; + validating=true; + print_line("edited"); + TreeItem *item = clips_tree->get_edited(); + if (item==clips[clips.size()-1]) { + //add new + print_line("islast"); + if (item->get_text(0).find("<")!=-1 || item->get_text(0).find(">")!=-1) { + validating=false; + return; //fuckit + } + + item->set_editable(1,true); + item->set_editable(2,true); + item->add_button(0,EditorNode::get_singleton()->get_gui_base()->get_icon("Del","EditorIcons")); + item->set_cell_mode(1,TreeItem::CELL_MODE_RANGE); + item->set_range_config(1,0,3600,0.01); + item->set_range(1,0); + item->set_editable(1,true); + item->set_cell_mode(2,TreeItem::CELL_MODE_RANGE); + item->set_range_config(2,0,3600,0.01); + item->set_range(2,0); + item->set_cell_mode(3,TreeItem::CELL_MODE_CHECK); + item->set_editable(3,true); + + TreeItem *newclip = clips_tree->create_item(clips_base); + newclip->set_text(0,"<new clip>"); + newclip->set_editable(0,true); + newclip->set_editable(1,false); + newclip->set_editable(2,false); + clips.push_back(newclip); + + + + } + + + //make name unique JUST IN CASE + String name = item->get_text(0); + name=name.replace("/","_").replace(":","_").strip_edges(); + if (name=="") + name="New Clip"; + + if (clips.size()>2) { + int index=1; + while(true) { + bool valid = true; + String try_name=name; + if (index>1) + try_name+=" "+itos(index); + + for(int i=0;i<clips.size()-1;i++) { + + if (clips[i]==item) + continue; + if (clips[i]->get_text(0)==try_name) { + index++; + valid=false; + break; + } + } + + if (valid) { + name=try_name; + break; + } + + } + } + + if (item->get_text(0)!=name) + item->set_text(0,name); + + validating=false; + +} + void EditorImportAnimationOptions::_bind_methods() { ObjectTypeDB::bind_method("_changed",&EditorImportAnimationOptions::_changed); + ObjectTypeDB::bind_method("_item_edited",&EditorImportAnimationOptions::_item_edited); + ObjectTypeDB::bind_method("_button_action",&EditorImportAnimationOptions::_button_action); // ObjectTypeDB::bind_method("_changedp",&EditorImportAnimationOptions::_changedp); ADD_SIGNAL(MethodInfo("changed")); @@ -237,17 +351,84 @@ void EditorImportAnimationOptions::_notification(int p_what) { if (p_what==NOTIFICATION_ENTER_SCENE) { flags->connect("item_edited",this,"_changed"); + clips_tree->connect("item_edited",this,"_item_edited"); + clips_tree->connect("button_pressed",this,"_button_action",varray(),CONNECT_DEFERRED); // format->connect("item_selected",this,"_changedp"); } } + +Array EditorImportAnimationOptions::get_clips() const { + + Array arr; + for(int i=0;i<clips.size()-1;i++) { + + arr.push_back(clips[i]->get_text(0)); + arr.push_back(clips[i]->get_range(1)); + arr.push_back(clips[i]->get_range(2)); + arr.push_back(clips[i]->is_checked(3)); + } + + return arr; +} + + +void EditorImportAnimationOptions::setup_clips(const Array& p_clips) { + + ERR_FAIL_COND(p_clips.size()%4!=0); + for(int i=0;i<clips.size();i++) { + + memdelete(clips[i]); + } + + + clips.clear(); + + for(int i=0;i<p_clips.size();i+=4) { + + TreeItem *clip = clips_tree->create_item(clips_base); + clip->set_text(0,p_clips[i]); + clip->add_button(0,EditorNode::get_singleton()->get_gui_base()->get_icon("Del","EditorIcons")); + clip->set_editable(0,true); + clip->set_cell_mode(1,TreeItem::CELL_MODE_RANGE); + clip->set_range_config(1,0,3600,0.01); + clip->set_range(1,p_clips[i+1]); + clip->set_editable(1,true); + clip->set_cell_mode(2,TreeItem::CELL_MODE_RANGE); + clip->set_range_config(2,0,3600,0.01); + clip->set_range(2,p_clips[i+2]); + clip->set_editable(2,true); + clip->set_cell_mode(3,TreeItem::CELL_MODE_CHECK); + clip->set_editable(3,true); + clip->set_checked(3,p_clips[i+3]); + clips.push_back(clip); + + } + + TreeItem *newclip = clips_tree->create_item(clips_base); + newclip->set_text(0,"<new clip>"); + newclip->set_editable(0,true); + newclip->set_editable(1,false); + newclip->set_editable(2,false); + newclip->set_editable(3,false); + clips.push_back(newclip); + +} + + EditorImportAnimationOptions::EditorImportAnimationOptions() { updating=false; + validating=false; + + TabContainer *tab= memnew(TabContainer); + add_margin_child("Animation Options",tab,true); flags = memnew( Tree ); flags->set_hide_root(true); + tab->add_child(flags); + flags->set_name("Flags"); TreeItem *root = flags->create_item(); const char ** fname=anim_flag_names; @@ -263,14 +444,69 @@ EditorImportAnimationOptions::EditorImportAnimationOptions() { items.push_back(ti); fname++; fdescr++; - } + } + + + TreeItem *fps_base = flags->create_item(root); + fps_base->set_text(0,"Bake FPS:"); + fps_base->set_editable(0,false); + fps = flags->create_item(fps_base); + fps->set_cell_mode(0,TreeItem::CELL_MODE_RANGE); + fps->set_editable(0,true); + fps->set_range(0,15); + fps->set_range_config(0,1,120,1); + + + clips_tree = memnew( Tree ); + clips_tree->set_hide_root(true); + tab->add_child(clips_tree); + clips_tree->set_name("Clips"); + + clips_tree->set_columns(4); + clips_tree->set_column_expand(0,1); + clips_tree->set_column_expand(1,0); + clips_tree->set_column_expand(2,0); + clips_tree->set_column_expand(3,0); + clips_tree->set_column_min_width(1,60); + clips_tree->set_column_min_width(2,60); + clips_tree->set_column_min_width(3,40); + clips_tree->set_column_titles_visible(true); + clips_tree->set_column_title(0,"Name"); + clips_tree->set_column_title(1,"Start(s)"); + clips_tree->set_column_title(2,"End(s)"); + clips_tree->set_column_title(3,"Loop"); + clips_base =clips_tree->create_item(0); + + + setup_clips(Array()); + + + filters = memnew( TextEdit ); + tab->add_child(filters); + filters->set_name("Filters"); +} - add_margin_child("Animation Options",flags,true); +void EditorImportAnimationOptions::set_fps(int p_fps) { + + fps->set_range(0,p_fps); } +int EditorImportAnimationOptions::get_fps() const { + return fps->get_range(0); +} + +void EditorImportAnimationOptions::set_filter(const String& p_filter) { + + filters->set_text(p_filter); +} + +String EditorImportAnimationOptions::get_filter() const { + + return filters->get_text(); +} @@ -413,7 +649,12 @@ void EditorSceneImportDialog::_import(bool p_and_open) { rim->set_option("texture_format",texture_options->get_format()); rim->set_option("texture_quality",texture_options->get_quality()); rim->set_option("animation_flags",animation_options->get_flags()); + rim->set_option("animation_bake_fps",animation_options->get_fps()); + rim->set_option("animation_filters",animation_options->get_filter()); + rim->set_option("animation_clips",animation_options->get_clips()); rim->set_option("post_import_script",script_path->get_text()!=String()?EditorImportPlugin::validate_source_path(script_path->get_text()):String()); + rim->set_option("import_this_time",this_import->get_selected()); + rim->set_option("import_next_time",next_import->get_selected()); rim->set_option("reimport",true); List<String> missing; @@ -526,7 +767,7 @@ void EditorSceneImportDialog::_browse_script() { void EditorSceneImportDialog::popup_import(const String &p_from) { - popup_centered(Size2(700,500)); + popup_centered(Size2(750,550)); if (p_from!="") { Ref<ResourceImportMetadata> rimd = ResourceLoader::load_import_metadata(p_from); if (rimd.is_null()) @@ -544,7 +785,17 @@ void EditorSceneImportDialog::popup_import(const String &p_from) { texture_options->set_format(EditorTextureImportPlugin::ImageFormat(int(rimd->get_option("texture_format")))); texture_options->set_quality(rimd->get_option("texture_quality")); animation_options->set_flags(rimd->get_option("animation_flags")); + if (rimd->has_option("animation_clips")) + animation_options->setup_clips(rimd->get_option("animation_clips")); + if (rimd->has_option("animation_filters")) + animation_options->set_filter(rimd->get_option("animation_filters")); + if (rimd->has_option("animation_bake_fps")) + animation_options->set_fps(rimd->get_option("animation_bake_fps")); script_path->set_text(rimd->get_option("post_import_script")); + if (rimd->has_option("import_this_time")) + this_import->select(rimd->get_option("import_this_time")); + if (rimd->has_option("import_next_time")) + next_import->select(rimd->get_option("import_next_time")); save_path->set_text(p_from.get_base_dir()); import_path->set_text(EditorImportPlugin::expand_source_path(rimd->get_source_path(0))); @@ -619,7 +870,7 @@ void EditorSceneImportDialog::_bind_methods() { ObjectTypeDB::bind_method("_choose_file",&EditorSceneImportDialog::_choose_file); ObjectTypeDB::bind_method("_choose_save_file",&EditorSceneImportDialog::_choose_save_file); ObjectTypeDB::bind_method("_choose_script",&EditorSceneImportDialog::_choose_script); - ObjectTypeDB::bind_method("_import",&EditorSceneImportDialog::_import); + ObjectTypeDB::bind_method("_import",&EditorSceneImportDialog::_import,DEFVAL(false)); ObjectTypeDB::bind_method("_browse",&EditorSceneImportDialog::_browse); ObjectTypeDB::bind_method("_browse_target",&EditorSceneImportDialog::_browse_target); ObjectTypeDB::bind_method("_browse_script",&EditorSceneImportDialog::_browse_script); @@ -792,6 +1043,20 @@ EditorSceneImportDialog::EditorSceneImportDialog(EditorNode *p_editor, EditorSce error_dialog->get_ok()->set_text("Accept"); // error_dialog->get_cancel()->hide(); + this_import = memnew( OptionButton ); + this_import->add_item("Overwrite Existing Scene"); + this_import->add_item("Owerwrite Existing, Keep Materials"); + this_import->add_item("Keep Existing, Merge with New"); + this_import->add_item("Keep Existing, Ignore New"); + vbc->add_margin_child("This Time:",this_import); + + next_import = memnew( OptionButton ); + next_import->add_item("Overwrite Existing Scene"); + next_import->add_item("Owerwrite Existing, Keep Materials"); + next_import->add_item("Keep Existing, Merge with New"); + next_import->add_item("Keep Existing, Ignore New"); + vbc->add_margin_child("Next Time:",next_import); + set_hide_on_ok(false); GLOBAL_DEF("import/shared_textures","res://"); @@ -814,7 +1079,7 @@ EditorSceneImportDialog::EditorSceneImportDialog(EditorNode *p_editor, EditorSce animation_options = memnew( EditorImportAnimationOptions ); ovb->add_child(animation_options); animation_options->set_v_size_flags(SIZE_EXPAND_FILL); - animation_options->set_flags(EditorSceneAnimationImportPlugin::ANIMATION_DETECT_LOOP|EditorSceneAnimationImportPlugin::ANIMATION_KEEP_VALUE_TRACKS|EditorSceneAnimationImportPlugin::ANIMATION_OPTIMIZE|EditorSceneAnimationImportPlugin::ANIMATION_FORCE_TRACKS_IN_ALL_BONES); + animation_options->set_flags(EditorSceneAnimationImportPlugin::ANIMATION_DETECT_LOOP|EditorSceneAnimationImportPlugin::ANIMATION_KEEP_VALUE_TRACKS|EditorSceneAnimationImportPlugin::ANIMATION_OPTIMIZE|EditorSceneAnimationImportPlugin::ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS); confirm_import = memnew( ConfirmationDialog ); @@ -1815,6 +2080,79 @@ void EditorSceneImportPlugin::_merge_scenes(Node *p_node,Node *p_imported) { } +void EditorSceneImportPlugin::_scan_materials(Node*p_base,Node *p_node,Map<String,Ref<Material> > &mesh_materials,Map<String,Ref<Material> >& override_materials) { + + if (!p_base && p_node->get_owner()!=p_base) + return; + MeshInstance *mi=p_node->cast_to<MeshInstance>(); + + if (mi) { + if (mi->get_material_override().is_valid()) { + String path = p_base->get_path_to(p_node); + override_materials[path]=mi->get_material_override(); + } + Ref<Mesh> mesh = mi->get_mesh(); + if (mesh.is_valid()) { + + for(int i=0;i<mesh->get_surface_count();i++) { + + String name = mesh->get_name()+":"+mesh->surface_get_name(i); + if (!mesh_materials.has(name)) { + mesh_materials[name]=mesh->surface_get_material(i); + } + } + } + } + + for(int i=0;i<p_node->get_child_count();i++) { + _scan_materials(p_base,p_node->get_child(i),mesh_materials,override_materials); + } +} + + +void EditorSceneImportPlugin::_apply_materials(Node*p_base,Node *p_node,Map<String,Ref<Material> > &mesh_materials,Map<String,Ref<Material> >& override_materials,Set<Ref<Mesh> >& meshes_processed) { + + if (!p_base && p_node->get_owner()!=p_base) + return; + + MeshInstance *mi=p_node->cast_to<MeshInstance>(); + + if (mi) { + + String path = p_base->get_path_to(p_node); + if (override_materials.has(path)) + mi->set_material_override(override_materials[path]); + + Ref<Mesh> mesh = mi->get_mesh(); + if (mesh.is_valid() && !meshes_processed.has(mesh)) { + meshes_processed.insert(mesh); + for(int i=0;i<mesh->get_surface_count();i++) { + + String name = mesh->get_name()+":"+mesh->surface_get_name(i); + if (mesh_materials.has(name)) { + + Ref<Material> mat = mesh_materials[name]; + mesh->surface_set_material(i,mat); + } + } + } + } + + for(int i=0;i<p_node->get_child_count();i++) { + _apply_materials(p_base,p_node->get_child(i),mesh_materials,override_materials,meshes_processed); + } +} + +void EditorSceneImportPlugin::_merge_materials(Node *p_node,Node *p_imported) { + + Map<String,Ref<Material> > mesh_materials; + Map<String,Ref<Material> > override_materials; + + _scan_materials(p_node,p_node,mesh_materials,override_materials); + Set<Ref<Mesh> > mp; + _apply_materials(p_imported,p_imported,mesh_materials,override_materials,mp); + +} #if 0 @@ -1882,14 +2220,20 @@ Error EditorSceneImportPlugin::import1(const Ref<ResourceImportMetadata>& p_from int animation_flags=p_from->get_option("animation_flags"); int scene_flags = from->get_option("flags"); + int fps = 24; + if (from->has_option("animation_bake_fps")) + fps=from->get_option("animation_bake_fps"); + Array clips; + if (from->has_option("animation_clips")) + clips=from->get_option("animation_clips"); uint32_t import_flags=0; if (animation_flags&EditorSceneAnimationImportPlugin::ANIMATION_DETECT_LOOP) import_flags|=EditorSceneImporter::IMPORT_ANIMATION_DETECT_LOOP; if (animation_flags&EditorSceneAnimationImportPlugin::ANIMATION_OPTIMIZE) import_flags|=EditorSceneImporter::IMPORT_ANIMATION_OPTIMIZE; - if (animation_flags&EditorSceneAnimationImportPlugin::ANIMATION_FORCE_TRACKS_IN_ALL_BONES) - import_flags|=EditorSceneImporter::IMPORT_ANIMATION_FORCE_TRACKS_IN_ALL_BONES; + if (animation_flags&EditorSceneAnimationImportPlugin::ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS) + import_flags|=EditorSceneImporter::IMPORT_ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS; if (scene_flags&SCENE_FLAG_IMPORT_ANIMATIONS) import_flags|=EditorSceneImporter::IMPORT_ANIMATION; //if (scene_flags&SCENE_FLAG_FAIL_ON_MISSING_IMAGES) @@ -1902,7 +2246,7 @@ Error EditorSceneImportPlugin::import1(const Ref<ResourceImportMetadata>& p_from Error err=OK; - Node *scene = importer->import_scene(src_path,import_flags,r_missing,&err); + Node *scene = importer->import_scene(src_path,import_flags,fps,r_missing,&err); if (!scene || err!=OK) { return err; } @@ -1913,19 +2257,231 @@ Error EditorSceneImportPlugin::import1(const Ref<ResourceImportMetadata>& p_from return OK; } + +void EditorSceneImportPlugin::_create_clips(Node *scene, const Array& p_clips,bool p_bake_all) { + + if (!scene->has_node(String("AnimationPlayer"))) + return; + + Node* n = scene->get_node(String("AnimationPlayer")); + ERR_FAIL_COND(!n); + AnimationPlayer *anim = n->cast_to<AnimationPlayer>(); + ERR_FAIL_COND(!anim); + + if (!anim->has_animation("default")) + return; + + + Ref<Animation> default_anim = anim->get_animation("default"); + + for(int i=0;i<p_clips.size();i+=4) { + + String name = p_clips[i]; + float from=p_clips[i+1]; + float to=p_clips[i+2]; + bool loop=p_clips[i+3]; + if (from>=to) + continue; + + Ref<Animation> new_anim = memnew( Animation ); + + for(int j=0;j<default_anim->get_track_count();j++) { + + + List<float> keys; + int kc = default_anim->track_get_key_count(j); + int dtrack=-1; + for(int k=0;k<kc;k++) { + + float kt = default_anim->track_get_key_time(j,k); + if (kt>=from && kt<to) { + + //found a key within range, so create track + if (dtrack==-1) { + new_anim->add_track(default_anim->track_get_type(j)); + dtrack = new_anim->get_track_count()-1; + new_anim->track_set_path(dtrack,default_anim->track_get_path(j)); + + if (kt>(from+0.01) && k>0) { + + if (default_anim->track_get_type(j)==Animation::TYPE_TRANSFORM) { + Quat q; + Vector3 p; + Vector3 s; + default_anim->transform_track_interpolate(j,from,&p,&q,&s); + new_anim->transform_track_insert_key(dtrack,0,p,q,s); + } + } + + } + + if (default_anim->track_get_type(j)==Animation::TYPE_TRANSFORM) { + Quat q; + Vector3 p; + Vector3 s; + default_anim->transform_track_get_key(j,k,&p,&q,&s); + new_anim->transform_track_insert_key(dtrack,kt-from,p,q,s); + } + + } + + if (dtrack!=-1 && kt>=to) { + + if (default_anim->track_get_type(j)==Animation::TYPE_TRANSFORM) { + Quat q; + Vector3 p; + Vector3 s; + default_anim->transform_track_interpolate(j,to,&p,&q,&s); + new_anim->transform_track_insert_key(dtrack,to-from,p,q,s); + } + } + + } + + if (dtrack==-1 && p_bake_all) { + new_anim->add_track(default_anim->track_get_type(j)); + dtrack = new_anim->get_track_count()-1; + new_anim->track_set_path(dtrack,default_anim->track_get_path(j)); + if (default_anim->track_get_type(j)==Animation::TYPE_TRANSFORM) { + + + Quat q; + Vector3 p; + Vector3 s; + default_anim->transform_track_interpolate(j,from,&p,&q,&s); + new_anim->transform_track_insert_key(dtrack,0,p,q,s); + default_anim->transform_track_interpolate(j,to,&p,&q,&s); + new_anim->transform_track_insert_key(dtrack,to-from,p,q,s); + } + + } + } + + + new_anim->set_loop(loop); + new_anim->set_length(to-from); + anim->add_animation(name,new_anim); + } + + anim->remove_animation("default"); //remove default (no longer needed) +} + +void EditorSceneImportPlugin::_filter_tracks(Node *scene, const String& p_text) { + + if (!scene->has_node(String("AnimationPlayer"))) + return; + Node* n = scene->get_node(String("AnimationPlayer")); + ERR_FAIL_COND(!n); + AnimationPlayer *anim = n->cast_to<AnimationPlayer>(); + ERR_FAIL_COND(!anim); + + Vector<String> strings = p_text.split("\n"); + for(int i=0;i<strings.size();i++) { + + strings[i]=strings[i].strip_edges(); + } + + List<StringName> anim_names; + anim->get_animation_list(&anim_names); + Set<String> keep; + for(List<StringName>::Element *E=anim_names.front();E;E=E->next()) { + + String name = E->get(); + bool valid_for_this=false; + + for(int i=0;i<strings.size();i++) { + + + if (strings[i].begins_with("@")) { + + valid_for_this=false; + keep.clear(); + + Vector<String> filters=strings[i].substr(1,strings[i].length()).split(","); + for(int j=0;j<filters.size();j++) { + + String fname = filters[i].strip_edges(); + if (fname=="") + continue; + int fc = fname[0]; + bool plus; + if (fc=='+') + plus=true; + else if (fc=='-') + plus=false; + else + continue; + + String filter=fname.substr(1,fname.length()).strip_edges(); + + if (!name.matchn(filter)) + continue; + valid_for_this=plus; + } + } else if (valid_for_this) { + + Ref<Animation> a = anim->get_animation(name); + if (!a.is_valid()) + continue; + + for(int j=0;j<a->get_track_count();j++) { + + String path = a->track_get_path(j); + + String tname = strings[i]; + if (tname=="") + continue; + int fc = tname[0]; + bool plus; + if (fc=='+') + plus=true; + else if (fc=='-') + plus=false; + else + continue; + + String filter=tname.substr(1,tname.length()).strip_edges(); + + if (!path.matchn(filter)) + continue; + + if (plus) + keep.insert(path); + else if (!keep.has(path)) { + a->remove_track(j); + j--; + } + + } + + } + + } + + } + + +} + Error EditorSceneImportPlugin::import2(Node *scene, const String& p_dest_path, const Ref<ResourceImportMetadata>& p_from) { Error err=OK; Ref<ResourceImportMetadata> from=p_from; String src_path=EditorImportPlugin::expand_source_path(from->get_source_path(0)); int animation_flags=p_from->get_option("animation_flags"); + Array animation_clips = p_from->get_option("animation_clips"); + String animation_filter = p_from->get_option("animation_filters"); int scene_flags = from->get_option("flags"); EditorProgress progress("import","Import Scene",104); progress.step("Importing Scene..",2); - bool merge = !bool(from->get_option("reimport")); + bool reimport = bool(from->get_option("reimport")); + int this_time_action = from->get_option("import_this_time"); + int next_time_action = from->get_option("import_next_time"); + + int import_action = reimport?this_time_action:next_time_action; from->set_source_md5(0,FileAccess::get_md5(src_path)); from->set_editor(get_name()); @@ -1940,6 +2496,11 @@ Error EditorSceneImportPlugin::import2(Node *scene, const String& p_dest_path, c Map< Ref<ImageTexture>,TextureRole > imagemap; scene=_fix_node(scene,scene,collision_map,scene_flags,imagemap); + if (animation_clips.size()) + _create_clips(scene,animation_clips,animation_flags&EditorSceneAnimationImportPlugin::ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS); + + _filter_tracks(scene,animation_filter); + /// BEFORE ANYTHING, RUN SCRIPT @@ -2063,7 +2624,7 @@ Error EditorSceneImportPlugin::import2(Node *scene, const String& p_dest_path, c /// BEFORE SAVING - MERGE - if (merge) { + if (import_action!=SCENE_UPDATE_REPLACE_WITH_NEW) { progress.step("Merging..",103); @@ -2082,10 +2643,30 @@ Error EditorSceneImportPlugin::import2(Node *scene, const String& p_dest_path, c if (existing) { - _merge_scenes(existing,scene); - memdelete(scene); - scene=existing; + switch(import_action) { + + case SCENE_UPDATE_REPLACE_WITH_NEW: break; + case SCENE_UPDATE_REPLACE_WITH_NEW_KEEP_MATERIALS: { + + _merge_materials(existing,scene); + memdelete(existing); + + } break; + case SCENE_UPDATE_KEEP_OLD_MERGE_CHANGES: { + + _merge_scenes(existing,scene); + memdelete(scene); + scene=existing; + + } break; + case SCENE_UPDATE_KEEP_OLD: { + + memdelete(scene); + scene=existing; + } break; + } + } } diff --git a/tools/editor/io_plugins/editor_scene_import_plugin.h b/tools/editor/io_plugins/editor_scene_import_plugin.h index 72b4089d89..8aafde93df 100644 --- a/tools/editor/io_plugins/editor_scene_import_plugin.h +++ b/tools/editor/io_plugins/editor_scene_import_plugin.h @@ -58,7 +58,7 @@ public: IMPORT_ANIMATION=2, IMPORT_ANIMATION_DETECT_LOOP=4, IMPORT_ANIMATION_OPTIMIZE=8, - IMPORT_ANIMATION_FORCE_TRACKS_IN_ALL_BONES=16, + IMPORT_ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS=16, IMPORT_GENERATE_TANGENT_ARRAYS=256, IMPORT_FAIL_ON_MISSING_DEPENDENCIES=512 @@ -66,7 +66,7 @@ public: virtual uint32_t get_import_flags() const=0; virtual void get_extensions(List<String> *r_extensions) const=0; - virtual Node* import_scene(const String& p_path,uint32_t p_flags,List<String> *r_missing_deps,Error* r_err=NULL)=0; + virtual Node* import_scene(const String& p_path,uint32_t p_flags,int p_bake_fps,List<String> *r_missing_deps,Error* r_err=NULL)=0; virtual Ref<Animation> import_animation(const String& p_path,uint32_t p_flags)=0; @@ -108,10 +108,16 @@ class EditorSceneImportPlugin : public EditorImportPlugin { void _find_resources(const Variant& p_var,Map<Ref<ImageTexture>,TextureRole >& image_map,int p_flags); Node* _fix_node(Node *p_node,Node *p_root,Map<Ref<Mesh>,Ref<Shape> > &collision_map,uint32_t p_flags,Map<Ref<ImageTexture>,TextureRole >& image_map); + void _create_clips(Node *scene, const Array& p_clips, bool p_bake_all); + void _filter_tracks(Node *scene, const String& p_text); void _merge_existing_node(Node *p_node,Node *p_imported_scene,Set<Ref<Resource> >& checked_resources,Set<Node*> &checked_nodes); + void _add_new_nodes(Node *p_node,Node *p_imported,Node *p_imported_scene,Set<Node*> &checked_nodes); void _merge_scenes(Node *p_node, Node *p_imported); + void _scan_materials(Node*p_base,Node *p_node,Map<String,Ref<Material> > &mesh_materials,Map<String,Ref<Material> >& override_materials); + void _apply_materials(Node*p_base,Node *p_node,Map<String,Ref<Material> > &mesh_materials,Map<String,Ref<Material> >& override_materials,Set<Ref<Mesh> >& meshes_processed); + void _merge_materials(Node *p_node,Node *p_imported); void _tag_import_paths(Node *p_scene,Node *p_node); @@ -142,6 +148,13 @@ public: SCENE_FLAG_CONVERT_NORMALMAPS_TO_XY=1<<30, }; + enum SceneUpdate { + SCENE_UPDATE_REPLACE_WITH_NEW, + SCENE_UPDATE_REPLACE_WITH_NEW_KEEP_MATERIALS, + SCENE_UPDATE_KEEP_OLD_MERGE_CHANGES, + SCENE_UPDATE_KEEP_OLD, + }; + virtual String get_name() const; virtual String get_visible_name() const; @@ -171,7 +184,7 @@ public: ANIMATION_DETECT_LOOP=1, ANIMATION_KEEP_VALUE_TRACKS=2, ANIMATION_OPTIMIZE=4, - ANIMATION_FORCE_TRACKS_IN_ALL_BONES=8 + ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS=8 }; virtual String get_name() const; @@ -185,5 +198,4 @@ public: }; - #endif // EDITOR_SCENE_IMPORT_PLUGIN_H diff --git a/tools/editor/plugins/baked_light_baker_cmpxchg.cpp b/tools/editor/plugins/baked_light_baker_cmpxchg.cpp index d08c9f6484..42d3fc5276 100644 --- a/tools/editor/plugins/baked_light_baker_cmpxchg.cpp +++ b/tools/editor/plugins/baked_light_baker_cmpxchg.cpp @@ -2,12 +2,11 @@ #include "typedefs.h" -#ifdef WINDOWS_ENABLED - -#include "windows.h" +#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40100 void baked_light_baker_add_64f(double *dst,double value) { + union { int64_t i; double f; @@ -19,28 +18,22 @@ void baked_light_baker_add_64f(double *dst,double value) { int64_t from = swapy.i; swapy.f+=value; int64_t to=swapy.i; - int64_t result = InterlockedCompareExchange64((int64_t*)dst,to,from); - if (result==from) + if (__sync_bool_compare_and_swap((int64_t*)dst,from,to)) break; } - } void baked_light_baker_add_64i(int64_t *dst,int64_t value) { - while(true) { - int64_t from = *dst; - int64_t to = from+value; - int64_t result = InterlockedCompareExchange64(dst,to,from); - if (result==from) - break; - } + while(!__sync_bool_compare_and_swap(dst,*dst,(*dst)+value)) {} + } -#elif (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40100 +#elif defined(WINDOWS_ENABLED) -void baked_light_baker_add_64f(double *dst,double value) { +#include "windows.h" +void baked_light_baker_add_64f(double *dst,double value) { union { int64_t i; @@ -53,17 +46,25 @@ void baked_light_baker_add_64f(double *dst,double value) { int64_t from = swapy.i; swapy.f+=value; int64_t to=swapy.i; - if (__sync_bool_compare_and_swap((int64_t*)dst,from,to)) + int64_t result = InterlockedCompareExchange64((int64_t*)dst,to,from); + if (result==from) break; } + } void baked_light_baker_add_64i(int64_t *dst,int64_t value) { - while(!__sync_bool_compare_and_swap(dst,*dst,(*dst)+value)) {} - + while(true) { + int64_t from = *dst; + int64_t to = from+value; + int64_t result = InterlockedCompareExchange64(dst,to,from); + if (result==from) + break; + } } + #else //in goder (the god of programmers) we trust diff --git a/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp b/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp index 080ed7d11c..96c7e4540c 100644 --- a/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp +++ b/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp @@ -13,7 +13,7 @@ void CollisionPolygon2DEditor::_notification(int p_what) { button_create->set_icon( get_icon("Edit","EditorIcons")); button_edit->set_icon( get_icon("MovePoint","EditorIcons")); button_edit->set_pressed(true); - + get_scene()->connect("node_removed",this,"_node_removed"); } break; case NOTIFICATION_FIXED_PROCESS: { @@ -28,6 +28,7 @@ void CollisionPolygon2DEditor::_node_removed(Node *p_node) { if(p_node==node) { node=NULL; hide(); + canvas_item_editor->get_viewport_control()->update(); } } @@ -83,6 +84,9 @@ void CollisionPolygon2DEditor::_wip_close() { bool CollisionPolygon2DEditor::forward_input_event(const InputEvent& p_event) { + if (!node) + return false; + switch(p_event.type) { case InputEvent::MOUSE_BUTTON: { @@ -379,6 +383,7 @@ void CollisionPolygon2DEditor::_bind_methods() { ObjectTypeDB::bind_method(_MD("_menu_option"),&CollisionPolygon2DEditor::_menu_option); ObjectTypeDB::bind_method(_MD("_canvas_draw"),&CollisionPolygon2DEditor::_canvas_draw); + ObjectTypeDB::bind_method(_MD("_node_removed"),&CollisionPolygon2DEditor::_node_removed); } diff --git a/tools/editor/plugins/mesh_editor_plugin.cpp b/tools/editor/plugins/mesh_editor_plugin.cpp index b8a5bd3bbe..10e4c0b681 100644 --- a/tools/editor/plugins/mesh_editor_plugin.cpp +++ b/tools/editor/plugins/mesh_editor_plugin.cpp @@ -158,13 +158,54 @@ void MeshInstanceEditor::_menu_option(int p_option) { ur->add_undo_method(node,"remove_child",nmi); ur->commit_action(); } break; + case MENU_OPTION_CREATE_OUTLINE_MESH: { + + outline_dialog->popup_centered(Size2(200,80)); + } break; } } +void MeshInstanceEditor::_create_outline_mesh() { + + Ref<Mesh> mesh = node->get_mesh(); + if (mesh.is_null()) { + err_dialog->set_text("MeshInstance lacks a Mesh!"); + err_dialog->popup_centered(Size2(100,50)); + return; + } + + Ref<Mesh> mesho = mesh->create_outline(outline_size->get_val()); + + if (mesho.is_null()) { + err_dialog->set_text("Could not create outline!"); + err_dialog->popup_centered(Size2(100,50)); + return; + } + + MeshInstance *mi = memnew( MeshInstance ); + mi->set_mesh(mesho); + Node *owner=node->get_owner(); + if (get_scene()->get_edited_scene_root()==node) { + owner=node; + } + + UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); + + ur->create_action("Create Outline"); + + ur->add_do_method(node,"add_child",mi); + ur->add_do_method(mi,"set_owner",owner); + + ur->add_do_reference(mi); + ur->add_undo_method(node,"remove_child",mi); + ur->commit_action(); +} + void MeshInstanceEditor::_bind_methods() { ObjectTypeDB::bind_method("_menu_option",&MeshInstanceEditor::_menu_option); + ObjectTypeDB::bind_method("_create_outline_mesh",&MeshInstanceEditor::_create_outline_mesh); } MeshInstanceEditor::MeshInstanceEditor() { @@ -182,9 +223,23 @@ MeshInstanceEditor::MeshInstanceEditor() { options->get_popup()->add_item("Create Convex Collision Sibling",MENU_OPTION_CREATE_CONVEX_COLLISION_SHAPE); options->get_popup()->add_separator(); options->get_popup()->add_item("Create Navigation Mesh",MENU_OPTION_CREATE_NAVMESH); + options->get_popup()->add_separator(); + options->get_popup()->add_item("Create Outline Mesh..",MENU_OPTION_CREATE_OUTLINE_MESH); options->get_popup()->connect("item_pressed", this,"_menu_option"); + outline_dialog = memnew( ConfirmationDialog ); + outline_dialog->set_title("Outline Size: "); + outline_size = memnew( SpinBox ); + outline_size->set_min(0.001); + outline_size->set_max(1024); + outline_size->set_step(0.001); + outline_size->set_val(0.05); + outline_dialog->add_child(outline_size); + outline_dialog->set_child_rect(outline_size); + add_child(outline_dialog); + outline_dialog->connect("confirmed",this,"_create_outline_mesh"); + } diff --git a/tools/editor/plugins/mesh_editor_plugin.h b/tools/editor/plugins/mesh_editor_plugin.h index 557eb90148..e502b5dc2b 100644 --- a/tools/editor/plugins/mesh_editor_plugin.h +++ b/tools/editor/plugins/mesh_editor_plugin.h @@ -20,8 +20,12 @@ class MeshInstanceEditor : public Node { MENU_OPTION_CREATE_TRIMESH_COLLISION_SHAPE, MENU_OPTION_CREATE_CONVEX_COLLISION_SHAPE, MENU_OPTION_CREATE_NAVMESH, + MENU_OPTION_CREATE_OUTLINE_MESH, }; + ConfirmationDialog *outline_dialog; + SpinBox *outline_size; + AcceptDialog *err_dialog; @@ -33,6 +37,8 @@ class MeshInstanceEditor : public Node { void _menu_option(int p_option); + void _create_outline_mesh(); + friend class MeshInstanceEditorPlugin; MenuButton * options; diff --git a/tools/editor/spatial_editor_gizmos.cpp b/tools/editor/spatial_editor_gizmos.cpp index 04d5888861..d48a4ce813 100644 --- a/tools/editor/spatial_editor_gizmos.cpp +++ b/tools/editor/spatial_editor_gizmos.cpp @@ -1779,7 +1779,7 @@ void CollisionShapeSpatialGizmo::set_handle(int p_idx,Camera *p_camera, const Po Ref<CapsuleShape> cs = s;
Vector3 ra,rb;
Geometry::get_closest_points_between_segments(Vector3(),axis*4096,sg[0],sg[1],ra,rb);
- float d = ra[p_idx];
+ float d = axis.dot(ra);
if (p_idx==1)
d-=cs->get_radius();
if (d<0.001)
|