diff options
144 files changed, 1014 insertions, 1872 deletions
diff --git a/SConstruct b/SConstruct index af1ffb544e..ad6b6ee445 100644 --- a/SConstruct +++ b/SConstruct @@ -188,6 +188,7 @@ opts.Add(BoolVariable('builtin_squish', "Use the builtin squish library", True)) opts.Add(BoolVariable('builtin_thekla_atlas', "Use the builtin thekla_altas library", True)) opts.Add(BoolVariable('builtin_zlib', "Use the builtin zlib library", True)) opts.Add(BoolVariable('builtin_zstd', "Use the builtin zstd library", True)) +opts.Add(BoolVariable('no_editor_splash', "Don't use the custom splash screen for the editor", False)) # Environment setup opts.Add("CXX", "C++ compiler") @@ -239,6 +240,9 @@ if (env_base['target'] == 'debug'): env_base.Append(CPPFLAGS=['-DDEBUG_MEMORY_ALLOC']) env_base.Append(CPPFLAGS=['-DSCI_NAMESPACE']) +if (env_base['no_editor_splash']): + env_base.Append(CPPFLAGS=['-DNO_EDITOR_SPLASH']) + if not env_base['deprecated']: env_base.Append(CPPFLAGS=['-DDISABLE_DEPRECATED']) diff --git a/core/class_db.cpp b/core/class_db.cpp index edd49fe95f..b18e3d2b65 100644 --- a/core/class_db.cpp +++ b/core/class_db.cpp @@ -348,10 +348,11 @@ uint64_t ClassDB::get_api_hash(APIType p_api) { hash = hash_djb2_one_64(mb->get_argument_type(-1), hash); //return for (int i = 0; i < mb->get_argument_count(); i++) { - hash = hash_djb2_one_64(mb->get_argument_info(i).type, hash); - hash = hash_djb2_one_64(mb->get_argument_info(i).name.hash(), hash); - hash = hash_djb2_one_64(mb->get_argument_info(i).hint, hash); - hash = hash_djb2_one_64(mb->get_argument_info(i).hint_string.hash(), hash); + const PropertyInfo info = mb->get_argument_info(i); + hash = hash_djb2_one_64(info.type, hash); + hash = hash_djb2_one_64(info.name.hash(), hash); + hash = hash_djb2_one_64(info.hint, hash); + hash = hash_djb2_one_64(info.hint_string.hash(), hash); } hash = hash_djb2_one_64(mb->get_default_argument_count(), hash); diff --git a/core/hash_map.h b/core/hash_map.h index a53cb53c84..3ec3961d73 100644 --- a/core/hash_map.h +++ b/core/hash_map.h @@ -313,7 +313,7 @@ public: _FORCE_INLINE_ TData *getptr(const TKey &p_key) { - if (!hash_table) + if (unlikely(!hash_table)) return NULL; Element *e = const_cast<Element *>(get_element(p_key)); @@ -326,7 +326,7 @@ public: _FORCE_INLINE_ const TData *getptr(const TKey &p_key) const { - if (!hash_table) + if (unlikely(!hash_table)) return NULL; const Element *e = const_cast<Element *>(get_element(p_key)); @@ -345,7 +345,7 @@ public: template <class C> _FORCE_INLINE_ TData *custom_getptr(C p_custom_key, uint32_t p_custom_hash) { - if (!hash_table) + if (unlikely(!hash_table)) return NULL; uint32_t hash = p_custom_hash; @@ -371,7 +371,7 @@ public: template <class C> _FORCE_INLINE_ const TData *custom_getptr(C p_custom_key, uint32_t p_custom_hash) const { - if (!hash_table) + if (unlikely(!hash_table)) return NULL; uint32_t hash = p_custom_hash; @@ -400,7 +400,7 @@ public: bool erase(const TKey &p_key) { - if (!hash_table) + if (unlikely(!hash_table)) return false; uint32_t hash = Hasher::hash(p_key); @@ -478,7 +478,8 @@ public: */ const TKey *next(const TKey *p_key) const { - if (!hash_table) return NULL; + if (unlikely(!hash_table)) + return NULL; if (!p_key) { /* get the first key */ @@ -559,7 +560,7 @@ public: } void get_key_value_ptr_array(const Pair **p_pairs) const { - if (!hash_table) + if (unlikely(!hash_table)) return; for (int i = 0; i < (1 << hash_table_power); i++) { @@ -573,7 +574,7 @@ public: } void get_key_list(List<TKey> *p_keys) const { - if (!hash_table) + if (unlikely(!hash_table)) return; for (int i = 0; i < (1 << hash_table_power); i++) { diff --git a/core/os/file_access.cpp b/core/os/file_access.cpp index 7b2062936b..20c1221f2b 100644 --- a/core/os/file_access.cpp +++ b/core/os/file_access.cpp @@ -273,9 +273,62 @@ String FileAccess::get_token() const { return String::utf8(token.get_data()); } +class CharBuffer { + Vector<char> vector; + char stack_buffer[256]; + + char *buffer; + int capacity; + int written; + + bool grow() { + + if (vector.resize(next_power_of_2(1 + written)) != OK) { + + return false; + } + + if (buffer == stack_buffer) { // first chunk? + + for (int i = 0; i < written; i++) { + + vector[i] = stack_buffer[i]; + } + } + + buffer = vector.ptrw(); + capacity = vector.size(); + ERR_FAIL_COND_V(written >= capacity, false); + + return true; + } + +public: + _FORCE_INLINE_ CharBuffer() : + buffer(stack_buffer), + capacity(sizeof(stack_buffer) / sizeof(char)), + written(0) { + } + + _FORCE_INLINE_ void push_back(char c) { + + if (written >= capacity) { + + ERR_FAIL_COND(!grow()); + } + + buffer[written++] = c; + } + + _FORCE_INLINE_ const char *get_data() const { + + return buffer; + } +}; + String FileAccess::get_line() const { - CharString line; + CharBuffer line; CharType c = get_8(); diff --git a/core/os/os.cpp b/core/os/os.cpp index d81e70e612..7010d44930 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -536,12 +536,21 @@ String OS::get_joy_guid(int p_device) const { void OS::set_context(int p_context) { } + +OS::SwitchVSyncCallbackInThread OS::switch_vsync_function = NULL; + void OS::set_use_vsync(bool p_enable) { + _use_vsync = p_enable; + if (switch_vsync_function) { //if a function was set, use function + switch_vsync_function(p_enable); + } else { //otherwise just call here + _set_use_vsync(p_enable); + } } bool OS::is_vsync_enabled() const { - return true; + return _use_vsync; } OS::PowerState OS::get_power_state() { diff --git a/core/os/os.h b/core/os/os.h index d9f7b91daa..2faaa6ab8f 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -58,6 +58,7 @@ class OS { int _exit_code; int _orientation; bool _allow_hidpi; + bool _use_vsync; char *last_error; @@ -435,8 +436,16 @@ public: virtual void set_context(int p_context); - virtual void set_use_vsync(bool p_enable); - virtual bool is_vsync_enabled() const; + //amazing hack because OpenGL needs this to be set on a separate thread.. + //also core can't access servers, so a callback must be used + typedef void (*SwitchVSyncCallbackInThread)(bool); + + static SwitchVSyncCallbackInThread switch_vsync_function; + void set_use_vsync(bool p_enable); + bool is_vsync_enabled() const; + + //real, actual overridable function to switch vsync, which needs to be called from graphics thread if needed + virtual void _set_use_vsync(bool p_enable) {} virtual OS::PowerState get_power_state(); virtual int get_power_seconds_left(); diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index dd248d18f7..f78b39eadb 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -321,7 +321,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> - Enables/disables the given track. Tracks are enabled by default. + Enables/disables the given track. Tracks are enabled by default. </description> </method> <method name="track_set_imported"> diff --git a/doc/classes/BakedLightmap.xml b/doc/classes/BakedLightmap.xml new file mode 100644 index 0000000000..8084af3817 --- /dev/null +++ b/doc/classes/BakedLightmap.xml @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="BakedLightmap" inherits="VisualInstance" category="Core" version="3.0-beta"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + <method name="bake"> + <return type="int" enum="BakedLightmap.BakeError"> + </return> + <argument index="0" name="from_node" type="Node" default="null"> + </argument> + <argument index="1" name="create_visual_debug" type="bool" default="false"> + </argument> + <description> + </description> + </method> + <method name="debug_bake"> + <return type="void"> + </return> + <description> + </description> + </method> + </methods> + <members> + <member name="bake_mode" type="int" setter="set_bake_mode" getter="get_bake_mode" enum="BakedLightmap.BakeMode"> + </member> + <member name="bake_quality" type="int" setter="set_bake_quality" getter="get_bake_quality" enum="BakedLightmap.BakeQuality"> + </member> + <member name="bake_subdiv" type="int" setter="set_bake_subdiv" getter="get_bake_subdiv" enum="BakedLightmap.Subdiv"> + </member> + <member name="capture_subdiv" type="int" setter="set_capture_subdiv" getter="get_capture_subdiv" enum="BakedLightmap.Subdiv"> + </member> + <member name="energy" type="float" setter="set_energy" getter="get_energy"> + </member> + <member name="extents" type="Vector3" setter="set_extents" getter="get_extents"> + </member> + <member name="hdr" type="bool" setter="set_hdr" getter="is_hdr"> + </member> + <member name="image_path" type="String" setter="set_image_path" getter="get_image_path"> + </member> + <member name="light_data" type="BakedLightmapData" setter="set_light_data" getter="get_light_data"> + </member> + <member name="propagation" type="float" setter="set_propagation" getter="get_propagation"> + </member> + </members> + <constants> + <constant name="SUBDIV_128" value="0" enum="Subdiv"> + </constant> + <constant name="SUBDIV_256" value="1" enum="Subdiv"> + </constant> + <constant name="SUBDIV_512" value="2" enum="Subdiv"> + </constant> + <constant name="SUBDIV_1024" value="3" enum="Subdiv"> + </constant> + <constant name="SUBDIV_2048" value="4" enum="Subdiv"> + </constant> + <constant name="SUBDIV_4096" value="5" enum="Subdiv"> + </constant> + <constant name="SUBDIV_MAX" value="6" enum="Subdiv"> + </constant> + <constant name="BAKE_QUALITY_LOW" value="0" enum="BakeQuality"> + </constant> + <constant name="BAKE_QUALITY_MEDIUM" value="1" enum="BakeQuality"> + </constant> + <constant name="BAKE_QUALITY_HIGH" value="2" enum="BakeQuality"> + </constant> + <constant name="BAKE_MODE_CONE_TRACE" value="0" enum="BakeMode"> + </constant> + <constant name="BAKE_MODE_RAY_TRACE" value="1" enum="BakeMode"> + </constant> + </constants> +</class> diff --git a/doc/classes/BakedLightmapData.xml b/doc/classes/BakedLightmapData.xml new file mode 100644 index 0000000000..6997dcb0b2 --- /dev/null +++ b/doc/classes/BakedLightmapData.xml @@ -0,0 +1,113 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="BakedLightmapData" inherits="Resource" category="Core" version="3.0-beta"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + <method name="add_user"> + <return type="void"> + </return> + <argument index="0" name="path" type="NodePath"> + </argument> + <argument index="1" name="lightmap" type="Texture"> + </argument> + <description> + </description> + </method> + <method name="clear_users"> + <return type="void"> + </return> + <description> + </description> + </method> + <method name="get_bounds" qualifiers="const"> + <return type="AABB"> + </return> + <description> + </description> + </method> + <method name="get_cell_space_transform" qualifiers="const"> + <return type="Transform"> + </return> + <description> + </description> + </method> + <method name="get_cell_subdiv" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="get_octree" qualifiers="const"> + <return type="PoolByteArray"> + </return> + <description> + </description> + </method> + <method name="get_user_count" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="get_user_lightmap" qualifiers="const"> + <return type="Texture"> + </return> + <argument index="0" name="user_idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_user_path" qualifiers="const"> + <return type="NodePath"> + </return> + <argument index="0" name="user_idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_bounds"> + <return type="void"> + </return> + <argument index="0" name="bounds" type="AABB"> + </argument> + <description> + </description> + </method> + <method name="set_cell_space_transform"> + <return type="void"> + </return> + <argument index="0" name="xform" type="Transform"> + </argument> + <description> + </description> + </method> + <method name="set_cell_subdiv"> + <return type="void"> + </return> + <argument index="0" name="cell_subdiv" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_octree"> + <return type="void"> + </return> + <argument index="0" name="octree" type="PoolByteArray"> + </argument> + <description> + </description> + </method> + </methods> + <members> + <member name="energy" type="float" setter="set_energy" getter="get_energy"> + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/Curve.xml b/doc/classes/Curve.xml index f7ef9a182c..8a007cc5cc 100644 --- a/doc/classes/Curve.xml +++ b/doc/classes/Curve.xml @@ -107,9 +107,9 @@ <return type="float"> </return> <argument index="0" name="offset" type="float"> - Returns the y value for the point that would exist at x-position [code]offset[/code] along the curve using the baked cache. Bakes the curve's points if not already baked. </argument> <description> + Returns the y value for the point that would exist at x-position [code]offset[/code] along the curve using the baked cache. Bakes the curve's points if not already baked. </description> </method> <method name="remove_point"> diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml index 9d4b45a8d7..80f6966e12 100644 --- a/doc/classes/HTTPClient.xml +++ b/doc/classes/HTTPClient.xml @@ -26,7 +26,7 @@ </return> <argument index="0" name="host" type="String"> </argument> - <argument index="1" name="port" type="int"> + <argument index="1" name="port" type="int" default="-1"> </argument> <argument index="2" name="use_ssl" type="bool" default="false"> </argument> @@ -35,6 +35,7 @@ <description> Connect to a host. This needs to be done before any requests are sent. The host should not have http:// prepended but will strip the protocol identifier if provided. + If no [code]port[/code] is specified (or [code]-1[/code] is used), it is automatically set to 80 for HTTP and 443 for HTTPS (if [code]use_ssl[/code] is enabled). [code]verify_host[/code] will check the SSL identity of the host if set to [code]true[/code]. </description> </method> diff --git a/doc/classes/Light.xml b/doc/classes/Light.xml index e4f92cc9b3..4aa39ffff6 100644 --- a/doc/classes/Light.xml +++ b/doc/classes/Light.xml @@ -15,6 +15,8 @@ <members> <member name="editor_only" type="bool" setter="set_editor_only" getter="is_editor_only"> </member> + <member name="light_bake_mode" type="int" setter="set_bake_mode" getter="get_bake_mode" enum="Light.BakeMode"> + </member> <member name="light_color" type="Color" setter="set_color" getter="get_color"> </member> <member name="light_cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask"> @@ -71,5 +73,11 @@ </constant> <constant name="PARAM_MAX" value="15" enum="Param"> </constant> + <constant name="BAKE_DISABLED" value="0" enum="BakeMode"> + </constant> + <constant name="BAKE_INDIRECT" value="1" enum="BakeMode"> + </constant> + <constant name="BAKE_ALL" value="2" enum="BakeMode"> + </constant> </constants> </class> diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index 9a03d4e0c1..4434a7b7e2 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -27,6 +27,13 @@ Erases the [LineEdit] text. </description> </method> + <method name="deselect"> + <return type="void"> + </return> + <description> + Clears the current selection. + </description> + </method> <method name="get_cursor_position" qualifiers="const"> <return type="int"> </return> diff --git a/doc/classes/PacketPeer.xml b/doc/classes/PacketPeer.xml index 891f0c9ffc..57d88d7ff8 100644 --- a/doc/classes/PacketPeer.xml +++ b/doc/classes/PacketPeer.xml @@ -18,7 +18,7 @@ Return the number of packets currently available in the ring-buffer. </description> </method> - <method name="get_packet" qualifiers="const"> + <method name="get_packet"> <return type="PoolByteArray"> </return> <description> @@ -32,7 +32,7 @@ Return the error state of the last packet received (via [method get_packet] and [method get_var]). </description> </method> - <method name="get_var" qualifiers="const"> + <method name="get_var"> <return type="Variant"> </return> <description> diff --git a/doc/classes/SceneState.xml b/doc/classes/SceneState.xml index 4fcaaa23dc..f5cf2dbee4 100644 --- a/doc/classes/SceneState.xml +++ b/doc/classes/SceneState.xml @@ -88,6 +88,14 @@ Returns the list of group names associated with the node at [code]idx[/code]. </description> </method> + <method name="get_node_index" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> <method name="get_node_instance" qualifiers="const"> <return type="PackedScene"> </return> diff --git a/doc/classes/ScriptEditor.xml b/doc/classes/ScriptEditor.xml index 0b035f90d2..81b0b3d0c3 100644 --- a/doc/classes/ScriptEditor.xml +++ b/doc/classes/ScriptEditor.xml @@ -57,6 +57,16 @@ Returns an array with all [Script] objects which are currently open in editor. </description> </method> + <method name="open_script_create_dialog"> + <return type="void"> + </return> + <argument index="0" name="base_name" type="String"> + </argument> + <argument index="1" name="base_path" type="String"> + </argument> + <description> + </description> + </method> </methods> <signals> <signal name="editor_script_changed"> diff --git a/doc/classes/SpatialMaterial.xml b/doc/classes/SpatialMaterial.xml index cf08b0daae..403a6dc930 100644 --- a/doc/classes/SpatialMaterial.xml +++ b/doc/classes/SpatialMaterial.xml @@ -75,6 +75,8 @@ </member> <member name="emission_energy" type="float" setter="set_emission_energy" getter="get_emission_energy"> </member> + <member name="emission_on_uv2" type="bool" setter="set_flag" getter="get_flag"> + </member> <member name="emission_operator" type="int" setter="set_emission_operator" getter="get_emission_operator" enum="SpatialMaterial.EmissionOperator"> </member> <member name="emission_texture" type="Texture" setter="set_texture" getter="get_texture"> @@ -305,13 +307,15 @@ </constant> <constant name="FLAG_AO_ON_UV2" value="10" enum="Flags"> </constant> - <constant name="FLAG_USE_ALPHA_SCISSOR" value="11" enum="Flags"> + <constant name="FLAG_EMISSION_ON_UV2" value="11" enum="Flags"> + </constant> + <constant name="FLAG_USE_ALPHA_SCISSOR" value="12" enum="Flags"> </constant> <constant name="FLAG_TRIPLANAR_USE_WORLD" value="9" enum="Flags"> </constant> - <constant name="FLAG_ALBEDO_TEXTURE_FORCE_SRGB" value="12" enum="Flags"> + <constant name="FLAG_ALBEDO_TEXTURE_FORCE_SRGB" value="13" enum="Flags"> </constant> - <constant name="FLAG_MAX" value="13" enum="Flags"> + <constant name="FLAG_MAX" value="14" enum="Flags"> </constant> <constant name="DIFFUSE_BURLEY" value="0" enum="DiffuseMode"> </constant> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index da30c4c7bd..85cbeaaa03 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -109,6 +109,13 @@ Cut the current selection. </description> </method> + <method name="deselect"> + <return type="void"> + </return> + <description> + Clears the current selection. + </description> + </method> <method name="fold_all_lines"> <return type="void"> </return> diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index 72cd56dc55..510a215fbc 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -182,6 +182,24 @@ <description> </description> </method> + <method name="update_bitmask_area"> + <return type="void"> + </return> + <argument index="0" name="arg0" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="update_bitmask_region"> + <return type="void"> + </return> + <argument index="0" name="start" type="Vector2" default="Vector2( 0, 0 )"> + </argument> + <argument index="1" name="end" type="Vector2" default="Vector2( 0, 0 )"> + </argument> + <description> + </description> + </method> <method name="world_to_map" qualifiers="const"> <return type="Vector2"> </return> diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml index 1a9dc3a669..0cba132de8 100644 --- a/doc/classes/VisualServer.xml +++ b/doc/classes/VisualServer.xml @@ -2315,7 +2315,9 @@ </constant> <constant name="INSTANCE_GI_PROBE" value="7" enum="InstanceType"> </constant> - <constant name="INSTANCE_MAX" value="8" enum="InstanceType"> + <constant name="INSTANCE_LIGHTMAP_CAPTURE" value="8" enum="InstanceType"> + </constant> + <constant name="INSTANCE_MAX" value="9" enum="InstanceType"> The max value for INSTANCE_* constants, used internally. </constant> <constant name="INSTANCE_GEOMETRY_MASK" value="30" enum="InstanceType"> diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp index 309497c938..5d93c6a982 100644 --- a/drivers/gles3/rasterizer_canvas_gles3.cpp +++ b/drivers/gles3/rasterizer_canvas_gles3.cpp @@ -1545,7 +1545,7 @@ void RasterizerCanvasGLES3::reset_canvas() { glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); //use for reading from screen - if (storage->frame.current_rt) { + if (storage->frame.current_rt && !storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_NO_SAMPLING]) { glActiveTexture(GL_TEXTURE0 + storage->config.max_texture_image_units - 3); glBindTexture(GL_TEXTURE_2D, storage->frame.current_rt->effects.mip_maps[0].color); } diff --git a/drivers/gles3/rasterizer_gles3.cpp b/drivers/gles3/rasterizer_gles3.cpp index cd0adbd0d1..6b827002f8 100644 --- a/drivers/gles3/rasterizer_gles3.cpp +++ b/drivers/gles3/rasterizer_gles3.cpp @@ -354,47 +354,10 @@ void RasterizerGLES3::blit_render_target_to_screen(RID p_render_target, const Re void RasterizerGLES3::end_frame(bool p_swap_buffers) { -#if 0 - canvas->canvas_begin(); - glActiveTexture(GL_TEXTURE0); - glBindTexture(GL_TEXTURE_2D,storage->resources.white_tex); - glDisable(GL_BLEND); - glDisable(GL_DEPTH_TEST); - glDisable(GL_CULL_FACE); - - - float vtx[8]={0,0, - 0,1, - 1,1, - 1,0 - }; - - glBindBuffer(GL_ARRAY_BUFFER,0); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,0); - - glEnableVertexAttribArray(VS::ARRAY_VERTEX); - glVertexAttribPointer( VS::ARRAY_VERTEX, 2 ,GL_FLOAT, false, 0, vtx ); - - - //glBindBuffer(GL_ARRAY_BUFFER,canvas->data.canvas_quad_vertices); - //glEnableVertexAttribArray(VS::ARRAY_VERTEX); - //glVertexAttribPointer( VS::ARRAY_VERTEX, 2 ,GL_FLOAT, false, 0, 0 ); - - glBindVertexArray(canvas->data.canvas_quad_array); - - canvas->draw_generic_textured_rect(Rect2(0,0,15,15),Rect2(0,0,1,1)); -#endif if (p_swap_buffers) OS::get_singleton()->swap_buffers(); else glFinish(); - - /* print_line("objects: "+itos(storage->info.render_object_count)); - print_line("material chages: "+itos(storage->info.render_material_switch_count)); - print_line("surface changes: "+itos(storage->info.render_surface_switch_count)); - print_line("shader changes: "+itos(storage->info.render_shader_rebind_count)); - print_line("vertices: "+itos(storage->info.render_vertices_count)); -*/ } void RasterizerGLES3::finalize() { diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp index 29ab531177..b777f9343a 100644 --- a/drivers/gles3/rasterizer_scene_gles3.cpp +++ b/drivers/gles3/rasterizer_scene_gles3.cpp @@ -2786,12 +2786,6 @@ void RasterizerSceneGLES3::_setup_lights(RID *p_light_cull_result, int p_light_c copymem(&state.omni_array_tmp[li->light_index * state.ubo_light_size], &ubo_data, state.ubo_light_size); state.omni_light_count++; -#if 0 - if (li->light_ptr->shadow_enabled) { - li->shadow_projection[0] = Transform(camera_transform_inverse * li->transform).inverse(); - lights_use_shadow=true; - } -#endif } break; case VS::LIGHT_SPOT: { diff --git a/drivers/gles3/shader_gles3.cpp b/drivers/gles3/shader_gles3.cpp index 9e234f5005..20b2bc0a28 100644 --- a/drivers/gles3/shader_gles3.cpp +++ b/drivers/gles3/shader_gles3.cpp @@ -279,21 +279,6 @@ ShaderGLES3::Version *ShaderGLES3::get_current_version() { strings.push_back("precision highp sampler2DArray;\n"); #endif -#if 0 - if (cc) { - - String _code_string = "#define VERTEX_SHADER_CODE "+cc->vertex+"\n"; - String _code_globals = "#define VERTEX_SHADER_GLOBALS "+cc->vertex_globals+"\n"; - - code_string=_code_string.ascii(); - code_globals=_code_globals.ascii(); - DEBUG_PRINT( code_globals.get_data() ); - DEBUG_PRINT( code_string.get_data() ); - strings.push_back(code_globals); - strings.push_back(code_string); - } -#endif - strings.push_back(vertex_code0.get_data()); if (cc) { @@ -382,21 +367,6 @@ ShaderGLES3::Version *ShaderGLES3::get_current_version() { strings.push_back("precision highp sampler2DArray;\n"); #endif -#if 0 - if (cc) { - - String _code_string = "#define FRAGMENT_SHADER_CODE "+cc->fragment+"\n"; - String _code_globals = "#define FRAGMENT_SHADER_GLOBALS "+cc->fragment_globals+"\n"; - - code_string=_code_string.ascii(); - code_globals=_code_globals.ascii(); - DEBUG_PRINT( code_globals.get_data() ); - DEBUG_PRINT( code_string.get_data() ); - strings.push_back(code_globals); - strings.push_back(code_string); - } -#endif - strings.push_back(fragment_code0.get_data()); if (cc) { material_string = cc->uniforms.ascii(); diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index 676b168371..d20b55e268 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -522,6 +522,19 @@ EditorHelpIndex::EditorHelpIndex() { /// ///////////////////////////////// DocData *EditorHelp::doc = NULL; +void EditorHelp::_init_colors() { + + title_color = get_color("accent_color", "Editor"); + text_color = get_color("default_color", "RichTextLabel"); + headline_color = get_color("headline_color", "EditorHelp"); + base_type_color = title_color.linear_interpolate(text_color, 0.5); + comment_color = Color(text_color.r, text_color.g, text_color.b, 0.6); + symbol_color = comment_color; + value_color = Color(text_color.r, text_color.g, text_color.b, 0.4); + qualifier_color = Color(text_color.r, text_color.g, text_color.b, 0.8); + type_color = get_color("accent_color", "Editor").linear_interpolate(text_color, 0.5); +} + void EditorHelp::_unhandled_key_input(const Ref<InputEvent> &p_ev) { if (!is_visible_in_tree()) @@ -654,6 +667,86 @@ void EditorHelp::_add_type(const String &p_type, const String &p_enum) { class_desc->pop(); } +void EditorHelp::_add_method(const DocData::MethodDoc &p_method, bool p_overview) { + + method_line[p_method.name] = class_desc->get_line_count() - 2; //gets overridden if description + + const bool is_vararg = p_method.qualifiers.find("vararg") != -1; + + if (p_overview) { + class_desc->push_cell(); + class_desc->push_align(RichTextLabel::ALIGN_RIGHT); + } + + _add_type(p_method.return_type, p_method.return_enum); + + if (p_overview) { + class_desc->pop(); //align + class_desc->pop(); //cell + class_desc->push_cell(); + } else { + class_desc->add_text(" "); + } + + if (p_overview && p_method.description != "") { + class_desc->push_meta("@method" + p_method.name); + } + + class_desc->push_color(headline_color); + _add_text(p_method.name); + class_desc->pop(); + + if (p_overview && p_method.description != "") { + class_desc->pop(); //meta + } + + class_desc->push_color(symbol_color); + class_desc->add_text(p_method.arguments.size() || is_vararg ? "( " : "("); + class_desc->pop(); + + for (int j = 0; j < p_method.arguments.size(); j++) { + class_desc->push_color(text_color); + if (j > 0) + class_desc->add_text(", "); + _add_type(p_method.arguments[j].type, p_method.arguments[j].enumeration); + class_desc->add_text(" "); + _add_text(p_method.arguments[j].name); + if (p_method.arguments[j].default_value != "") { + + class_desc->push_color(symbol_color); + class_desc->add_text("="); + class_desc->pop(); + _add_text(p_method.arguments[j].default_value); + } + + class_desc->pop(); + } + + if (is_vararg) { + class_desc->push_color(text_color); + if (p_method.arguments.size()) + class_desc->add_text(", "); + class_desc->push_color(symbol_color); + class_desc->add_text("..."); + class_desc->pop(); + class_desc->pop(); + } + + class_desc->push_color(symbol_color); + class_desc->add_text(p_method.arguments.size() || is_vararg ? " )" : ")"); + class_desc->pop(); + if (p_method.qualifiers != "") { + + class_desc->push_color(qualifier_color); + class_desc->add_text(" "); + _add_text(p_method.qualifiers); + class_desc->pop(); + } + + if (p_overview) + class_desc->pop(); //cell +} + Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) { //ERR_FAIL_COND(!doc->class_list.has(p_class)); @@ -679,15 +772,7 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) { edited_class = p_class; //edited_class->show(); - // Colors - const Color title_color = get_color("accent_color", "Editor"); - const Color text_color = get_color("default_color", "RichTextLabel"); - const Color headline_color = get_color("headline_color", "EditorHelp"); - const Color base_type_color = title_color.linear_interpolate(text_color, 0.5); - const Color comment_color = Color(text_color.r, text_color.g, text_color.b, 0.6); - const Color symbol_color = comment_color; - const Color value_color = Color(text_color.r, text_color.g, text_color.b, 0.4); - const Color qualifier_color = Color(text_color.r, text_color.g, text_color.b, 0.8); + _init_colors(); DocData::ClassDoc cd = doc->class_list[p_class]; //make a copy, so we can sort without worrying @@ -892,78 +977,51 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) { class_desc->push_table(2); class_desc->set_table_column_expand(1, 1); - for (int i = 0; i < methods.size(); i++) { - - bool is_vararg = methods[i].qualifiers.find("vararg") != -1; - - method_line[methods[i].name] = class_desc->get_line_count() - 2; //gets overridden if description - - class_desc->push_cell(); - class_desc->push_align(RichTextLabel::ALIGN_RIGHT); - class_desc->push_font(doc_code_font); - _add_type(methods[i].return_type, methods[i].return_enum); - //class_desc->add_text(" "); - class_desc->pop(); //align - class_desc->pop(); //font - class_desc->pop(); //cell + bool any_previous = false; + for (int pass = 0; pass < 2; pass++) { + Vector<DocData::MethodDoc> m; - class_desc->push_cell(); - class_desc->push_font(doc_code_font); + for (int i = 0; i < methods.size(); i++) { + const String &q = methods[i].qualifiers; + if ((pass == 0 && q.find("virtual") != -1) || (pass == 1 && q.find("virtual") == -1)) { + m.push_back(methods[i]); + } + } - if (methods[i].description != "") { - method_descr = true; - class_desc->push_meta("@method" + methods[i].name); + if (any_previous && !m.empty()) { + class_desc->push_cell(); + class_desc->pop(); //cell + class_desc->push_cell(); + class_desc->pop(); //cell + any_previous = false; } - class_desc->push_color(headline_color); - _add_text(methods[i].name); - class_desc->pop(); - if (methods[i].description != "") - class_desc->pop(); // pop meta - class_desc->push_color(symbol_color); - class_desc->add_text(methods[i].arguments.size() || is_vararg ? "( " : "("); - class_desc->pop(); - for (int j = 0; j < methods[i].arguments.size(); j++) { - class_desc->push_color(text_color); - if (j > 0) - class_desc->add_text(", "); - _add_type(methods[i].arguments[j].type, methods[i].arguments[j].enumeration); - class_desc->add_text(" "); - _add_text(methods[i].arguments[j].name); - if (methods[i].arguments[j].default_value != "") { - class_desc->push_color(symbol_color); - class_desc->add_text("="); - class_desc->pop(); - _add_text(methods[i].arguments[j].default_value); + String group_prefix; + for (int i = 0; i < m.size(); i++) { + const String new_prefix = m[i].name.substr(0, 3); + bool is_new_group = false; + + if (i < m.size() - 1 && new_prefix == m[i + 1].name.substr(0, 3) && new_prefix != group_prefix) { + is_new_group = i > 0; + group_prefix = new_prefix; + } else if (group_prefix != "" && new_prefix != group_prefix) { + is_new_group = true; + group_prefix = ""; } - class_desc->pop(); - } + if (is_new_group && pass == 1) { + class_desc->push_cell(); + class_desc->pop(); //cell + class_desc->push_cell(); + class_desc->pop(); //cell + } - if (is_vararg) { - class_desc->push_color(text_color); - if (methods[i].arguments.size()) - class_desc->add_text(", "); - class_desc->push_color(symbol_color); - class_desc->add_text("..."); - class_desc->pop(); - class_desc->pop(); + _add_method(m[i], true); } - class_desc->push_color(symbol_color); - class_desc->add_text(methods[i].arguments.size() || is_vararg ? " )" : ")"); - class_desc->pop(); - if (methods[i].qualifiers != "") { - - class_desc->push_color(qualifier_color); - class_desc->add_text(" "); - _add_text(methods[i].qualifiers); - class_desc->pop(); - } - class_desc->pop(); //monofont - //class_desc->add_newline(); - class_desc->pop(); //cell + any_previous = !m.empty(); } + class_desc->pop(); //table class_desc->pop(); class_desc->add_newline(); @@ -1366,60 +1424,7 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) { for (int i = 0; i < methods.size(); i++) { - bool is_vararg = methods[i].qualifiers.find("vararg") != -1; - - method_line[methods[i].name] = class_desc->get_line_count() - 2; - - class_desc->push_font(doc_code_font); - _add_type(methods[i].return_type, methods[i].return_enum); - - class_desc->add_text(" "); - class_desc->push_color(headline_color); - _add_text(methods[i].name); - class_desc->pop(); - class_desc->push_color(symbol_color); - class_desc->add_text(methods[i].arguments.size() || is_vararg ? "( " : "("); - class_desc->pop(); - for (int j = 0; j < methods[i].arguments.size(); j++) { - class_desc->push_color(text_color); - if (j > 0) - class_desc->add_text(", "); - _add_type(methods[i].arguments[j].type, methods[i].arguments[j].enumeration); - class_desc->add_text(" "); - _add_text(methods[i].arguments[j].name); - if (methods[i].arguments[j].default_value != "") { - - class_desc->push_color(symbol_color); - class_desc->add_text("="); - class_desc->pop(); - _add_text(methods[i].arguments[j].default_value); - } - - class_desc->pop(); - } - - if (is_vararg) { - class_desc->push_color(text_color); - if (methods[i].arguments.size()) - class_desc->add_text(", "); - class_desc->push_color(symbol_color); - class_desc->add_text("..."); - class_desc->pop(); - class_desc->pop(); - } - - class_desc->push_color(symbol_color); - class_desc->add_text(methods[i].arguments.size() || is_vararg ? " )" : ")"); - class_desc->pop(); - if (methods[i].qualifiers != "") { - - class_desc->push_color(qualifier_color); - class_desc->add_text(" "); - _add_text(methods[i].qualifiers); - class_desc->pop(); - } - - class_desc->pop(); + _add_method(methods[i], false); class_desc->add_newline(); class_desc->push_color(text_color); diff --git a/editor/editor_help.h b/editor/editor_help.h index a224c7f8ee..96a3309ca3 100644 --- a/editor/editor_help.h +++ b/editor/editor_help.h @@ -139,6 +139,17 @@ class EditorHelp : public VBoxContainer { String base_path; + Color title_color; + Color text_color; + Color headline_color; + Color base_type_color; + Color type_color; + Color comment_color; + Color symbol_color; + Color value_color; + Color qualifier_color; + + void _init_colors(); void _help_callback(const String &p_topic); void _add_text(const String &p_bbcode); @@ -146,6 +157,7 @@ class EditorHelp : public VBoxContainer { //void _button_pressed(int p_idx); void _add_type(const String &p_type, const String &p_enum = String()); + void _add_method(const DocData::MethodDoc &p_method, bool p_overview = true); void _class_list_select(const String &p_select); void _class_desc_select(const String &p_select); diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index cb8407386d..0eb8ea6e46 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -444,15 +444,7 @@ void EditorNode::_fs_changed() { continue; if (E->get()->get_import_path() != String()) { -//this is an imported resource, will be reloaded if reimported via the _resources_reimported() callback -//imported resource -#if 0 - uint64_t mt = FileAccess::get_modified_time(E->get()->get_import_path()); - - if (mt != E->get()->get_import_last_modified_time()) { - changed.push_back(E->get()); - } -#endif + //this is an imported resource, will be reloaded if reimported via the _resources_reimported() callback continue; } diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 152eda7d91..cc0b292cc4 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -999,6 +999,12 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_icon("bg", "ColorPickerButton", theme->get_icon("GuiMiniCheckerboard", "EditorIcons")); + // Information on 3D viewport + Ref<StyleBoxFlat> style_info_3d_viewport = style_default->duplicate(); + style_info_3d_viewport->set_bg_color(style_info_3d_viewport->get_bg_color() * Color(1, 1, 1, 0.5)); + style_info_3d_viewport->set_border_width_all(0); + theme->set_stylebox("Information3dViewport", "EditorStyles", style_info_3d_viewport); + // adaptive script theme constants // for comments and elements with lower relevance const Color dim_color = Color(font_color.r, font_color.g, font_color.b, 0.5); diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp index cdb7256329..3eaa6e44fd 100644 --- a/editor/export_template_manager.cpp +++ b/editor/export_template_manager.cpp @@ -176,7 +176,7 @@ void ExportTemplateManager::_uninstall_template_confirm() { _update_template_list(); } -void ExportTemplateManager::_install_from_file(const String &p_file) { +void ExportTemplateManager::_install_from_file(const String &p_file, bool p_use_progress) { FileAccess *fa = NULL; zlib_filefunc_def io = zipio_create_io_from_file(&fa); @@ -259,7 +259,10 @@ void ExportTemplateManager::_install_from_file(const String &p_file) { ret = unzGoToFirstFile(pkg); - EditorProgress p("ltask", TTR("Extracting Export Templates"), fc); + EditorProgress *p = NULL; + if (p_use_progress) { + p = memnew(EditorProgress("ltask", TTR("Extracting Export Templates"), fc)); + } fc = 0; @@ -288,8 +291,9 @@ void ExportTemplateManager::_install_from_file(const String &p_file) { */ file = file.get_file(); - - p.step(TTR("Importing:") + " " + file, fc); + if (p) { + p->step(TTR("Importing:") + " " + file, fc); + } FileAccess *f = FileAccess::open(template_path.plus_file(file), FileAccess::WRITE); @@ -302,6 +306,10 @@ void ExportTemplateManager::_install_from_file(const String &p_file) { fc++; } + if (p) { + memdelete(p); + } + unzClose(pkg); _update_template_list(); @@ -405,7 +413,7 @@ void ExportTemplateManager::_http_download_templates_completed(int p_status, int memdelete(f); template_list_state->set_text(TTR("Download Complete.")); template_downloader->hide(); - _install_from_file(path); + _install_from_file(path, false); } } } break; diff --git a/editor/export_template_manager.h b/editor/export_template_manager.h index 644c6b466b..36093da66a 100644 --- a/editor/export_template_manager.h +++ b/editor/export_template_manager.h @@ -69,7 +69,7 @@ class ExportTemplateManager : public ConfirmationDialog { void _uninstall_template_confirm(); virtual void ok_pressed(); - void _install_from_file(const String &p_file); + void _install_from_file(const String &p_file, bool p_use_progress = true); void _http_download_mirror_completed(int p_status, int p_code, const PoolStringArray &headers, const PoolByteArray &p_data); void _http_download_templates_completed(int p_status, int p_code, const PoolStringArray &headers, const PoolByteArray &p_data); diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index a756366edf..c30f077888 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -591,9 +591,7 @@ void FileSystemDock::_select_file(int p_idx) { if (fpath != "res://") { fpath = fpath.substr(0, fpath.length() - 1); } - path = fpath; - _update_files(false); - navigate_to_path(path); + navigate_to_path(fpath); } else { if (ResourceLoader::get_resource_type(fpath) == "PackedScene") { editor->open_request(fpath); diff --git a/editor/icons/icon_GUI_visibility_hidden.svg b/editor/icons/icon_GUI_visibility_hidden.svg index 61131c77c8..7b7f3c8031 100644 --- a/editor/icons/icon_GUI_visibility_hidden.svg +++ b/editor/icons/icon_GUI_visibility_hidden.svg @@ -1,3 +1,3 @@ <svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> -<path d="m7.9998 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.00586 0.5703c1.1244 3.9354 4.4609 5.7246 6.9609 5.7246s5.8365-1.7892 6.9609-5.7246a1.0001 1.0001 0 0 0 0 -0.5527c-1.1003-3.7876-4.4066-5.7227-6.9609-5.7227zm0 2a4 4 0 0 1 4 4 4 4 0 0 1 -4 4 4 4 0 0 1 -4 -4 4 4 0 0 1 4 -4zm0 2a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2z" color="#000000" color-rendering="auto" fill="#e0e0e0" fill-opacity=".39216" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/> +<path d="m2.9609 7.7266-1.9219 0.54883c0.31999 1.12 0.8236 2.0593 1.4316 2.8398l-0.83398 0.83398 1.4141 1.4141 0.84375-0.84375c0.98585 0.74762 2.0766 1.2067 3.1055 1.3867v1.0938h2v-1.0938c1.0288-0.17998 2.1196-0.6391 3.1055-1.3867l0.84375 0.84375 1.4141-1.4141-0.83398-0.83398c0.60804-0.78055 1.1117-1.7199 1.4316-2.8398l-1.9219-0.54883c-0.8756 3.0646-3.5391 4.2734-5.0391 4.2734s-4.1635-1.2088-5.0391-4.2734z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#e0e0e0" fill-opacity=".99608" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/> </svg> diff --git a/editor/icons/icon_mini_aabb.svg b/editor/icons/icon_aabb.svg index 1af05f9b68..1af05f9b68 100644 --- a/editor/icons/icon_mini_aabb.svg +++ b/editor/icons/icon_aabb.svg diff --git a/editor/icons/icon_mini_array.svg b/editor/icons/icon_array.svg index 4a279bf87b..4a279bf87b 100644 --- a/editor/icons/icon_mini_array.svg +++ b/editor/icons/icon_array.svg diff --git a/editor/icons/icon_basis.svg b/editor/icons/icon_basis.svg new file mode 100644 index 0000000000..e9bee04f56 --- /dev/null +++ b/editor/icons/icon_basis.svg @@ -0,0 +1,4 @@ +<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> +<path d="m0 2v8h2a3 3 0 0 0 3 -3 3 3 0 0 0 -3 -3v-2zm10 0v2h2v-2zm-3 2a2 2 0 0 0 -1.7324 1 2 2 0 0 0 0 2 2 2 0 0 0 1.7324 1h-2v2h2a2 2 0 0 0 1.7324 -1 2 2 0 0 0 0 -2 2 2 0 0 0 -1.7324 -1h2v-2zm7 0a2 2 0 0 0 -1.7324 1 2 2 0 0 0 0 2 2 2 0 0 0 1.7324 1h-2v-2h-2v4h4a2 2 0 0 0 1.7324 -1 2 2 0 0 0 0 -2 2 2 0 0 0 -1.7324 -1h2v-2zm-12 2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1z" fill="#e3ec69"/> +<path d="m10 2v2h2v-2zm0 4v4h2v-4z" fill="#fff" fill-opacity=".39216"/> +</svg> diff --git a/editor/icons/icon_bool.svg b/editor/icons/icon_bool.svg new file mode 100644 index 0000000000..c4c919dfca --- /dev/null +++ b/editor/icons/icon_bool.svg @@ -0,0 +1,3 @@ +<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> +<path d="m0 2v8h2a3 3 0 0 0 2.5 -1.3457 3 3 0 0 0 2.5 1.3457 3 3 0 0 0 2 -0.76758 3 3 0 0 0 2 0.76758 3 3 0 0 0 2.5 -1.3457 3 3 0 0 0 2.5 1.3457v-2a1 1 0 0 1 -1 -1v-5h-2v2.7695a3 3 0 0 0 -2 -0.76953 3 3 0 0 0 -2 0.76758 3 3 0 0 0 -2 -0.76758 3 3 0 0 0 -2.5 1.3457 3 3 0 0 0 -2.5 -1.3457v-2zm2 4a1 1 0 0 1 1 1 1 1 0 0 1 -1 1zm5 0a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1zm4 0a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1z" fill="#8da6f0"/> +</svg> diff --git a/editor/icons/icon_color.svg b/editor/icons/icon_color.svg new file mode 100644 index 0000000000..52c7890e60 --- /dev/null +++ b/editor/icons/icon_color.svg @@ -0,0 +1,7 @@ +<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> +<g> +<path d="m4 4a3 3 0 0 0 -3 3 3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1h1v-2z" fill="#ff8484"/> +<path d="m14 4a3 3 0 0 0 -3 3v3h2v-3a1 1 0 0 1 1 -1h1v-2z" fill="#84c2ff"/> +<path d="m6 2v5a3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1v-5z" fill="#84ffb1"/> +</g> +</svg> diff --git a/editor/icons/icon_dictionary.svg b/editor/icons/icon_dictionary.svg new file mode 100644 index 0000000000..b0146bb5d3 --- /dev/null +++ b/editor/icons/icon_dictionary.svg @@ -0,0 +1,3 @@ +<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> +<path d="m3 2v2a3 3 0 0 0 -3 3 3 3 0 0 0 3 3h2v-8h-2zm3 0v2h2v-2h-2zm7 0v5a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1 -1v-1h1v-2h-1v-2h-2zm-2 2a3 3 0 0 0 -3 3 3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1h1v-2h-1zm-3 3v-1h-2v4h2v-3zm-5-1v2a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1z" fill="#77edb1"/> +</svg> diff --git a/editor/icons/icon_float.svg b/editor/icons/icon_float.svg new file mode 100644 index 0000000000..4091101fd1 --- /dev/null +++ b/editor/icons/icon_float.svg @@ -0,0 +1,3 @@ +<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> +<path d="m3 2a3 3 0 0 0 -3 3v5h2v-2h2v-2h-2v-1a1 1 0 0 1 1 -1h1v-2zm3 0v5a3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1v-5zm6 0v5a3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1v-1h2v-2h-2v-2z" fill="#61daf4"/> +</svg> diff --git a/editor/icons/icon_int.svg b/editor/icons/icon_int.svg new file mode 100644 index 0000000000..e16bb2ec07 --- /dev/null +++ b/editor/icons/icon_int.svg @@ -0,0 +1,3 @@ +<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> +<path d="m1 2v2h2v-2zm11 0v5a3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1v-1h2v-2h-2v-2zm-8 2v6h2v-4h1a1 1 0 0 1 1 1v3h2v-3a3 3 0 0 0 -3 -3h-1zm-3 2v4h2v-4z" fill="#7dc6ef"/> +</svg> diff --git a/editor/icons/icon_kinematic_body.svg b/editor/icons/icon_kinematic_body.svg index 6f8d69fa53..c5f817c68c 100644 --- a/editor/icons/icon_kinematic_body.svg +++ b/editor/icons/icon_kinematic_body.svg @@ -1,5 +1,3 @@ <svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1036.4)"> -<path transform="translate(0 1036.4)" d="m6 1c-0.55401 0-1 0.44599-1 1v3c0 0.55401 0.44599 1 1 1h1v0.99023a1.0001 1.0001 0 0 0 -0.31641 0.0625l-2.0508 0.68359-0.68359-2.0508a1.0001 1.0001 0 0 0 -0.99023 -0.69727 1.0001 1.0001 0 0 0 -0.9082 1.3281l1 3a1.0001 1.0001 0 0 0 1.2656 0.63281l1.6836-0.56055v0.61133c0 0.040884 0.018715 0.075662 0.023438 0.11523l-4.5781 3.0527a1.0001 1.0001 0 1 0 1.1094 1.6641l5.0566-3.3711 1.4941 2.9863a1.0001 1.0001 0 0 0 1.2109 0.50195l3-1a1.0001 1.0001 0 1 0 -0.63281 -1.8965l-2.1777 0.72461-0.97461-1.9512c0.2759-0.17764 0.46875-0.47227 0.46875-0.82617v-1h1.3828l0.72266 1.4473a1.0001 1.0001 0 1 0 1.7891 -0.89453l-1-2a1.0001 1.0001 0 0 0 -0.89453 -0.55273h-3v-1h1c0.55401 0 1-0.44599 1-1v-3c0-0.55401-0.44599-1-1-1h-4zm0 2h1v2h-1v-2z" fill="#fc9c9c" fill-opacity=".99608"/> -</g> +<path d="m6 1c-0.55401 0-1 0.44599-1 1v3c0 0.55401 0.44599 1 1 1h1v0.99023a1.0001 1.0001 0 0 0 -0.31641 0.0625l-2.0508 0.68359-0.68359-2.0508a1.0001 1.0001 0 0 0 -0.99023 -0.69727 1.0001 1.0001 0 0 0 -0.9082 1.3281l1 3a1.0001 1.0001 0 0 0 1.2656 0.63281l1.6836-0.56055v0.61133c0 0.04088 0.018715 0.07566 0.023437 0.11523l-4.5781 3.0527a1.0001 1.0001 0 1 0 1.1094 1.6641l5.0566-3.3711 1.4941 2.9863a1.0001 1.0001 0 0 0 1.2109 0.50195l3-1a1.0001 1.0001 0 1 0 -0.63281 -1.8965l-2.1777 0.72461-0.97461-1.9512c0.2759-0.17764 0.46875-0.47227 0.46875-0.82617v-1h1.3828l0.72266 1.4473a1.0001 1.0001 0 1 0 1.7891 -0.89453l-1-2a1.0001 1.0001 0 0 0 -0.89453 -0.55273h-3v-1h1c0.55401 0 1-0.44599 1-1v-3c0-0.55401-0.44599-1-1-1zm0 2h1v2h-1z" fill="#fc9c9c" fill-opacity=".99608"/> </svg> diff --git a/editor/icons/icon_kinematic_body_2d.svg b/editor/icons/icon_kinematic_body_2d.svg index 0441e499c0..cac3ac7684 100644 --- a/editor/icons/icon_kinematic_body_2d.svg +++ b/editor/icons/icon_kinematic_body_2d.svg @@ -1,7 +1,3 @@ <svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1036.4)"> -<g transform="translate(.49212 -.0044019)" fill="#a5b7f3"> -<path transform="translate(0 1036.4)" d="m6 1c-0.55401 0-1 0.44599-1 1v3c0 0.55401 0.44599 1 1 1h1v0.99023a1.0001 1.0001 0 0 0 -0.31641 0.0625l-2.0508 0.68359-0.68359-2.0508a1.0001 1.0001 0 0 0 -0.99023 -0.69727 1.0001 1.0001 0 0 0 -0.9082 1.3281l1 3a1.0001 1.0001 0 0 0 1.2656 0.63281l1.6836-0.56055v0.61133c0 0.04088 0.018715 0.07566 0.023437 0.11523l-4.5781 3.0527a1.0001 1.0001 0 1 0 1.1094 1.6641l5.0566-3.3711 1.4941 2.9863a1.0001 1.0001 0 0 0 1.2109 0.50195l3-1a1.0001 1.0001 0 1 0 -0.63281 -1.8965l-2.1777 0.72461-0.97461-1.9512c0.2759-0.17764 0.46875-0.47227 0.46875-0.82617v-1h1.3828l0.72266 1.4473a1.0001 1.0001 0 1 0 1.7891 -0.89453l-1-2a1.0001 1.0001 0 0 0 -0.89453 -0.55273h-3v-1h1c0.55401 0 1-0.44599 1-1v-3c0-0.55401-0.44599-1-1-1zm0 2h1v2h-1z" fill="#a5b7f3"/> -</g> -</g> +<path d="m6.4921 1c-0.55401 0-1 0.446-1 1v3c0 0.554 0.44599 1 1 1h1v0.9902a1.0001 1.0001 0 0 0 -0.31641 0.062l-2.0508 0.6836-0.68359-2.0508a1.0001 1.0001 0 0 0 -0.99023 -0.6972 1.0001 1.0001 0 0 0 -0.9082 1.3281l1 3a1.0001 1.0001 0 0 0 1.2656 0.6328l1.6836-0.5605v0.6113c0 0.041 0.018715 0.076 0.023437 0.1152l-4.5781 3.0528a1.0001 1.0001 0 1 0 1.1094 1.664l5.0566-3.3711 1.4941 2.9864a1.0001 1.0001 0 0 0 1.2109 0.5019l3-1a1.0001 1.0001 0 1 0 -0.63281 -1.8965l-2.1777 0.7246-0.97461-1.9511c0.2759-0.1777 0.46875-0.4723 0.46875-0.8262v-1h1.3828l0.72266 1.4473a1.0001 1.0001 0 1 0 1.7891 -0.8946l-1-2a1.0001 1.0001 0 0 0 -0.89453 -0.5527h-3v-1h1c0.55401 0 1-0.446 1-1v-3c0-0.554-0.44599-1-1-1zm0 2h1v2h-1z" fill="#a5b7f3"/> </svg> diff --git a/editor/icons/icon_match_case.svg b/editor/icons/icon_match_case.svg new file mode 100644 index 0000000000..2958933aca --- /dev/null +++ b/editor/icons/icon_match_case.svg @@ -0,0 +1,3 @@ +<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> +<path d="m4 1c-2.2091-6.6e-7 -4.069 1.7919-4 4v10h2v-4h4v4h2v-10c0-2.2091-1.7909-4-4-4zm5 11c0 1.6569 1.3431 3 3 3 0.3409-0.0014 0.67908-0.0608 1-0.17578v0.17578h2v-6c0-1.6569-1.3431-3-3-3h-1v2h1c0.55228 0 1 0.44772 1 1v0.17383c-0.32104-0.11432-0.65921-0.1731-1-0.17383-1.6569 0-3 1.3431-3 3zm-5-9c1.1046-1e-7 1.914 0.89879 2 2v4h-4v-4c0-1.1046 0.89543-2 2-2zm8 8c0.55228 0 1 0.44772 1 1s-0.44772 1-1 1-1-0.44772-1-1 0.44772-1 1-1z" fill="#e0e0e0" stroke-width="0"/> +</svg> diff --git a/editor/icons/icon_member_constant.svg b/editor/icons/icon_member_constant.svg new file mode 100644 index 0000000000..0f8c6966c4 --- /dev/null +++ b/editor/icons/icon_member_constant.svg @@ -0,0 +1,3 @@ +<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> +<path d="m10.135 3.002c-1.5244-0.04132-2.9843 0.61528-3.9648 1.7832-1.5607 1.8591-1.5607 4.5706 0 6.4297 1.5599 1.8584 4.229 2.3286 6.3301 1.1152l-1.0039-1.7363c-0.45449 0.26416-0.97042 0.40425-1.4961 0.40625-1.6569 0-3-1.3431-3-3-1e-7 -1.6569 1.3431-3 3-3 0.5255 0.0014061 1.0414 0.14082 1.4961 0.4043l1.0039-1.7344c-0.72056-0.41598-1.5335-0.64557-2.3652-0.66797zm-7.1348 7.998c-0.55228 0-1 0.44772-1 1-1e-7 0.55228 0.44772 1 1 1s1-0.44772 1-1c1e-7 -0.55228-0.44772-1-1-1z" fill="#e0e0e0" stroke-width="0"/> +</svg> diff --git a/editor/icons/icon_member_method.svg b/editor/icons/icon_member_method.svg new file mode 100644 index 0000000000..57c93339b6 --- /dev/null +++ b/editor/icons/icon_member_method.svg @@ -0,0 +1,3 @@ +<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> +<path d="m6.0215 3c-0.40133-0.0028518-0.79916 0.074854-1.1699 0.22852-1.1208 0.46444-1.8516 1.5582-1.8516 2.7715v7h2v-3h2v-2h-2v-2c0-0.55228 0.44772-1 1-1 0.2652 4.01e-5 0.51953 0.10542 0.70703 0.29297l1.4141-1.4141c-0.55724-0.5574-1.3115-0.87312-2.0996-0.87891zm2.9785 3c-1.3263 2.6586-1.3404 4.3252 0 7h2c-1.3404-2.6748-1.3263-4.3414 0-7h-2zm4 0c1.3263 2.6586 1.3404 4.3252 0 7h2c1.3404-2.6748 1.3263-4.3414 0-7h-2zm-12 5a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1z" fill="#e0e0e0" stroke-width="0"/> +</svg> diff --git a/editor/icons/icon_member_property.svg b/editor/icons/icon_member_property.svg new file mode 100644 index 0000000000..918d0a64e9 --- /dev/null +++ b/editor/icons/icon_member_property.svg @@ -0,0 +1,3 @@ +<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> +<path d="m7 4v9h2v-3h1c1.6569 0 3-1.3431 3-3s-1.3431-3-3-3zm2 2h1c0.55228 0 1 0.44772 1 1s-0.44798 0.98275-1 1h-1zm-5 5c-0.55228 0-1 0.44772-1 1-1e-7 0.55228 0.44772 1 1 1s1-0.44772 1-1c1e-7 -0.55228-0.44772-1-1-1z" fill="#e0e0e0" stroke-width="0"/> +</svg> diff --git a/editor/icons/icon_member_signal.svg b/editor/icons/icon_member_signal.svg new file mode 100644 index 0000000000..2957cbbc50 --- /dev/null +++ b/editor/icons/icon_member_signal.svg @@ -0,0 +1,3 @@ +<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> +<path d="m6 1a1 1 0 0 0 -1 1 1 1 0 0 0 1 1c4.4301 0 8 3.5699 8 8a1 1 0 0 0 1 1 1 1 0 0 0 1 -1c0-5.511-4.489-10-10-10zm0 4a1 1 0 0 0 -1 1 1 1 0 0 0 1 1c2.221 0 4 1.779 4 4a1 1 0 0 0 1 1 1 1 0 0 0 1 -1c0-3.3018-2.6981-6-6-6zm0 4a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2zm-5 2c-0.55228 0-1 0.44772-1 1-1e-7 0.55228 0.44772 1 1 1s1-0.44772 1-1c1e-7 -0.55228-0.44772-1-1-1z" fill="#e0e0e0" stroke-width="0"/> +</svg> diff --git a/editor/icons/icon_member_theme.svg b/editor/icons/icon_member_theme.svg new file mode 100644 index 0000000000..880450abae --- /dev/null +++ b/editor/icons/icon_member_theme.svg @@ -0,0 +1,6 @@ +<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> +<g fill="#e0e0e0" stroke-width="0"> +<path d="m3 11c-0.55228 0-1 0.44772-1 1-1e-7 0.55228 0.44772 1 1 1s1-0.44772 1-1c1e-7 -0.55228-0.44772-1-1-1z"/> +<path d="m10 2c-2.4 4-4 4.7909-4 7 0 2.2091 1.8297 4 4 4 2.1703 0 4-1.7909 4-4 0-2.2091-1.6-3-4-7z"/> +</g> +</svg> diff --git a/editor/icons/icon_mini_basis.svg b/editor/icons/icon_mini_basis.svg deleted file mode 100644 index 21b4f29aa4..0000000000 --- a/editor/icons/icon_mini_basis.svg +++ /dev/null @@ -1,6 +0,0 @@ -<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1040.4)"> -<path transform="translate(0 1040.4)" d="m0 2v4 4h2a3 3 0 0 0 3 -3 3 3 0 0 0 -3 -3v-2h-2zm10 0v2h2v-2h-2zm-3 2a2 2 0 0 0 -1.7324 1 2 2 0 0 0 0 2 2 2 0 0 0 1.7324 1h-2v2h2a2 2 0 0 0 1.7324 -1 2 2 0 0 0 0 -2 2 2 0 0 0 -1.7324 -1h2v-2h-2zm7 0a2 2 0 0 0 -1.7324 1 2 2 0 0 0 0 2 2 2 0 0 0 1.7324 1h-2v-2h-2v4h2 2a2 2 0 0 0 1.7324 -1 2 2 0 0 0 0 -2 2 2 0 0 0 -1.7324 -1h2v-2h-2zm-12 2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1v-2z" fill="#e3ec69"/> -<path d="m10 1042.4v2h2v-2zm0 4v4h2v-4z" fill="#fff" fill-opacity=".39216"/> -</g> -</svg> diff --git a/editor/icons/icon_mini_boolean.svg b/editor/icons/icon_mini_boolean.svg deleted file mode 100644 index b1e169d73c..0000000000 --- a/editor/icons/icon_mini_boolean.svg +++ /dev/null @@ -1,5 +0,0 @@ -<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1040.4)"> -<path transform="translate(0 1040.4)" d="m0 2v4 4h2a3 3 0 0 0 2.5 -1.3457 3 3 0 0 0 2.5 1.3457 3 3 0 0 0 2 -0.76758 3 3 0 0 0 2 0.76758 3 3 0 0 0 2.5 -1.3457 3 3 0 0 0 2.5 1.3457v-2a1 1 0 0 1 -1 -1v-5h-2v2.7695a3 3 0 0 0 -2 -0.76953 3 3 0 0 0 -2 0.76758 3 3 0 0 0 -2 -0.76758 3 3 0 0 0 -2.5 1.3457 3 3 0 0 0 -2.5 -1.3457v-2h-2zm2 4a1 1 0 0 1 1 1 1 1 0 0 1 -1 1v-2zm5 0a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1zm4 0a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1z" fill="#8da6f0"/> -</g> -</svg> diff --git a/editor/icons/icon_mini_color.svg b/editor/icons/icon_mini_color.svg deleted file mode 100644 index 623f922158..0000000000 --- a/editor/icons/icon_mini_color.svg +++ /dev/null @@ -1,7 +0,0 @@ -<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1040.4)"> -<path transform="translate(0 1040.4)" d="m4 4a3 3 0 0 0 -3 3 3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1h1v-2h-1z" fill="#ff8484"/> -<path transform="translate(0 1040.4)" d="m14 4a3 3 0 0 0 -3 3v3h2v-3a1 1 0 0 1 1 -1h1v-2h-1z" fill="#84c2ff"/> -<path transform="translate(0 1040.4)" d="m6 2v5a3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1v-5h-2z" fill="#84ffb1"/> -</g> -</svg> diff --git a/editor/icons/icon_mini_color_array.svg b/editor/icons/icon_mini_color_array.svg deleted file mode 100644 index 2a5588a698..0000000000 --- a/editor/icons/icon_mini_color_array.svg +++ /dev/null @@ -1,14 +0,0 @@ -<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1040.4)"> -<rect y="1050.4" width="4" height="2" fill="#e0e0e0"/> -<rect y="1040.4" width="2" height="12" fill="#e0e0e0"/> -<rect y="1040.4" width="4" height="2" fill="#e0e0e0"/> -<rect transform="scale(-1,1)" x="-16" y="1050.4" width="4" height="2" fill="#e0e0e0"/> -<rect transform="scale(-1,1)" x="-16" y="1040.4" width="2" height="12" fill="#e0e0e0"/> -<rect transform="scale(-1,1)" x="-16" y="1040.4" width="4" height="2" fill="#e0e0e0"/> -<path transform="translate(0 1040.4)" d="m6 3.5a3 3 0 0 0 -3 3 3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1h1v-2h-1z" fill="#ff7070"/> -<rect x="10" y="1046.9" width="2" height="3" fill="#70bfff"/> -<path d="m13 1043.9a3 3 0 0 0 -3 3h2a1 1 0 0 1 1 -1v-2z" fill="#70bfff"/> -<path transform="translate(0 1040.4)" d="m7 1.5v5a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1 -1v-5h-2z" fill="#7aff70"/> -</g> -</svg> diff --git a/editor/icons/icon_mini_dictionary.svg b/editor/icons/icon_mini_dictionary.svg deleted file mode 100644 index 814f27e2f9..0000000000 --- a/editor/icons/icon_mini_dictionary.svg +++ /dev/null @@ -1,5 +0,0 @@ -<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1040.4)"> -<path transform="translate(0 1040.4)" d="m3 2v2a3 3 0 0 0 -3 3 3 3 0 0 0 3 3h2v-8h-2zm3 0v2h2v-2h-2zm7 0v5a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1 -1v-1h1v-2h-1v-2h-2zm-2 2a3 3 0 0 0 -3 3 3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1h1v-2h-1zm-3 3v-1h-2v4h2v-3zm-5-1v2a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1z" fill="#77edb1"/> -</g> -</svg> diff --git a/editor/icons/icon_mini_float.svg b/editor/icons/icon_mini_float.svg deleted file mode 100644 index 68f09ef07a..0000000000 --- a/editor/icons/icon_mini_float.svg +++ /dev/null @@ -1,5 +0,0 @@ -<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1040.4)"> -<path transform="translate(0 1040.4)" d="m3 2a3 3 0 0 0 -3 3v5h2v-2h2v-2h-2v-1a1 1 0 0 1 1 -1h1v-2h-1zm3 0v5a3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1v-5h-2zm6 0v5a3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1v-1h2v-2h-2v-2h-2z" fill="#61daf4"/> -</g> -</svg> diff --git a/editor/icons/icon_mini_float_array.svg b/editor/icons/icon_mini_float_array.svg deleted file mode 100644 index 3e3c88cc99..0000000000 --- a/editor/icons/icon_mini_float_array.svg +++ /dev/null @@ -1,7 +0,0 @@ -<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1040.4)"> -<path transform="translate(0 1040.4)" d="m0 0v2 8 2h4v-2h-2v-8h2v-2h-2-2zm12 0v2h2v8h-2v2h4v-2-10h-4z" fill="#e0e0e0"/> -<path transform="translate(0 1040.4)" d="m6 2a3 3 0 0 0 -3 3v5h2v-2h1v-2h-1v-1a1 1 0 0 1 1 -1v-2zm1 0v5a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1 -1v-5h-2zm3 0v5a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1 -1v-1h1v-2h-1v-2h-2z" fill="#61daf4"/> -<path d="m7 1042.4v5a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1 -1v-5h-2z" fill="#fff" fill-opacity=".39216"/> -</g> -</svg> diff --git a/editor/icons/icon_mini_int_array.svg b/editor/icons/icon_mini_int_array.svg deleted file mode 100644 index 04957c8d4b..0000000000 --- a/editor/icons/icon_mini_int_array.svg +++ /dev/null @@ -1,7 +0,0 @@ -<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1040.4)"> -<path transform="translate(0 1040.4)" d="m0 0v2 8 2h2 2v-2h-2v-8h2v-2h-4zm12 0v2h2v8h-2v2h4v-2-8-2h-2-2z" fill="#e0e0e0"/> -<path transform="translate(0 1040.4)" d="m3 2v2h2v-2h-2zm2 2v2h-2v4h2 2v-4a1 1 0 0 1 1 1v3h2v-3a3 3 0 0 0 -3 -3h-2zm5 3a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1 -1v-1h1v-2h-1v-2h-2v5z" fill="#7dc6ef"/> -<path transform="translate(0 1040.4)" d="m5 4v6h2v-4a1 1 0 0 1 1 1v3h2v-3a3 3 0 0 0 -3 -3h-2z" fill="#fff" fill-opacity=".39216"/> -</g> -</svg> diff --git a/editor/icons/icon_mini_integer.svg b/editor/icons/icon_mini_integer.svg deleted file mode 100644 index 3bfe95980d..0000000000 --- a/editor/icons/icon_mini_integer.svg +++ /dev/null @@ -1,5 +0,0 @@ -<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1040.4)"> -<path transform="translate(0 1040.4)" d="m1 2v2h2v-2h-2zm11 0v5a3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1v-1h2v-2h-2v-2h-2zm-8 2v6h2v-4h1a1 1 0 0 1 1 1v3h2v-3a3 3 0 0 0 -3 -3h-1-2zm-3 2v4h2v-4h-2z" fill="#7dc6ef"/> -</g> -</svg> diff --git a/editor/icons/icon_mini_object.svg b/editor/icons/icon_mini_object.svg index a59808b970..ffac2061c5 100644 --- a/editor/icons/icon_mini_object.svg +++ b/editor/icons/icon_mini_object.svg @@ -1,5 +1,3 @@ <svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1040.4)"> -<path transform="translate(0 1040.4)" d="m6 2v5 3h2a3 3 0 0 0 3 -3 3 3 0 0 0 -3 -3v-2h-2zm0 5a3 3 0 0 0 -3 -3 3 3 0 0 0 -3 3 3 3 0 0 0 3 3 3 3 0 0 0 3 -3zm7-3v5a1 1 0 0 1 -1 1h-1v2h1a3 3 0 0 0 3 -3v-5h-2zm-10 2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1zm5 0a1 1 0 0 1 1 1 1 1 0 0 1 -1 1v-2z" fill="#79f3e8"/> -</g> +<path d="m6 2v8h2a3 3 0 0 0 3 -3 3 3 0 0 0 -3 -3v-2zm0 5a3 3 0 0 0 -3 -3 3 3 0 0 0 -3 3 3 3 0 0 0 3 3 3 3 0 0 0 3 -3zm7-3v5a1 1 0 0 1 -1 1h-1v2h1a3 3 0 0 0 3 -3v-5zm-10 2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1zm5 0a1 1 0 0 1 1 1 1 1 0 0 1 -1 1z" fill="#79f3e8"/> </svg> diff --git a/editor/icons/icon_mini_path.svg b/editor/icons/icon_mini_path.svg deleted file mode 100644 index 4c99ad8cc0..0000000000 --- a/editor/icons/icon_mini_path.svg +++ /dev/null @@ -1,5 +0,0 @@ -<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1040.4)"> -<path transform="translate(0 1040.4)" d="m0 2v8h2v-2a3 3 0 0 0 3 -3 3 3 0 0 0 -3 -3h-2zm6 0v5a3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1v-1h2v-2h-2v-2h-2zm5 0v8h2v-4a1 1 0 0 1 1 1v3h2v-3a3 3 0 0 0 -3 -3v-2h-2zm-9 2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1v-2z" fill="#6993ec"/> -</g> -</svg> diff --git a/editor/icons/icon_mini_plane.svg b/editor/icons/icon_mini_plane.svg deleted file mode 100644 index e02fded99f..0000000000 --- a/editor/icons/icon_mini_plane.svg +++ /dev/null @@ -1,5 +0,0 @@ -<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1040.4)"> -<path transform="translate(0 1040.4)" d="m1 2v8h2v-2a3 3 0 0 0 3 -3 3 3 0 0 0 -3 -3h-2zm6 0v5a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1 -1v-5h-2zm-4 2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1v-2zm8 0v6h2v-4a1 1 0 0 1 1 1v3h2v-3a3 3 0 0 0 -3 -3h-2z" fill="#f77070"/> -</g> -</svg> diff --git a/editor/icons/icon_mini_quat.svg b/editor/icons/icon_mini_quat.svg deleted file mode 100644 index c705fae2b6..0000000000 --- a/editor/icons/icon_mini_quat.svg +++ /dev/null @@ -1,7 +0,0 @@ -<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1040.4)"> -<path transform="translate(0 1040.4)" d="m3 3a3 3 0 0 0 -3 3 3 3 0 0 0 3 3v2h2v-2.7695a3 3 0 0 0 2 0.76953h2v-6h-2v4a1 1 0 0 1 -1 -1v-3h-1-1-1zm0 2v2a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1z" fill="#ec69a3"/> -<path d="m4 1043.4v3a3 3 0 0 0 3 3h2v-6h-2v4a1 1 0 0 1 -1 -1v-3z" fill="#fff" fill-opacity=".39216"/> -<path transform="translate(0 1040.4)" d="m13 1v2h-2a3 3 0 0 0 -3 3 3 3 0 0 0 3 3h2v-3a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1 -1v-1h1v-2h-1v-2h-2zm-2 4v2a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1z" fill="#ec69a3"/> -</g> -</svg> diff --git a/editor/icons/icon_mini_raw_array.svg b/editor/icons/icon_mini_raw_array.svg deleted file mode 100644 index ebd6c9a225..0000000000 --- a/editor/icons/icon_mini_raw_array.svg +++ /dev/null @@ -1,7 +0,0 @@ -<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1040.4)"> -<path transform="translate(0 1040.4)" d="m0 0v2 8 2h4v-2h-2v-8h2v-2h-2-2zm12 0v2h2v8h-2v2h4v-2-8-2h-2-2z" fill="#e0e0e0"/> -<path transform="translate(0 1040.4)" d="m5 3a3 3 0 0 0 -3 3v3h2v-3a1 1 0 0 1 1 -1h1v4h2a3 3 0 0 0 1 -0.17578v0.17578h2a3 3 0 0 0 3 -3v-3h-2v3a1 1 0 0 1 -1 1v-1-3h-2v3a1 1 0 0 1 -1 1v-4h-2-1z" fill="#69ec9e"/> -<path d="m6 1049.4v-6h2v4a1 1 0 0 0 1 -1v-3h2v3 1a1 1 0 0 0 1 -1v-3h2v3a3 3 0 0 1 -3 3h-2v-0.1758a3 3 0 0 1 -1 0.1758h-2z" fill="#fff" fill-opacity=".39216"/> -</g> -</svg> diff --git a/editor/icons/icon_mini_rect2.svg b/editor/icons/icon_mini_rect2.svg deleted file mode 100644 index 9dec66dfa1..0000000000 --- a/editor/icons/icon_mini_rect2.svg +++ /dev/null @@ -1,5 +0,0 @@ -<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1040.4)"> -<path transform="translate(0 1040.4)" d="m13 2v2h-1a3 3 0 0 0 -2.5 1.3457 3 3 0 0 0 -2.5 -1.3457 3 3 0 0 0 -3 3 3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1h2 1a3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1h1v1a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1 -1v-1h1v-2h-1v-2h-2zm-10 2a3 3 0 0 0 -3 3v3h2v-3a1 1 0 0 1 1 -1h1v-2h-1z" fill="#f191a5"/> -</g> -</svg> diff --git a/editor/icons/icon_mini_string.svg b/editor/icons/icon_mini_string.svg deleted file mode 100644 index 17e565cd75..0000000000 --- a/editor/icons/icon_mini_string.svg +++ /dev/null @@ -1,5 +0,0 @@ -<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1040.4)"> -<path transform="translate(0 1040.4)" d="m5 2a3 3 0 0 0 -3 3v2a1 1 0 0 1 -1 1h-1v2h1a3 3 0 0 0 3 -3v-2a1 1 0 0 1 1 -1h1v-2h-1zm2 0v5a3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1v-1h2v-2h-2v-2h-2zm8 2a3 3 0 0 0 -3 3v3h2v-3a1 1 0 0 1 1 -1h1v-2h-1z" fill="#6ba7ec"/> -</g> -</svg> diff --git a/editor/icons/icon_mini_string_array.svg b/editor/icons/icon_mini_string_array.svg deleted file mode 100644 index af81cabce4..0000000000 --- a/editor/icons/icon_mini_string_array.svg +++ /dev/null @@ -1,7 +0,0 @@ -<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1040.4)"> -<path transform="translate(0 1040.4)" d="m0 0v2 8 2h2 2v-2h-2v-8h2v-2h-2-2zm12 0v2h2v8h-2v2h4v-2-10h-4z" fill="#e0e0e0"/> -<path transform="translate(0 1040.4)" d="m7 2a3 3 0 0 0 -3 3v2a1 1 0 0 1 -1 1h-1v2h1a3 3 0 0 0 3 -3v-2a1 1 0 0 1 1 -1h1v3a3 3 0 0 0 3 3h2v-3a1 1 0 0 1 1 -1v-2a3 3 0 0 0 -3 3v1a1 1 0 0 1 -1 -1v-1h1v-2h-1v-2h-2-1z" fill="#6ba7ec"/> -<path d="m8 1042.4v5a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1 -1v-1h1v-2h-1v-2h-2z" fill="#fff" fill-opacity=".39216"/> -</g> -</svg> diff --git a/editor/icons/icon_mini_transform.svg b/editor/icons/icon_mini_transform.svg deleted file mode 100644 index 53bad91efc..0000000000 --- a/editor/icons/icon_mini_transform.svg +++ /dev/null @@ -1,6 +0,0 @@ -<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1040.4)"> -<path transform="translate(0 1040.4)" d="m0 2l2 4-2 4h2l0.9082-2.1816 1.0918 2.1816h2l-2-4 2-4h-2l-0.9082 2.1816-1.0918-2.1816h-2zm6 8h2v-2h1v-2h-1v-1a1 1 0 0 1 1 -1h1v-2h-1a3 3 0 0 0 -3 3v5zm4-6v2 2 2h2v-2l1 1 1-1v2h2v-2-2-2h-2l-1 2-1-2h-2z" fill="#f6a86e"/> -<path d="m9 1042.4a3 3 0 0 0 -3 3v5h2v-2h1v-2h-1v-1a1 1 0 0 1 1 -1h1v-2h-1z" fill="#fff" fill-opacity=".39216"/> -</g> -</svg> diff --git a/editor/icons/icon_mini_transform2D.svg b/editor/icons/icon_mini_transform2D.svg deleted file mode 100644 index b4723d37c4..0000000000 --- a/editor/icons/icon_mini_transform2D.svg +++ /dev/null @@ -1,6 +0,0 @@ -<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1040.4)"> -<path transform="translate(0 1040.4)" d="m0 2v2h2v6h2v-6h2v-2h-6zm7 0v2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 2 2 0 0 0 -1.7324 1 2 2 0 0 0 -0.26562 1h-0.0019531v0.046875 1.9531h2 3 2a4 4 0 0 0 3.4648 -2 4 4 0 0 0 0 -4 4 4 0 0 0 -3.4648 -2h-2v6h-3a3 3 0 0 0 2.5977 -1.5 3 3 0 0 0 0 -3 3 3 0 0 0 -2.5977 -1.5zm5 2a2 2 0 0 1 1.7324 1 2 2 0 0 1 0 2 2 2 0 0 1 -1.7324 1v-4z" fill="#c4ec69"/> -<path transform="translate(0 1040.4)" d="m7 2v2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 2 2 0 0 0 -1.7324 1 2 2 0 0 0 -0.26562 1h-0.0019531v0.046875 1.9531h2 3v-2h-3a3 3 0 0 0 2.5977 -1.5 3 3 0 0 0 0 -3 3 3 0 0 0 -2.5977 -1.5z" fill="#fff" fill-opacity=".39216"/> -</g> -</svg> diff --git a/editor/icons/icon_mini_variant.svg b/editor/icons/icon_mini_variant.svg deleted file mode 100644 index 4b9a2a5f18..0000000000 --- a/editor/icons/icon_mini_variant.svg +++ /dev/null @@ -1,5 +0,0 @@ -<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1040.4)"> -<path transform="translate(0 1040.4)" d="m3 4a3 3 0 0 0 -3 3 3 3 0 0 0 3 3h2v-6h-2zm3 0v6h2v-4a1 1 0 0 1 1 1v3h2v-3a3 3 0 0 0 -3 -3h-2zm5 3a3 3 0 0 0 3 3v2h2v-8h-2v4a1 1 0 0 1 -1 -1v-3h-2v3zm-8-1v2a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1z" fill="#69ecbd"/> -</g> -</svg> diff --git a/editor/icons/icon_mini_vector2.svg b/editor/icons/icon_mini_vector2.svg deleted file mode 100644 index 907e6ba84d..0000000000 --- a/editor/icons/icon_mini_vector2.svg +++ /dev/null @@ -1,6 +0,0 @@ -<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1040.4)"> -<path transform="translate(0 1040.4)" d="m12 2v2h1a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 2 2 0 0 0 -1.7324 1 2 2 0 0 0 -0.26562 1h-0.001953v2h5v-2h-3a3 3 0 0 0 2.5977 -1.5 3 3 0 0 0 0 -3 3 3 0 0 0 -2.5977 -1.5h-1zm-11 2v6h2a3 3 0 0 0 3 -3v-3h-2v3a1 1 0 0 1 -1 1v-4h-2zm5 3a3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1h1v-2h-1a3 3 0 0 0 -3 3z" fill="#bd91f1"/> -<path transform="translate(0 1040.4)" d="m12 2v2h1a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 2 2 0 0 0 -1.7324 1 2 2 0 0 0 -0.26562 1h-0.001953v2h5v-2h-3a3 3 0 0 0 2.5977 -1.5 3 3 0 0 0 0 -3 3 3 0 0 0 -2.5977 -1.5h-1z" fill="#fff" fill-opacity=".39216"/> -</g> -</svg> diff --git a/editor/icons/icon_mini_vector2_array.svg b/editor/icons/icon_mini_vector2_array.svg deleted file mode 100644 index e05eefc46a..0000000000 --- a/editor/icons/icon_mini_vector2_array.svg +++ /dev/null @@ -1,7 +0,0 @@ -<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1040.4)"> -<path transform="translate(0 1040.4)" d="m0 0v2 10h2 2v-2h-2v-8h2v-2h-2-2zm12 0v2h2v8h-2v2h4v-2-10h-4z" fill="#e0e0e0"/> -<path transform="translate(0 1040.4)" d="m9 2v2h1a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 2 2 0 0 0 -1.7324 1 2 2 0 0 0 -0.26562 1h-0.0019531v0.046875 1.9531h2 3v-2h-3a3 3 0 0 0 2.5977 -1.5 3 3 0 0 0 0 -3 3 3 0 0 0 -2.5977 -1.5h-1zm-6 1v6h2a3 3 0 0 0 3 -3v-3h-2v3a1 1 0 0 1 -1 1v-4h-2z" fill="#bd91f1"/> -<path d="m9 1042.4v2h1a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 2 2 0 0 0 -1.7324 1 2 2 0 0 0 -0.26562 1h-0.00195v0.047 1.9531h2 3v-2h-3a3 3 0 0 0 2.5977 -1.5 3 3 0 0 0 0 -3 3 3 0 0 0 -2.5977 -1.5001h-1z" fill="#fff" fill-opacity=".39216"/> -</g> -</svg> diff --git a/editor/icons/icon_mini_vector3.svg b/editor/icons/icon_mini_vector3.svg deleted file mode 100644 index be1f8ec360..0000000000 --- a/editor/icons/icon_mini_vector3.svg +++ /dev/null @@ -1,6 +0,0 @@ -<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1040.4)"> -<path transform="translate(0 1040.4)" d="m12 2v2h2a1 1 0 0 1 -1 1v2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1h-1v2h1a3 3 0 0 0 2.5977 -1.5 3 3 0 0 0 0 -3 3 3 0 0 0 -0.36523 -0.50195 3 3 0 0 0 0.36523 -0.49805 3 3 0 0 0 0.39844 -1.5h0.003906v-2h-4zm-11 2v6h2a3 3 0 0 0 3 -3v-3h-2v3a1 1 0 0 1 -1 1v-4h-2zm5 3a3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1h1v-2h-1a3 3 0 0 0 -3 3z" fill="#e286f0"/> -<path transform="translate(0 1040.4)" d="m12 2v2h2a1 1 0 0 1 -1 1v2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1h-1v2h1a3 3 0 0 0 2.5977 -1.5 3 3 0 0 0 0 -3 3 3 0 0 0 -0.36523 -0.50195 3 3 0 0 0 0.36523 -0.49805 3 3 0 0 0 0.39844 -1.5h0.003906v-2h-4z" fill="#fff" fill-opacity=".39216"/> -</g> -</svg> diff --git a/editor/icons/icon_mini_vector3_array.svg b/editor/icons/icon_mini_vector3_array.svg deleted file mode 100644 index e2843d2e68..0000000000 --- a/editor/icons/icon_mini_vector3_array.svg +++ /dev/null @@ -1,7 +0,0 @@ -<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1040.4)"> -<path transform="translate(0 1040.4)" d="m0 0v2 8 2h4v-2h-2v-8h2v-2h-2-2zm12 0v2h2v8h-2v2h4v-2-10h-4z" fill="#e0e0e0"/> -<path transform="translate(0 1040.4)" d="m8 1v2h1 1a1 1 0 0 1 -1 1v2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1h-1v2h1a3 3 0 0 0 2.5977 -1.5 3 3 0 0 0 0 -3 3 3 0 0 0 -0.36523 -0.50195 3 3 0 0 0 0.36523 -0.49805 3 3 0 0 0 0.39844 -1.5h0.003906v-2h-0.76562-2.2344-1zm0 2h-2v3a1 1 0 0 1 -1 1v-4h-2v6h2a3 3 0 0 0 3 -3v-3z" fill="#e286f0"/> -<path transform="translate(0 1040.4)" d="m8 1v2h1 1a1 1 0 0 1 -1 1v2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1h-1v2h1a3 3 0 0 0 2.5977 -1.5 3 3 0 0 0 0 -3 3 3 0 0 0 -0.36523 -0.50195 3 3 0 0 0 0.36523 -0.49805 3 3 0 0 0 0.39844 -1.5h0.003906v-2h-0.76562-2.2344-1z" fill="#fff" fill-opacity=".39216"/> -</g> -</svg> diff --git a/editor/icons/icon_node_path.svg b/editor/icons/icon_node_path.svg new file mode 100644 index 0000000000..1697c026a3 --- /dev/null +++ b/editor/icons/icon_node_path.svg @@ -0,0 +1,3 @@ +<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> +<path d="m0 2v8h2v-2a3 3 0 0 0 3 -3 3 3 0 0 0 -3 -3h-2zm6 0v5a3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1v-1h2v-2h-2v-2h-2zm5 0v8h2v-4a1 1 0 0 1 1 1v3h2v-3a3 3 0 0 0 -3 -3v-2h-2zm-9 2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1v-2z" fill="#6993ec"/> +</svg> diff --git a/editor/icons/icon_plane.svg b/editor/icons/icon_plane.svg index d0525e13dc..e02fded99f 100644 --- a/editor/icons/icon_plane.svg +++ b/editor/icons/icon_plane.svg @@ -1,5 +1,5 @@ -<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1036.4)"> -<path d="m1 1044.4 7 3 7-3-7-3z" fill="#e0e0e0" fill-rule="evenodd"/> +<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> +<g transform="translate(0 -1040.4)"> +<path transform="translate(0 1040.4)" d="m1 2v8h2v-2a3 3 0 0 0 3 -3 3 3 0 0 0 -3 -3h-2zm6 0v5a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1 -1v-5h-2zm-4 2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1v-2zm8 0v6h2v-4a1 1 0 0 1 1 1v3h2v-3a3 3 0 0 0 -3 -3h-2z" fill="#f77070"/> </g> </svg> diff --git a/editor/icons/icon_pool_byte_array.svg b/editor/icons/icon_pool_byte_array.svg new file mode 100644 index 0000000000..29d6bfe4f0 --- /dev/null +++ b/editor/icons/icon_pool_byte_array.svg @@ -0,0 +1,5 @@ +<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> +<path d="m0 0v12h4v-2h-2v-8h2v-2h-2zm12 0v2h2v8h-2v2h4v-12h-2z" fill="#e0e0e0"/> +<path d="m5 3a3 3 0 0 0 -3 3v3h2v-3a1 1 0 0 1 1 -1h1v4h2a3 3 0 0 0 1 -0.17578v0.17578h2a3 3 0 0 0 3 -3v-3h-2v3a1 1 0 0 1 -1 1v-4h-2v3a1 1 0 0 1 -1 1v-4h-2z" fill="#69ec9e"/> +<path d="m6 9v-6h2v4a1 1 0 0 0 1 -1v-3h2v4a1 1 0 0 0 1 -1v-3h2v3a3 3 0 0 1 -3 3h-2v-0.1758a3 3 0 0 1 -1 0.1758z" fill="#fff" fill-opacity=".39216"/> +</svg> diff --git a/editor/icons/icon_pool_color_array.svg b/editor/icons/icon_pool_color_array.svg new file mode 100644 index 0000000000..dcce58f9c6 --- /dev/null +++ b/editor/icons/icon_pool_color_array.svg @@ -0,0 +1,8 @@ +<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> +<g> +<path d="m0 0v12h4v-2h-2v-8h2v-2h-4zm12 0v2h2v8h-2v2h4v-12h-4z" fill="#e0e0e0"/> +<path d="m6 3.5a3 3 0 0 0 -3 3 3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1h1v-2z" fill="#ff7070"/> +<path d="m13 3.5a3 3 0 0 0 -3 3v3h2v-3a1 1 0 0 1 1 -1z" fill="#70bfff"/> +<path d="m7 1.5v5a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1 -1v-5z" fill="#7aff70"/> +</g> +</svg> diff --git a/editor/icons/icon_pool_int_array.svg b/editor/icons/icon_pool_int_array.svg new file mode 100644 index 0000000000..d59f9e1531 --- /dev/null +++ b/editor/icons/icon_pool_int_array.svg @@ -0,0 +1,5 @@ +<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> +<path d="m0 0v12h4v-2h-2v-8h2v-2zm12 0v2h2v8h-2v2h4v-12z" fill="#e0e0e0"/> +<path d="m3 2v2h2v-2zm2 2v2h-2v4h4v-4a1 1 0 0 1 1 1v3h2v-3a3 3 0 0 0 -3 -3zm5 3a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1 -1v-1h1v-2h-1v-2h-2z" fill="#7dc6ef"/> +<path d="m5 4v6h2v-4a1 1 0 0 1 1 1v3h2v-3a3 3 0 0 0 -3 -3z" fill="#fff" fill-opacity=".39216"/> +</svg> diff --git a/editor/icons/icon_pool_real_array.svg b/editor/icons/icon_pool_real_array.svg new file mode 100644 index 0000000000..78a8064611 --- /dev/null +++ b/editor/icons/icon_pool_real_array.svg @@ -0,0 +1,5 @@ +<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> +<path d="m0 0v12h4v-2h-2v-8h2v-2zm12 0v2h2v8h-2v2h4v-12z" fill="#e0e0e0"/> +<path d="m6 2a3 3 0 0 0 -3 3v5h2v-2h1v-2h-1v-1a1 1 0 0 1 1 -1zm1 0v5a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1 -1v-5zm3 0v5a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1 -1v-1h1v-2h-1v-2z" fill="#61daf4"/> +<path d="m7 2v5a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1 -1v-5z" fill="#fff" fill-opacity=".39216"/> +</svg> diff --git a/editor/icons/icon_pool_string_array.svg b/editor/icons/icon_pool_string_array.svg new file mode 100644 index 0000000000..401bfe6145 --- /dev/null +++ b/editor/icons/icon_pool_string_array.svg @@ -0,0 +1,5 @@ +<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> +<path d="m0 0v12h4v-2h-2v-8h2v-2zm12 0v2h2v8h-2v2h4v-12z" fill="#e0e0e0"/> +<path d="m7 2a3 3 0 0 0 -3 3v2a1 1 0 0 1 -1 1h-1v2h1a3 3 0 0 0 3 -3v-2a1 1 0 0 1 1 -1h1v3a3 3 0 0 0 3 3h2v-3a1 1 0 0 1 1 -1v-2a3 3 0 0 0 -3 3v1a1 1 0 0 1 -1 -1v-1h1v-2h-1v-2h-2z" fill="#6ba7ec"/> +<path d="m8 2v5a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1 -1v-1h1v-2h-1v-2z" fill="#fff" fill-opacity=".39216"/> +</svg> diff --git a/editor/icons/icon_pool_vector2_array.svg b/editor/icons/icon_pool_vector2_array.svg new file mode 100644 index 0000000000..bb089a26ef --- /dev/null +++ b/editor/icons/icon_pool_vector2_array.svg @@ -0,0 +1,5 @@ +<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> +<path d="m0 0v12h4v-2h-2v-8h2v-2zm12 0v2h2v8h-2v2h4v-12z" fill="#e0e0e0"/> +<path d="m9 2v2h1a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 2 2 0 0 0 -1.7324 1 2 2 0 0 0 -0.26562 1h-0.0019531v2h5v-2h-3a3 3 0 0 0 2.5977 -1.5 3 3 0 0 0 0 -3 3 3 0 0 0 -2.5977 -1.5zm-6 1v6h2a3 3 0 0 0 3 -3v-3h-2v3a1 1 0 0 1 -1 1v-4z" fill="#bd91f1"/> +<path d="m9 2v2h1a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 2 2 0 0 0 -1.7324 1 2 2 0 0 0 -0.26562 1h-0.00195v2.0001h5v-2h-3a3 3 0 0 0 2.5977 -1.5 3 3 0 0 0 0 -3 3 3 0 0 0 -2.5977 -1.5001z" fill="#fff" fill-opacity=".39216"/> +</svg> diff --git a/editor/icons/icon_pool_vector3_array.svg b/editor/icons/icon_pool_vector3_array.svg new file mode 100644 index 0000000000..4f69183e30 --- /dev/null +++ b/editor/icons/icon_pool_vector3_array.svg @@ -0,0 +1,5 @@ +<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> +<path d="m0 0v12h4v-2h-2v-8h2v-2zm12 0v2h2v8h-2v2h4v-12z" fill="#e0e0e0"/> +<path d="m8 1v2h2c0 0.55228-0.44772 1-1 1v2c0.55228 0 1 0.44772 1 1s-0.44772 1-1 1h-1v2h1c1.0716-1.501e-4 2.0618-0.57193 2.5977-1.5 0.5359-0.9282 0.5359-2.0718 0-3-0.10406-0.1795-0.22646-0.34772-0.36523-0.50195 0.13856-0.15301 0.26095-0.31991 0.36523-0.49805 0.26209-0.45639 0.3995-0.97371 0.39844-1.5h0.003906v-2zm0 2h-2v3c-9.6e-6 0.55228-0.44772 0.99999-1 1v-4h-2v6h2c1.6569 0 3-1.3431 3-3z" fill="#e286f0"/> +<path d="m8 1v2h2c0 0.55228-0.44772 1-1 1v2c0.55228 0 1 0.44772 1 1s-0.44772 1-1 1h-1v2h1c1.0716-1.501e-4 2.0618-0.57193 2.5977-1.5 0.5359-0.9282 0.5359-2.0718 0-3-0.10406-0.1795-0.22646-0.34772-0.36523-0.50195 0.13856-0.15301 0.26095-0.31991 0.36523-0.49805 0.26209-0.45639 0.3995-0.97371 0.39844-1.5h0.003906v-2z" fill="#fff" fill-opacity=".39216"/> +</svg> diff --git a/editor/icons/icon_quat.svg b/editor/icons/icon_quat.svg index fc99c33aeb..07433920a1 100644 --- a/editor/icons/icon_quat.svg +++ b/editor/icons/icon_quat.svg @@ -1,5 +1,5 @@ -<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1036.4)"> -<path transform="translate(0 1036.4)" d="m7 1v6h2v-6h-2zm4 2.3906v2.0137a5 2 0 0 1 2 1.5957 5 2 0 0 1 -5 2 5 2 0 0 1 -5 -2 5 2 0 0 1 2 -1.5977v-2.0098a7 4 0 0 0 -4 3.6074 7 4 0 0 0 7 4 7 4 0 0 0 7 -4 7 4 0 0 0 -4 -3.6094zm-4 9.6094v2h2v-2h-2z" fill="#e0e0e0"/> -</g> +<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> +<path d="m3 3a3 3 0 0 0 -3 3 3 3 0 0 0 3 3v2h2v-2.7695a3 3 0 0 0 2 0.76953h2v-6h-2v4a1 1 0 0 1 -1 -1v-3h-2zm0 2v2a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1z" fill="#ec69a3"/> +<path d="m4 3v3a3 3 0 0 0 3 3h2v-6h-2v4a1 1 0 0 1 -1 -1v-3z" fill="#fff" fill-opacity=".39216"/> +<path d="m13 1v2h-2a3 3 0 0 0 -3 3 3 3 0 0 0 3 3h2v-3a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1 -1v-1h1v-2h-1v-2zm-2 4v2a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1z" fill="#ec69a3"/> </svg> diff --git a/editor/icons/icon_mini_rid.svg b/editor/icons/icon_r_i_d.svg index f1709a5acc..f1709a5acc 100644 --- a/editor/icons/icon_mini_rid.svg +++ b/editor/icons/icon_r_i_d.svg diff --git a/editor/icons/icon_rect2.svg b/editor/icons/icon_rect2.svg new file mode 100644 index 0000000000..05d1022e5b --- /dev/null +++ b/editor/icons/icon_rect2.svg @@ -0,0 +1,3 @@ +<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> +<path d="m13 2v2h-1a3 3 0 0 0 -2.5 1.3457 3 3 0 0 0 -2.5 -1.3457 3 3 0 0 0 -3 3 3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1h3a3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1h1v1a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1 -1v-1h1v-2h-1v-2zm-10 2a3 3 0 0 0 -3 3v3h2v-3a1 1 0 0 1 1 -1h1v-2z" fill="#f191a5"/> +</svg> diff --git a/editor/icons/icon_string.svg b/editor/icons/icon_string.svg new file mode 100644 index 0000000000..6618f3b7f9 --- /dev/null +++ b/editor/icons/icon_string.svg @@ -0,0 +1,3 @@ +<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> +<path d="m5 2a3 3 0 0 0 -3 3v2a1 1 0 0 1 -1 1h-1v2h1a3 3 0 0 0 3 -3v-2a1 1 0 0 1 1 -1h1v-2zm2 0v5a3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1v-1h2v-2h-2v-2zm8 2a3 3 0 0 0 -3 3v3h2v-3a1 1 0 0 1 1 -1h1v-2z" fill="#6ba7ec"/> +</svg> diff --git a/editor/icons/icon_theme.svg b/editor/icons/icon_theme.svg index 3dfb4aaa00..f44529c4cb 100644 --- a/editor/icons/icon_theme.svg +++ b/editor/icons/icon_theme.svg @@ -1,11 +1,11 @@ <svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1036.4)"> -<path transform="translate(0 1036.4)" d="m7 1l-0.5 2h3l-0.5-2h-2zm-3.2422 1.3438l-0.65625 0.65625h1.75l-1.0938-0.65625zm8.4844 0l-1.0957 0.65625h1.752l-0.65625-0.65625z" fill="#ff7070"/> -<path transform="translate(0 1036.4)" d="m3.1016 3l-0.75781 0.75781 0.74414 1.2422h9.8242l0.74414-1.2422-0.75781-0.75781h-1.752l-0.89844 0.53906a5 5 0 0 0 -0.68555 -0.28516l-0.0625-0.25391h-3l-0.064453 0.25781a5 5 0 0 0 -0.68945 0.2793l-0.89453-0.53711h-1.75z" fill="#ffeb70"/> -<path transform="translate(0 1036.4)" d="m3.0879 5l0.45117 0.75195a5 5 0 0 0 -0.28516 0.68555l-2.2539 0.5625h5.2695a2 2 0 0 1 1.7305 -1 2 2 0 0 1 1.7285 1h5.2715l-2.2578-0.56445a5 5 0 0 0 -0.2793 -0.6875l0.44922-0.74805h-9.8242z" fill="#9dff70"/> -<path transform="translate(0 1036.4)" d="m1 7v2h5.2715a2 2 0 0 1 -0.27148 -1 2 2 0 0 1 0.26953 -1h-5.2695zm8.7285 0a2 2 0 0 1 0.27148 1 2 2 0 0 1 -0.26953 1h5.2695v-2h-5.2715z" fill="#70ffb9"/> -<path transform="translate(0 1036.4)" d="m1 9l2.2578 0.56445a5 5 0 0 0 0.2793 0.6875l-0.44922 0.74805h9.8242l-0.45117-0.75195a5 5 0 0 0 0.28516 -0.68555l2.2539-0.5625h-5.2695a2 2 0 0 1 -1.7305 1 2 2 0 0 1 -1.7285 -1h-5.2715z" fill="#70deff"/> -<path transform="translate(0 1036.4)" d="m3.1016 13l0.65625 0.65625 1.0957-0.65625h-1.752zm3.3984 0l0.5 2h2l0.5-2h-3zm4.6484 0l1.0938 0.65625 0.65625-0.65625h-1.75z" fill="#ff70ac"/> -<path transform="translate(0 1036.4)" d="m3.0879 11l-0.74414 1.2422 0.75781 0.75781h1.752l0.89844-0.53906a5 5 0 0 0 0.68555 0.28516l0.0625 0.25391h3l0.064453-0.25781a5 5 0 0 0 0.6875 -0.2793l0.89648 0.53711h1.75l0.75781-0.75781-0.74414-1.2422h-9.8242z" fill="#9f70ff"/> +<g transform="translate(0 -1036.4)" stroke-width="0"> +<path transform="translate(0 1036.4)" d="m6.7246 3c-0.52985 0.78935-0.96267 1.4021-1.3945 2h5.3398c-0.43187-0.59786-0.86468-1.2107-1.3945-2h-2.5508z" fill="#ffeb70"/> +<path transform="translate(0 1036.4)" d="m5.3301 5c-0.52617 0.72841-1.0198 1.4208-1.375 2h8.0898c-0.35516-0.57924-0.84883-1.2716-1.375-2h-5.3398z" fill="#9dff70"/> +<path transform="translate(0 1036.4)" d="m3.9551 7c-0.41451 0.67603-0.71534 1.3082-0.85547 2h9.8008c-0.14013-0.69181-0.44096-1.324-0.85547-2h-8.0898z" fill="#70ffb9"/> +<path transform="translate(0 1036.4)" d="m3.0996 9c-0.063989 0.3159-0.099609 0.64498-0.099609 1 0 0.34242 0.034776 0.67693 0.10156 1h9.7969c0.066786-0.32307 0.10156-0.65758 0.10156-1 0-0.35502-0.03562-0.6841-0.099609-1h-9.8008z" fill="#70deff"/> +<path transform="translate(0 1036.4)" d="m3.1016 11c0.15381 0.74405 0.48967 1.4159 0.93555 2h7.9258c0.44588-0.5841 0.78173-1.2559 0.93555-2h-9.7969z" fill="#9f70ff"/> +<path transform="translate(0 1036.4)" d="m4.0371 13c0.9218 1.2076 2.3612 2 3.9629 2s3.0411-0.79243 3.9629-2h-7.9258z" fill="#ff70ac"/> +<path transform="translate(0 1036.4)" d="m8 1c-0.45196 0.75327-0.87224 1.3994-1.2754 2h2.5508c-0.40315-0.6006-0.82343-1.2467-1.2754-2z" fill="#ff7070"/> </g> </svg> diff --git a/editor/icons/icon_transform.svg b/editor/icons/icon_transform.svg new file mode 100644 index 0000000000..7645622c28 --- /dev/null +++ b/editor/icons/icon_transform.svg @@ -0,0 +1,4 @@ +<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> +<path d="m0 2 2 4-2 4h2l0.9082-2.1816 1.0918 2.1816h2l-2-4 2-4h-2l-0.9082 2.1816-1.0918-2.1816zm6 8h2v-2h1v-2h-1v-1c9.6e-6 -0.55228 0.44772-0.99999 1-1h1v-2h-1c-1.6569 0-3 1.3431-3 3zm4-6v6h2v-2l1 1 1-1v2h2v-6h-2l-1 2-1-2z" fill="#f6a86e"/> +<path d="m9 2a3 3 0 0 0 -3 3v5h2v-2h1v-2h-1v-1a1 1 0 0 1 1 -1h1v-2z" fill="#fff" fill-opacity=".39216"/> +</svg> diff --git a/editor/icons/icon_transform_2_D.svg b/editor/icons/icon_transform_2_D.svg new file mode 100644 index 0000000000..de05160dac --- /dev/null +++ b/editor/icons/icon_transform_2_D.svg @@ -0,0 +1,4 @@ +<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> +<path d="m0 2v2h2v6h2v-6h2v-2zm7 0v2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 2 2 0 0 0 -1.7324 1 2 2 0 0 0 -0.26562 1h-0.0019531v2h7a4 4 0 0 0 3.4648 -2 4 4 0 0 0 0 -4 4 4 0 0 0 -3.4648 -2h-2v6h-3a3 3 0 0 0 2.5977 -1.5 3 3 0 0 0 0 -3 3 3 0 0 0 -2.5977 -1.5zm5 2a2 2 0 0 1 1.7324 1 2 2 0 0 1 0 2 2 2 0 0 1 -1.7324 1z" fill="#c4ec69"/> +<path d="m7 2v2c0.55228 0 1 0.44772 1 1s-0.44772 1-1 1c-0.71466-1.326e-4 -1.3751 0.38108-1.7324 1-0.17472 0.30426-0.26633 0.64914-0.26562 1h-0.0019531v2h5v-2h-3c1.0716-1.5e-4 2.0618-0.57193 2.5977-1.5 0.5359-0.9282 0.5359-2.0718 0-3-0.53582-0.92807-1.526-1.4998-2.5977-1.5z" fill="#fff" fill-opacity=".39216"/> +</svg> diff --git a/editor/icons/icon_variant.svg b/editor/icons/icon_variant.svg index 32f72b1ce6..859578243c 100644 --- a/editor/icons/icon_variant.svg +++ b/editor/icons/icon_variant.svg @@ -1,16 +1,3 @@ -<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> -<g transform="translate(0 -1036.4)"> -<g transform="translate(0,-3)" fill="#e0e0e0"> -<rect x="3" y="1044.4" width="2" height="6"/> -<rect x="6" y="1044.4" width="2" height="6"/> -<rect x="3" y="1044.4" width="1" height="2"/> -<path d="m3 1044.4a3 3 0 0 0 -3 3h2a1 1 0 0 1 1 -1z"/> -<path d="m14 1050.4a3 3 0 0 1 -3 -3h2a1 1 0 0 0 1 1z"/> -<rect transform="scale(1,-1)" x="14" y="-1052.4" width="2" height="8"/> -<rect transform="scale(1,-1)" x="11" y="-1047.4" width="2" height="3"/> -<path d="m3 1050.4a3 3 0 0 1 -3 -3h2a1 1 0 0 0 1 1z"/> -<path d="m8 1044.4a3 3 0 0 1 3 3h-2a1 1 0 0 0 -1 -1z"/> -<rect x="9" y="1047.4" width="2" height="3"/> -</g> -</g> +<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> +<path d="m3 4a3 3 0 0 0 -3 3 3 3 0 0 0 3 3h2v-6zm3 0v6h2v-4a1 1 0 0 1 1 1v3h2v-3a3 3 0 0 0 -3 -3zm5 3a3 3 0 0 0 3 3v2h2v-8h-2v4a1 1 0 0 1 -1 -1v-3h-2zm-8-1v2a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1z" fill="#69ecbd"/> </svg> diff --git a/editor/icons/icon_vector2.svg b/editor/icons/icon_vector2.svg new file mode 100644 index 0000000000..9fa798df5d --- /dev/null +++ b/editor/icons/icon_vector2.svg @@ -0,0 +1,4 @@ +<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> +<path d="m12 2v2h1a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 2 2 0 0 0 -1.7324 1 2 2 0 0 0 -0.26562 1h-0.001953v2h5v-2h-3a3 3 0 0 0 2.5977 -1.5 3 3 0 0 0 0 -3 3 3 0 0 0 -2.5977 -1.5zm-11 2v6h2a3 3 0 0 0 3 -3v-3h-2v3a1 1 0 0 1 -1 1v-4zm5 3a3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1h1v-2h-1a3 3 0 0 0 -3 3z" fill="#bd91f1"/> +<path d="m12 2v2h1a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 2 2 0 0 0 -1.7324 1 2 2 0 0 0 -0.26562 1h-0.001953v2h5v-2h-3a3 3 0 0 0 2.5977 -1.5 3 3 0 0 0 0 -3 3 3 0 0 0 -2.5977 -1.5z" fill="#fff" fill-opacity=".39216"/> +</svg> diff --git a/editor/icons/icon_vector3.svg b/editor/icons/icon_vector3.svg new file mode 100644 index 0000000000..cf1d0d0136 --- /dev/null +++ b/editor/icons/icon_vector3.svg @@ -0,0 +1,4 @@ +<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg"> +<path d="m12 2v2h2a1 1 0 0 1 -1 1v2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1h-1v2h1a3 3 0 0 0 2.5977 -1.5 3 3 0 0 0 0 -3 3 3 0 0 0 -0.36523 -0.50195 3 3 0 0 0 0.36523 -0.49805 3 3 0 0 0 0.39844 -1.5h0.003906v-2zm-11 2v6h2a3 3 0 0 0 3 -3v-3h-2v3a1 1 0 0 1 -1 1v-4zm5 3a3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1h1v-2h-1a3 3 0 0 0 -3 3z" fill="#e286f0"/> +<path d="m12 2v2h2a1 1 0 0 1 -1 1v2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1h-1v2h1a3 3 0 0 0 2.5977 -1.5 3 3 0 0 0 0 -3 3 3 0 0 0 -0.36523 -0.50195 3 3 0 0 0 0.36523 -0.49805 3 3 0 0 0 0.39844 -1.5h0.003906v-2z" fill="#fff" fill-opacity=".39216"/> +</svg> diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index ed7c6dba79..b6e4729352 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -515,127 +515,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Array s->set_transform(Transform()); p_node = bv; -#if 0 - } else if (_teststr(name, "room") && Object::cast_to<MeshInstance>(p_node)) { - if (isroot) - return p_node; - - MeshInstance *mi = Object::cast_to<MeshInstance>(p_node); - PoolVector<Face3> faces = mi->get_faces(VisualInstance::FACES_SOLID); - - BSP_Tree bsptree(faces); - - Ref<RoomBounds> area = memnew(RoomBounds); - //area->set_bounds(faces); - //area->set_geometry_hint(faces); - - Room *room = memnew(Room); - room->set_name(_fixstr(name, "room")); - room->set_transform(mi->get_transform()); - room->set_room(area); - - p_node->replace_by(room); - memdelete(p_node); - p_node = room; - - } else if (_teststr(name, "room")) { - - if (isroot) - return p_node; - - Spatial *dummy = Object::cast_to<Spatial>(p_node); - ERR_FAIL_COND_V(!dummy, NULL); - - Room *room = memnew(Room); - room->set_name(_fixstr(name, "room")); - room->set_transform(dummy->get_transform()); - - p_node->replace_by(room); - memdelete(p_node); - p_node = room; - - //room->compute_room_from_subtree(); - - } else if (_teststr(name, "portal") && Object::cast_to<MeshInstance>(p_node)) { - - if (isroot) - return p_node; - - MeshInstance *mi = Object::cast_to<MeshInstance>(p_node); - PoolVector<Face3> faces = mi->get_faces(VisualInstance::FACES_SOLID); - - ERR_FAIL_COND_V(faces.size() == 0, NULL); - //step 1 compute the plane - Set<Vector3> points; - Plane plane; - - Vector3 center; - - for (int i = 0; i < faces.size(); i++) { - - Face3 f = faces.get(i); - Plane p = f.get_plane(); - plane.normal += p.normal; - plane.d += p.d; - - for (int i = 0; i < 3; i++) { - - Vector3 v = f.vertex[i].snapped(Vector3(0.01, 0.01, 0.01)); - if (!points.has(v)) { - points.insert(v); - center += v; - } - } - } - - plane.normal.normalize(); - plane.d /= faces.size(); - center /= points.size(); - - //step 2, create points - - Transform t; - t.basis.from_z(plane.normal); - t.basis.transpose(); - t.origin = center; - - Vector<Point2> portal_points; - - for (Set<Vector3>::Element *E = points.front(); E; E = E->next()) { - - Vector3 local = t.xform_inv(E->get()); - portal_points.push_back(Point2(local.x, local.y)); - } - // step 3 bubbly sort points - - int swaps = 0; - - do { - swaps = 0; - - for (int i = 0; i < portal_points.size() - 1; i++) { - - float a = portal_points[i].angle(); - float b = portal_points[i + 1].angle(); - - if (a > b) { - SWAP(portal_points[i], portal_points[i + 1]); - swaps++; - } - } - - } while (swaps); - - Portal *portal = memnew(Portal); - - portal->set_shape(portal_points); - portal->set_transform(mi->get_transform() * t); - - p_node->replace_by(portal); - memdelete(p_node); - p_node = portal; -#endif } else if (Object::cast_to<MeshInstance>(p_node)) { //last attempt, maybe collision inside the mesh data @@ -969,15 +849,15 @@ void ResourceImporterScene::_find_meshes(Node *p_node, Map<Ref<ArrayMesh>, Trans if (mesh.is_valid() && !meshes.has(mesh)) { Spatial *s = mi; - while (s->get_parent_spatial()) { + Transform transform; + while (s) { + transform = transform * s->get_transform(); s = s->get_parent_spatial(); } - if (s == mi) { - meshes[mesh] = s->get_transform(); - } else { - meshes[mesh] = s->get_transform() * mi->get_relative_transform(s); - } + meshes[mesh] = transform; + + print_line("mesh transform: " + meshes[mesh]); } } for (int i = 0; i < p_node->get_child_count(); i++) { @@ -1157,6 +1037,7 @@ void ResourceImporterScene::get_import_options(List<ImportOption> *r_options, in bool scenes_out = p_preset == PRESET_MULTIPLE_SCENES || p_preset == PRESET_MULTIPLE_SCENES_AND_MATERIALS; bool animations_out = p_preset == PRESET_SEPARATE_ANIMATIONS || p_preset == PRESET_SEPARATE_MESHES_AND_ANIMATIONS || p_preset == PRESET_SEPARATE_MATERIALS_AND_ANIMATIONS || p_preset == PRESET_SEPARATE_MESHES_MATERIALS_AND_ANIMATIONS; + r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "nodes/root_scale", PROPERTY_HINT_RANGE, "0.001,1000,0.001"), 1.0)); r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "nodes/custom_script", PROPERTY_HINT_FILE, script_ext_hint), "")); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "nodes/storage", PROPERTY_HINT_ENUM, "Single Scene,Instanced Sub-Scenes"), scenes_out ? 1 : 0)); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "materials/location", PROPERTY_HINT_ENUM, "Node,Mesh"), (meshes_out || materials_out) ? 1 : 0)); @@ -1329,6 +1210,11 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p } } + if (Object::cast_to<Spatial>(scene)) { + float root_scale = p_options["nodes/root_scale"]; + Object::cast_to<Spatial>(scene)->scale(Vector3(root_scale, root_scale, root_scale)); + } + scene->set_name(p_options["nodes/root_name"]); err = OK; diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 0f27310264..59da5112ae 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -2219,15 +2219,9 @@ void SpatialEditorViewport::_notification(int p_what) { viewport->set_hdr(hdr); bool show_info = view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_INFORMATION)); - if (show_info != info->is_visible()) { - if (show_info) - info->show(); - else - info->hide(); - } + info_label->set_visible(show_info); if (show_info) { - String text; text += TTR("Objects Drawn") + ": " + itos(viewport->get_render_info(Viewport::RENDER_INFO_OBJECTS_IN_FRAME)) + "\n"; text += TTR("Material Changes") + ": " + itos(viewport->get_render_info(Viewport::RENDER_INFO_MATERIAL_CHANGES_IN_FRAME)) + "\n"; @@ -2235,38 +2229,19 @@ void SpatialEditorViewport::_notification(int p_what) { text += TTR("Surface Changes") + ": " + itos(viewport->get_render_info(Viewport::RENDER_INFO_SURFACE_CHANGES_IN_FRAME)) + "\n"; text += TTR("Draw Calls") + ": " + itos(viewport->get_render_info(Viewport::RENDER_INFO_DRAW_CALLS_IN_FRAME)) + "\n"; text += TTR("Vertices") + ": " + itos(viewport->get_render_info(Viewport::RENDER_INFO_VERTICES_IN_FRAME)); - - if (info_label->get_text() != text || surface->get_size() != prev_size) { - info_label->set_text(text); - Size2 ms = info->get_minimum_size(); - info->set_position(surface->get_size() - ms - Vector2(20, 20) * EDSCALE); - } + info_label->set_text(text); } // FPS Counter. bool show_fps = view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_FPS)); - if (show_fps != fps->is_visible()) { - if (show_fps) - fps->show(); - else - fps->hide(); - } + fps_label->set_visible(show_fps); if (show_fps) { String text; const float temp_fps = Engine::get_singleton()->get_frames_per_second(); text += TTR("FPS") + ": " + itos(temp_fps) + " (" + String::num(1000.0f / temp_fps, 2) + " ms)"; - - if (fps_label->get_text() != text || surface->get_size() != prev_size) { - fps_label->set_text(text); - Size2 ms = fps->get_size(); - Size2 size = surface->get_size(); - size.y = ms.y + 20; - fps->set_position(size - ms - Vector2(20, 0) * EDSCALE); - } + fps_label->set_text(text); } - - prev_size = surface->get_size(); } if (p_what == NOTIFICATION_ENTER_TREE) { @@ -2275,8 +2250,8 @@ void SpatialEditorViewport::_notification(int p_what) { surface->connect("gui_input", this, "_sinput"); surface->connect("mouse_entered", this, "_smouseenter"); surface->connect("mouse_exited", this, "_smouseexit"); - info->add_style_override("panel", get_stylebox("panel", "Panel")); - fps->add_style_override("panel", get_stylebox("panel", "Panel")); + info_label->add_style_override("normal", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles")); + fps_label->add_style_override("normal", editor->get_gui_base()->get_stylebox("Information3dViewport", "EditorStyles")); preview_camera->set_icon(get_icon("Camera", "EditorIcons")); _init_gizmo_instance(index); } @@ -2773,8 +2748,10 @@ void SpatialEditorViewport::set_can_preview(Camera *p_preview) { if (!preview_camera->is_pressed()) { if (p_preview) { + fps_label->set_anchor_and_margin(MARGIN_TOP, ANCHOR_BEGIN, 15 * EDSCALE + preview_camera->get_size().height); preview_camera->show(); } else { + fps_label->set_anchor_and_margin(MARGIN_TOP, ANCHOR_BEGIN, 10 * EDSCALE); preview_camera->hide(); } } @@ -3399,20 +3376,24 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed preview_node = NULL; - info = memnew(PanelContainer); - info->set_self_modulate(Color(1, 1, 1, 0.4)); - surface->add_child(info); info_label = memnew(Label); - info->add_child(info_label); - info->hide(); + info_label->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_END, -90 * EDSCALE); + info_label->set_anchor_and_margin(MARGIN_TOP, ANCHOR_END, -90 * EDSCALE); + info_label->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, -10 * EDSCALE); + info_label->set_anchor_and_margin(MARGIN_BOTTOM, ANCHOR_END, -10 * EDSCALE); + info_label->set_h_grow_direction(GROW_DIRECTION_BEGIN); + info_label->set_v_grow_direction(GROW_DIRECTION_BEGIN); + surface->add_child(info_label); + info_label->hide(); // FPS Counter. - fps = memnew(PanelContainer); - fps->set_self_modulate(Color(1, 1, 1, 0.4)); - surface->add_child(fps); fps_label = memnew(Label); - fps->add_child(fps_label); - fps->hide(); + fps_label->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_END, -90 * EDSCALE); + fps_label->set_anchor_and_margin(MARGIN_TOP, ANCHOR_BEGIN, 10 * EDSCALE); + fps_label->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, -10 * EDSCALE); + fps_label->set_h_grow_direction(GROW_DIRECTION_BEGIN); + surface->add_child(fps_label); + fps_label->hide(); accept = NULL; diff --git a/editor/plugins/spatial_editor_plugin.h b/editor/plugins/spatial_editor_plugin.h index 86b814ab8a..4aa1d9c0c1 100644 --- a/editor/plugins/spatial_editor_plugin.h +++ b/editor/plugins/spatial_editor_plugin.h @@ -106,7 +106,6 @@ private: int index; String name; void _menu_option(int p_option); - Size2 prev_size; Spatial *preview_node; AABB *preview_bounds; @@ -136,10 +135,7 @@ private: bool freelook_active; real_t freelook_speed; - PanelContainer *info; Label *info_label; - - PanelContainer *fps; Label *fps_label; struct _RayResult { diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp index ae726b69ef..5eb3435e24 100644 --- a/editor/plugins/tile_set_editor_plugin.cpp +++ b/editor/plugins/tile_set_editor_plugin.cpp @@ -1435,13 +1435,13 @@ bool AutotileEditorHelper::_get(const StringName &p_name, Variant &r_ret) const return false; String name = p_name.operator String(); + bool v = false; if (name == "bitmask_mode") { - r_ret = tile_set->get(String::num(autotile_editor->get_current_tile(), 0) + "/autotile/bitmask_mode"); + r_ret = tile_set->get(String::num(autotile_editor->get_current_tile(), 0) + "/autotile/bitmask_mode", &v); } else if (name.left(7) == "layout/") { - bool v; r_ret = tile_set->get(String::num(autotile_editor->get_current_tile(), 0) + "/autotile" + name.right(6), &v); - return v; } + return v; } void AutotileEditorHelper::_get_property_list(List<PropertyInfo> *p_list) const { diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 4d5d467857..6fbca5c904 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -1699,12 +1699,11 @@ void SceneTreeDock::_add_children_to_popup(Object *p_obj, int p_depth) { icon = get_icon("Object", "EditorIcons"); if (menu->get_item_count() == 0) { - menu->add_item(TTR("Sub-Resources:")); - menu->set_item_disabled(0, true); + menu->add_submenu_item(TTR("Sub-Resources:"), "Sub-Resources"); } - int index = menu->get_item_count(); - menu->add_icon_item(icon, E->get().name.capitalize(), EDIT_SUBRESOURCE_BASE + subresources.size()); - menu->set_item_h_offset(index, p_depth * 10 * EDSCALE); + int index = menu_subresources->get_item_count(); + menu_subresources->add_icon_item(icon, E->get().name.capitalize(), EDIT_SUBRESOURCE_BASE + subresources.size()); + menu_subresources->set_item_h_offset(index, p_depth * 10 * EDSCALE); subresources.push_back(obj->get_instance_id()); _add_children_to_popup(obj, p_depth + 1); @@ -2049,6 +2048,9 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSel menu = memnew(PopupMenu); add_child(menu); menu->connect("id_pressed", this, "_tool_selected"); + menu_subresources = memnew(PopupMenu); + menu_subresources->set_name("Sub-Resources"); + menu->add_child(menu_subresources); first_enter = true; restore_script_editor_on_drag = false; diff --git a/editor/scene_tree_dock.h b/editor/scene_tree_dock.h index 41d5bda180..6a281bb7e8 100644 --- a/editor/scene_tree_dock.h +++ b/editor/scene_tree_dock.h @@ -119,6 +119,7 @@ class SceneTreeDock : public VBoxContainer { TextureRect *filter_icon; PopupMenu *menu; + PopupMenu *menu_subresources; ConfirmationDialog *clear_inherit_confirm; bool first_enter; diff --git a/editor/spatial_editor_gizmos.cpp b/editor/spatial_editor_gizmos.cpp index f0e8d438fa..5359f9894c 100644 --- a/editor/spatial_editor_gizmos.cpp +++ b/editor/spatial_editor_gizmos.cpp @@ -1529,6 +1529,8 @@ SkeletonSpatialGizmo::SkeletonSpatialGizmo(Skeleton *p_skel) { skel = p_skel; set_spatial_node(p_skel); } + +// FIXME: Kept as reference for reimplementation in 3.1+ #if 0 void RoomSpatialGizmo::redraw() { diff --git a/main/SCsub b/main/SCsub index 2cc617fc2c..5748bc38d2 100644 --- a/main/SCsub +++ b/main/SCsub @@ -24,6 +24,27 @@ def make_splash(target, source, env): g.write("#endif") +def make_splash_editor(target, source, env): + + src = source[0].srcnode().abspath + dst = target[0].srcnode().abspath + f = open(src, "rb") + g = open(dst, "w") + + buf = f.read() + + g.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n") + g.write("#ifndef BOOT_SPLASH_EDITOR_H\n") + g.write("#define BOOT_SPLASH_EDITOR_H\n") + g.write('static const Color boot_splash_editor_bg_color = Color::html("#232323");\n') + g.write("static const unsigned char boot_splash_editor_png[] = {\n") + for i in range(len(buf)): + g.write(byte_to_str(buf[i]) + ",\n") + g.write("};\n") + g.write("#endif") + + + def make_app_icon(target, source, env): src = source[0].srcnode().abspath @@ -51,6 +72,9 @@ Export('env') env.Depends("#main/splash.gen.h", "#main/splash.png") env.Command("#main/splash.gen.h", "#main/splash.png", make_splash) +env.Depends("#main/splash_editor.gen.h", "#main/splash_editor.png") +env.Command("#main/splash_editor.gen.h", "#main/splash_editor.png", make_splash_editor) + env.Depends("#main/app_icon.gen.h", "#main/app_icon.png") env.Command("#main/app_icon.gen.h", "#main/app_icon.png", make_app_icon) diff --git a/main/main.cpp b/main/main.cpp index c6e20f6d3b..ab520c5e7f 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -42,6 +42,7 @@ #include "script_debugger_remote.h" #include "servers/register_server_types.h" #include "splash.gen.h" +#include "splash_editor.gen.h" #include "input_map.h" #include "io/resource_loader.h" @@ -1051,7 +1052,12 @@ Error Main::setup2(Thread::ID p_main_tid_override) { #ifndef NO_DEFAULT_BOOT_LOGO MAIN_PRINT("Main: Create bootsplash"); +#if defined(TOOLS_ENABLED) && !defined(NO_EDITOR_SPLASH) + + Ref<Image> splash = editor ? memnew(Image(boot_splash_editor_png)) : memnew(Image(boot_splash_png)); +#else Ref<Image> splash = memnew(Image(boot_splash_png)); +#endif MAIN_PRINT("Main: ClearColor"); VisualServer::get_singleton()->set_default_clear_color(boot_splash_bg_color); diff --git a/main/splash_sponsors.png b/main/splash_editor.png Binary files differindex d8677f1749..d8677f1749 100644 --- a/main/splash_sponsors.png +++ b/main/splash_editor.png diff --git a/modules/gdscript/gdscript_function.cpp b/modules/gdscript/gdscript_function.cpp index ee23f0ea0f..d6352f1e6e 100644 --- a/modules/gdscript/gdscript_function.cpp +++ b/modules/gdscript/gdscript_function.cpp @@ -1257,6 +1257,8 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a exit_ok = true; OPCODE_BREAK; } + +// Enable for debugging #if 0 default: { diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index 6c58de8a5a..0bb235436e 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -480,33 +480,33 @@ void VisualScriptEditor::_update_graph(int p_only_id) { select_func_text->hide(); Ref<Texture> type_icons[Variant::VARIANT_MAX] = { - Control::get_icon("MiniVariant", "EditorIcons"), - Control::get_icon("MiniBoolean", "EditorIcons"), - Control::get_icon("MiniInteger", "EditorIcons"), - Control::get_icon("MiniFloat", "EditorIcons"), - Control::get_icon("MiniString", "EditorIcons"), - Control::get_icon("MiniVector2", "EditorIcons"), - Control::get_icon("MiniRect2", "EditorIcons"), - Control::get_icon("MiniVector3", "EditorIcons"), - Control::get_icon("MiniTransform2D", "EditorIcons"), - Control::get_icon("MiniPlane", "EditorIcons"), - Control::get_icon("MiniQuat", "EditorIcons"), - Control::get_icon("MiniAabb", "EditorIcons"), - Control::get_icon("MiniBasis", "EditorIcons"), - Control::get_icon("MiniTransform", "EditorIcons"), - Control::get_icon("MiniColor", "EditorIcons"), - Control::get_icon("MiniPath", "EditorIcons"), - Control::get_icon("MiniRid", "EditorIcons"), + Control::get_icon("Variant", "EditorIcons"), + Control::get_icon("Bool", "EditorIcons"), + Control::get_icon("Int", "EditorIcons"), + Control::get_icon("Float", "EditorIcons"), + Control::get_icon("String", "EditorIcons"), + Control::get_icon("Vector2", "EditorIcons"), + Control::get_icon("Rect2", "EditorIcons"), + Control::get_icon("Vector3", "EditorIcons"), + Control::get_icon("Transform2D", "EditorIcons"), + Control::get_icon("Plane", "EditorIcons"), + Control::get_icon("Quat", "EditorIcons"), + Control::get_icon("Aabb", "EditorIcons"), + Control::get_icon("Basis", "EditorIcons"), + Control::get_icon("Transform", "EditorIcons"), + Control::get_icon("Color", "EditorIcons"), + Control::get_icon("NodePath", "EditorIcons"), + Control::get_icon("RID", "EditorIcons"), Control::get_icon("MiniObject", "EditorIcons"), - Control::get_icon("MiniDictionary", "EditorIcons"), - Control::get_icon("MiniArray", "EditorIcons"), - Control::get_icon("MiniRawArray", "EditorIcons"), - Control::get_icon("MiniIntArray", "EditorIcons"), - Control::get_icon("MiniFloatArray", "EditorIcons"), - Control::get_icon("MiniStringArray", "EditorIcons"), - Control::get_icon("MiniVector2Array", "EditorIcons"), - Control::get_icon("MiniVector3Array", "EditorIcons"), - Control::get_icon("MiniColorArray", "EditorIcons") + Control::get_icon("Dictionary", "EditorIcons"), + Control::get_icon("Array", "EditorIcons"), + Control::get_icon("PoolByteArray", "EditorIcons"), + Control::get_icon("PoolIntArray", "EditorIcons"), + Control::get_icon("PoolRealArray", "EditorIcons"), + Control::get_icon("PoolStringArray", "EditorIcons"), + Control::get_icon("PoolVector2Array", "EditorIcons"), + Control::get_icon("PoolVector3Array", "EditorIcons"), + Control::get_icon("PoolColorArray", "EditorIcons") }; Ref<Texture> seq_port = Control::get_icon("VisualShaderPort", "EditorIcons"); @@ -774,33 +774,33 @@ void VisualScriptEditor::_update_members() { variables->set_custom_color(0, Control::get_color("mono_color", "Editor")); Ref<Texture> type_icons[Variant::VARIANT_MAX] = { - Control::get_icon("MiniVariant", "EditorIcons"), - Control::get_icon("MiniBoolean", "EditorIcons"), - Control::get_icon("MiniInteger", "EditorIcons"), - Control::get_icon("MiniFloat", "EditorIcons"), - Control::get_icon("MiniString", "EditorIcons"), - Control::get_icon("MiniVector2", "EditorIcons"), - Control::get_icon("MiniRect2", "EditorIcons"), - Control::get_icon("MiniVector3", "EditorIcons"), - Control::get_icon("MiniMatrix32", "EditorIcons"), - Control::get_icon("MiniPlane", "EditorIcons"), - Control::get_icon("MiniQuat", "EditorIcons"), - Control::get_icon("MiniAabb", "EditorIcons"), - Control::get_icon("MiniMatrix3", "EditorIcons"), - Control::get_icon("MiniTransform", "EditorIcons"), - Control::get_icon("MiniColor", "EditorIcons"), - Control::get_icon("MiniPath", "EditorIcons"), - Control::get_icon("MiniRid", "EditorIcons"), + Control::get_icon("Variant", "EditorIcons"), + Control::get_icon("Bool", "EditorIcons"), + Control::get_icon("Int", "EditorIcons"), + Control::get_icon("Float", "EditorIcons"), + Control::get_icon("String", "EditorIcons"), + Control::get_icon("Vector2", "EditorIcons"), + Control::get_icon("Rect2", "EditorIcons"), + Control::get_icon("Vector3", "EditorIcons"), + Control::get_icon("Transform2D", "EditorIcons"), + Control::get_icon("Plane", "EditorIcons"), + Control::get_icon("Quat", "EditorIcons"), + Control::get_icon("Aabb", "EditorIcons"), + Control::get_icon("Basis", "EditorIcons"), + Control::get_icon("Transform", "EditorIcons"), + Control::get_icon("Color", "EditorIcons"), + Control::get_icon("NodePath", "EditorIcons"), + Control::get_icon("RID", "EditorIcons"), Control::get_icon("MiniObject", "EditorIcons"), - Control::get_icon("MiniDictionary", "EditorIcons"), - Control::get_icon("MiniArray", "EditorIcons"), - Control::get_icon("MiniRawArray", "EditorIcons"), - Control::get_icon("MiniIntArray", "EditorIcons"), - Control::get_icon("MiniFloatArray", "EditorIcons"), - Control::get_icon("MiniStringArray", "EditorIcons"), - Control::get_icon("MiniVector2Array", "EditorIcons"), - Control::get_icon("MiniVector3Array", "EditorIcons"), - Control::get_icon("MiniColorArray", "EditorIcons") + Control::get_icon("Dictionary", "EditorIcons"), + Control::get_icon("Array", "EditorIcons"), + Control::get_icon("PoolByteArray", "EditorIcons"), + Control::get_icon("PoolIntArray", "EditorIcons"), + Control::get_icon("PoolRealArray", "EditorIcons"), + Control::get_icon("PoolStringArray", "EditorIcons"), + Control::get_icon("PoolVector2Array", "EditorIcons"), + Control::get_icon("PoolVector3Array", "EditorIcons"), + Control::get_icon("PoolColorArray", "EditorIcons") }; List<StringName> var_names; diff --git a/modules/visual_script/visual_script_flow_control.cpp b/modules/visual_script/visual_script_flow_control.cpp index a38266acc0..147761783a 100644 --- a/modules/visual_script/visual_script_flow_control.cpp +++ b/modules/visual_script/visual_script_flow_control.cpp @@ -731,921 +731,6 @@ void VisualScriptSwitch::_bind_methods() { VisualScriptSwitch::VisualScriptSwitch() { } - ////////////////////////////////////////// - ////////////////EVENT ACTION FILTER/////////// - ////////////////////////////////////////// - -#if 0 -int VisualScriptInputFilter::get_output_sequence_port_count() const { - - return filters.size(); -} - -bool VisualScriptInputFilter::has_input_sequence_port() const { - - return true; -} - -int VisualScriptInputFilter::get_input_value_port_count() const { - - return 1; -} -int VisualScriptInputFilter::get_output_value_port_count() const { - - return 1; -} - -String VisualScriptInputFilter::get_output_sequence_port_text(int p_port) const { - - String text; - - switch (filters[p_port].type) { - case Ref<InputEvent>::NONE: { - text = "None"; - } break; - case Ref<InputEvent>::KEY: { - - InputEventKey k = filters[p_port].key; - - if (k->get_scancode() == 0 && k.unicode == 0) { - text = "No Key"; - } else { - if (k->get_scancode() != 0) { - text = "KeyCode: " + keycode_get_string(k->get_scancode()); - } else if (k.unicode != 0) { - text = "Uniode: " + String::chr(k.unicode); - } - - if (k->is_pressed()) - text += ", Pressed"; - else - text += ", Released"; - - if (k.echo) - text += ", Echo"; - if (k->get_alt()) - text = "Alt+" + text; - if (k->get_shift()) - text = "Shift+" + text; - if (k->get_control()) - text = "Ctrl+" + text; - if (k->get_metakey()) - text = "Meta+" + text; - } - - } break; - case Ref<InputEvent>::MOUSE_MOTION: { - InputEventMouseMotion mm = filters[p_port].mouse_motion; - text = "Mouse Motion"; - - String b = "Left,Right,Middle,WheelUp,WheelDown,WheelLeft,WheelRight"; - - for (int i = 0; i < 7; i++) { - if (mm->get_button_mask() & (1 << i)) { - text = b.get_slice(",", i) + "+" + text; - } - } - if (mm->get_alt()) - text = "Alt+" + text; - if (mm->get_shift()) - text = "Shift+" + text; - if (mm->get_control()) - text = "Ctrl+" + text; - if (mm->get_metakey()) - text = "Meta+" + text; - } break; - case Ref<InputEvent>::MOUSE_BUTTON: { - - InputEventMouseButton mb = filters[p_port].mouse_button; - - String b = "Any,Left,Right,Middle,WheelUp,WheelDown,WheelLeft,WheelRight"; - - text = b.get_slice(",", mb->get_button_index()) + " Mouse Button"; - - if (mb->is_pressed()) - text += ", Pressed"; - else - text += ", Released"; - - if (mb.doubleclick) - text += ", DblClick"; - if (mb->get_alt()) - text = "Alt+" + text; - if (mb->get_shift()) - text = "Shift+" + text; - if (mb->get_control()) - text = "Ctrl+" + text; - if (mb->get_metakey()) - text = "Meta+" + text; - - } break; - case Ref<InputEvent>::JOYPAD_MOTION: { - - InputEventJoypadMotion jm = filters[p_port].joy_motion; - - text = "JoyMotion Axis " + itos(jm.axis >> 1); - if (jm.axis & 1) - text += " > " + rtos(jm.axis_value); - else - text += " < " + rtos(-jm.axis_value); - - } break; - case Ref<InputEvent>::JOYPAD_BUTTON: { - InputEventJoypadButton jb = filters[p_port].joy_button; - - text = "JoyButton " + itos(jb->get_button_index()); - if (jb->is_pressed()) - text += ", Pressed"; - else - text += ", Released"; - } break; - case Ref<InputEvent>::SCREEN_TOUCH: { - InputEventScreenTouch sd = filters[p_port].screen_touch; - - text = "Touch Finger " + itos(sd.index); - if (sd->is_pressed()) - text += ", Pressed"; - else - text += ", Released"; - } break; - case Ref<InputEvent>::SCREEN_DRAG: { - InputEventScreenDrag sd = filters[p_port].screen_drag; - text = "Drag Finger " + itos(sd.index); - } break; - case Ref<InputEvent>::ACTION: { - - List<PropertyInfo> pinfo; - ProjectSettings::get_singleton()->get_property_list(&pinfo); - int index = 1; - - text = "No Action"; - for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) { - const PropertyInfo &pi = E->get(); - - if (!pi.name.begins_with("input/")) - continue; - - if (filters[p_port].action.action == index) { - text = "Action " + pi.name.substr(pi.name.find("/") + 1, pi.name.length()); - break; - } - index++; - } - - if (filters[p_port].action->is_pressed()) - text += ", Pressed"; - else - text += ", Released"; - - } break; - } - - return text + " - " + itos(p_port); -} - -PropertyInfo VisualScriptInputFilter::get_input_value_port_info(int p_idx) const { - - return PropertyInfo(Variant::INPUT_EVENT, "event"); -} - -PropertyInfo VisualScriptInputFilter::get_output_value_port_info(int p_idx) const { - - return PropertyInfo(Variant::INPUT_EVENT, ""); -} - -String VisualScriptInputFilter::get_caption() const { - - return "InputFilter"; -} - -String VisualScriptInputFilter::get_text() const { - - return ""; -} - -bool VisualScriptInputFilter::_set(const StringName &p_name, const Variant &p_value) { - - if (p_name == "filter_count") { - filters.resize(p_value); - _change_notify(); - ports_changed_notify(); - return true; - } - - if (String(p_name).begins_with("filter_")) { - - int idx = String(p_name).replace_first("filters_", "").get_slice("/", 0).to_int(); - - ERR_FAIL_INDEX_V(idx, filters.size(), false); - - String what = String(p_name).get_slice("/", 1); - - if (what == "type") { - filters[idx] = Ref<InputEvent>(); - filters[idx].type = Ref<InputEvent>::Type(int(p_value)); - if (filters[idx].type == Ref<InputEvent>::JOYPAD_MOTION) { - filters[idx].joy_motion.axis_value = 0.5; //for threshold - } else if (filters[idx].type == Ref<InputEvent>::KEY) { - filters[idx]->is_pressed() = true; //put these as true to make it more user friendly - } else if (filters[idx].type == Ref<InputEvent>::MOUSE_BUTTON) { - filters[idx]->is_pressed() = true; - } else if (filters[idx].type == Ref<InputEvent>::JOYPAD_BUTTON) { - filters[idx].joy_button->is_pressed() = true; - } else if (filters[idx].type == Ref<InputEvent>::SCREEN_TOUCH) { - filters[idx].screen_touch->is_pressed() = true; - } else if (filters[idx].type == Ref<InputEvent>::ACTION) { - filters[idx].action->is_pressed() = true; - } - _change_notify(); - ports_changed_notify(); - - return true; - } - if (what == "device") { - filters[idx].device = p_value; - ports_changed_notify(); - return true; - } - - switch (filters[idx].type) { - - case Ref<InputEvent>::KEY: { - - if (what == "scancode") { - String sc = p_value; - if (sc == String()) { - filters[idx]->get_scancode() = 0; - } else { - filters[idx]->get_scancode() = find_keycode(p_value); - } - - } else if (what == "unicode") { - - String uc = p_value; - - if (uc == String()) { - filters[idx].key.unicode = 0; - } else { - filters[idx].key.unicode = uc[0]; - } - - } else if (what == "pressed") { - - filters[idx]->is_pressed() = p_value; - } else if (what == "echo") { - - filters[idx]->is_echo() = p_value; - - } else if (what == "mod_alt") { - filters[idx]->get_alt() = p_value; - - } else if (what == "mod_shift") { - filters[idx]->get_shift() = p_value; - - } else if (what == "mod_ctrl") { - filters[idx]->get_control() = p_value; - - } else if (what == "mod_meta") { - filters[idx]->get_metakey() = p_value; - } else { - return false; - } - ports_changed_notify(); - - return true; - } break; - case Ref<InputEvent>::MOUSE_MOTION: { - - if (what == "button_mask") { - filters[idx]->get_button_mask() = p_value; - - } else if (what == "mod_alt") { - filters[idx].mouse_motion->get_alt() = p_value; - - } else if (what == "mod_shift") { - filters[idx].mouse_motion->get_shift() = p_value; - - } else if (what == "mod_ctrl") { - filters[idx].mouse_motion->get_control() = p_value; - - } else if (what == "mod_meta") { - filters[idx].mouse_motion->get_metakey() = p_value; - } else { - return false; - } - - ports_changed_notify(); - return true; - - } break; - case Ref<InputEvent>::MOUSE_BUTTON: { - - if (what == "button_index") { - filters[idx]->get_button_index() = p_value; - } else if (what == "pressed") { - filters[idx]->is_pressed() = p_value; - } else if (what == "doubleclicked") { - filters[idx].mouse_button.doubleclick = p_value; - - } else if (what == "mod_alt") { - filters[idx].mouse_button->get_alt() = p_value; - - } else if (what == "mod_shift") { - filters[idx].mouse_button->get_shift() = p_value; - - } else if (what == "mod_ctrl") { - filters[idx].mouse_button->get_control() = p_value; - - } else if (what == "mod_meta") { - filters[idx].mouse_button->get_metakey() = p_value; - } else { - return false; - } - ports_changed_notify(); - return true; - - } break; - case Ref<InputEvent>::JOYPAD_MOTION: { - - if (what == "axis") { - filters[idx].joy_motion.axis = int(p_value) << 1 | filters[idx].joy_motion.axis; - } else if (what == "mode") { - filters[idx].joy_motion.axis |= int(p_value); - } else if (what == "threshold") { - filters[idx].joy_motion.axis_value = p_value; - } else { - return false; - } - ports_changed_notify(); - return true; - - } break; - case Ref<InputEvent>::JOYPAD_BUTTON: { - - if (what == "button_index") { - filters[idx].joy_button->get_button_index() = p_value; - } else if (what == "pressed") { - filters[idx].joy_button->is_pressed() = p_value; - } else { - return false; - } - ports_changed_notify(); - return true; - - } break; - case Ref<InputEvent>::SCREEN_TOUCH: { - - if (what == "finger_index") { - filters[idx].screen_touch.index = p_value; - } else if (what == "pressed") { - filters[idx].screen_touch->is_pressed() = p_value; - } else { - return false; - } - ports_changed_notify(); - return true; - } break; - case Ref<InputEvent>::SCREEN_DRAG: { - if (what == "finger_index") { - filters[idx].screen_drag.index = p_value; - } else { - return false; - } - ports_changed_notify(); - return true; - } break; - case Ref<InputEvent>::ACTION: { - - if (what == "action_name") { - - List<PropertyInfo> pinfo; - ProjectSettings::get_singleton()->get_property_list(&pinfo); - int index = 1; - - for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) { - const PropertyInfo &pi = E->get(); - - if (!pi.name.begins_with("input/")) - continue; - - String name = pi.name.substr(pi.name.find("/") + 1, pi.name.length()); - if (name == String(p_value)) { - - filters[idx].action.action = index; - ports_changed_notify(); - return true; - } - - index++; - } - - filters[idx].action.action = 0; - ports_changed_notify(); - - return false; - - } else if (what == "pressed") { - - filters[idx].action->is_pressed() = p_value; - ports_changed_notify(); - return true; - } - - } break; - } - } - return false; -} - -bool VisualScriptInputFilter::_get(const StringName &p_name, Variant &r_ret) const { - - if (p_name == "filter_count") { - r_ret = filters.size(); - return true; - } - - if (String(p_name).begins_with("filter_")) { - - int idx = String(p_name).replace_first("filters_", "").get_slice("/", 0).to_int(); - - ERR_FAIL_INDEX_V(idx, filters.size(), false); - - String what = String(p_name).get_slice("/", 1); - - if (what == "type") { - r_ret = filters[idx].type; - return true; - } - if (what == "device") { - r_ret = filters[idx].device; - return true; - } - - switch (filters[idx].type) { - - case Ref<InputEvent>::KEY: { - - if (what == "scancode") { - if (filters[idx]->get_scancode() == 0) - r_ret = String(); - else { - - r_ret = keycode_get_string(filters[idx]->get_scancode()); - } - - } else if (what == "unicode") { - - if (filters[idx].key.unicode == 0) { - r_ret = String(); - } else { - CharType str[2] = { (CharType)filters[idx].key.unicode, 0 }; - r_ret = String(str); - } - - } else if (what == "pressed") { - - r_ret = filters[idx]->is_pressed(); - } else if (what == "echo") { - - r_ret = filters[idx]->is_echo(); - - } else if (what == "mod_alt") { - r_ret = filters[idx]->get_alt(); - - } else if (what == "mod_shift") { - r_ret = filters[idx]->get_shift(); - - } else if (what == "mod_ctrl") { - r_ret = filters[idx]->get_control(); - - } else if (what == "mod_meta") { - r_ret = filters[idx]->get_metakey(); - } else { - return false; - } - - return true; - } break; - case Ref<InputEvent>::MOUSE_MOTION: { - - if (what == "button_mask") { - r_ret = filters[idx]->get_button_mask(); - - } else if (what == "mod_alt") { - r_ret = filters[idx].mouse_motion->get_alt(); - - } else if (what == "mod_shift") { - r_ret = filters[idx].mouse_motion->get_shift(); - - } else if (what == "mod_ctrl") { - r_ret = filters[idx].mouse_motion->get_control(); - - } else if (what == "mod_meta") { - r_ret = filters[idx].mouse_motion->get_metakey(); - } else { - return false; - } - - return true; - - } break; - case Ref<InputEvent>::MOUSE_BUTTON: { - - if (what == "button_index") { - r_ret = filters[idx]->get_button_index(); - } else if (what == "pressed") { - r_ret = filters[idx]->is_pressed(); - } else if (what == "doubleclicked") { - r_ret = filters[idx].mouse_button.doubleclick; - - } else if (what == "mod_alt") { - r_ret = filters[idx].mouse_button->get_alt(); - - } else if (what == "mod_shift") { - r_ret = filters[idx].mouse_button->get_shift(); - - } else if (what == "mod_ctrl") { - r_ret = filters[idx].mouse_button->get_control(); - - } else if (what == "mod_meta") { - r_ret = filters[idx].mouse_button->get_metakey(); - } else { - return false; - } - return true; - - } break; - case Ref<InputEvent>::JOYPAD_MOTION: { - - if (what == "axis_index") { - r_ret = filters[idx].joy_motion.axis >> 1; - } else if (what == "mode") { - r_ret = filters[idx].joy_motion.axis & 1; - } else if (what == "threshold") { - r_ret = filters[idx].joy_motion.axis_value; - } else { - return false; - } - return true; - - } break; - case Ref<InputEvent>::JOYPAD_BUTTON: { - - if (what == "button_index") { - r_ret = filters[idx].joy_button->get_button_index(); - } else if (what == "pressed") { - r_ret = filters[idx].joy_button->is_pressed(); - } else { - return false; - } - return true; - - } break; - case Ref<InputEvent>::SCREEN_TOUCH: { - - if (what == "finger_index") { - r_ret = filters[idx].screen_touch.index; - } else if (what == "pressed") { - r_ret = filters[idx].screen_touch->is_pressed(); - } else { - return false; - } - return true; - } break; - case Ref<InputEvent>::SCREEN_DRAG: { - if (what == "finger_index") { - r_ret = filters[idx].screen_drag.index; - } else { - return false; - } - return true; - } break; - case Ref<InputEvent>::ACTION: { - - if (what == "action_name") { - - List<PropertyInfo> pinfo; - ProjectSettings::get_singleton()->get_property_list(&pinfo); - int index = 1; - - for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) { - const PropertyInfo &pi = E->get(); - - if (!pi.name.begins_with("input/")) - continue; - - if (filters[idx].action.action == index) { - r_ret = pi.name.substr(pi.name.find("/") + 1, pi.name.length()); - return true; - } - index++; - } - - r_ret = "None"; //no index - return false; - - } else if (what == "pressed") { - - r_ret = filters[idx].action->is_pressed(); - return true; - } - - } break; - } - } - return false; -} - -static const char *event_type_names[Ref<InputEvent>::TYPE_MAX] = { - "None", - "Key", - "MouseMotion", - "MouseButton", - "JoypadMotion", - "JoypadButton", - "ScreenTouch", - "ScreenDrag", - "Action" -}; - -void VisualScriptInputFilter::_get_property_list(List<PropertyInfo> *p_list) const { - - p_list->push_back(PropertyInfo(Variant::INT, "filter_count", PROPERTY_HINT_RANGE, "0,64")); - - String et; - for (int i = 0; i < Ref<InputEvent>::TYPE_MAX; i++) { - if (i > 0) - et += ","; - - et += event_type_names[i]; - } - - String kc; - String actions; - - for (int i = 0; i < filters.size(); i++) { - - String base = "filter_" + itos(i) + "/"; - p_list->push_back(PropertyInfo(Variant::INT, base + "type", PROPERTY_HINT_ENUM, et)); - p_list->push_back(PropertyInfo(Variant::INT, base + "device")); - switch (filters[i].type) { - - case Ref<InputEvent>::NONE: { - - } break; - case Ref<InputEvent>::KEY: { - if (kc == String()) { - int kcc = keycode_get_count(); - kc = "None"; - for (int i = 0; i < kcc; i++) { - kc += ","; - kc += String(keycode_get_name_by_index(i)); - } - } - p_list->push_back(PropertyInfo(Variant::STRING, base + "scancode", PROPERTY_HINT_ENUM, kc)); - p_list->push_back(PropertyInfo(Variant::STRING, base + "unicode")); - p_list->push_back(PropertyInfo(Variant::BOOL, base + "pressed")); - p_list->push_back(PropertyInfo(Variant::BOOL, base + "echo")); - p_list->push_back(PropertyInfo(Variant::BOOL, base + "mod_alt")); - p_list->push_back(PropertyInfo(Variant::BOOL, base + "mod_shift")); - p_list->push_back(PropertyInfo(Variant::BOOL, base + "mod_ctrl")); - p_list->push_back(PropertyInfo(Variant::BOOL, base + "mod_meta")); - - } break; - case Ref<InputEvent>::MOUSE_MOTION: { - p_list->push_back(PropertyInfo(Variant::INT, base + "button_mask", PROPERTY_HINT_FLAGS, "Left,Right,Middle,WheelUp,WheelDown,WheelLeft,WheelRight")); - p_list->push_back(PropertyInfo(Variant::BOOL, base + "mod_alt")); - p_list->push_back(PropertyInfo(Variant::BOOL, base + "mod_shift")); - p_list->push_back(PropertyInfo(Variant::BOOL, base + "mod_ctrl")); - p_list->push_back(PropertyInfo(Variant::BOOL, base + "mod_meta")); - - } break; - case Ref<InputEvent>::MOUSE_BUTTON: { - p_list->push_back(PropertyInfo(Variant::INT, base + "button_index", PROPERTY_HINT_ENUM, "Any,Left,Right,Middle,WheelUp,WheelDown,WheelLeft,WheelRight")); - p_list->push_back(PropertyInfo(Variant::BOOL, base + "pressed")); - p_list->push_back(PropertyInfo(Variant::BOOL, base + "doubleclicked")); - p_list->push_back(PropertyInfo(Variant::BOOL, base + "mod_alt")); - p_list->push_back(PropertyInfo(Variant::BOOL, base + "mod_shift")); - p_list->push_back(PropertyInfo(Variant::BOOL, base + "mod_ctrl")); - p_list->push_back(PropertyInfo(Variant::BOOL, base + "mod_meta")); - - } break; - case Ref<InputEvent>::JOYPAD_MOTION: { - - p_list->push_back(PropertyInfo(Variant::INT, base + "axis_index")); - p_list->push_back(PropertyInfo(Variant::INT, base + "mode", PROPERTY_HINT_ENUM, "Min,Max")); - p_list->push_back(PropertyInfo(Variant::REAL, base + "threshold", PROPERTY_HINT_RANGE, "0,1,0.01")); - } break; - case Ref<InputEvent>::JOYPAD_BUTTON: { - p_list->push_back(PropertyInfo(Variant::INT, base + "button_index")); - p_list->push_back(PropertyInfo(Variant::BOOL, base + "pressed")); - - } break; - case Ref<InputEvent>::SCREEN_TOUCH: { - p_list->push_back(PropertyInfo(Variant::INT, base + "finger_index")); - p_list->push_back(PropertyInfo(Variant::BOOL, base + "pressed")); - - } break; - case Ref<InputEvent>::SCREEN_DRAG: { - p_list->push_back(PropertyInfo(Variant::INT, base + "finger_index")); - } break; - case Ref<InputEvent>::ACTION: { - - if (actions == String()) { - - actions = "None"; - - List<PropertyInfo> pinfo; - ProjectSettings::get_singleton()->get_property_list(&pinfo); - Vector<String> al; - - for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) { - const PropertyInfo &pi = E->get(); - - if (!pi.name.begins_with("input/")) - continue; - - String name = pi.name.substr(pi.name.find("/") + 1, pi.name.length()); - - al.push_back(name); - } - - for (int i = 0; i < al.size(); i++) { - actions += ","; - actions += al[i]; - } - } - - p_list->push_back(PropertyInfo(Variant::STRING, base + "action_name", PROPERTY_HINT_ENUM, actions)); - p_list->push_back(PropertyInfo(Variant::BOOL, base + "pressed")); - - } break; - } - } -} - -class VisualScriptNodeInstanceInputFilter : public VisualScriptNodeInstance { -public: - VisualScriptInstance *instance; - Vector<Ref<InputEvent>> filters; - - //virtual int get_working_memory_size() const { return 0; } - //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } - //virtual bool get_output_port_unsequenced(int p_idx,Variant* r_value,Variant* p_working_mem,String &r_error) const { return false; } - - virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { - - if (p_inputs[0]->get_type() != Variant::INPUT_EVENT) { - r_error_str = "Input value not of type event"; - r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; - return 0; - } - - Ref<InputEvent> event = *p_inputs[0]; - - for (int i = 0; i < filters.size(); i++) { - - const Ref<InputEvent> &ie = filters[i]; - if (ie.type != event.type) - continue; - - bool match = false; - - switch (ie.type) { - - case Ref<InputEvent>::NONE: { - - match = true; - } break; - case Ref<InputEvent>::KEY: { - - InputEventKey k = ie.key; - InputEventKey k2 = event.key; - - if (k->get_scancode() == 0 && k.unicode == 0 && k2->get_scancode() == 0 && k2.unicode == 0) { - match = true; - - } else { - - if ((k->get_scancode() != 0 && k->get_scancode() == k2->get_scancode()) || (k.unicode != 0 && k.unicode == k2.unicode)) { - //key valid - - if ( - k->is_pressed() == k2->is_pressed() && - k.echo == k2.echo && - k.mod == k2.mod) { - match = true; - } - } - } - - } break; - case Ref<InputEvent>::MOUSE_MOTION: { - InputEventMouseMotion mm = ie.mouse_motion; - InputEventMouseMotion mm2 = event.mouse_motion; - - if (mm->get_button_mask() == mm2->get_button_mask() && - mm.mod == mm2.mod) { - match = true; - } - - } break; - case Ref<InputEvent>::MOUSE_BUTTON: { - - InputEventMouseButton mb = ie.mouse_button; - InputEventMouseButton mb2 = event.mouse_button; - - if (mb->get_button_index() == mb2->get_button_index() && - mb->is_pressed() == mb2->is_pressed() && - mb.doubleclick == mb2.doubleclick && - mb.mod == mb2.mod) { - match = true; - } - - } break; - case Ref<InputEvent>::JOYPAD_MOTION: { - - InputEventJoypadMotion jm = ie.joy_motion; - InputEventJoypadMotion jm2 = event.joy_motion; - - int axis = jm.axis >> 1; - - if (axis == jm2.axis) { - - if (jm.axis & 1) { - //greater - if (jm2.axis_value > jm.axis_value) { - match = true; - } - } else { - //less - if (jm2.axis_value < -jm.axis_value) { - match = true; - } - } - } - - } break; - case Ref<InputEvent>::JOYPAD_BUTTON: { - InputEventJoypadButton jb = ie.joy_button; - InputEventJoypadButton jb2 = event.joy_button; - - if (jb->get_button_index() == jb2->get_button_index() && - jb->is_pressed() == jb2->is_pressed()) { - match = true; - } - } break; - case Ref<InputEvent>::SCREEN_TOUCH: { - InputEventScreenTouch st = ie.screen_touch; - InputEventScreenTouch st2 = event.screen_touch; - - if (st.index == st2.index && - st->is_pressed() == st2->is_pressed()) { - match = true; - } - - } break; - case Ref<InputEvent>::SCREEN_DRAG: { - InputEventScreenDrag sd = ie.screen_drag; - InputEventScreenDrag sd2 = event.screen_drag; - - if (sd.index == sd2.index) { - match = true; - } - } break; - case Ref<InputEvent>::ACTION: { - - InputEventAction ia = ie.action; - InputEventAction ia2 = event.action; - - if (ia.action == ia2.action && - ia->is_pressed() == ia2->is_pressed()) { - match = true; - } - } break; - } - - *p_outputs[0] = event; - - if (match) - return i; //go through match output - } - - return STEP_NO_ADVANCE_BIT; //none found, don't advance - } -}; - -VisualScriptNodeInstance *VisualScriptInputFilter::instance(VisualScriptInstance *p_instance) { - - VisualScriptNodeInstanceInputFilter *instance = memnew(VisualScriptNodeInstanceInputFilter); - instance->instance = p_instance; - instance->filters = filters; - return instance; -} - -VisualScriptInputFilter::VisualScriptInputFilter() { -} -#endif ////////////////////////////////////////// ////////////////TYPE CAST/////////// ////////////////////////////////////////// diff --git a/modules/visual_script/visual_script_flow_control.h b/modules/visual_script/visual_script_flow_control.h index 380eb76c45..4766bbef6b 100644 --- a/modules/visual_script/visual_script_flow_control.h +++ b/modules/visual_script/visual_script_flow_control.h @@ -228,40 +228,6 @@ public: VisualScriptSwitch(); }; -#if 0 -class VisualScriptInputFilter : public VisualScriptNode { - - GDCLASS(VisualScriptInputFilter, VisualScriptNode) - - Vector<Ref<InputEvent>> filters; - -protected: - bool _set(const StringName &p_name, const Variant &p_value); - bool _get(const StringName &p_name, Variant &r_ret) const; - void _get_property_list(List<PropertyInfo> *p_list) const; - -public: - virtual int get_output_sequence_port_count() const; - virtual bool has_input_sequence_port() const; - - virtual String get_output_sequence_port_text(int p_port) const; - - virtual int get_input_value_port_count() const; - virtual int get_output_value_port_count() const; - - virtual PropertyInfo get_input_value_port_info(int p_idx) const; - virtual PropertyInfo get_output_value_port_info(int p_idx) const; - - virtual String get_caption() const; - virtual String get_text() const; - virtual String get_category() const { return "flow_control"; } - - virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance); - - VisualScriptInputFilter(); -}; -#endif - class VisualScriptTypeCast : public VisualScriptNode { GDCLASS(VisualScriptTypeCast, VisualScriptNode) diff --git a/platform/android/detect.py b/platform/android/detect.py index bc67f6e6dc..892b1b6a85 100644 --- a/platform/android/detect.py +++ b/platform/android/detect.py @@ -277,7 +277,7 @@ def get_ndk_version(path): try: with open(prop_file_path) as prop_file: for line in prop_file: - key_value = map(lambda x: string.strip(x), line.split("=")) + key_value = list(map(lambda x: x.strip(), line.split("="))) if key_value[0] == "Pkg.Revision": return key_value[1] except: diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index 6ca687d057..d4c079cfc6 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -352,10 +352,11 @@ class EditorExportAndroid : public EditorExportPlatform { ea->device_lock->unlock(); } + uint64_t sleep = OS::get_singleton()->get_power_state() == OS::POWERSTATE_ON_BATTERY ? 1000 : 100; uint64_t wait = 3000000; uint64_t time = OS::get_singleton()->get_ticks_usec(); while (OS::get_singleton()->get_ticks_usec() - time < wait) { - OS::get_singleton()->delay_usec(1000); + OS::get_singleton()->delay_usec(1000 * sleep); if (ea->quit_request) break; } diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp index 40dfe6d909..c4d0cf5181 100644 --- a/platform/android/java_glue.cpp +++ b/platform/android/java_glue.cpp @@ -936,13 +936,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setup(JNIEnv *env, jo } __android_log_print(ANDROID_LOG_INFO, "godot", "CMDLINE LEN %i - APK EXPANSION %i\n", cmdlen, int(use_apk_expansion)); -#if 0 - char *args[]={"-test","render",NULL}; - __android_log_print(ANDROID_LOG_INFO,"godot","pre asdasd setup..."); - Error err = Main::setup("apk",2,args,false); -#else Error err = Main::setup("apk", cmdlen, (char **)cmdline, false); -#endif if (cmdline) { free(cmdline); } diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h index ede50a05ba..2381b85658 100644 --- a/platform/osx/os_osx.h +++ b/platform/osx/os_osx.h @@ -215,8 +215,8 @@ public: virtual bool _check_internal_feature_support(const String &p_feature); - virtual void set_use_vsync(bool p_enable); - virtual bool is_vsync_enabled() const; + virtual void _set_use_vsync(bool p_enable); + //virtual bool is_vsync_enabled() const; void run(); diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index f3809e6eed..aab37cb59c 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -2063,14 +2063,14 @@ Error OS_OSX::move_to_trash(const String &p_path) { return OK; } -void OS_OSX::set_use_vsync(bool p_enable) { +void OS_OSX::_set_use_vsync(bool p_enable) { CGLContextObj ctx = CGLGetCurrentContext(); if (ctx) { GLint swapInterval = p_enable ? 1 : 0; CGLSetParameter(ctx, kCGLCPSwapInterval, &swapInterval); } } - +/* bool OS_OSX::is_vsync_enabled() const { GLint swapInterval = 0; CGLContextObj ctx = CGLGetCurrentContext(); @@ -2079,7 +2079,7 @@ bool OS_OSX::is_vsync_enabled() const { } return swapInterval ? true : false; } - +*/ OS_OSX *OS_OSX::singleton = NULL; OS_OSX::OS_OSX() { diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 01eb50e69c..564359d743 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -188,6 +188,9 @@ def configure(env): else: VC_PATH = "" + if (env["use_lto"]): + env.Append(CCFLAGS=['/GL']) + env.Append(LINKFLAGS=['/LTCG']) if (env["openmp"]): env.Append(CPPFLAGS=['/openmp']) diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 6cab683e83..d3fa2bbc0d 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -2288,19 +2288,19 @@ String OS_Windows::get_joy_guid(int p_device) const { return input->get_joy_guid_remapped(p_device); } -void OS_Windows::set_use_vsync(bool p_enable) { +void OS_Windows::_set_use_vsync(bool p_enable) { if (gl_context) gl_context->set_use_vsync(p_enable); } - +/* bool OS_Windows::is_vsync_enabled() const { if (gl_context) return gl_context->is_using_vsync(); return true; -} +}*/ OS::PowerState OS_Windows::get_power_state() { return power_manager->get_power_state(); diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h index f2226a53a9..7c5490a0a4 100644 --- a/platform/windows/os_windows.h +++ b/platform/windows/os_windows.h @@ -275,8 +275,8 @@ public: virtual bool is_joy_known(int p_device); virtual String get_joy_guid(int p_device) const; - virtual void set_use_vsync(bool p_enable); - virtual bool is_vsync_enabled() const; + virtual void _set_use_vsync(bool p_enable); + //virtual bool is_vsync_enabled() const; virtual OS::PowerState get_power_state(); virtual int get_power_seconds_left(); diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 0c0bc1a8a3..6616e47317 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -2306,11 +2306,11 @@ String OS_X11::get_joy_guid(int p_device) const { return input->get_joy_guid_remapped(p_device); } -void OS_X11::set_use_vsync(bool p_enable) { +void OS_X11::_set_use_vsync(bool p_enable) { if (context_gl) return context_gl->set_use_vsync(p_enable); } - +/* bool OS_X11::is_vsync_enabled() const { if (context_gl) @@ -2318,7 +2318,7 @@ bool OS_X11::is_vsync_enabled() const { return true; } - +*/ void OS_X11::set_context(int p_context) { XClassHint *classHint = XAllocClassHint(); diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h index c8cea1e30c..86f25918fd 100644 --- a/platform/x11/os_x11.h +++ b/platform/x11/os_x11.h @@ -270,8 +270,8 @@ public: virtual void set_context(int p_context); - virtual void set_use_vsync(bool p_enable); - virtual bool is_vsync_enabled() const; + virtual void _set_use_vsync(bool p_enable); + //virtual bool is_vsync_enabled() const; virtual OS::PowerState get_power_state(); virtual int get_power_seconds_left(); diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index bcdad177c5..7b30ddaa56 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -739,6 +739,26 @@ void TileMap::update_bitmask_area(const Vector2 &p_pos) { } } +void TileMap::update_bitmask_region(const Vector2 &p_start, const Vector2 &p_end) { + + if ((p_end.x < p_start.x || p_end.y < p_start.y) || (p_end.x == p_start.x && p_end.y == p_start.y)) { + int i; + Array a = get_used_cells(); + for (i = 0; i < a.size(); i++) { + // update_bitmask_area() in order to update cells adjacent to the + // current cell, since ordering in array may not be reliable + Vector2 vector = (Vector2)a[i]; + update_bitmask_area(Vector2(vector.x, vector.y)); + } + return; + } + for (int x = p_start.x - 1; x <= p_end.x + 1; x++) { + for (int y = p_start.y - 1; y <= p_end.y + 1; y++) { + update_cell_bitmask(x, y); + } + } +} + void TileMap::update_cell_bitmask(int p_x, int p_y) { PosKey p(p_x, p_y); @@ -1507,6 +1527,9 @@ void TileMap::_bind_methods() { ClassDB::bind_method(D_METHOD("_recreate_quadrants"), &TileMap::_recreate_quadrants); ClassDB::bind_method(D_METHOD("_update_dirty_quadrants"), &TileMap::_update_dirty_quadrants); + ClassDB::bind_method(D_METHOD("update_bitmask_area"), &TileMap::update_bitmask_area); + ClassDB::bind_method(D_METHOD("update_bitmask_region", "start", "end"), &TileMap::update_bitmask_region, DEFVAL(Vector2()), DEFVAL(Vector2())); + ClassDB::bind_method(D_METHOD("_set_tile_data"), &TileMap::_set_tile_data); ClassDB::bind_method(D_METHOD("_get_tile_data"), &TileMap::_get_tile_data); diff --git a/scene/2d/tile_map.h b/scene/2d/tile_map.h index e5608884c4..8f0b2e6e4c 100644 --- a/scene/2d/tile_map.h +++ b/scene/2d/tile_map.h @@ -245,6 +245,7 @@ public: void make_bitmask_area_dirty(const Vector2 &p_pos); void update_bitmask_area(const Vector2 &p_pos); + void update_bitmask_region(const Vector2 &p_start = Vector2(), const Vector2 &p_end = Vector2()); void update_cell_bitmask(int p_x, int p_y); void update_dirty_bitmask(); diff --git a/scene/3d/baked_lightmap.cpp b/scene/3d/baked_lightmap.cpp index 3d9bb73181..7afac94e71 100644 --- a/scene/3d/baked_lightmap.cpp +++ b/scene/3d/baked_lightmap.cpp @@ -298,7 +298,7 @@ BakedLightmap::BakeError BakedLightmap::bake(Node *p_from_node, bool p_create_vi Ref<BakedLightmapData> new_light_data; new_light_data.instance(); - static const int subdiv_value[SUBDIV_MAX] = { 8, 9, 10, 11, 12, 13 }; + static const int subdiv_value[SUBDIV_MAX] = { 8, 9, 10, 11 }; VoxelLightBaker baker; @@ -678,7 +678,7 @@ void BakedLightmap::_bind_methods() { ClassDB::bind_method(D_METHOD("debug_bake"), &BakedLightmap::_debug_bake); ClassDB::set_method_flags(get_class_static(), _scs_create("debug_bake"), METHOD_FLAGS_DEFAULT | METHOD_FLAG_EDITOR); - ADD_PROPERTY(PropertyInfo(Variant::INT, "bake_subdiv", PROPERTY_HINT_ENUM, "128,256,512,1024,2048,4096"), "set_bake_subdiv", "get_bake_subdiv"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "bake_subdiv", PROPERTY_HINT_ENUM, "128,256,512,1024"), "set_bake_subdiv", "get_bake_subdiv"); ADD_PROPERTY(PropertyInfo(Variant::INT, "capture_subdiv", PROPERTY_HINT_ENUM, "128,256,512"), "set_capture_subdiv", "get_capture_subdiv"); ADD_PROPERTY(PropertyInfo(Variant::INT, "bake_quality", PROPERTY_HINT_ENUM, "Low,Medium,High"), "set_bake_quality", "get_bake_quality"); ADD_PROPERTY(PropertyInfo(Variant::INT, "bake_mode", PROPERTY_HINT_ENUM, "ConeTrace,RayTrace"), "set_bake_mode", "get_bake_mode"); @@ -693,8 +693,6 @@ void BakedLightmap::_bind_methods() { BIND_ENUM_CONSTANT(SUBDIV_256); BIND_ENUM_CONSTANT(SUBDIV_512); BIND_ENUM_CONSTANT(SUBDIV_1024); - BIND_ENUM_CONSTANT(SUBDIV_2048); - BIND_ENUM_CONSTANT(SUBDIV_4096); BIND_ENUM_CONSTANT(SUBDIV_MAX); BIND_ENUM_CONSTANT(BAKE_QUALITY_LOW); @@ -702,6 +700,12 @@ void BakedLightmap::_bind_methods() { BIND_ENUM_CONSTANT(BAKE_QUALITY_HIGH); BIND_ENUM_CONSTANT(BAKE_MODE_CONE_TRACE); BIND_ENUM_CONSTANT(BAKE_MODE_RAY_TRACE); + + BIND_ENUM_CONSTANT(BAKE_ERROR_OK); + BIND_ENUM_CONSTANT(BAKE_ERROR_NO_SAVE_PATH); + BIND_ENUM_CONSTANT(BAKE_ERROR_NO_MESHES); + BIND_ENUM_CONSTANT(BAKE_ERROR_CANT_CREATE_IMAGE); + BIND_ENUM_CONSTANT(BAKE_ERROR_USER_ABORTED); } BakedLightmap::BakedLightmap() { diff --git a/scene/3d/baked_lightmap.h b/scene/3d/baked_lightmap.h index 5595ec1e61..f63749a0b4 100644 --- a/scene/3d/baked_lightmap.h +++ b/scene/3d/baked_lightmap.h @@ -64,8 +64,6 @@ public: SUBDIV_256, SUBDIV_512, SUBDIV_1024, - SUBDIV_2048, - SUBDIV_4096, SUBDIV_MAX }; diff --git a/scene/3d/portal.h b/scene/3d/portal.h index 4ea208a718..a3a7956286 100644 --- a/scene/3d/portal.h +++ b/scene/3d/portal.h @@ -39,7 +39,8 @@ If a portal is placed next (very close to) a similar, opposing portal, they automatically connect, otherwise, a portal connects to the parent room */ -//this will be redone and replaced by area portals, left for reference since a new class with this name will have to exist and want to reuse the gizmos +// FIXME: This will be redone and replaced by area portals, left for reference +// since a new class with this name will have to exist and want to reuse the gizmos #if 0 class Portal : public VisualInstance { diff --git a/scene/3d/room_instance.h b/scene/3d/room_instance.h index 3069ea2eba..2b2f80a0c6 100644 --- a/scene/3d/room_instance.h +++ b/scene/3d/room_instance.h @@ -44,7 +44,7 @@ */ -//this will be removed, left for reference +// FIXME: this will be removed, left for reference #if 0 class Room : public VisualInstance { diff --git a/scene/3d/voxel_light_baker.cpp b/scene/3d/voxel_light_baker.cpp index 98dc1590d8..39ff6fa35e 100644 --- a/scene/3d/voxel_light_baker.cpp +++ b/scene/3d/voxel_light_baker.cpp @@ -897,17 +897,7 @@ void VoxelLightBaker::plot_light_omni(const Vector3 &p_pos, const Color &p_color float dt = CLAMP((d + distance_adv) / local_radius, 0, 1); att *= powf(1.0 - dt, p_attenutation); } -#if 0 - if (light_cache.type == VS::LIGHT_SPOT) { - - float angle = Math::rad2deg(acos(light_axis.dot(spot_axis))); - if (angle > light_cache.spot_angle) - continue; - float d = CLAMP(angle / light_cache.spot_angle, 1, 0); - att *= powf(1.0 - d, light_cache.spot_attenuation); - } -#endif clip_planes = 0; for (int c = 0; c < 3; c++) { @@ -1041,17 +1031,7 @@ void VoxelLightBaker::plot_light_spot(const Vector3 &p_pos, const Vector3 &p_axi float dt = CLAMP((d + distance_adv) / local_radius, 0, 1); att *= powf(1.0 - dt, p_attenutation); } -#if 0 - if (light_cache.type == VS::LIGHT_SPOT) { - - float angle = Math::rad2deg(acos(light_axis.dot(spot_axis))); - if (angle > light_cache.spot_angle) - continue; - float d = CLAMP(angle / light_cache.spot_angle, 1, 0); - att *= powf(1.0 - d, light_cache.spot_attenuation); - } -#endif clip_planes = 0; for (int c = 0; c < 3; c++) { @@ -1614,6 +1594,18 @@ Vector3 VoxelLightBaker::_compute_pixel_light_at_pos(const Vector3 &p_pos, const return accum; } +uint32_t xorshiftstate[] = { 123 }; // anything non-zero will do here + +_ALWAYS_INLINE_ uint32_t xorshift32() { + /* Algorithm "xor" from p. 4 of Marsaglia, "Xorshift RNGs" */ + uint32_t x = xorshiftstate[0]; + x ^= x << 13; + x ^= x >> 17; + x ^= x << 5; + xorshiftstate[0] = x; + return x; +} + Vector3 VoxelLightBaker::_compute_ray_trace_at_pos(const Vector3 &p_pos, const Vector3 &p_normal) { int samples_per_quality[3] = { 48, 128, 512 }; @@ -1638,9 +1630,9 @@ Vector3 VoxelLightBaker::_compute_ray_trace_at_pos(const Vector3 &p_pos, const V for (int i = 0; i < samples; i++) { - float random_angle1 = (((Math::rand() % 65535) / 65535.0) * 2.0 - 1.0) * spread; + float random_angle1 = (((xorshift32() % 65535) / 65535.0) * 2.0 - 1.0) * spread; Vector3 axis(0, sin(random_angle1), cos(random_angle1)); - float random_angle2 = ((Math::rand() % 65535) / 65535.0) * Math_PI * 2.0; + float random_angle2 = ((xorshift32() % 65535) / 65535.0) * Math_PI * 2.0; Basis rot(Vector3(0, 0, 1), random_angle2); axis = rot.xform(axis); @@ -1692,7 +1684,7 @@ Vector3 VoxelLightBaker::_compute_ray_trace_at_pos(const Vector3 &p_pos, const V } cell = bc->childs[child]; - if (cell == CHILD_EMPTY) + if (unlikely(cell == CHILD_EMPTY)) break; half >>= 1; @@ -1701,12 +1693,12 @@ Vector3 VoxelLightBaker::_compute_ray_trace_at_pos(const Vector3 &p_pos, const V pos += advance; } - if (cell != CHILD_EMPTY) { + if (unlikely(cell != CHILD_EMPTY)) { for (int i = 0; i < 6; i++) { //anisotropic read light float amount = direction.dot(aniso_normal[i]); - if (amount < 0) - amount = 0; + if (amount <= 0) + continue; accum.x += light[cell].accum[i][0] * amount; accum.y += light[cell].accum[i][1] * amount; accum.z += light[cell].accum[i][2] * amount; @@ -1781,7 +1773,7 @@ Error VoxelLightBaker::make_lightmap(const Transform &p_xform, Ref<Mesh> &p_mesh //print_line("bake line " + itos(i) + " / " + itos(height)); #ifdef _OPENMP -#pragma omp parallel for +#pragma omp parallel for schedule(dynamic, 1) #endif for (int j = 0; j < width; j++) { @@ -1878,12 +1870,14 @@ Error VoxelLightBaker::make_lightmap(const Transform &p_xform, Ref<Mesh> &p_mesh LightMap *lightmap_ptr = lightmap.ptrw(); const Cell *cells = bake_cells.ptr(); const Light *light = bake_light.ptr(); - +#ifdef _OPENMP +#pragma omp parallel +#endif for (int i = 0; i < height; i++) { //print_line("bake line " + itos(i) + " / " + itos(height)); #ifdef _OPENMP -#pragma omp parallel for +#pragma omp parallel for schedule(dynamic, 1) #endif for (int j = 0; j < width; j++) { @@ -2002,6 +1996,7 @@ Error VoxelLightBaker::make_lightmap(const Transform &p_xform, Ref<Mesh> &p_mesh } } +// Enable for debugging #if 0 { PoolVector<uint8_t> img; diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 81d2b6731f..b34abf5a46 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -2835,7 +2835,7 @@ void Control::_bind_methods() { ADD_PROPERTYNZ(PropertyInfo(Variant::REAL, "rect_rotation", PROPERTY_HINT_RANGE, "-1080,1080,0.01"), "set_rotation_degrees", "get_rotation_degrees"); ADD_PROPERTYNO(PropertyInfo(Variant::VECTOR2, "rect_scale"), "set_scale", "get_scale"); ADD_PROPERTYNO(PropertyInfo(Variant::VECTOR2, "rect_pivot_offset"), "set_pivot_offset", "get_pivot_offset"); - ADD_PROPERTYNO(PropertyInfo(Variant::BOOL, "rect_clip_content"), "set_clip_contents", "is_clipping_contents"); + ADD_PROPERTYNZ(PropertyInfo(Variant::BOOL, "rect_clip_content"), "set_clip_contents", "is_clipping_contents"); ADD_GROUP("Hint", "hint_"); ADD_PROPERTYNZ(PropertyInfo(Variant::STRING, "hint_tooltip", PROPERTY_HINT_MULTILINE_TEXT), "set_tooltip", "_get_tooltip"); diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 85ae6d6241..cebbb2193d 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -85,7 +85,7 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) { if ((cursor_pos < selection.begin) || (cursor_pos > selection.end) || !selection.enabled) { - selection_clear(); + deselect(); selection.cursor_start = cursor_pos; selection.creating = true; } else if (selection.enabled) { @@ -99,7 +99,7 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) { } else { if ((!selection.creating) && (!selection.doubleclick)) { - selection_clear(); + deselect(); } selection.creating = false; selection.doubleclick = false; @@ -175,7 +175,7 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) { if (editable) { - selection_clear(); + deselect(); text = text.substr(cursor_pos, text.length() - cursor_pos); Ref<Font> font = get_font("font"); @@ -204,7 +204,7 @@ void LineEdit::_gui_input(Ref<InputEvent> p_event) { if (editable) { - selection_clear(); + deselect(); text = text.substr(0, cursor_pos); _text_changed(); } @@ -827,7 +827,7 @@ void LineEdit::shift_selection_check_pre(bool p_shift) { selection.cursor_start = cursor_pos; } if (!p_shift) - selection_clear(); + deselect(); } void LineEdit::shift_selection_check_post(bool p_shift) { @@ -880,13 +880,6 @@ void LineEdit::set_cursor_at_pixel_pos(int p_x) { } set_cursor_position(ofs); - - /* - int new_cursor_pos=p_x; - int charwidth=draw_area->get_font_char_width(' ',0); - new_cursor_pos=( ( (new_cursor_pos-2)+ (charwidth/2) ) /charwidth ); - if (new_cursor_pos>(int)text.length()) new_cursor_pos=text.length(); - set_cursor_position(window_pos+new_cursor_pos); */ } bool LineEdit::cursor_get_blink_enabled() const { @@ -941,11 +934,6 @@ void LineEdit::delete_char() { set_cursor_position(get_cursor_position() - 1); - if (cursor_pos == window_pos) { - - //set_window_pos(cursor_pos-get_window_length()); - } - _text_changed(); } @@ -1143,7 +1131,7 @@ Size2 LineEdit::get_minimum_size() const { /* selection */ -void LineEdit::selection_clear() { +void LineEdit::deselect() { selection.begin = 0; selection.end = 0; @@ -1159,7 +1147,7 @@ void LineEdit::selection_delete() { if (selection.enabled) delete_text(selection.begin, selection.end); - selection_clear(); + deselect(); } void LineEdit::set_max_length(int p_max_length) { @@ -1224,7 +1212,7 @@ bool LineEdit::is_secret() const { void LineEdit::select(int p_from, int p_to) { if (p_from == 0 && p_to == 0) { - selection_clear(); + deselect(); return; } @@ -1383,7 +1371,9 @@ void LineEdit::_bind_methods() { ClassDB::bind_method(D_METHOD("_gui_input"), &LineEdit::_gui_input); ClassDB::bind_method(D_METHOD("clear"), &LineEdit::clear); + ClassDB::bind_method(D_METHOD("select", "from", "to"), &LineEdit::select, DEFVAL(0), DEFVAL(-1)); ClassDB::bind_method(D_METHOD("select_all"), &LineEdit::select_all); + ClassDB::bind_method(D_METHOD("deselect"), &LineEdit::deselect); ClassDB::bind_method(D_METHOD("set_text", "text"), &LineEdit::set_text); ClassDB::bind_method(D_METHOD("get_text"), &LineEdit::get_text); ClassDB::bind_method(D_METHOD("set_placeholder", "text"), &LineEdit::set_placeholder); @@ -1405,7 +1395,6 @@ void LineEdit::_bind_methods() { ClassDB::bind_method(D_METHOD("is_editable"), &LineEdit::is_editable); ClassDB::bind_method(D_METHOD("set_secret", "enabled"), &LineEdit::set_secret); ClassDB::bind_method(D_METHOD("is_secret"), &LineEdit::is_secret); - ClassDB::bind_method(D_METHOD("select", "from", "to"), &LineEdit::select, DEFVAL(0), DEFVAL(-1)); ClassDB::bind_method(D_METHOD("menu_option", "option"), &LineEdit::menu_option); ClassDB::bind_method(D_METHOD("get_menu"), &LineEdit::get_menu); ClassDB::bind_method(D_METHOD("set_context_menu_enabled", "enable"), &LineEdit::set_context_menu_enabled); @@ -1457,7 +1446,7 @@ LineEdit::LineEdit() { pass = false; placeholder_alpha = 0.6; - selection_clear(); + deselect(); set_focus_mode(FOCUS_ALL); editable = true; set_default_cursor_shape(CURSOR_IBEAM); diff --git a/scene/gui/line_edit.h b/scene/gui/line_edit.h index c3a299c2f5..5ca4ca15df 100644 --- a/scene/gui/line_edit.h +++ b/scene/gui/line_edit.h @@ -119,7 +119,6 @@ private: void shift_selection_check_pre(bool); void shift_selection_check_post(bool); - void selection_clear(); void selection_fill_at_cursor(); void selection_delete(); void set_window_pos(int p_pos); @@ -155,7 +154,9 @@ public: bool is_context_menu_enabled(); PopupMenu *get_menu() const; + void select(int p_from = 0, int p_to = -1); void select_all(); + void deselect(); void delete_char(); void delete_text(int p_from_column, int p_to_column); @@ -190,8 +191,6 @@ public: void set_secret(bool p_secret); bool is_secret() const; - void select(int p_from = 0, int p_to = -1); - virtual Size2 get_minimum_size() const; void set_expand_to_text_length(bool p_enabled); diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index 72ddea72a1..d598104cf5 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -215,11 +215,6 @@ void PopupMenu::_gui_input(const Ref<InputEvent> &p_event) { mouse_over = i; update(); - - if (items[i].submenu != "" && submenu_over != i) { - submenu_over = i; - submenu_timer->start(); - } break; } } @@ -239,20 +234,40 @@ void PopupMenu::_gui_input(const Ref<InputEvent> &p_event) { mouse_over = i; update(); - - if (items[i].submenu != "" && submenu_over != i) { - submenu_over = i; - submenu_timer->start(); - } break; } } } break; + + case KEY_LEFT: { + + Node *n = get_parent(); + if (!n) + break; + + PopupMenu *pm = Object::cast_to<PopupMenu>(n); + if (!pm) + break; + + hide(); + } break; + + case KEY_RIGHT: { + + if (mouse_over >= 0 && mouse_over < items.size() && !items[mouse_over].separator && items[mouse_over].submenu != "" && submenu_over != mouse_over) + _activate_submenu(mouse_over); + } break; + case KEY_ENTER: case KEY_KP_ENTER: { if (mouse_over >= 0 && mouse_over < items.size() && !items[mouse_over].separator) { + if (items[mouse_over].submenu != "" && submenu_over != mouse_over) { + _activate_submenu(mouse_over); + break; + } + activate_item(mouse_over); } } break; diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 2ce709732c..07f1bdf8e5 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -4084,7 +4084,7 @@ void TextEdit::cut() { backspace_at_cursor(); update(); cursor_set_line(cursor.line + 1); - cut_copy_line = true; + cut_copy_line = clipboard; } else { @@ -4098,7 +4098,7 @@ void TextEdit::cut() { selection.active = false; selection.selecting_mode = Selection::MODE_NONE; update(); - cut_copy_line = false; + cut_copy_line = ""; } } @@ -4107,11 +4107,11 @@ void TextEdit::copy() { if (!selection.active) { String clipboard = _base_get_text(cursor.line, 0, cursor.line, text[cursor.line].length()); OS::get_singleton()->set_clipboard(clipboard); - cut_copy_line = true; + cut_copy_line = clipboard; } else { String clipboard = _base_get_text(selection.from_line, selection.from_column, selection.to_line, selection.to_column); OS::get_singleton()->set_clipboard(clipboard); - cut_copy_line = false; + cut_copy_line = ""; } } @@ -4127,7 +4127,7 @@ void TextEdit::paste() { cursor_set_line(selection.from_line); cursor_set_column(selection.from_column); - } else if (cut_copy_line) { + } else if (!cut_copy_line.empty() && cut_copy_line == clipboard) { cursor_set_column(0); String ins = "\n"; @@ -5468,8 +5468,10 @@ void TextEdit::_bind_methods() { ClassDB::bind_method(D_METHOD("cut"), &TextEdit::cut); ClassDB::bind_method(D_METHOD("copy"), &TextEdit::copy); ClassDB::bind_method(D_METHOD("paste"), &TextEdit::paste); - ClassDB::bind_method(D_METHOD("select_all"), &TextEdit::select_all); + ClassDB::bind_method(D_METHOD("select", "from_line", "from_column", "to_line", "to_column"), &TextEdit::select); + ClassDB::bind_method(D_METHOD("select_all"), &TextEdit::select_all); + ClassDB::bind_method(D_METHOD("deselect"), &TextEdit::deselect); ClassDB::bind_method(D_METHOD("is_selection_active"), &TextEdit::is_selection_active); ClassDB::bind_method(D_METHOD("get_selection_from_line"), &TextEdit::get_selection_from_line); @@ -5681,4 +5683,4 @@ TextEdit::TextEdit() { } TextEdit::~TextEdit() { -}
\ No newline at end of file +} diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h index edef28cc25..836d5c7388 100644 --- a/scene/gui/text_edit.h +++ b/scene/gui/text_edit.h @@ -270,7 +270,7 @@ class TextEdit : public Control { bool brace_matching_enabled; bool highlight_current_line; bool auto_indent; - bool cut_copy_line; + String cut_copy_line; bool insert_mode; bool select_identifiers_enabled; diff --git a/scene/main/node.cpp b/scene/main/node.cpp index efc5d269a6..af7a6bddd9 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -2110,6 +2110,7 @@ Node *Node::_duplicate(int p_flags, Map<const Node *, Node *> *r_duplimap) const StringName script_property_name = CoreStringNames::get_singleton()->_script; + List<const Node *> hidden_roots; List<const Node *> node_tree; node_tree.push_front(this); @@ -2120,11 +2121,16 @@ Node *Node::_duplicate(int p_flags, Map<const Node *, Node *> *r_duplimap) const for (List<const Node *>::Element *N = node_tree.front(); N; N = N->next()) { for (int i = 0; i < N->get()->get_child_count(); ++i) { + Node *descendant = N->get()->get_child(i); // Skip nodes not really belonging to the instanced hierarchy; they'll be processed normally later - if (N->get()->get_child(i)->data.owner != this) + // but remember non-instanced nodes that are hidden below instanced ones + if (descendant->data.owner != this) { + if (descendant->get_parent() && descendant->get_parent() != this && descendant->get_parent()->data.owner == this) + hidden_roots.push_back(descendant); continue; + } - node_tree.push_back(N->get()->get_child(i)); + node_tree.push_back(descendant); } } } @@ -2201,6 +2207,34 @@ Node *Node::_duplicate(int p_flags, Map<const Node *, Node *> *r_duplimap) const } node->add_child(dup); + if (i < node->get_child_count() - 1) { + node->move_child(dup, i); + } + } + + for (List<const Node *>::Element *E = hidden_roots.front(); E; E = E->next()) { + + Node *parent = node->get_node(get_path_to(E->get()->data.parent)); + if (!parent) { + + memdelete(node); + return NULL; + } + + Node *dup = E->get()->_duplicate(p_flags, r_duplimap); + if (!dup) { + + memdelete(node); + return NULL; + } + + parent->add_child(dup); + int pos = E->get()->get_position_in_parent(); + + if (pos < parent->get_child_count() - 1) { + + parent->move_child(dup, pos); + } } return node; diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 1666aa5415..f5d7043a40 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1811,8 +1811,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { _gui_call_input(gui.mouse_focus, mb); } - if (mb->get_button_mask() == 0) { - // Last mouse button was released + if (mb->get_button_index() == gui.mouse_focus_button) { gui.mouse_focus = NULL; gui.mouse_focus_button = -1; } diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp index bb33962be6..bf5f7bf039 100644 --- a/scene/resources/mesh.cpp +++ b/scene/resources/mesh.cpp @@ -1111,13 +1111,14 @@ Error ArrayMesh::lightmap_unwrap(const Transform &p_base_transform, float p_texe for (int j = 0; j < vc; j++) { Vector3 v = p_base_transform.xform(r[j]); + Vector3 n = p_base_transform.basis.xform(rn[j]).normalized(); vertices[(j + vertex_ofs) * 3 + 0] = v.x; vertices[(j + vertex_ofs) * 3 + 1] = v.y; vertices[(j + vertex_ofs) * 3 + 2] = v.z; - normals[(j + vertex_ofs) * 3 + 0] = rn[j].x; - normals[(j + vertex_ofs) * 3 + 1] = rn[j].y; - normals[(j + vertex_ofs) * 3 + 2] = rn[j].z; + normals[(j + vertex_ofs) * 3 + 0] = n.x; + normals[(j + vertex_ofs) * 3 + 1] = n.y; + normals[(j + vertex_ofs) * 3 + 2] = n.z; uv_index[j + vertex_ofs] = Pair<int, int>(i, j); } diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index 3a5cb7da2e..879f76e6d8 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -270,6 +270,8 @@ Node *SceneState::instance(GenEditState p_edit_state) const { if (i > 0) { if (parent) { parent->_add_child_nocheck(node, snames[n.name]); + if (n.index >= 0 && n.index < parent->get_child_count() - 1) + parent->move_child(node, n.index); } else { //it may be possible that an instanced scene has changed //and the node has nowhere to go anymore @@ -386,6 +388,7 @@ Error SceneState::_parse_node(Node *p_owner, Node *p_node, int p_parent_idx, Map nd.name = _nm_get_string(p_node->get_name(), name_map); nd.instance = -1; //not instanced by default + nd.index = p_node->get_index(); // if this node is part of an instanced scene or sub-instanced scene // we need to get the corresponding instance states. @@ -1114,7 +1117,10 @@ void SceneState::set_bundled_scene(const Dictionary &p_dictionary) { nd.parent = r[idx++]; nd.owner = r[idx++]; nd.type = r[idx++]; - nd.name = r[idx++]; + uint32_t name_index = r[idx++]; + nd.name = name_index & ((1 << NAME_INDEX_BITS) - 1); + nd.index = (name_index >> NAME_INDEX_BITS); + nd.index--; //0 is invaild, stored as 1 nd.instance = r[idx++]; nd.properties.resize(r[idx++]); for (int j = 0; j < nd.properties.size(); j++) { @@ -1206,7 +1212,11 @@ Dictionary SceneState::get_bundled_scene() const { rnodes.push_back(nd.parent); rnodes.push_back(nd.owner); rnodes.push_back(nd.type); - rnodes.push_back(nd.name); + uint32_t name_index = nd.name; + if (nd.index < (1 << (32 - NAME_INDEX_BITS)) - 1) { //save if less than 16k childs + name_index |= uint32_t(nd.index + 1) << NAME_INDEX_BITS; //for backwards compatibility, index 0 is no index + } + rnodes.push_back(name_index); rnodes.push_back(nd.instance); rnodes.push_back(nd.properties.size()); for (int j = 0; j < nd.properties.size(); j++) { @@ -1284,6 +1294,11 @@ StringName SceneState::get_node_name(int p_idx) const { return names[nodes[p_idx].name]; } +int SceneState::get_node_index(int p_idx) const { + ERR_FAIL_INDEX_V(p_idx, nodes.size(), -1); + return nodes[p_idx].index; +} + bool SceneState::is_node_instance_placeholder(int p_idx) const { ERR_FAIL_INDEX_V(p_idx, nodes.size(), false); @@ -1524,7 +1539,7 @@ int SceneState::add_node_path(const NodePath &p_path) { node_paths.push_back(p_path); return (node_paths.size() - 1) | FLAG_ID_IS_PATH; } -int SceneState::add_node(int p_parent, int p_owner, int p_type, int p_name, int p_instance) { +int SceneState::add_node(int p_parent, int p_owner, int p_type, int p_name, int p_instance, int p_index) { NodeData nd; nd.parent = p_parent; @@ -1532,6 +1547,7 @@ int SceneState::add_node(int p_parent, int p_owner, int p_type, int p_name, int nd.type = p_type; nd.name = p_name; nd.instance = p_instance; + nd.index = p_index; nodes.push_back(nd); @@ -1605,6 +1621,7 @@ void SceneState::_bind_methods() { ClassDB::bind_method(D_METHOD("get_node_instance_placeholder", "idx"), &SceneState::get_node_instance_placeholder); ClassDB::bind_method(D_METHOD("get_node_instance", "idx"), &SceneState::get_node_instance); ClassDB::bind_method(D_METHOD("get_node_groups", "idx"), &SceneState::_get_node_groups); + ClassDB::bind_method(D_METHOD("get_node_index", "idx"), &SceneState::get_node_index); ClassDB::bind_method(D_METHOD("get_node_property_count", "idx"), &SceneState::get_node_property_count); ClassDB::bind_method(D_METHOD("get_node_property_name", "idx", "prop_idx"), &SceneState::get_node_property_name); ClassDB::bind_method(D_METHOD("get_node_property_value", "idx", "prop_idx"), &SceneState::get_node_property_value); diff --git a/scene/resources/packed_scene.h b/scene/resources/packed_scene.h index 20bfb19b1f..70deea24ff 100644 --- a/scene/resources/packed_scene.h +++ b/scene/resources/packed_scene.h @@ -48,6 +48,8 @@ class SceneState : public Reference { enum { NO_PARENT_SAVED = 0x7FFFFFFF, + NAME_INDEX_BITS = 18, + NAME_MASK = (1 << NAME_INDEX_BITS) - 1, }; struct NodeData { @@ -57,6 +59,7 @@ class SceneState : public Reference { int type; int name; int instance; + int index; struct Property { @@ -151,6 +154,7 @@ public: String get_node_instance_placeholder(int p_idx) const; bool is_node_instance_placeholder(int p_idx) const; Vector<StringName> get_node_groups(int p_idx) const; + int get_node_index(int p_idx) const; int get_node_property_count(int p_idx) const; StringName get_node_property_name(int p_idx, int p_prop) const; @@ -174,7 +178,7 @@ public: int find_name(const StringName &p_name) const; int add_value(const Variant &p_value); int add_node_path(const NodePath &p_path); - int add_node(int p_parent, int p_owner, int p_type, int p_name, int p_instance); + int add_node(int p_parent, int p_owner, int p_type, int p_name, int p_instance, int p_index); void add_node_property(int p_node, int p_name, int p_value); void add_node_group(int p_node, int p_group); void set_base_scene(int p_idx); diff --git a/scene/resources/room.h b/scene/resources/room.h index aadee858c2..0e021cfcf7 100644 --- a/scene/resources/room.h +++ b/scene/resources/room.h @@ -36,7 +36,7 @@ @author Juan Linietsky <reduzio@gmail.com> */ -//left for reference but will be removed when portals are reimplemented using Area +// FIXME: left for reference but will be removed when portals are reimplemented using Area #if 0 class RoomBounds : public Resource { diff --git a/scene/resources/scene_format_text.cpp b/scene/resources/scene_format_text.cpp index aebbb5b562..7bf5f24269 100644 --- a/scene/resources/scene_format_text.cpp +++ b/scene/resources/scene_format_text.cpp @@ -198,6 +198,7 @@ Ref<PackedScene> ResourceInteractiveLoaderText::_parse_node_tag(VariantParser::R int type = -1; int name = -1; int instance = -1; + int index = -1; //int base_scene=-1; if (next_tag.fields.has("name")) { @@ -249,7 +250,11 @@ Ref<PackedScene> ResourceInteractiveLoaderText::_parse_node_tag(VariantParser::R owner = 0; //if no owner, owner is root } - int node_id = packed_scene->get_state()->add_node(parent, owner, type, name, instance); + if (next_tag.fields.has("index")) { + index = next_tag.fields["index"]; + } + + int node_id = packed_scene->get_state()->add_node(parent, owner, type, name, instance, index); if (next_tag.fields.has("groups")) { @@ -1609,6 +1614,7 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r StringName type = state->get_node_type(i); StringName name = state->get_node_name(i); + int index = state->get_node_index(i); NodePath path = state->get_node_path(i, true); NodePath owner = state->get_node_owner_path(i); Ref<PackedScene> instance = state->get_node_instance(i); @@ -1626,6 +1632,9 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r if (owner != NodePath() && owner != NodePath(".")) { header += " owner=\"" + String(owner.simplified()) + "\""; } + if (index >= 0) { + header += " index=\"" + itos(index) + "\""; + } if (groups.size()) { String sgroups = " groups=[\n"; diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index c69bbb9343..834505df9a 100644 --- a/servers/visual/shader_language.cpp +++ b/servers/visual/shader_language.cpp @@ -1897,62 +1897,6 @@ bool ShaderLanguage::_validate_function_call(BlockNode *p_block, OperatorNode *p return false; } -#if 0 - if (found_builtin) { - - if (p_func->op==OP_CONSTRUCT && all_const) { - - - Vector<float> cdata; - for(int i=0;i<argcount;i++) { - - Variant v = static_cast<ConstantNode*>(p_func->arguments[i+1])->value; - switch(v.get_type()) { - - case Variant::REAL: cdata.push_back(v); break; - case Variant::INT: cdata.push_back(v); break; - case Variant::VECTOR2: { Vector2 v2=v; cdata.push_back(v2.x); cdata.push_back(v2.y); } break; - case Variant::VECTOR3: { Vector3 v3=v; cdata.push_back(v3.x); cdata.push_back(v3.y); cdata.push_back(v3.z);} break; - case Variant::PLANE: { Plane v4=v; cdata.push_back(v4.normal.x); cdata.push_back(v4.normal.y); cdata.push_back(v4.normal.z); cdata.push_back(v4.d); } break; - default: ERR_FAIL_V(NULL); - - } - - } - - ConstantNode *cn = parser.create_node<ConstantNode>(p_func->parent); - Variant data; - switch(p_func->return_cache) { - case TYPE_FLOAT: data = cdata[0]; break; - case TYPE_VEC2: - if (cdata.size()==1) - data = Vector2(cdata[0],cdata[0]); - else - data = Vector2(cdata[0],cdata[1]); - - break; - case TYPE_VEC3: - if (cdata.size()==1) - data = Vector3(cdata[0],cdata[0],cdata[0]); - else - data = Vector3(cdata[0],cdata[1],cdata[2]); - break; - case TYPE_VEC4: - if (cdata.size()==1) - data = Plane(cdata[0],cdata[0],cdata[0],cdata[0]); - else - data = Plane(cdata[0],cdata[1],cdata[2],cdata[3]); - break; - } - - cn->datatype=p_func->return_cache; - cn->value=data; - return cn; - - } - return p_func; - } -#endif // try existing functions.. StringName exclude_function; @@ -3426,7 +3370,7 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const Map<StringName, Bui } BlockNode *block = alloc_node<BlockNode>(); - block->parent_block = p_block; + block->parent_block = init_block; cf->blocks.push_back(block); p_block->statements.push_back(cf); diff --git a/servers/visual/visual_server_canvas.cpp b/servers/visual/visual_server_canvas.cpp index 0fed9cc961..532546c5fa 100644 --- a/servers/visual/visual_server_canvas.cpp +++ b/servers/visual/visual_server_canvas.cpp @@ -499,7 +499,6 @@ void VisualServerCanvas::canvas_item_add_multiline(RID p_item, const Vector<Poin pline->antialiased = false; //todo pline->multiline = true; - // if (p_width <= 1) { pline->lines = p_points; pline->line_colors = p_colors; if (pline->line_colors.size() == 0) { @@ -507,66 +506,7 @@ void VisualServerCanvas::canvas_item_add_multiline(RID p_item, const Vector<Poin } else if (pline->line_colors.size() > 1 && pline->line_colors.size() != pline->lines.size()) { pline->line_colors.resize(1); } -#if 0 -//width not yet - } else { - //make a trianglestrip for drawing the line... - Vector2 prev_t; - pline->triangles.resize(p_points.size() * 2); - if (p_antialiased) { - pline->lines.resize(p_points.size() * 2); - } - if (p_colors.size() == 0) { - pline->triangle_colors.push_back(Color(1, 1, 1, 1)); - if (p_antialiased) { - pline->line_colors.push_back(Color(1, 1, 1, 1)); - } - } - if (p_colors.size() == 1) { - pline->triangle_colors = p_colors; - pline->line_colors = p_colors; - } else { - pline->triangle_colors.resize(pline->triangles.size()); - pline->line_colors.resize(pline->lines.size()); - } - - for (int i = 0; i < p_points.size(); i++) { - - Vector2 t; - if (i == p_points.size() - 1) { - t = prev_t; - } else { - t = (p_points[i + 1] - p_points[i]).normalized().tangent(); - if (i == 0) { - prev_t = t; - } - } - - Vector2 tangent = ((t + prev_t).normalized()) * p_width * 0.5; - - if (p_antialiased) { - pline->lines[i] = p_points[i] + tangent; - pline->lines[p_points.size() * 2 - i - 1] = p_points[i] - tangent; - if (pline->line_colors.size() > 1) { - pline->line_colors[i] = p_colors[i]; - pline->line_colors[p_points.size() * 2 - i - 1] = p_colors[i]; - } - } - - pline->triangles[i * 2 + 0] = p_points[i] + tangent; - pline->triangles[i * 2 + 1] = p_points[i] - tangent; - - if (pline->triangle_colors.size() > 1) { - - pline->triangle_colors[i * 2 + 0] = p_colors[i]; - pline->triangle_colors[i * 2 + 1] = p_colors[i]; - } - - prev_t = t; - } - } -#endif canvas_item->rect_dirty = true; canvas_item->commands.push_back(pline); } diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp index 6b527b5cd1..7bb7d04fcd 100644 --- a/servers/visual/visual_server_raster.cpp +++ b/servers/visual/visual_server_raster.cpp @@ -181,6 +181,10 @@ void VisualServerRaster::set_debug_generate_wireframes(bool p_generate) { VSG::storage->set_debug_generate_wireframes(p_generate); } +void VisualServerRaster::call_set_use_vsync(bool p_enable) { + OS::get_singleton()->_set_use_vsync(p_enable); +} + VisualServerRaster::VisualServerRaster() { VSG::canvas = memnew(VisualServerCanvas); diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h index a0e79e9d3e..716c1754e1 100644 --- a/servers/visual/visual_server_raster.h +++ b/servers/visual/visual_server_raster.h @@ -668,6 +668,8 @@ public: virtual bool has_os_feature(const String &p_feature) const; virtual void set_debug_generate_wireframes(bool p_generate); + virtual void call_set_use_vsync(bool p_enable); + VisualServerRaster(); ~VisualServerRaster(); diff --git a/servers/visual/visual_server_scene.h b/servers/visual/visual_server_scene.h index 4b0c4af09d..689e06de93 100644 --- a/servers/visual/visual_server_scene.h +++ b/servers/visual/visual_server_scene.h @@ -69,34 +69,6 @@ public: Portal() { enabled=true; disable_distance=50; disable_color=Color(); connect_range=0.8; } }; - - struct BakedLight { - - Rasterizer::BakedLightData data; - PoolVector<int> sampler; - AABB octree_aabb; - Size2i octree_tex_size; - Size2i light_tex_size; - - }; - - struct BakedLightSampler { - - float params[BAKED_LIGHT_SAMPLER_MAX]; - int resolution; - Vector<Vector3> dp_cache; - - BakedLightSampler() { - params[BAKED_LIGHT_SAMPLER_STRENGTH]=1.0; - params[BAKED_LIGHT_SAMPLER_ATTENUATION]=1.0; - params[BAKED_LIGHT_SAMPLER_RADIUS]=1.0; - params[BAKED_LIGHT_SAMPLER_DETAIL_RATIO]=0.1; - resolution=16; - } - }; - - void _update_baked_light_sampler_dp_cache(BakedLightSampler * blsamp); - #endif /* CAMERA API */ diff --git a/servers/visual/visual_server_wrap_mt.cpp b/servers/visual/visual_server_wrap_mt.cpp index b86a0ae3f6..e55b7a9309 100644 --- a/servers/visual/visual_server_wrap_mt.cpp +++ b/servers/visual/visual_server_wrap_mt.cpp @@ -158,9 +158,19 @@ void VisualServerWrapMT::finish() { canvas_occluder_polygon_free_cached_ids(); } +void VisualServerWrapMT::set_use_vsync_callback(bool p_enable) { + + singleton_mt->call_set_use_vsync(p_enable); +} + +VisualServerWrapMT *VisualServerWrapMT::singleton_mt = NULL; + VisualServerWrapMT::VisualServerWrapMT(VisualServer *p_contained, bool p_create_thread) : command_queue(p_create_thread) { + singleton_mt = this; + OS::switch_vsync_function = set_use_vsync_callback; //as this goes to another thread, make sure it goes properly + visual_server = p_contained; create_thread = p_create_thread; thread = NULL; diff --git a/servers/visual/visual_server_wrap_mt.h b/servers/visual/visual_server_wrap_mt.h index cb6f67474e..0f24521f5d 100644 --- a/servers/visual/visual_server_wrap_mt.h +++ b/servers/visual/visual_server_wrap_mt.h @@ -64,6 +64,8 @@ class VisualServerWrapMT : public VisualServer { //#define DEBUG_SYNC + static VisualServerWrapMT *singleton_mt; + #ifdef DEBUG_SYNC #define SYNC_DEBUG print_line("sync on: " + String(__FUNCTION__)); #else @@ -584,6 +586,10 @@ public: virtual bool has_feature(Features p_feature) const { return visual_server->has_feature(p_feature); } virtual bool has_os_feature(const String &p_feature) const { return visual_server->has_os_feature(p_feature); } + FUNC1(call_set_use_vsync, bool) + + static void set_use_vsync_callback(bool p_enable); + VisualServerWrapMT(VisualServer *p_contained, bool p_create_thread); ~VisualServerWrapMT(); diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp index 153cff2f22..42ecb82a46 100644 --- a/servers/visual_server.cpp +++ b/servers/visual_server.cpp @@ -1820,6 +1820,7 @@ void VisualServer::_bind_methods() { BIND_ENUM_CONSTANT(INSTANCE_LIGHT); BIND_ENUM_CONSTANT(INSTANCE_REFLECTION_PROBE); BIND_ENUM_CONSTANT(INSTANCE_GI_PROBE); + BIND_ENUM_CONSTANT(INSTANCE_LIGHTMAP_CAPTURE); BIND_ENUM_CONSTANT(INSTANCE_MAX); BIND_ENUM_CONSTANT(INSTANCE_GEOMETRY_MASK); @@ -1921,6 +1922,7 @@ VisualServer::VisualServer() { //ERR_FAIL_COND(singleton); singleton = this; + GLOBAL_DEF("rendering/vram_compression/import_s3tc", true); GLOBAL_DEF("rendering/vram_compression/import_etc", false); GLOBAL_DEF("rendering/vram_compression/import_etc2", true); diff --git a/servers/visual_server.h b/servers/visual_server.h index ad4d32b967..23354c3d37 100644 --- a/servers/visual_server.h +++ b/servers/visual_server.h @@ -751,7 +751,6 @@ public: INSTANCE_GI_PROBE, INSTANCE_LIGHTMAP_CAPTURE, INSTANCE_MAX, - /*INSTANCE_BAKED_LIGHT_SAMPLER,*/ INSTANCE_GEOMETRY_MASK = (1 << INSTANCE_MESH) | (1 << INSTANCE_MULTIMESH) | (1 << INSTANCE_IMMEDIATE) | (1 << INSTANCE_PARTICLES) }; @@ -981,6 +980,8 @@ public: virtual void set_debug_generate_wireframes(bool p_generate) = 0; + virtual void call_set_use_vsync(bool p_enable) = 0; + VisualServer(); virtual ~VisualServer(); }; |