diff options
61 files changed, 193 insertions, 114 deletions
diff --git a/core/io/resource_importer.h b/core/io/resource_importer.h index 0089544caa..e17644058a 100644 --- a/core/io/resource_importer.h +++ b/core/io/resource_importer.h @@ -136,6 +136,7 @@ public: virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const = 0; virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const = 0; + virtual void handle_compatibility_options(HashMap<StringName, Variant> &p_import_params) const {} virtual String get_option_group_file() const { return String(); } virtual Error import(const String &p_source_file, const String &p_save_path, const HashMap<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) = 0; diff --git a/doc/classes/AnimationLibrary.xml b/doc/classes/AnimationLibrary.xml index d457a858ab..7f87ea4616 100644 --- a/doc/classes/AnimationLibrary.xml +++ b/doc/classes/AnimationLibrary.xml @@ -54,10 +54,6 @@ </description> </method> </methods> - <members> - <member name="_data" type="Dictionary" setter="_set_data" getter="_get_data" default="{}"> - </member> - </members> <signals> <signal name="animation_added"> <param index="0" name="name" type="StringName" /> diff --git a/doc/classes/Material.xml b/doc/classes/Material.xml index 1118461445..87fa3fd676 100644 --- a/doc/classes/Material.xml +++ b/doc/classes/Material.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Material" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> - Abstract base class for applying visual properties to an object, such as color and roughness. + Virtual base class for applying visual properties to an object, such as color and roughness. </brief_description> <description> [Material] is a base resource used for coloring and shading geometry. All materials inherit from it and almost all [VisualInstance3D] derived nodes carry a [Material]. A few flags and parameters are shared between all material types and are configured here. + Importantly, you can inherit from [Material] to create your own custom material type in script or in GDExtension. </description> <tutorials> <link title="3D Material Testers Demo">https://godotengine.org/asset-library/asset/123</link> @@ -14,21 +15,25 @@ <method name="_can_do_next_pass" qualifiers="virtual const"> <return type="bool" /> <description> + Only exposed for the purpose of overriding. You cannot call this function directly. Used internally to determine if [member next_pass] should be shown in the editor or not. </description> </method> <method name="_can_use_render_priority" qualifiers="virtual const"> <return type="bool" /> <description> + Only exposed for the purpose of overriding. You cannot call this function directly. Used internally to determine if [member render_priority] should be shown in the editor or not. </description> </method> <method name="_get_shader_mode" qualifiers="virtual const"> <return type="int" enum="Shader.Mode" /> <description> + Only exposed for the purpose of overriding. You cannot call this function directly. Used internally by various editor tools. </description> </method> <method name="_get_shader_rid" qualifiers="virtual const"> <return type="RID" /> <description> + Only exposed for the purpose of overriding. You cannot call this function directly. Used internally by various editor tools. Used to access the RID of the [Material]'s [Shader]. </description> </method> <method name="create_placeholder" qualifiers="const"> @@ -40,18 +45,20 @@ <method name="inspect_native_shader_code"> <return type="void" /> <description> + Only available when running in the editor. Opens a popup that visualizes the generated shader code, including all variants and internal shader code. </description> </method> </methods> <members> <member name="next_pass" type="Material" setter="set_next_pass" getter="get_next_pass"> Sets the [Material] to be used for the next pass. This renders the object again using a different material. + [b]Note:[/b] [member next_pass] materials are not necessarily drawn immediately after the source [Material]. Draw order is determined by material properties, [member render_priority], and distance to camera. [b]Note:[/b] This only applies to [StandardMaterial3D]s and [ShaderMaterial]s with type "Spatial". </member> <member name="render_priority" type="int" setter="set_render_priority" getter="get_render_priority"> - Sets the render priority for transparent objects in 3D scenes. Higher priority objects will be sorted in front of lower priority objects. + Sets the render priority for objects in 3D scenes. Higher priority objects will be sorted in front of lower priority objects. In other words, all objects with [member render_priority] [code]1[/code] will render before all objects with [member render_priority] [code]0[/code]). [b]Note:[/b] This only applies to [StandardMaterial3D]s and [ShaderMaterial]s with type "Spatial". - [b]Note:[/b] This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority). + [b]Note:[/b] This will not impact how transparent objects are sorted relative to opaque objects or how dynamic meshes will be sorted relative to other opaque meshes. This is because all transparent objects are drawn after all opaque objects and all dynamic opaque meshes are drawn before other opaque meshes. </member> </members> <constants> diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index ecb05efa2d..f018d9581d 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -1042,9 +1042,6 @@ <constant name="NOTIFICATION_ENABLED" value="29"> Notification received when the node is enabled again after being disabled. See [constant PROCESS_MODE_DISABLED]. </constant> - <constant name="NOTIFICATION_NODE_RECACHE_REQUESTED" value="30"> - Notification received when other nodes in the tree may have been removed/replaced and node pointers may require re-caching. - </constant> <constant name="NOTIFICATION_EDITOR_PRE_SAVE" value="9001"> Notification received right before the scene with the node is saved in the editor. This notification is only sent in the Godot editor and will not occur in exported projects. </constant> diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index db54179633..b1d591d0f3 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -2012,6 +2012,11 @@ Error EditorFileSystem::_reimport_file(const String &p_file, const HashMap<Strin } } + if (FileAccess::exists(p_file + ".import")) { + // We only want to handle compat for existing files, not new ones. + importer->handle_compatibility_options(params); + } + //mix with default params, in case a parameter is missing List<ResourceImporter::ImportOption> opts; diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 227b52472f..0dd787f0ea 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -68,7 +68,10 @@ void EditorColorMap::create() { add_conversion_color_pair("#414042", "#414042"); // Godot Gray add_conversion_color_pair("#ffffff", "#414141"); // Pure white + add_conversion_color_pair("#fefefe", "#fefefe"); // Forced light color add_conversion_color_pair("#000000", "#bfbfbf"); // Pure black + add_conversion_color_pair("#010101", "#010101"); // Forced dark color + // Keep pure RGB colors as is, but list them for explicitness. add_conversion_color_pair("#ff0000", "#ff0000"); // Pure red add_conversion_color_pair("#00ff00", "#00ff00"); // Pure green @@ -76,7 +79,6 @@ void EditorColorMap::create() { // GUI Colors add_conversion_color_pair("#e0e0e0", "#5a5a5a"); // Common icon color - add_conversion_color_pair("#fefefe", "#fefefe"); // Forced light color add_conversion_color_pair("#808080", "#808080"); // GUI disabled color add_conversion_color_pair("#b3b3b3", "#363636"); // GUI disabled light color add_conversion_color_pair("#699ce8", "#699ce8"); // GUI highlight color @@ -84,7 +86,6 @@ void EditorColorMap::create() { add_conversion_color_pair("#c38ef1", "#a85de9"); // Animation add_conversion_color_pair("#8da5f3", "#3d64dd"); // 2D - add_conversion_color_pair("#4b70ea", "#1a3eac"); // 2D Dark add_conversion_color_pair("#7582a8", "#6d83c8"); // 2D Abstract add_conversion_color_pair("#fc7f7f", "#cd3838"); // 3D add_conversion_color_pair("#b56d6d", "#be6a6a"); // 3D Abstract diff --git a/editor/icons/CameraAttributes.svg b/editor/icons/CameraAttributes.svg index 5e82205d92..d67e3d5713 100644 --- a/editor/icons/CameraAttributes.svg +++ b/editor/icons/CameraAttributes.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M6 2a3 3 0 0 0-2 5.23V9L1 7v6l3-2v1a1 1 0 0 0 1 1h3a2 2 0 0 1 .73-1.24 1.83 1.83 0 0 1 1.828-3.143 1.8 1.8 0 0 1 3.313-.75 3 3 0 0 0-4.883-3.09A3 3 0 0 0 6 2z" fill="#808080"/><path d="M12.36 8.598a.533 3.2 0 0 0-.51 2.275 3.2.533 30 0 0-.515.887.533 3.2 60 0 0 .515.887.533 3.2 0 0 0 1.02 0 3.2.533 30 0 0 .515-.887.533 3.2 60 0 0-.515-.887.533 3.2 0 0 0-.51-2.275z" fill="#c38ef1"/></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M6 2a3 3 0 0 0-2 5.23V9L1 7v6l3-2v1a1 1 0 0 0 1 1h3a2 2 0 0 1 .73-1.24 1.83 1.83 0 0 1 1.828-3.143 1.8 1.8 0 0 1 3.313-.75 3 3 0 0 0-4.883-3.09A3 3 0 0 0 6 2zm6.36 6.598a.533 3.2 0 0 0-.51 2.275 3.2.533 30 0 0-.515.887.533 3.2 60 0 0 .515.887.533 3.2 0 0 0 1.02 0 3.2.533 30 0 0 .515-.887.533 3.2 60 0 0-.515-.887.533 3.2 0 0 0-.51-2.275z" fill="#808080"/></svg> diff --git a/editor/icons/DampedSpringJoint2D.svg b/editor/icons/DampedSpringJoint2D.svg index cba54bbd99..88a3b41cb4 100644 --- a/editor/icons/DampedSpringJoint2D.svg +++ b/editor/icons/DampedSpringJoint2D.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m4 3v2l8 3v-2zm0 5v2l8 3v-2z" fill="#4b70ea"/><path d="m4 3v2l8-2v-2zm0 5v2l8-2v-2zm0 5v2l8-2v-2z" fill="#8da5f3"/></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M12 1 4 3v2l4.8 1.8L4 8v2l4.8 1.8L4 13v2l8-2v-2L7.2 9.2 12 8V6L7.2 4.2 12 3V1" fill="#8da5f3"/><path d="m4 5 4.8 1.8L12 6 7.2 4.2M4 10l4.8 1.8L12 11 7.2 9.2" fill="#010101" fill-opacity=".235"/></svg> diff --git a/editor/icons/EditAddRemove.svg b/editor/icons/EditAddRemove.svg index 307557cbfc..b07ba1090e 100644 --- a/editor/icons/EditAddRemove.svg +++ b/editor/icons/EditAddRemove.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3.5105509 1c-.554 0-1 .446-1 1v2h4v-2c0-.554-.446-1-1-1zm5.4894491 12.5v1.5h6v-1.5zm-6.4894491-8.5v7l2 3 2-3v-7zm1 1h1v5h-1zm7.7394491 0v2.25h-2.25v1.5h2.25v2.25h1.5v-2.25h2.25v-1.5h-2.25v-2.25z" fill="#e0e0e0"/></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M3 1a1 1 0 0 0-1 1v2h4V2a1 1 0 0 0-1-1zM2 5v7l2 3 2-3V5zm1 1h1v5H3zm7.75-.25v2h-2v1.5h2v2h1.5v-2h2v-1.5h-2v-2zm-2 7v1.5h5.5v-1.5z" fill="#e0e0e0"/></svg> diff --git a/editor/icons/EditKey.svg b/editor/icons/EditKey.svg index 455c544e6a..a30ce8f67b 100644 --- a/editor/icons/EditKey.svg +++ b/editor/icons/EditKey.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m12 1c-.554 0-1 .446-1 1v2h4v-2c0-.554-.446-1-1-1zm-7 3c-.195 0-.38964.07519-.53906.22461l-3.2363 3.2363c-.29884.29884-.29884.77929 0 1.0781l3.2363 3.2363c.29884.29884.77929.29884 1.0781 0l3.2363-3.2363c.29884-.29884.29884-.77929 0-1.0781l-3.2363-3.2363c-.14942-.14942-.34406-.22461-.53906-.22461zm6 1v7l2 3 2-3v-7zm1 1h1v5h-1z" fill="#e0e0e0"/></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M12 1a1 1 0 0 0-1 1v2h4V2a1 1 0 0 0-1-1zM1.226 7.46a.76.76 0 0 0 0 1.078l3.236 3.236a.76.76 0 0 0 1.078 0L8.775 8.54a.76.76 0 0 0 0-1.078L5.54 4.225a.76.76 0 0 0-1.08 0zM11 5v7l2 3 2-3V5zm1 1h1v5h-1z" fill="#e0e0e0"/></svg> diff --git a/editor/icons/GizmoAudioListener3D.svg b/editor/icons/GizmoAudioListener3D.svg index e84124f66b..2f310cb446 100644 --- a/editor/icons/GizmoAudioListener3D.svg +++ b/editor/icons/GizmoAudioListener3D.svg @@ -1 +1 @@ -<svg height="128" viewBox="0 0 128 128" width="128" xmlns="http://www.w3.org/2000/svg"><path d="M48 4A44 44 0 0 0 4 48a4 4 0 0 0 4 4h16a4 4 0 0 0 4-4 20 20 0 0 1 40 0c0 13.174-3.206 16.05-7.68 19.78-2.06 1.716-4.628 3.22-7.596 5.364-1.446 1.044-3.33 2.468-5.098 4.7C45.662 80.282 44 83.782 44 87.958c0 4.78-.634 7.372-1.22 8.64-.588 1.266-.942 1.46-1.956 2.066-1.1.66-5.032 1.29-8.824 1.29l-.04.002H24a4 4 0 0 0-4 4v16a4 4 0 0 0 4 4h8.042c3.812 0 12.62.394 21.132-4.712 8.02-4.812 13.326-14.546 14.348-27.184 1.624-1.096 4.69-2.994 8.16-5.886C83.686 79.504 92 67.094 92 47.958a44 44 0 0 0-44-44zm63.614 8.004a4 4 0 0 0-2.188.534l-13.906 8.03A4 4 0 0 0 94.06 26a44 44 0 0 1 .016 43.936 4 4 0 0 0 1.462 5.47l13.89 8.014a4 4 0 0 0 5.464-1.466 68 68 0 0 0 0-68 4 4 0 0 0-3.278-2z" fill-opacity=".294"/><path d="M48 8A40 40 0 0 0 8 48h16a24 24 0 0 1 48 0c0 14-4.33 18.86-9.12 22.852-2.396 1.996-5.038 3.53-7.814 5.536-1.388 1-2.866 2.126-4.304 3.94-1.44 1.774-2.762 4.63-2.762 7.63 0 10.22-2.54 12.59-5.118 14.138-2.578 1.546-6.882 1.86-10.882 1.86h-8v16h8c4 0 11.696.31 19.116-4.14 7.06-4.238 12.2-13.28 12.696-26 .184-.166.148-.156.62-.498 1.724-1.244 5.084-3.21 8.688-6.214C80.33 77.096 88 65.958 88 47.958A40 40 0 0 0 48 8zm63.426 8L97.52 24a48 48 0 0 1 .016 47.942l13.89 8a64 64 0 0 0 0-64z" fill="#f7f5cf"/></svg> +<svg height="128" viewBox="0 0 128 128" width="128" xmlns="http://www.w3.org/2000/svg"><path d="M48 8A40 40 0 0 0 8 48h16a24 24 0 0 1 48 0c0 14-4.33 18.86-9.12 22.852-2.396 1.996-5.038 3.53-7.814 5.536-1.388 1-2.866 2.126-4.304 3.94-1.44 1.774-2.762 4.63-2.762 7.63 0 10.22-2.54 12.59-5.118 14.138-2.578 1.546-6.882 1.86-10.882 1.86h-8v16h8c4 0 11.696.31 19.116-4.14 7.06-4.238 12.2-13.28 12.696-26 .184-.166.148-.156.62-.498 1.724-1.244 5.084-3.21 8.688-6.214C80.33 77.096 88 65.958 88 47.958A40 40 0 0 0 48 8zm63.426 8L97.52 24a48 48 0 0 1 .016 47.942l13.89 8a64 64 0 0 0 0-64z" stroke="#000" stroke-opacity=".294" stroke-width="8" stroke-linejoin="round" fill="none"/><path d="M48 8A40 40 0 0 0 8 48h16a24 24 0 0 1 48 0c0 14-4.33 18.86-9.12 22.852-2.396 1.996-5.038 3.53-7.814 5.536-1.388 1-2.866 2.126-4.304 3.94-1.44 1.774-2.762 4.63-2.762 7.63 0 10.22-2.54 12.59-5.118 14.138-2.578 1.546-6.882 1.86-10.882 1.86h-8v16h8c4 0 11.696.31 19.116-4.14 7.06-4.238 12.2-13.28 12.696-26 .184-.166.148-.156.62-.498 1.724-1.244 5.084-3.21 8.688-6.214C80.33 77.096 88 65.958 88 47.958A40 40 0 0 0 48 8zm63.426 8L97.52 24a48 48 0 0 1 .016 47.942l13.89 8a64 64 0 0 0 0-64z" fill="#f7f5cf"/></svg> diff --git a/editor/icons/GizmoCPUParticles3D.svg b/editor/icons/GizmoCPUParticles3D.svg index b67aa0eaed..3dc8702e18 100644 --- a/editor/icons/GizmoCPUParticles3D.svg +++ b/editor/icons/GizmoCPUParticles3D.svg @@ -1 +1 @@ -<svg height="128" viewBox="0 0 128 128" width="128" xmlns="http://www.w3.org/2000/svg"><path d="M36.688 4a6.112 6.112 0 0 0-6.112 6.112v4.8h-9.6a6.112 6.112 0 0 0-6.112 6.112v9.6h-4.8a6.112 6.112 0 0 0-6.112 6.112v3.2a6.112 6.112 0 0 0 6.112 6.112h4.8v36h-4.8a6.112 6.112 0 0 0-6.112 6.112v3.2a6.112 6.112 0 0 0 6.112 6.112h4.8v9.6a6.112 6.112 0 0 0 6.112 6.112h9.6v4.8a6.112 6.112 0 0 0 6.112 6.112h3.2A6.112 6.112 0 0 0 46 117.984v-4.8h36v4.8a6.112 6.112 0 0 0 6.112 6.112h3.2a6.112 6.112 0 0 0 6.112-6.112v-4.8h9.6a6.112 6.112 0 0 0 6.112-6.112v-9.6h4.8a6.112 6.112 0 0 0 6.112-6.112v-3.2a6.112 6.112 0 0 0-6.112-6.112h-4.8v-36h4.8a6.112 6.112 0 0 0 6.112-6.112v-3.2a6.112 6.112 0 0 0-6.112-6.112h-4.8v-9.6a6.112 6.112 0 0 0-6.112-6.104h-9.6v-4.8a6.112 6.112 0 0 0-6.112-6.112h-3.2A6.112 6.112 0 0 0 82 10.12v4.8H46v-4.8a6.112 6.112 0 0 0-6.112-6.112z" stroke="#000" stroke-width="8" stroke-opacity=".3"/><path d="M36.688 4a6.112 6.112 0 0 0-6.112 6.112v4.8h-9.6a6.112 6.112 0 0 0-6.112 6.112v9.6h-4.8a6.112 6.112 0 0 0-6.112 6.112v3.2a6.112 6.112 0 0 0 6.112 6.112h4.8v36h-4.8a6.112 6.112 0 0 0-6.112 6.112v3.2a6.112 6.112 0 0 0 6.112 6.112h4.8v9.6a6.112 6.112 0 0 0 6.112 6.112h9.6v4.8a6.112 6.112 0 0 0 6.112 6.112h3.2A6.112 6.112 0 0 0 46 117.984v-4.8h36v4.8a6.112 6.112 0 0 0 6.112 6.112h3.2a6.112 6.112 0 0 0 6.112-6.112v-4.8h9.6a6.112 6.112 0 0 0 6.112-6.112v-9.6h4.8a6.112 6.112 0 0 0 6.112-6.112v-3.2a6.112 6.112 0 0 0-6.112-6.112h-4.8v-36h4.8a6.112 6.112 0 0 0 6.112-6.112v-3.2a6.112 6.112 0 0 0-6.112-6.112h-4.8v-9.6a6.112 6.112 0 0 0-6.112-6.104h-9.6v-4.8a6.112 6.112 0 0 0-6.112-6.112h-3.2A6.112 6.112 0 0 0 82 10.12v4.8H46v-4.8a6.112 6.112 0 0 0-6.112-6.112z" fill="#f7f5cf"/><path d="M88 82a18 18 0 0 0 2.484-35.814 27 30 0 0 0-52.944 0 18 18 0 0 0 2.484 35.802zm-48 6a6 6 0 0 0 0 12 6 6 0 0 0 0-12zm48 0a6 6 0 0 0 0 12 6 6 0 0 0 0-12zm-24 6a6 6 0 0 0 0 12 6 6 0 0 0 0-12z" fill="#e1b44c"/></svg> +<svg height="128" viewBox="0 0 128 128" width="128" xmlns="http://www.w3.org/2000/svg"><path d="M36.688 4a6.112 6.112 0 0 0-6.112 6.112v4.8h-9.6a6.112 6.112 0 0 0-6.112 6.112v9.6h-4.8a6.112 6.112 0 0 0-6.112 6.112v3.2a6.112 6.112 0 0 0 6.112 6.112h4.8v36h-4.8a6.112 6.112 0 0 0-6.112 6.112v3.2a6.112 6.112 0 0 0 6.112 6.112h4.8v9.6a6.112 6.112 0 0 0 6.112 6.112h9.6v4.8a6.112 6.112 0 0 0 6.112 6.112h3.2A6.112 6.112 0 0 0 46 117.984v-4.8h36v4.8a6.112 6.112 0 0 0 6.112 6.112h3.2a6.112 6.112 0 0 0 6.112-6.112v-4.8h9.6a6.112 6.112 0 0 0 6.112-6.112v-9.6h4.8a6.112 6.112 0 0 0 6.112-6.112v-3.2a6.112 6.112 0 0 0-6.112-6.112h-4.8v-36h4.8a6.112 6.112 0 0 0 6.112-6.112v-3.2a6.112 6.112 0 0 0-6.112-6.112h-4.8v-9.6a6.112 6.112 0 0 0-6.112-6.104h-9.6v-4.8a6.112 6.112 0 0 0-6.112-6.112h-3.2A6.112 6.112 0 0 0 82 10.12v4.8H46v-4.8a6.112 6.112 0 0 0-6.112-6.112z" stroke="#000" stroke-width="8" stroke-opacity=".3" fill="none"/><path d="M36.688 4a6.112 6.112 0 0 0-6.112 6.112v4.8h-9.6a6.112 6.112 0 0 0-6.112 6.112v9.6h-4.8a6.112 6.112 0 0 0-6.112 6.112v3.2a6.112 6.112 0 0 0 6.112 6.112h4.8v36h-4.8a6.112 6.112 0 0 0-6.112 6.112v3.2a6.112 6.112 0 0 0 6.112 6.112h4.8v9.6a6.112 6.112 0 0 0 6.112 6.112h9.6v4.8a6.112 6.112 0 0 0 6.112 6.112h3.2A6.112 6.112 0 0 0 46 117.984v-4.8h36v4.8a6.112 6.112 0 0 0 6.112 6.112h3.2a6.112 6.112 0 0 0 6.112-6.112v-4.8h9.6a6.112 6.112 0 0 0 6.112-6.112v-9.6h4.8a6.112 6.112 0 0 0 6.112-6.112v-3.2a6.112 6.112 0 0 0-6.112-6.112h-4.8v-36h4.8a6.112 6.112 0 0 0 6.112-6.112v-3.2a6.112 6.112 0 0 0-6.112-6.112h-4.8v-9.6a6.112 6.112 0 0 0-6.112-6.104h-9.6v-4.8a6.112 6.112 0 0 0-6.112-6.112h-3.2A6.112 6.112 0 0 0 82 10.12v4.8H46v-4.8a6.112 6.112 0 0 0-6.112-6.112z" fill="#f7f5cf"/><path d="M88 82a18 18 0 0 0 2.484-35.814 27 30 0 0 0-52.944 0 18 18 0 0 0 2.484 35.802zm-48 6a6 6 0 0 0 0 12 6 6 0 0 0 0-12zm48 0a6 6 0 0 0 0 12 6 6 0 0 0 0-12zm-24 6a6 6 0 0 0 0 12 6 6 0 0 0 0-12z" fill="#e1b44c"/></svg> diff --git a/editor/icons/GizmoCamera3D.svg b/editor/icons/GizmoCamera3D.svg index 1aa67bfed7..6a686cb8a5 100644 --- a/editor/icons/GizmoCamera3D.svg +++ b/editor/icons/GizmoCamera3D.svg @@ -1 +1 @@ -<svg height="128" viewBox="0 0 128 128" width="128" xmlns="http://www.w3.org/2000/svg"><path d="M76 20a24 24 0 0 0-24 22.216 24 24 0 1 0-24 40.376V100a8 8 0 0 0 8 8h48a8 8 0 0 0 8-8v-8l24 16V60L92 76V61.84A24 24 0 0 0 76 20zM44 96a4 4 0 0 1-4-4V75a3 3 0 0 0-3-3 12 12 0 1 1 9-19 9.5 9.5 0 0 0 18-6 12 12 0 1 1 18 7 3 3 0 0 0-2 3v35a4 4 0 0 1-4 4z" stroke="#000" stroke-width="8" stroke-linejoin="round" stroke-opacity=".294"/><path d="M76 20a24 24 0 0 0-24 22.216 24 24 0 1 0-24 40.376V100a8 8 0 0 0 8 8h48a8 8 0 0 0 8-8v-8l24 16V60L92 76V61.84A24 24 0 0 0 76 20zM44 96a4 4 0 0 1-4-4V75a3 3 0 0 0-3-3 12 12 0 1 1 9-19 9.5 9.5 0 0 0 18-6 12 12 0 1 1 18 7 3 3 0 0 0-2 3v35a4 4 0 0 1-4 4z" fill="#f7f5cf"/></svg> +<svg height="128" viewBox="0 0 128 128" width="128" xmlns="http://www.w3.org/2000/svg"><path d="M76 20a24 24 0 0 0-24 22.216 24 24 0 1 0-24 40.376V100a8 8 0 0 0 8 8h48a8 8 0 0 0 8-8v-8l24 16V60L92 76V61.84A24 24 0 0 0 76 20zM44 96a4 4 0 0 1-4-4V75a3 3 0 0 0-3-3 12 12 0 1 1 9-19 9.5 9.5 0 0 0 18-6 12 12 0 1 1 18 7 3 3 0 0 0-2 3v35a4 4 0 0 1-4 4z" stroke="#000" stroke-width="8" stroke-linejoin="round" stroke-opacity=".294" fill="none"/><path d="M76 20a24 24 0 0 0-24 22.216 24 24 0 1 0-24 40.376V100a8 8 0 0 0 8 8h48a8 8 0 0 0 8-8v-8l24 16V60L92 76V61.84A24 24 0 0 0 76 20zM44 96a4 4 0 0 1-4-4V75a3 3 0 0 0-3-3 12 12 0 1 1 9-19 9.5 9.5 0 0 0 18-6 12 12 0 1 1 18 7 3 3 0 0 0-2 3v35a4 4 0 0 1-4 4z" fill="#f7f5cf"/></svg> diff --git a/editor/icons/GizmoFogVolume.svg b/editor/icons/GizmoFogVolume.svg index 6a3423b1a2..17dbdb7cbb 100644 --- a/editor/icons/GizmoFogVolume.svg +++ b/editor/icons/GizmoFogVolume.svg @@ -1 +1 @@ -<svg height="128" viewBox="0 0 128 128" width="128" xmlns="http://www.w3.org/2000/svg"><path d="M20 68S8 68 8 56s16-12 16-12 0-32 28-32 28 24 28 24 10.08-16 24-8 4 24 4 24 12 0 12 8-8 8-8 8zm16 8a4 4 0 0 0 0 8h64a4 4 0 0 0 0-8zm-8 16a4 4 0 0 0 0 8h40a4 4 0 0 0 0-8zm56 0a4 4 0 0 0 0 8h20a4 4 0 0 0 0-8zm-40 16a4 4 0 0 0 0 8h40a4 4 0 0 0 0-8z" stroke="#000" stroke-width="8" stroke-opacity=".3"/><path d="M20 68S8 68 8 56s16-12 16-12 0-32 28-32 28 24 28 24 10.08-16 24-8 4 24 4 24 12 0 12 8-8 8-8 8zm16 8a4 4 0 0 0 0 8h64a4 4 0 0 0 0-8zm-8 16a4 4 0 0 0 0 8h40a4 4 0 0 0 0-8zm56 0a4 4 0 0 0 0 8h20a4 4 0 0 0 0-8zm-40 16a4 4 0 0 0 0 8h40a4 4 0 0 0 0-8z" fill="#f7f5cf"/></svg> +<svg height="128" viewBox="0 0 128 128" width="128" xmlns="http://www.w3.org/2000/svg"><path d="M20 68S8 68 8 56s16-12 16-12 0-32 28-32 28 24 28 24 10.08-16 24-8 4 24 4 24 12 0 12 8-8 8-8 8zm16 8a4 4 0 0 0 0 8h64a4 4 0 0 0 0-8zm-8 16a4 4 0 0 0 0 8h40a4 4 0 0 0 0-8zm56 0a4 4 0 0 0 0 8h20a4 4 0 0 0 0-8zm-40 16a4 4 0 0 0 0 8h40a4 4 0 0 0 0-8z" stroke="#000" stroke-width="8" stroke-opacity=".3" fill="none"/><path d="M20 68S8 68 8 56s16-12 16-12 0-32 28-32 28 24 28 24 10.08-16 24-8 4 24 4 24 12 0 12 8-8 8-8 8zm16 8a4 4 0 0 0 0 8h64a4 4 0 0 0 0-8zm-8 16a4 4 0 0 0 0 8h40a4 4 0 0 0 0-8zm56 0a4 4 0 0 0 0 8h20a4 4 0 0 0 0-8zm-40 16a4 4 0 0 0 0 8h40a4 4 0 0 0 0-8z" fill="#f7f5cf"/></svg> diff --git a/editor/icons/GizmoLightmapProbe.svg b/editor/icons/GizmoLightmapProbe.svg index 7259a7c184..8890649c4d 100644 --- a/editor/icons/GizmoLightmapProbe.svg +++ b/editor/icons/GizmoLightmapProbe.svg @@ -1 +1 @@ -<svg height="128" viewBox="0 0 128 128" width="128" xmlns="http://www.w3.org/2000/svg"><path d="M8 72h24V56H8zm16.4 20.28 11.32 11.312L47.032 92.28 35.72 80.968zm0-56.56 11.32 11.312L47.032 35.72 35.72 24.4zM40 64a24 24 0 0 0 48 0 24 24 0 0 0-48 0zm24 56A56 56 0 0 0 64 8v18.672a37.328 37.328 0 0 1 0 74.656z" stroke="#000" stroke-width="8" stroke-opacity=".3"/><path d="M8 72h24V56H8zm16.4 20.28 11.32 11.312L47.032 92.28 35.72 80.968zm0-56.56 11.32 11.312L47.032 35.72 35.72 24.4zM40 64a24 24 0 0 0 48 0 24 24 0 0 0-48 0zm24 56A56 56 0 0 0 64 8v18.672a37.328 37.328 0 0 1 0 74.656z" fill="#f7f5cf"/></svg> +<svg height="128" viewBox="0 0 128 128" width="128" xmlns="http://www.w3.org/2000/svg"><path d="M8 72h24V56H8zm16.4 20.28 11.32 11.312L47.032 92.28 35.72 80.968zm0-56.56 11.32 11.312L47.032 35.72 35.72 24.4zM40 64a24 24 0 0 0 48 0 24 24 0 0 0-48 0zm24 56A56 56 0 0 0 64 8v18.672a37.328 37.328 0 0 1 0 74.656z" stroke="#000" stroke-width="8" stroke-opacity=".3" fill="none"/><path d="M8 72h24V56H8zm16.4 20.28 11.32 11.312L47.032 92.28 35.72 80.968zm0-56.56 11.32 11.312L47.032 35.72 35.72 24.4zM40 64a24 24 0 0 0 48 0 24 24 0 0 0-48 0zm24 56A56 56 0 0 0 64 8v18.672a37.328 37.328 0 0 1 0 74.656z" fill="#f7f5cf"/></svg> diff --git a/editor/icons/InputEventMIDI.svg b/editor/icons/InputEventMIDI.svg index 3784b4f132..4d955259f3 100644 --- a/editor/icons/InputEventMIDI.svg +++ b/editor/icons/InputEventMIDI.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M.5 15.5h15v-9a2 2 0 0 0-2-2h-11a2 2 0 0 0-2 2zm1-1v-8h2v4H4v4zm3.5 0v-4h.5v-4H7v4h.5v4zm7 0v-4h.5v-4h2v8zm-3.5 0v-4H9v-4h1.5v4h.5v4z" fill="#e0e0e0"/><path d="M4.5 4.127a2 2 0 0 0-2-2 2 2 0 0 1-2-2" stroke-linecap="square" stroke="#e0e0e0" fill="none"/><path d="M8.5 14.5v-4H9v-4h1.5v4h.5v4z" fill="#69c4d4" fill-opacity=".8"/><path d="m11.75 3.3.75-1.5M7.75 3.3 7 1.8m2.75 1.1V1.2" stroke-width="1.25" stroke-linecap="round" stroke="#69c4d4"/></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M8.5 14.5v-4H9v-4h1.5v4h.5v4z" fill="#69c4d4" fill-opacity=".8"/><path d="M.5 15.5h15v-9a2 2 0 0 0-2-2h-11a2 2 0 0 0-2 2zm1-1v-8h2v4H4v4zm3.5 0v-4h.5v-4H7v4h.5v4zm7 0v-4h.5v-4h2v8zm-3.5 0v-4H9v-4h1.5v4h.5v4z" fill="#e0e0e0"/><path d="M4.5 4.127a2 2 0 0 0-2-2 2 2 0 0 1-2-2" stroke-linecap="square" stroke="#e0e0e0" fill="none"/><path d="m11.75 3.3.75-1.5M7.75 3.3 7 1.8m2.75 1.1V1.2" stroke-width="1.25" stroke-linecap="round" stroke="#69c4d4"/></svg> diff --git a/editor/icons/InputEventMouseButton.svg b/editor/icons/InputEventMouseButton.svg index 1981749489..26ff7413b4 100644 --- a/editor/icons/InputEventMouseButton.svg +++ b/editor/icons/InputEventMouseButton.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 8.5v2.75a4 4 0 0 0 8 0V8.5zm3-1V4a4 4 0 0 0-3 3.5Z" fill="#e0e0e0"/><path d="M7.5 4.127a2 2 0 0 0-2-2H4a2 2 0 0 1-2-2" stroke-linecap="round" stroke="#e0e0e0" fill="none"/><path d="M11.5 7.5a4 4 0 0 0-3-3.5v3.5z" fill="#69c4d4"/><path d="m12.2 5.5 1.6-.8m-2.5-.75 1.3-1.3m-2.85.4.8-1.6" stroke-width="1.25" stroke-linecap="round" stroke="#69c4d4"/></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 8.5v2.75a4 4 0 0 0 8 0V8.5zm3-1V4a4 4 0 0 0-3 3.5z" fill="#e0e0e0"/><path d="M7.5 4.127a2 2 0 0 0-2-2H4a2 2 0 0 1-2-2" stroke-linecap="round" stroke="#e0e0e0" fill="none"/><path d="M11.5 7.5a4 4 0 0 0-3-3.5v3.5z" fill="#69c4d4"/><path d="m12.2 5.5 1.6-.8m-2.5-.75 1.3-1.3m-2.85.4.8-1.6" stroke-width="1.25" stroke-linecap="round" stroke="#69c4d4"/></svg> diff --git a/editor/icons/MemberAnnotation.svg b/editor/icons/MemberAnnotation.svg index 39bef6d9ee..5578ef92c9 100644 --- a/editor/icons/MemberAnnotation.svg +++ b/editor/icons/MemberAnnotation.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m13.821 12.756c-5.0033 3.9148-12.551 2.248-12.49-4.538.67424-11.471 17.312-7.4502 12.446 2.1173-1.0549 1.1955-2.0737 1.4617-3.1983.4329-.21023-.19282-.44783-1.1594-.3819-1.5089.35827-1.8946 1.0885-4.0778-.72151-4.7234-2.4171-.86457-4.5592 1.6495-4.9697 4.0193-.47396 2.7343 2.284 3.3749 4.1487 1.9879.4553-.36324 1.6433-1.3796 1.6806-1.9742" fill="none" stroke="#e0e0e0" stroke-linejoin="round" stroke-width="1.4928"/></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M13.821 12.756c-5 3.915-12.551 2.248-12.49-4.538.674-11.471 17.312-7.45 12.446 2.117-.8 1.196-2.074 1.462-3.198.433-.3-.3-.448-1.16-.382-1.509.4-1.894 1.088-4.078-.722-4.723-2.417-.865-4.559 1.65-4.97 4.02-.473 2.734 2.285 3.374 4.15 1.987.455-.363 1.55-1.38 1.68-1.974" fill="none" stroke="#e0e0e0" stroke-linejoin="round" stroke-width="1.493"/></svg> diff --git a/editor/icons/NavigationLink2D.svg b/editor/icons/NavigationLink2D.svg index 02e2faafed..9b7b9859f6 100644 --- a/editor/icons/NavigationLink2D.svg +++ b/editor/icons/NavigationLink2D.svg @@ -1 +1 @@ -<svg height="16" width="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M2 1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h3.2a3.25 3.25 0 0 1-.2-5l5-5a3.25 3.25 0 0 1 5 .2V2a1 1 0 0 0-1-1zm7.15 6.65a2 2 0 0 1 1.207.207l1.25-1.25a1 1 0 0 1 1.75 1.75l-2 2a1 1 0 0 1-1.5 0 .5.5 0 0 0-.707.707 2 2 0 0 0 2.914 0l2-2A2 2 0 0 0 10.9 5.9zm1.628 4.628a2 2 0 0 1-1.207-.207l-1.25 1.25a1.237 1.237 0 0 1-1.75-1.75l2-2a1 1 0 0 1 1.5 0 .5.5 0 0 0 .707-.707 2 2 0 0 0-2.914 0l-2 2a2.237 2.237 0 0 0 3.164 3.164z" fill="#8ea6f4"/></svg> +<svg height="16" width="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M2 1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h3.2a3.25 3.25 0 0 1-.2-5l5-5a3.25 3.25 0 0 1 5 .2V2a1 1 0 0 0-1-1zm7.15 6.65a2 2 0 0 1 1.207.207l1.25-1.25a1 1 0 0 1 1.75 1.75l-2 2a1 1 0 0 1-1.5 0 .5.5 0 0 0-.707.707 2 2 0 0 0 2.914 0l2-2A2 2 0 0 0 10.9 5.9zm1.628 4.628a2 2 0 0 1-1.207-.207l-1.25 1.25a1.237 1.237 0 0 1-1.75-1.75l2-2a1 1 0 0 1 1.5 0 .5.5 0 0 0 .707-.707 2 2 0 0 0-2.914 0l-2 2a2.237 2.237 0 0 0 3.164 3.164z" fill="#8da5f3"/></svg> diff --git a/editor/icons/NavigationLink3D.svg b/editor/icons/NavigationLink3D.svg index 5ecefba485..9115b8ff9a 100644 --- a/editor/icons/NavigationLink3D.svg +++ b/editor/icons/NavigationLink3D.svg @@ -1 +1 @@ -<svg height="16" width="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M2 1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h3.2a3.25 3.25 0 0 1-.2-5l5-5a3.25 3.25 0 0 1 5 .2V2a1 1 0 0 0-1-1zm7.15 6.65a2 2 0 0 1 1.207.207l1.25-1.25a1 1 0 0 1 1.75 1.75l-2 2a1 1 0 0 1-1.5 0 .5.5 0 0 0-.707.707 2 2 0 0 0 2.914 0l2-2A2 2 0 0 0 10.9 5.9zm1.628 4.628a2 2 0 0 1-1.207-.207l-1.25 1.25a1.237 1.237 0 0 1-1.75-1.75l2-2a1 1 0 0 1 1.5 0 .5.5 0 0 0 .707-.707 2 2 0 0 0-2.914 0l-2 2a2.237 2.237 0 0 0 3.164 3.164z" fill="#fc7d7d"/></svg> +<svg height="16" width="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M2 1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h3.2a3.25 3.25 0 0 1-.2-5l5-5a3.25 3.25 0 0 1 5 .2V2a1 1 0 0 0-1-1zm7.15 6.65a2 2 0 0 1 1.207.207l1.25-1.25a1 1 0 0 1 1.75 1.75l-2 2a1 1 0 0 1-1.5 0 .5.5 0 0 0-.707.707 2 2 0 0 0 2.914 0l2-2A2 2 0 0 0 10.9 5.9zm1.628 4.628a2 2 0 0 1-1.207-.207l-1.25 1.25a1.237 1.237 0 0 1-1.75-1.75l2-2a1 1 0 0 1 1.5 0 .5.5 0 0 0 .707-.707 2 2 0 0 0-2.914 0l-2 2a2.237 2.237 0 0 0 3.164 3.164z" fill="#fc7f7f"/></svg> diff --git a/editor/icons/NinePatchRect.svg b/editor/icons/NinePatchRect.svg index 485cebe382..18b9f3b8e4 100644 --- a/editor/icons/NinePatchRect.svg +++ b/editor/icons/NinePatchRect.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M1 1h2v14H1zm0 12h14v2H1zM1 1h14v2H1zm12 0h2v14h-2zM1 5h14v1H1zm0 5h14v1H1zm5-9v14H5V1zm5 0v14h-1V1z" fill="#8eef97"/></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M1 1h14v14H1zm2 2v2h2V3zm3 0v2h4V3zm5 0v2h2V3zM3 6v4h2V6zm3 0v4h4V6zm5 0v4h2V6zm-8 5v2h2v-2zm3 0v2h4v-2zm5 0v2h2v-2z" fill="#8eef97"/></svg> diff --git a/editor/icons/OccluderPolygon2D.svg b/editor/icons/OccluderPolygon2D.svg index dfa19ca191..e30590b199 100644 --- a/editor/icons/OccluderPolygon2D.svg +++ b/editor/icons/OccluderPolygon2D.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 9 6 6h8V7L9 1z" fill="#4b70ea"/><path d="M1 1h8L6 5l3 4H1z" fill="#8da5f3"/></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m1 9 6 6h8V7L9 1H1z" fill="#8da5f3"/><path d="m9 1 6 6v8H7L1 9h8L6 5z" fill-opacity=".235"/></svg> diff --git a/editor/icons/Onion.svg b/editor/icons/Onion.svg index ec4137eab9..bbe66af020 100644 --- a/editor/icons/Onion.svg +++ b/editor/icons/Onion.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-2 2-7 4-7 8s3 6 7 6c-7-3-6.5995-7.703 0-13-2.2981 3.9516-5.4951 8.9197 0 13 4.8692-4.2391 2.7733-8.1815 1-12 5.5855 4.704 5.3995 8.6488-1 12 4 0 7-2 7-6s-5-6-7-8z" fill="#e0e0e0"/></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M8 1C6 3 1 5 1 9s3 6 7 6C1 12 1.4 7.25 8 2c-2.25 4-5.5 9 0 13 5-4.25 2.75-8.25 1-12 5.5 4.75 5.5 8.75-1 12 4 0 7-2 7-6s-5-6-7-8z" fill="#e0e0e0"/></svg> diff --git a/editor/icons/PanelContainer.svg b/editor/icons/PanelContainer.svg index 2f783d6e49..7786778396 100644 --- a/editor/icons/PanelContainer.svg +++ b/editor/icons/PanelContainer.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3 1c-1.1046 0-2 .89543-2 2v10c0 1.1046.89543 2 2 2h10c1.1046 0 2-.89543 2-2v-10c0-1.1046-.89543-2-2-2zm0 2h10v10h-10z" fill="#8eef97"/></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M3 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2zm0 2h10v10H3z" fill="#8eef97"/></svg> diff --git a/editor/icons/ParallaxBackground.svg b/editor/icons/ParallaxBackground.svg index 504e9cec8b..d1badf5fe5 100644 --- a/editor/icons/ParallaxBackground.svg +++ b/editor/icons/ParallaxBackground.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M3 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2zm0 1h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zm4 3L4 8l3 3zm2 0v6l3-3z" fill="#e0e0e0"/></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><rect x="1.5" y="1.5" width="13" height="13" rx="1" fill="none" stroke="#e0e0e0"/><path d="M7 5v6L4 8zm2 0v6l3-3z" fill="#e0e0e0"/></svg> diff --git a/editor/icons/QuadMesh.svg b/editor/icons/QuadMesh.svg index 54808dbefe..c9f762c362 100644 --- a/editor/icons/QuadMesh.svg +++ b/editor/icons/QuadMesh.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M2 2h12v12H2zl12 12" fill="none" stroke-width="2" stroke="#ffca5f"/></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M2 2h12v12H2zm0 0l12 12" fill="none" stroke-width="2" stroke="#ffca5f"/></svg> diff --git a/editor/icons/SnapGrid.svg b/editor/icons/SnapGrid.svg index 3e77461043..feb4206e81 100644 --- a/editor/icons/SnapGrid.svg +++ b/editor/icons/SnapGrid.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M2 0v2H0v1h2v4H0v1h2v4H0v1h2v2h1v-2h3v-1H3V8h4l1-1V3h4v3h1V3h2V2h-2V0h-1v2H8V0H7v2H3V0zm1 3h4v4H3zm4 10v2h2v-2zm6 0v2h2v-2z" fill="#e0e0e0"/><path d="M7 13h2v-2a2 2 0 0 1 4 0v2h2v-2a4 4 0 0 0-8 0z" fill="#fff" fill-opacity=".686"/></svg> +<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M2 0v2H0v1h2v4H0v1h2v4H0v1h2v2h1v-2h3v-1H3V8h4l1-1V3h4v3h1V3h2V2h-2V0h-1v2H8V0H7v2H3V0zm1 3h4v4H3zm4 10v2h2v-2zm6 0v2h2v-2z" fill="#def"/><path d="M7 13h2v-2a2 2 0 0 1 4 0v2h2v-2a4 4 0 0 0-8 0z" fill="#def" fill-opacity=".8"/></svg> diff --git a/editor/icons/SpinBox.svg b/editor/icons/SpinBox.svg index 1206ada6bd..9dd875d86e 100644 --- a/editor/icons/SpinBox.svg +++ b/editor/icons/SpinBox.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m3 3c-1.1046 0-2 .89543-2 2v6c0 1.1046.89543 2 2 2h7v-2-6-2zm10 1-2 3h4zm-10 1h5v6h-5zm8 4 2 3 2-3z" fill="#8eef97"/></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M3 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h7V3zm10 1-2 3h4zM3 5h5v6H3zm8 4 2 3 2-3z" fill="#8eef97"/></svg> diff --git a/editor/icons/SubViewport.svg b/editor/icons/SubViewport.svg index 5d76495a26..3644215647 100644 --- a/editor/icons/SubViewport.svg +++ b/editor/icons/SubViewport.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="#e0e0e0"><rect x="1.5" y="2.5" rx="1.5" width="13" height="11"/><rect x="4.5" y="4.5" rx="1.5" width="7" height="7"/></g></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g stroke="#e0e0e0" stroke-width="1.25" fill="none"><rect x="1.625" y="2.625" height="10.75" width="12.75" rx="1.5"/><rect x="4.625" y="4.625" rx="1.5" width="6.75" height="6.75"/></g></svg> diff --git a/editor/icons/SubViewportContainer.svg b/editor/icons/SubViewportContainer.svg index e51848d524..dc571ff71b 100644 --- a/editor/icons/SubViewportContainer.svg +++ b/editor/icons/SubViewportContainer.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="#8eef97"><rect x="2" y="2" rx="1" width="12" height="12" stroke-width="2"/><rect x="4.5" y="4.5" rx="1.5" width="7" height="7"/></g></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="#8eef97"><rect x="2" y="2" rx="1" width="12" height="12" stroke-width="2"/><rect x="4.625" y="4.625" rx="1.5" width="6.75" height="6.75" stroke-width="1.25"/></g></svg> diff --git a/editor/icons/SystemFont.svg b/editor/icons/SystemFont.svg index c4fd496e6f..438c707624 100644 --- a/editor/icons/SystemFont.svg +++ b/editor/icons/SystemFont.svg @@ -1 +1 @@ -<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg"><path style="fill:#e0e0e0;stroke-width:.714755" d="m5.787 1-.402 1.613c-.352.265-.71.122-1.012-.111l-.904-.541L2.46 2.973l.853 1.425c-.058.438-.412.586-.79.635-.343.065-.674.216-1.024.213V6.72c.367 0 .715.157 1.074.224.371.032.716.243.727.65l-.84 1.4 1.008 1.01c.443-.266.895-.53 1.33-.802.349-.044.675.139.674.506l.314 1.258h1.45c.117-.475.242-.954.35-1.428A.67.67 0 0 1 8 9.195V7.5H6.5A.5.5 0 0 0 6 8v.5H4v-4h5.75c-.005-.22.107-.434.254-.625l.543-.902L9.535 1.96l-1.426.853c-.437-.058-.588-.412-.636-.79L7.217 1h-1.43z"/><path d="M4.5 5v3h1a1 1 0 0 1 1-1h2v6a1 1 0 0 1-1 1v1h4v-1a1 1 0 0 1-1-1V7h2a1 1 0 0 1 1 1h1V5h-6z" fill="#ff5f5f"/></svg> +<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg"><path fill="#e0e0e0" d="m5.787 1-.402 1.613c-.352.265-.71.122-1.012-.111l-.904-.541L2.46 2.973l.853 1.425c-.058.438-.412.586-.79.635-.343.065-.674.216-1.024.213V6.72c.367 0 .715.157 1.074.224.371.032.716.243.727.65l-.84 1.4 1.008 1.01c.443-.266.895-.53 1.33-.802.349-.044.675.139.674.506l.314 1.258h1.45c.117-.475.242-.954.35-1.428A.67.67 0 0 1 8 9.195V7.5H6.5A.5.5 0 0 0 6 8v.5H4v-4h5.75c-.005-.22.107-.434.254-.625l.543-.902L9.535 1.96l-1.426.853c-.437-.058-.588-.412-.636-.79L7.217 1h-1.43z"/><path d="M4.5 5v3h1a1 1 0 0 1 1-1h2v6a1 1 0 0 1-1 1v1h4v-1a1 1 0 0 1-1-1V7h2a1 1 0 0 1 1 1h1V5h-6z" fill="#ff5f5f"/></svg> diff --git a/editor/icons/Theme.svg b/editor/icons/Theme.svg index a48bb768f0..f35462d360 100644 --- a/editor/icons/Theme.svg +++ b/editor/icons/Theme.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><linearGradient x2="0" y2="16" gradientUnits="userSpaceOnUse" id="a"><stop offset=".1875" stop-color="#ff4545"/><stop stop-color="#ffe345"/><stop offset=".3125" stop-color="#ffe345"/><stop stop-color="#80ff45"/><stop offset=".4375" stop-color="#80ff45"/><stop stop-color="#45ffa2"/><stop offset=".5625" stop-color="#45ffa2"/><stop stop-color="#45d7ff"/><stop offset=".6875" stop-color="#45d7ff"/><stop stop-color="#8045ff"/><stop offset=".8125" stop-color="#8045ff"/><stop stop-color="#ff4596"/></linearGradient><path d="M8 1c-.75 1.305-1.654 2.427-2.5 3.5-1 1.208-1.865 2.349-2.346 3.5-.24.57-.404 1.148-.404 1.75s.126 1.2.322 1.75C3.795 13.535 5.718 15 8 15s4.205-1.465 4.928-3.5c.196-.55.322-1.148.322-1.75s-.164-1.18-.404-1.75C12.365 6.849 11.5 5.708 10.5 4.5 9.654 3.427 8.753 2.305 8 1Z" fill="url(#a)"/></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><linearGradient x2="0" y2="16" gradientUnits="userSpaceOnUse" id="a"><stop offset=".188" stop-color="#ff4545"/><stop stop-color="#ffe345"/><stop offset=".313" stop-color="#ffe345"/><stop stop-color="#80ff45"/><stop offset=".438" stop-color="#80ff45"/><stop stop-color="#45ffa2"/><stop offset=".563" stop-color="#45ffa2"/><stop stop-color="#45d7ff"/><stop offset=".688" stop-color="#45d7ff"/><stop stop-color="#8045ff"/><stop offset=".813" stop-color="#8045ff"/><stop stop-color="#ff4596"/></linearGradient><path d="M8 1c-.75 1.305-1.654 2.427-2.5 3.5-1 1.208-1.865 2.349-2.346 3.5-.24.57-.404 1.148-.404 1.75s.126 1.2.322 1.75C3.795 13.535 5.718 15 8 15s4.205-1.465 4.928-3.5c.196-.55.322-1.148.322-1.75s-.164-1.18-.404-1.75C12.365 6.849 11.5 5.708 10.5 4.5 9.654 3.427 8.753 2.305 8 1Z" fill="url(#a)"/></svg> diff --git a/editor/icons/Translation.svg b/editor/icons/Translation.svg index 4d864d4c40..5c104695b2 100644 --- a/editor/icons/Translation.svg +++ b/editor/icons/Translation.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M5.285 1.303a3 3 0 1 0 0 5.392A1 1 0 0 0 7 6V2a1 1 0 0 0-1.715-.697zM4 3a1 1 0 0 1 0 2 1 1 0 0 1 0-2zm6.887 3.53-1.79.894.29.576H7v2h.82c.133.93.5 1.894 1.2 2.73-.616.163-1.357.266-2.266.27l.01 2c1.677-.01 3.041-.313 4.111-.834 1.07.52 2.434.826 4.111.834l.01-2c-.909 0-1.65-.106-2.266-.27A5.432 5.432 0 0 0 13.932 10H15V8h-3.379l-.734-1.47zM9.863 10h2.024c-.126.58-.376 1.147-.836 1.623-.053.055-.117.107-.176.16-.06-.053-.123-.105-.176-.16-.46-.476-.71-1.043-.836-1.623z" fill="#e0e0e0"/></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M7 2a1 1 0 0 0-1.715-.697 3 3 0 1 0 0 5.392A1 1 0 0 0 7 6zM4 3a1 1 0 0 1 0 2 1 1 0 0 1 0-2zm6.887 3.53-1.79.894.29.576H7v2h.82a5.432 5.432 0 0 0 1.2 2.73c-.616.163-1.357.266-2.266.27v2c1.677-.01 3.041-.313 4.111-.834 1.07.52 2.434.826 4.111.834v-2c-.909 0-1.65-.106-2.266-.27A5.432 5.432 0 0 0 13.932 10H15V8h-3.379zM9.863 10h2.024a3.432 3.432 0 0 1-1.012 1.783A3.432 3.432 0 0 1 9.863 10z" fill="#e0e0e0"/></svg> diff --git a/editor/icons/Viewport.svg b/editor/icons/Viewport.svg index 49d9993174..95dee29d3d 100644 --- a/editor/icons/Viewport.svg +++ b/editor/icons/Viewport.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><rect x="1.75" y="2.75" height="10.5" width="12.5" rx="1.5" stroke="#808080" stroke-width="1.5" fill="none"/></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><rect x="1.625" y="2.625" height="10.75" width="12.75" rx="1.5" stroke="#808080" stroke-width="1.25" fill="none"/></svg> diff --git a/editor/icons/ViewportTexture.svg b/editor/icons/ViewportTexture.svg index c3d97a8805..de2ad7fb33 100644 --- a/editor/icons/ViewportTexture.svg +++ b/editor/icons/ViewportTexture.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M3 2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H3zm0 1h10a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm6 3v1H8v1H6v1H5v1H4v1h8V9h-1V7h-1V6z" fill="#e0e0e0"/></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><rect x="1.625" y="2.625" height="10.75" width="12.75" rx="1.5" stroke="#e0e0e0" stroke-width="1.25" fill="none"/><path d="M9 6v1H8v1H6v1H5v1H4v1h8V9h-1V7h-1V6z" fill="#e0e0e0"/></svg> diff --git a/editor/icons/VisualShaderNodeExpression.svg b/editor/icons/VisualShaderNodeExpression.svg index ecee759562..ae403da40d 100644 --- a/editor/icons/VisualShaderNodeExpression.svg +++ b/editor/icons/VisualShaderNodeExpression.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M4.86 3.041a3.72 3.72 0 0 0-3.72 3.72v6.198h2.48v-2.48H6.1V8H3.62V6.76a1.24 1.24 0 0 1 1.24-1.24H6.1V3.042zM7.589 3l2.5 5-2.5 5h2.5l1.135-2.727L12.59 13h2.5l-2.5-5 2.5-5h-2.5l-1.135 2.727L10.089 3z" fill="#cf68ea"/></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M4.5 3A3.5 3.5 0 0 0 1 6.5V13h2.5v-2.5H6V8H3.5V6.5a1 1 0 0 1 1-1H6V3zm3 0L10 8l-2.5 5H10l1.25-2.5L12.5 13H15l-2.5-5L15 3h-2.5l-1.25 2.5L10 3z" fill="#cf68ea"/></svg> diff --git a/editor/icons/VisualShaderNodeGlobalExpression.svg b/editor/icons/VisualShaderNodeGlobalExpression.svg index 5e967ea571..14b75e278f 100644 --- a/editor/icons/VisualShaderNodeGlobalExpression.svg +++ b/editor/icons/VisualShaderNodeGlobalExpression.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M4.86 3.041a3.72 3.72 0 0 0-3.72 3.72v6.198h2.48v-2.48H6.1V8H3.62V6.76a1.24 1.24 0 0 1 1.24-1.24H6.1V3.042zM7.589 3l2.5 5-2.5 5h2.5l1.135-2.727L12.59 13h2.5l-2.5-5 2.5-5h-2.5l-1.135 2.727L10.089 3z" fill="#35d4f4"/></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M4.5 3A3.5 3.5 0 0 0 1 6.5V13h2.5v-2.5H6V8H3.5V6.5a1 1 0 0 1 1-1H6V3zm3 0L10 8l-2.5 5H10l1.25-2.5L12.5 13H15l-2.5-5L15 3h-2.5l-1.25 2.5L10 3z" fill="#35d4f4"/></svg> diff --git a/editor/icons/WorldEnvironment.svg b/editor/icons/WorldEnvironment.svg index ff7717e1d1..a5b48cbdf8 100644 --- a/editor/icons/WorldEnvironment.svg +++ b/editor/icons/WorldEnvironment.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="none"><g stroke-width="1.5"><path d="M2 8a6.5 2 0 0 0 6 1.25M8 2c-3 4-3 8 0 12" stroke="#fc7f7f"/><path d="M14 8a6.5 2 0 0 1-6 1.25M8 2c3 4 3 8 0 12" stroke="#8da5f3" stroke-linejoin="round"/></g><g stroke-width="2"><path d="M8 2a6 6 0 0 1 0 12" stroke="#8da5f3"/><path d="M8 2a6 6 0 0 0 0 12" stroke="#fc7f7f"/></g><path d="M7.5 14v-1.325M7.5 2v1.325" stroke="#fc7f7f"/></g></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><linearGradient y2="0" gradientUnits="userSpaceOnUse" id="a"><stop stop-color="#fc7f7f"/><stop stop-color="#fc7f7f" offset=".5"/><stop stop-color="#8da5f3"/></linearGradient><g fill="none" stroke="url(#a)"><circle cx="8" cy="8" r="6" stroke-width="2"/><path d="M2 8a6.5 2 0 0 0 12 0M8 2c-3 4-3 8 0 12M8 2c3 4 3 8 0 12" stroke-width="1.5"/></g></svg> diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index 8e277a8b6c..d5da1183fb 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -1954,6 +1954,12 @@ void ResourceImporterScene::get_import_options(const String &p_path, List<Import } } +void ResourceImporterScene::handle_compatibility_options(HashMap<StringName, Variant> &p_import_params) const { + for (Ref<EditorSceneFormatImporter> importer_elem : importers) { + importer_elem->handle_compatibility_options(p_import_params); + } +} + void ResourceImporterScene::_replace_owner(Node *p_node, Node *p_scene, Node *p_new_owner) { if (p_node != p_new_owner && p_node->get_owner() == p_scene) { p_node->set_owner(p_new_owner); @@ -2658,10 +2664,10 @@ ResourceImporterScene *ResourceImporterScene::animation_singleton = nullptr; Vector<Ref<EditorSceneFormatImporter>> ResourceImporterScene::importers; Vector<Ref<EditorScenePostImportPlugin>> ResourceImporterScene::post_importer_plugins; -bool ResourceImporterScene::ResourceImporterScene::has_advanced_options() const { +bool ResourceImporterScene::has_advanced_options() const { return true; } -void ResourceImporterScene::ResourceImporterScene::show_advanced_options(const String &p_path) { +void ResourceImporterScene::show_advanced_options(const String &p_path) { SceneImportSettings::get_singleton()->open_settings(p_path, animation_importer); } diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h index 70060c3d0e..17681387e6 100644 --- a/editor/import/resource_importer_scene.h +++ b/editor/import/resource_importer_scene.h @@ -79,6 +79,7 @@ public: virtual Node *import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, List<String> *r_missing_deps, Error *r_err = nullptr); virtual void get_import_options(const String &p_path, List<ResourceImporter::ImportOption> *r_options); virtual Variant get_option_visibility(const String &p_path, bool p_for_animation, const String &p_option, const HashMap<StringName, Variant> &p_options); + virtual void handle_compatibility_options(HashMap<StringName, Variant> &p_import_params) const {} EditorSceneFormatImporter() {} }; @@ -276,6 +277,7 @@ public: virtual void get_import_options(const String &p_path, List<ImportOption> *r_options, int p_preset = 0) const override; virtual bool get_option_visibility(const String &p_path, const String &p_option, const HashMap<StringName, Variant> &p_options) const override; + virtual void handle_compatibility_options(HashMap<StringName, Variant> &p_import_params) const override; // Import scenes *after* everything else (such as textures). virtual int get_import_order() const override { return ResourceImporter::IMPORT_ORDER_SCENE; } diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 22596c09d1..f866bd2a01 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -433,7 +433,11 @@ ScriptEditor *ScriptEditor::script_editor = nullptr; String ScriptEditor::_get_debug_tooltip(const String &p_text, Node *_se) { String val = EditorDebuggerNode::get_singleton()->get_var_value(p_text); + const int display_limit = 300; if (!val.is_empty()) { + if (val.size() > display_limit) { + val = val.left(display_limit) + " [...] truncated!"; + } return p_text + ": " + val; } else { return String(); diff --git a/editor/plugins/sprite_2d_editor_plugin.cpp b/editor/plugins/sprite_2d_editor_plugin.cpp index e90609cd2f..56d74bba0a 100644 --- a/editor/plugins/sprite_2d_editor_plugin.cpp +++ b/editor/plugins/sprite_2d_editor_plugin.cpp @@ -127,59 +127,57 @@ void Sprite2DEditor::_menu_option(int p_option) { debug_uv_dialog->set_ok_button_text(TTR("Create MeshInstance2D")); debug_uv_dialog->set_title(TTR("MeshInstance2D Preview")); - _update_mesh_data(); - debug_uv_dialog->popup_centered(); - debug_uv->queue_redraw(); - + _popup_debug_uv_dialog(); } break; case MENU_OPTION_CONVERT_TO_POLYGON_2D: { debug_uv_dialog->set_ok_button_text(TTR("Create Polygon2D")); debug_uv_dialog->set_title(TTR("Polygon2D Preview")); - _update_mesh_data(); - debug_uv_dialog->popup_centered(); - debug_uv->queue_redraw(); + _popup_debug_uv_dialog(); } break; case MENU_OPTION_CREATE_COLLISION_POLY_2D: { debug_uv_dialog->set_ok_button_text(TTR("Create CollisionPolygon2D")); debug_uv_dialog->set_title(TTR("CollisionPolygon2D Preview")); - _update_mesh_data(); - debug_uv_dialog->popup_centered(); - debug_uv->queue_redraw(); - + _popup_debug_uv_dialog(); } break; case MENU_OPTION_CREATE_LIGHT_OCCLUDER_2D: { debug_uv_dialog->set_ok_button_text(TTR("Create LightOccluder2D")); debug_uv_dialog->set_title(TTR("LightOccluder2D Preview")); - _update_mesh_data(); - debug_uv_dialog->popup_centered(); - debug_uv->queue_redraw(); - + _popup_debug_uv_dialog(); } break; } } -void Sprite2DEditor::_update_mesh_data() { +void Sprite2DEditor::_popup_debug_uv_dialog() { + String error_message; if (node->get_owner() != get_tree()->get_edited_scene_root()) { - err_dialog->set_text(TTR("Can't convert a Sprite2D from a foreign scene.")); - err_dialog->popup_centered(); + error_message = TTR("Can't convert a sprite from a foreign scene."); } - Ref<Texture2D> texture = node->get_texture(); if (texture.is_null()) { - err_dialog->set_text(TTR("Sprite2D is empty!")); - err_dialog->popup_centered(); - return; + error_message = TTR("Can't convert an empty sprite to mesh."); } - if (node->get_hframes() > 1 || node->get_vframes() > 1) { - err_dialog->set_text(TTR("Can't convert a sprite using animation frames to mesh.")); + error_message = TTR("Can't convert a sprite using animation frames to mesh."); + } + + if (!error_message.is_empty()) { + err_dialog->set_text(error_message); err_dialog->popup_centered(); return; } + _update_mesh_data(); + debug_uv_dialog->popup_centered(); + debug_uv->queue_redraw(); +} + +void Sprite2DEditor::_update_mesh_data() { + ERR_FAIL_NULL(node); + Ref<Texture2D> texture = node->get_texture(); + ERR_FAIL_COND(texture.is_null()); Ref<Image> image = texture->get_image(); ERR_FAIL_COND(image.is_null()); @@ -187,12 +185,9 @@ void Sprite2DEditor::_update_mesh_data() { image->decompress(); } + // TODO: Add support for Sprite2D's region. Rect2 rect; - if (node->is_region_enabled()) { - rect = node->get_region_rect(); - } else { - rect.size = image->get_size(); - } + rect.size = image->get_size(); Ref<BitMap> bm; bm.instantiate(); diff --git a/editor/plugins/sprite_2d_editor_plugin.h b/editor/plugins/sprite_2d_editor_plugin.h index 4d351e2183..52e4b2b264 100644 --- a/editor/plugins/sprite_2d_editor_plugin.h +++ b/editor/plugins/sprite_2d_editor_plugin.h @@ -79,6 +79,7 @@ class Sprite2DEditor : public Control { friend class Sprite2DEditorPlugin; void _debug_uv_draw(); + void _popup_debug_uv_dialog(); void _update_mesh_data(); void _create_node(); diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp index 8df7be766b..f5bff6f3df 100644 --- a/editor/plugins/texture_region_editor_plugin.cpp +++ b/editor/plugins/texture_region_editor_plugin.cpp @@ -54,7 +54,7 @@ Transform2D TextureRegionEditor::_get_offset_transform() const { } void TextureRegionEditor::_texture_preview_draw() { - Ref<Texture2D> object_texture = _get_edited_object_texture(); + const Ref<Texture2D> object_texture = _get_edited_object_texture(); if (object_texture.is_null()) { return; } @@ -68,7 +68,7 @@ void TextureRegionEditor::_texture_preview_draw() { } void TextureRegionEditor::_texture_overlay_draw() { - Ref<Texture2D> object_texture = _get_edited_object_texture(); + const Ref<Texture2D> object_texture = _get_edited_object_texture(); if (object_texture.is_null()) { return; } @@ -746,7 +746,7 @@ void TextureRegionEditor::_update_autoslice() { autoslice_is_dirty = false; autoslice_cache.clear(); - Ref<Texture2D> object_texture = _get_edited_object_texture(); + const Ref<Texture2D> object_texture = _get_edited_object_texture(); if (object_texture.is_null()) { return; } @@ -860,14 +860,6 @@ void TextureRegionEditor::_node_removed(Node *p_node) { } void TextureRegionEditor::_clear_edited_object() { - node_sprite_2d = nullptr; - node_sprite_3d = nullptr; - node_ninepatch = nullptr; - res_stylebox = Ref<StyleBoxTexture>(); - res_atlas_texture = Ref<AtlasTexture>(); -} - -void TextureRegionEditor::edit(Object *p_obj) { if (node_sprite_2d) { node_sprite_2d->disconnect("texture_changed", callable_mp(this, &TextureRegionEditor::_texture_changed)); } @@ -884,6 +876,14 @@ void TextureRegionEditor::edit(Object *p_obj) { res_atlas_texture->disconnect_changed(callable_mp(this, &TextureRegionEditor::_texture_changed)); } + node_sprite_2d = nullptr; + node_sprite_3d = nullptr; + node_ninepatch = nullptr; + res_stylebox = Ref<StyleBoxTexture>(); + res_atlas_texture = Ref<AtlasTexture>(); +} + +void TextureRegionEditor::edit(Object *p_obj) { _clear_edited_object(); if (p_obj) { @@ -950,8 +950,9 @@ Rect2 TextureRegionEditor::_get_edited_object_region() const { region = res_atlas_texture->get_region(); } - if (region == Rect2()) { - region = Rect2(Vector2(), _get_edited_object_texture()->get_size()); + const Ref<Texture2D> object_texture = _get_edited_object_texture(); + if (region == Rect2() && object_texture.is_valid()) { + region = Rect2(Vector2(), object_texture->get_size()); } return region; @@ -965,7 +966,7 @@ void TextureRegionEditor::_texture_changed() { } void TextureRegionEditor::_edit_region() { - Ref<Texture2D> object_texture = _get_edited_object_texture(); + const Ref<Texture2D> object_texture = _get_edited_object_texture(); if (object_texture.is_null()) { _zoom_reset(); hscroll->hide(); diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 5f55591b57..bd52deedac 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -501,16 +501,25 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { // Preserve ownership relations ready for pasting. List<Node *> owned; - node->get_owned_by(node->get_owner() ? node->get_owner() : node, &owned); + Node *owner = node; + while (owner) { + List<Node *> cur_owned; + node->get_owned_by(owner, &cur_owned); + owner = owner->get_owner(); + for (Node *F : cur_owned) { + owned.push_back(F); + } + } for (Node *F : owned) { if (!duplimap.has(F) || F == node) { continue; } Node *d = duplimap[F]; - // Only use this as a marker that ownership needs to be assigned when pasting. - // The actual owner doesn't matter. - d->set_owner(dup); + // Only use nullptr as a marker that ownership may need to be assigned when pasting. + // The ownership is subsequently tracked in the node_clipboard_edited_scene_owned list. + d->set_owner(nullptr); + node_clipboard_edited_scene_owned.insert(d); } node_clipboard.push_back(dup); @@ -3581,14 +3590,17 @@ List<Node *> SceneTreeDock::paste_nodes(bool p_paste_as_sibling) { for (KeyValue<const Node *, Node *> &E2 : duplimap) { Node *d = E2.value; - // When copying, all nodes that should have an owner assigned here were given node as an owner. - if (d != dup && E2.key->get_owner() == node) { - ur->add_do_method(d, "set_owner", owner); + // When copying, all nodes that should have an owner assigned here were given nullptr as an owner + // and added to the node_clipboard_edited_scene_owned list. + if (d != dup && E2.key->get_owner() == nullptr) { + if (node_clipboard_edited_scene_owned.find(const_cast<Node *>(E2.key))) { + ur->add_do_method(d, "set_owner", edited_scene); + } } } if (dup != owner) { - ur->add_do_method(dup, "set_owner", owner); + ur->add_do_method(dup, "set_owner", edited_scene); } ur->add_do_method(editor_selection, "add_node", dup); @@ -3735,6 +3747,7 @@ void SceneTreeDock::_clear_clipboard() { memdelete(E); } node_clipboard.clear(); + node_clipboard_edited_scene_owned.clear(); clipboard_resource_remap.clear(); } diff --git a/editor/scene_tree_dock.h b/editor/scene_tree_dock.h index be0e6e1158..93c0e16db7 100644 --- a/editor/scene_tree_dock.h +++ b/editor/scene_tree_dock.h @@ -143,6 +143,7 @@ class SceneTreeDock : public VBoxContainer { EditorSelection *editor_selection = nullptr; List<Node *> node_clipboard; + HashSet<Node *> node_clipboard_edited_scene_owned; String clipboard_source_scene; HashMap<String, HashMap<Ref<Resource>, Ref<Resource>>> clipboard_resource_remap; diff --git a/misc/extension_api_validation/4.1-stable.expected b/misc/extension_api_validation/4.1-stable.expected index 8ea7d72563..d51523bd38 100644 --- a/misc/extension_api_validation/4.1-stable.expected +++ b/misc/extension_api_validation/4.1-stable.expected @@ -286,7 +286,7 @@ Validate extension JSON: Error: Field 'classes/MeshDataTool/methods/get_format/r Validate extension JSON: Error: Field 'classes/RenderingDevice/methods/shader_get_vertex_input_attribute_mask/return_value': meta changed value in new API, from "uint32" to "uint64". Validate extension JSON: Error: Field 'classes/SurfaceTool/methods/commit/arguments/1': meta changed value in new API, from "uint32" to "uint64". -Surface format was increased to 64 bits from 32 bits. Compatibility methods registered. +Surface format was increased to 64 bits from 32 bits. Compatibility methods registered. GH-79527 -------- @@ -305,3 +305,10 @@ Validate extension JSON: Error: Field 'classes/LineEdit/properties/right_icon': Validate extension JSON: Error: Field 'classes/Sprite3D/properties/texture': type changed value in new API, from "Texture" to "Texture2D". Changed the hint types of some nodes' properties from Texture to Texture2D. No adjustments should be necessary. + + +GH-84419 +-------- +Validate extension JSON: API was removed: classes/Node/constants/NOTIFICATION_NODE_RECACHE_REQUESTED + +Removed unused NOTIFICATION_NODE_RECACHE_REQUESTED notification. It also used to conflict with CanvasItem.NOTIFICATION_DRAW and Window.NOTIFICATION_VISIBILITY_CHANGED (which still need to be resolved). diff --git a/modules/csg/icons/CSGBox3D.svg b/modules/csg/icons/CSGBox3D.svg index bb3a1f357a..d425180cf5 100644 --- a/modules/csg/icons/CSGBox3D.svg +++ b/modules/csg/icons/CSGBox3D.svg @@ -1 +1 @@ -<svg height="16" width="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><mask id="a"><path d="M0 0h16v10a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2 2 2 0 0 0-2 2v2a2 2 0 0 0 2 2H0z" fill="#fff"/></mask><path d="M12 9a1 1 0 0 0-1 1v1h2v2h1a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1zm1 4h-2v-2h-1a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1z" fill="#5fb2ff"/><path d="m8 2 6 3v6l-6 3-6-3V5zm0 12V8l6-3M8 8 2 5" fill="none" stroke-width="2" stroke="#fc7f7f" mask="url(#a)"/></svg> +<svg height="16" width="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><mask id="a"><path d="M0 0h16v10a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2 2 2 0 0 0-2 2v2a2 2 0 0 0 2 2H0z" fill="#fefefe"/></mask><path d="M12 9a1 1 0 0 0-1 1v1h2v2h1a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1zm1 4h-2v-2h-1a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1z" fill="#5fb2ff"/><path d="m8 2 6 3v6l-6 3-6-3V5zm0 12V8l6-3M8 8 2 5" fill="none" stroke-width="2" stroke="#fc7f7f" mask="url(#a)"/></svg> diff --git a/modules/csg/icons/CSGCapsule3D.svg b/modules/csg/icons/CSGCapsule3D.svg index 33a2d4a115..3c2657999c 100644 --- a/modules/csg/icons/CSGCapsule3D.svg +++ b/modules/csg/icons/CSGCapsule3D.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><mask id="a"><path d="M0 0h16v10a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2 2 2 0 0 0-2 2v2a2 2 0 0 0 2 2H0z" fill="#fff"/></mask><path d="M12 9a1 1 0 0 0-1 1v1h2v2h1a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1zm1 4h-2v-2h-1a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1z" fill="#5fb2ff"/><path d="M4 6a4 4 0 0 1 8 0v4a4 4 0 0 1-8 0zm0 1.25a2.5 1 0 0 0 8 0m-4-5v12" fill="none" stroke-width="2" stroke="#fc7f7f" mask="url(#a)"/></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><mask id="a"><path d="M0 0h16v10a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2 2 2 0 0 0-2 2v2a2 2 0 0 0 2 2H0z" fill="#fefefe"/></mask><path d="M12 9a1 1 0 0 0-1 1v1h2v2h1a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1zm1 4h-2v-2h-1a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1z" fill="#5fb2ff"/><path d="M4 6a4 4 0 0 1 8 0v4a4 4 0 0 1-8 0zm0 1.25a2.5 1 0 0 0 8 0m-4-5v12" fill="none" stroke-width="2" stroke="#fc7f7f" mask="url(#a)"/></svg> diff --git a/modules/csg/icons/CSGCylinder3D.svg b/modules/csg/icons/CSGCylinder3D.svg index 29d658dc46..19e48b4dba 100644 --- a/modules/csg/icons/CSGCylinder3D.svg +++ b/modules/csg/icons/CSGCylinder3D.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><mask id="a"><path d="M0 0h16v10a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2 2 2 0 0 0-2 2v2a2 2 0 0 0 2 2H0z" fill="#fff"/></mask><path d="M12 9a1 1 0 0 0-1 1v1h2v2h1a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1zm1 4h-2v-2h-1a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1z" fill="#5fb2ff"/><path d="M2 4v8a6 2 0 0 0 12 0V4A6 2 0 0 0 2 4a6 2 0 0 0 12 0" stroke-width="2" fill="none" stroke="#fc7f7f" mask="url(#a)"/></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><mask id="a"><path d="M0 0h16v10a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2 2 2 0 0 0-2 2v2a2 2 0 0 0 2 2H0z" fill="#fefefe"/></mask><path d="M12 9a1 1 0 0 0-1 1v1h2v2h1a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1zm1 4h-2v-2h-1a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1z" fill="#5fb2ff"/><path d="M2 4v8a6 2 0 0 0 12 0V4A6 2 0 0 0 2 4a6 2 0 0 0 12 0" stroke-width="2" fill="none" stroke="#fc7f7f" mask="url(#a)"/></svg> diff --git a/modules/csg/icons/CSGPolygon3D.svg b/modules/csg/icons/CSGPolygon3D.svg index 8d4b61e039..090047248b 100644 --- a/modules/csg/icons/CSGPolygon3D.svg +++ b/modules/csg/icons/CSGPolygon3D.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><mask id="a"><path d="M0 0h16v10a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2 2 2 0 0 0-2 2v2a2 2 0 0 0 2 2H0z" fill="#fff"/></mask><path d="M12 9a1 1 0 0 0-1 1v1h2v2h1a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1zm1 4h-2v-2h-1a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1z" fill="#5fb2ff"/><path d="m8 2 6 3.5v5L8 14l-6-3.5v-5h6zm6 3.5L8 9 2 5.5M8 9v5" fill="none" stroke-linejoin="round" stroke-width="2" stroke="#fc7f7f" mask="url(#a)"/></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><mask id="a"><path d="M0 0h16v10a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2 2 2 0 0 0-2 2v2a2 2 0 0 0 2 2H0z" fill="#fefefe"/></mask><path d="M12 9a1 1 0 0 0-1 1v1h2v2h1a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1zm1 4h-2v-2h-1a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1z" fill="#5fb2ff"/><path d="m8 2 6 3.5v5L8 14l-6-3.5v-5h6zm6 3.5L8 9 2 5.5M8 9v5" fill="none" stroke-linejoin="round" stroke-width="2" stroke="#fc7f7f" mask="url(#a)"/></svg> diff --git a/modules/csg/icons/CSGSphere3D.svg b/modules/csg/icons/CSGSphere3D.svg index 16d45b3c99..a677ffaf5c 100644 --- a/modules/csg/icons/CSGSphere3D.svg +++ b/modules/csg/icons/CSGSphere3D.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><mask id="a"><path d="M0 0h16v10a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2 2 2 0 0 0-2 2v2a2 2 0 0 0 2 2H0z" fill="#fff"/></mask><path d="M12 9a1 1 0 0 0-1 1v1h2v2h1a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1zm1 4h-2v-2h-1a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1z" fill="#5fb2ff"/><path d="M8 2a6 6 0 0 0 0 12A6 6 0 0 0 8 2v12M2.05 7.4a6 2 0 0 0 11.9 0" fill="none" stroke-width="2" stroke="#fc7f7f" mask="url(#a)"/></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><mask id="a"><path d="M0 0h16v10a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2 2 2 0 0 0-2 2v2a2 2 0 0 0 2 2H0z" fill="#fefefe"/></mask><path d="M12 9a1 1 0 0 0-1 1v1h2v2h1a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1zm1 4h-2v-2h-1a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1z" fill="#5fb2ff"/><path d="M8 2a6 6 0 0 0 0 12A6 6 0 0 0 8 2v12M2.05 7.4a6 2 0 0 0 11.9 0" fill="none" stroke-width="2" stroke="#fc7f7f" mask="url(#a)"/></svg> diff --git a/modules/csg/icons/CSGTorus3D.svg b/modules/csg/icons/CSGTorus3D.svg index 27a6b422f9..60c56bd1ca 100644 --- a/modules/csg/icons/CSGTorus3D.svg +++ b/modules/csg/icons/CSGTorus3D.svg @@ -1 +1 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><mask id="a"><path d="M0 0h16v10a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2 2 2 0 0 0-2 2v2a2 2 0 0 0 2 2H0z" fill="#fff"/></mask><path d="M12 9a1 1 0 0 0-1 1v1h2v2h1a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1zm1 4h-2v-2h-1a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1z" fill="#5fb2ff"/><g fill="none" stroke="#fc7f7f" mask="url(#a)"><path d="M2.5 10a6 4 0 0 0 11 0 4 4 0 0 0 0-4 6 4 0 0 0-11 0 4 4 0 0 0 0 4z" stroke-width="2"/><path d="M6.2 7.2a2 1 0 1 0 3.6 0" stroke-width="1.75" stroke-linecap="round"/></g></svg> +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><mask id="a"><path d="M0 0h16v10a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2 2 2 0 0 0-2 2v2a2 2 0 0 0 2 2H0z" fill="#fefefe"/></mask><path d="M12 9a1 1 0 0 0-1 1v1h2v2h1a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1zm1 4h-2v-2h-1a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1z" fill="#5fb2ff"/><g fill="none" stroke="#fc7f7f" mask="url(#a)"><path d="M2.5 10a6 4 0 0 0 11 0 4 4 0 0 0 0-4 6 4 0 0 0-11 0 4 4 0 0 0 0 4z" stroke-width="2"/><path d="M6.2 7.2a2 1 0 1 0 3.6 0" stroke-width="1.75" stroke-linecap="round"/></g></svg> diff --git a/modules/gltf/editor/editor_scene_importer_gltf.cpp b/modules/gltf/editor/editor_scene_importer_gltf.cpp index ae2bd1f580..e35c0e9b9b 100644 --- a/modules/gltf/editor/editor_scene_importer_gltf.cpp +++ b/modules/gltf/editor/editor_scene_importer_gltf.cpp @@ -51,6 +51,10 @@ Node *EditorSceneFormatImporterGLTF::import_scene(const String &p_path, uint32_t gltf.instantiate(); Ref<GLTFState> state; state.instantiate(); + if (p_options.has("gltf/naming_version")) { + int naming_version = p_options["gltf/naming_version"]; + gltf->set_naming_version(naming_version); + } if (p_options.has("gltf/embedded_image_handling")) { int32_t enum_option = p_options["gltf/embedded_image_handling"]; state->set_handle_binary_image(enum_option); @@ -77,7 +81,16 @@ Node *EditorSceneFormatImporterGLTF::import_scene(const String &p_path, uint32_t void EditorSceneFormatImporterGLTF::get_import_options(const String &p_path, List<ResourceImporter::ImportOption> *r_options) { + r_options->push_back(ResourceImporterScene::ImportOption(PropertyInfo(Variant::INT, "gltf/naming_version", PROPERTY_HINT_ENUM, "Godot 4.1 or 4.0,Godot 4.2 or later"), 1)); r_options->push_back(ResourceImporterScene::ImportOption(PropertyInfo(Variant::INT, "gltf/embedded_image_handling", PROPERTY_HINT_ENUM, "Discard All Textures,Extract Textures,Embed as Basis Universal,Embed as Uncompressed", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), GLTFState::HANDLE_BINARY_EXTRACT_TEXTURES)); } +void EditorSceneFormatImporterGLTF::handle_compatibility_options(HashMap<StringName, Variant> &p_import_params) const { + if (!p_import_params.has("gltf/naming_version")) { + // If an existing import file is missing the glTF + // compatibility version, we need to use version 0. + p_import_params["gltf/naming_version"] = 0; + } +} + #endif // TOOLS_ENABLED diff --git a/modules/gltf/editor/editor_scene_importer_gltf.h b/modules/gltf/editor/editor_scene_importer_gltf.h index ed57ec8cdb..7726c845bf 100644 --- a/modules/gltf/editor/editor_scene_importer_gltf.h +++ b/modules/gltf/editor/editor_scene_importer_gltf.h @@ -49,6 +49,7 @@ public: List<String> *r_missing_deps, Error *r_err = nullptr) override; virtual void get_import_options(const String &p_path, List<ResourceImporter::ImportOption> *r_options) override; + virtual void handle_compatibility_options(HashMap<StringName, Variant> &p_import_params) const override; }; #endif // TOOLS_ENABLED diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp index 90280e0372..b5adea7da0 100644 --- a/modules/gltf/gltf_document.cpp +++ b/modules/gltf/gltf_document.cpp @@ -576,6 +576,9 @@ Error GLTFDocument::_parse_scenes(Ref<GLTFState> p_state) { } else { p_state->scene_name = p_state->filename; } + if (_naming_version == 0) { + p_state->scene_name = _gen_unique_name(p_state, p_state->scene_name); + } } return OK; @@ -3023,6 +3026,14 @@ Error GLTFDocument::_parse_meshes(Ref<GLTFState> p_state) { return OK; } +void GLTFDocument::set_naming_version(int p_version) { + _naming_version = p_version; +} + +int GLTFDocument::get_naming_version() const { + return _naming_version; +} + void GLTFDocument::set_image_format(const String &p_image_format) { _image_format = p_image_format; } @@ -5358,12 +5369,22 @@ void GLTFDocument::_assign_node_names(Ref<GLTFState> p_state) { } String gltf_node_name = gltf_node->get_name(); if (gltf_node_name.is_empty()) { - if (gltf_node->mesh >= 0) { - gltf_node_name = "Mesh"; - } else if (gltf_node->camera >= 0) { - gltf_node_name = "Camera"; + if (_naming_version == 0) { + if (gltf_node->mesh >= 0) { + gltf_node_name = _gen_unique_name(p_state, "Mesh"); + } else if (gltf_node->camera >= 0) { + gltf_node_name = _gen_unique_name(p_state, "Camera3D"); + } else { + gltf_node_name = _gen_unique_name(p_state, "Node"); + } } else { - gltf_node_name = "Node"; + if (gltf_node->mesh >= 0) { + gltf_node_name = "Mesh"; + } else if (gltf_node->camera >= 0) { + gltf_node_name = "Camera"; + } else { + gltf_node_name = "Node"; + } } } gltf_node->set_name(_gen_unique_name(p_state, gltf_node_name)); @@ -7405,7 +7426,11 @@ Node *GLTFDocument::_generate_scene_node_tree(Ref<GLTFState> p_state) { if (unlikely(p_state->scene_name.is_empty())) { p_state->scene_name = single_root->get_name(); } else if (single_root->get_name() == StringName()) { - single_root->set_name(_gen_unique_name(p_state, p_state->scene_name)); + if (_naming_version == 0) { + single_root->set_name(p_state->scene_name); + } else { + single_root->set_name(_gen_unique_name(p_state, p_state->scene_name)); + } } return single_root; } diff --git a/modules/gltf/gltf_document.h b/modules/gltf/gltf_document.h index 828d650cff..7e378fe94d 100644 --- a/modules/gltf/gltf_document.h +++ b/modules/gltf/gltf_document.h @@ -73,6 +73,7 @@ public: private: const float BAKE_FPS = 30.0f; + int _naming_version = 1; String _image_format = "PNG"; float _lossy_quality = 0.75f; Ref<GLTFDocumentExtension> _image_save_extension; @@ -86,6 +87,8 @@ public: static void unregister_gltf_document_extension(Ref<GLTFDocumentExtension> p_extension); static void unregister_all_gltf_document_extensions(); + void set_naming_version(int p_version); + int get_naming_version() const; void set_image_format(const String &p_image_format); String get_image_format() const; void set_lossy_quality(float p_lossy_quality); diff --git a/scene/animation/animation_mixer.cpp b/scene/animation/animation_mixer.cpp index 8e25b3ed16..fb17dae832 100644 --- a/scene/animation/animation_mixer.cpp +++ b/scene/animation/animation_mixer.cpp @@ -1998,10 +1998,11 @@ void AnimationMixer::reset() { ERR_FAIL_NULL(root_node_object); AnimationPlayer *aux_player = memnew(AnimationPlayer); - EditorNode::get_singleton()->add_child(aux_player); + root_node_object->add_child(aux_player); Ref<AnimationLibrary> al; al.instantiate(); al->add_animation(SceneStringNames::get_singleton()->RESET, reset_anim); + aux_player->set_reset_on_save_enabled(false); aux_player->set_root_node(aux_player->get_path_to(root_node_object)); aux_player->add_animation_library("", al); aux_player->set_assigned_animation(SceneStringNames::get_singleton()->RESET); diff --git a/scene/main/node.cpp b/scene/main/node.cpp index f44e3de203..9ce036616b 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -3442,7 +3442,6 @@ void Node::_bind_methods() { BIND_CONSTANT(NOTIFICATION_POST_ENTER_TREE); BIND_CONSTANT(NOTIFICATION_DISABLED); BIND_CONSTANT(NOTIFICATION_ENABLED); - BIND_CONSTANT(NOTIFICATION_NODE_RECACHE_REQUESTED); BIND_CONSTANT(NOTIFICATION_EDITOR_PRE_SAVE); BIND_CONSTANT(NOTIFICATION_EDITOR_POST_SAVE); diff --git a/scene/main/node.h b/scene/main/node.h index 94c6893170..cd1c31d784 100644 --- a/scene/main/node.h +++ b/scene/main/node.h @@ -350,7 +350,6 @@ public: NOTIFICATION_POST_ENTER_TREE = 27, NOTIFICATION_DISABLED = 28, NOTIFICATION_ENABLED = 29, - NOTIFICATION_NODE_RECACHE_REQUESTED = 30, //keep these linked to node NOTIFICATION_WM_MOUSE_ENTER = 1002, diff --git a/scene/resources/animation_library.cpp b/scene/resources/animation_library.cpp index a69b1818d2..436bf88ec9 100644 --- a/scene/resources/animation_library.cpp +++ b/scene/resources/animation_library.cpp @@ -154,7 +154,8 @@ void AnimationLibrary::_bind_methods() { ClassDB::bind_method(D_METHOD("_set_data", "data"), &AnimationLibrary::_set_data); ClassDB::bind_method(D_METHOD("_get_data"), &AnimationLibrary::_get_data); - ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR), "_set_data", "_get_data"); + ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL), "_set_data", "_get_data"); + ADD_SIGNAL(MethodInfo("animation_added", PropertyInfo(Variant::STRING_NAME, "name"))); ADD_SIGNAL(MethodInfo("animation_removed", PropertyInfo(Variant::STRING_NAME, "name"))); ADD_SIGNAL(MethodInfo("animation_renamed", PropertyInfo(Variant::STRING_NAME, "name"), PropertyInfo(Variant::STRING_NAME, "to_name"))); |