diff options
170 files changed, 1794 insertions, 1154 deletions
diff --git a/SConstruct b/SConstruct index 45765976cd..fee9786234 100644 --- a/SConstruct +++ b/SConstruct @@ -265,17 +265,17 @@ if selected_platform in platform_list: CCFLAGS = env.get('CCFLAGS', '') env['CCFLAGS'] = '' - env.Append(CCFLAGS=string.split(str(CCFLAGS))) + env.Append(CCFLAGS=str(CCFLAGS).split()) CFLAGS = env.get('CFLAGS', '') env['CFLAGS'] = '' - env.Append(CFLAGS=string.split(str(CFLAGS))) + env.Append(CFLAGS=str(CFLAGS).split()) LINKFLAGS = env.get('LINKFLAGS', '') env['LINKFLAGS'] = '' - env.Append(LINKFLAGS=string.split(str(LINKFLAGS))) + env.Append(LINKFLAGS=str(LINKFLAGS).split()) flag_list = platform_flags[selected_platform] for f in flag_list: diff --git a/compat.py b/compat.py new file mode 100644 index 0000000000..7338c479fb --- /dev/null +++ b/compat.py @@ -0,0 +1,31 @@ +import sys + +if sys.version_info < (3,): + def isbasestring(s): + return isinstance(s, basestring) + def open_utf8(filename, mode): + return open(filename, mode) + def byte_to_str(x): + return str(ord(x)) + import cStringIO + def StringIO(): + return cStringIO.StringIO() + def encode_utf8(x): + return x + def iteritems(d): + return d.iteritems() +else: + def isbasestring(s): + return isinstance(s, (str, bytes)) + def open_utf8(filename, mode): + return open(filename, mode, encoding="utf-8") + def byte_to_str(x): + return str(x) + import io + def StringIO(): + return io.StringIO() + import codecs + def encode_utf8(x): + return codecs.utf_8_encode(x)[0] + def iteritems(d): + return iter(d.items()) diff --git a/core/SCsub b/core/SCsub index 4c541d7269..c1e57f6840 100644 --- a/core/SCsub +++ b/core/SCsub @@ -18,7 +18,7 @@ gd_cpp = '#include "project_settings.h"\n' gd_cpp += gd_inc gd_cpp += "void ProjectSettings::register_global_defaults() {\n" + gd_call + "\n}\n" -f = open("global_defaults.gen.cpp", "wb") +f = open("global_defaults.gen.cpp", "w") f.write(gd_cpp) f.close() @@ -47,7 +47,7 @@ if ("SCRIPT_AES256_ENCRYPTION_KEY" in os.environ): txt = "0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0" print("Invalid AES256 encryption key, not 64 bits hex: " + e) -f = open("script_encryption_key.gen.cpp", "wb") +f = open("script_encryption_key.gen.cpp", "w") f.write("#include \"project_settings.h\"\nuint8_t script_encryption_key[32]={" + txt + "};\n") f.close() diff --git a/core/class_db.cpp b/core/class_db.cpp index 0d6c72afa8..1cb287a143 100644 --- a/core/class_db.cpp +++ b/core/class_db.cpp @@ -46,11 +46,6 @@ #ifdef DEBUG_METHODS_ENABLED -ParamDef::ParamDef(const Variant &p_variant) - : used(true), - val(p_variant) { -} - MethodDefinition D_METHOD(const char *p_name) { MethodDefinition md; @@ -539,8 +534,9 @@ void ClassDB::get_method_list(StringName p_class, List<MethodInfo> *p_methods, b } minfo.return_val = method->get_return_info(); - minfo.flags = method->get_hint_flags(); + minfo.default_arguments = method->get_default_arguments(); + p_methods->push_back(minfo); } @@ -864,7 +860,7 @@ void ClassDB::add_property(StringName p_class, const PropertyInfo &p_pinfo, cons MethodBind *mb_get = NULL; if (p_getter) { - MethodBind *mb_get = get_method(p_class, p_getter); + mb_get = get_method(p_class, p_getter); #ifdef DEBUG_METHODS_ENABLED if (!mb_get) { diff --git a/core/class_db.h b/core/class_db.h index 25a5000572..f6b97748b0 100644 --- a/core/class_db.h +++ b/core/class_db.h @@ -38,29 +38,6 @@ @author Juan Linietsky <reduzio@gmail.com> */ -struct ParamHint { - - String name; - PropertyHint hint; - String hint_text; - Variant default_val; - - ParamHint(const String &p_name = "", PropertyHint p_hint = PROPERTY_HINT_NONE, const String &p_hint_text = "", const Variant &p_default_val = Variant()) - : name(p_name), - hint(p_hint), - hint_text(p_hint_text), - default_val(p_default_val) { - } -}; - -struct ParamDef { - bool used; - Variant val; - _FORCE_INLINE_ ParamDef() { used = false; } - ParamDef(const Variant &p_variant); -}; - -//#define DEFVAL( m_defval ) ParamDef(m_defval) #define DEFVAL(m_defval) (m_defval) //#define SIMPLE_METHODDEF diff --git a/core/method_bind.h b/core/method_bind.h index f6cae6f34d..75f09b2cd9 100644 --- a/core/method_bind.h +++ b/core/method_bind.h @@ -334,6 +334,7 @@ public: } argument_types = at; arguments = p_info; + arguments.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT; #endif } diff --git a/core/object.cpp b/core/object.cpp index b220dc0563..23e32a214a 100644 --- a/core/object.cpp +++ b/core/object.cpp @@ -274,6 +274,63 @@ MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyIn arguments.push_back(p_param5); } +MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name) + : name(p_name), + flags(METHOD_FLAG_NORMAL), + id(0) { + return_val = p_ret; +} + +MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1) + : name(p_name), + flags(METHOD_FLAG_NORMAL), + id(0) { + return_val = p_ret; + arguments.push_back(p_param1); +} + +MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2) + : name(p_name), + flags(METHOD_FLAG_NORMAL), + id(0) { + return_val = p_ret; + arguments.push_back(p_param1); + arguments.push_back(p_param2); +} + +MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3) + : name(p_name), + flags(METHOD_FLAG_NORMAL), + id(0) { + return_val = p_ret; + arguments.push_back(p_param1); + arguments.push_back(p_param2); + arguments.push_back(p_param3); +} + +MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4) + : name(p_name), + flags(METHOD_FLAG_NORMAL), + id(0) { + return_val = p_ret; + arguments.push_back(p_param1); + arguments.push_back(p_param2); + arguments.push_back(p_param3); + arguments.push_back(p_param4); +} + +MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4, const PropertyInfo &p_param5) + : name(p_name), + flags(METHOD_FLAG_NORMAL), + id(0) { + return_val = p_ret; + arguments.push_back(p_param1); + arguments.push_back(p_param2); + arguments.push_back(p_param3); + arguments.push_back(p_param4); + arguments.push_back(p_param5); +} + Object::Connection::operator Variant() const { Dictionary d; @@ -1529,7 +1586,7 @@ void Object::_bind_methods() { ADD_SIGNAL(MethodInfo("script_changed")); BIND_VMETHOD(MethodInfo("_notification", PropertyInfo(Variant::INT, "what"))); - BIND_VMETHOD(MethodInfo("_set:bool", PropertyInfo(Variant::STRING, "property"), PropertyInfo(Variant::NIL, "value"))); + BIND_VMETHOD(MethodInfo(Variant::BOOL, "_set", PropertyInfo(Variant::STRING, "property"), PropertyInfo(Variant::NIL, "value"))); #ifdef TOOLS_ENABLED MethodInfo miget("_get", PropertyInfo(Variant::STRING, "property")); miget.return_val.name = "Variant"; diff --git a/core/object.h b/core/object.h index 8b13477480..6e1ed4308e 100644 --- a/core/object.h +++ b/core/object.h @@ -205,6 +205,12 @@ struct MethodInfo { MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3); MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4); MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4, const PropertyInfo &p_param5); + MethodInfo(const PropertyInfo &p_ret, const String &p_name); + MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1); + MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2); + MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3); + MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4); + MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4, const PropertyInfo &p_param5); }; // old cast_to diff --git a/core/script_language.cpp b/core/script_language.cpp index 9a891f9e52..f2be15897e 100644 --- a/core/script_language.cpp +++ b/core/script_language.cpp @@ -54,6 +54,12 @@ void Script::_bind_methods() { ClassDB::bind_method(D_METHOD("get_source_code"), &Script::get_source_code); ClassDB::bind_method(D_METHOD("set_source_code", "source"), &Script::set_source_code); ClassDB::bind_method(D_METHOD("reload", "keep_state"), &Script::reload, DEFVAL(false)); + + ClassDB::bind_method(D_METHOD("has_method", "method_name"), &Script::has_method); + ClassDB::bind_method(D_METHOD("has_script_signal", "signal_name"), &Script::has_script_signal); + + ClassDB::bind_method(D_METHOD("is_tool"), &Script::is_tool); + ClassDB::bind_method(D_METHOD("get_node_type"), &Script::get_node_type); } void ScriptServer::set_scripting_enabled(bool p_enabled) { diff --git a/core/type_info.h b/core/type_info.h index a7d3fa20c8..da6047450c 100644 --- a/core/type_info.h +++ b/core/type_info.h @@ -51,15 +51,15 @@ struct GetTypeInfo { template <> \ struct GetTypeInfo<m_type> { \ enum { VARIANT_TYPE = m_var_type }; \ - static inline PropertyInfo get_class_info() { \ - return PropertyInfo((Variant::Type)VARIANT_TYPE,String()); \ + static inline PropertyInfo get_class_info() { \ + return PropertyInfo((Variant::Type)VARIANT_TYPE, String()); \ } \ }; \ template <> \ struct GetTypeInfo<const m_type &> { \ enum { VARIANT_TYPE = m_var_type }; \ - static inline PropertyInfo get_class_info() { \ - return PropertyInfo((Variant::Type)VARIANT_TYPE,String()); \ + static inline PropertyInfo get_class_info() { \ + return PropertyInfo((Variant::Type)VARIANT_TYPE, String()); \ } \ }; @@ -110,49 +110,47 @@ template <> struct GetTypeInfo<RefPtr> { enum { VARIANT_TYPE = Variant::OBJECT }; static inline PropertyInfo get_class_info() { - return PropertyInfo(Variant::OBJECT,String(),PROPERTY_HINT_RESOURCE_TYPE,"Reference"); + return PropertyInfo(Variant::OBJECT, String(), PROPERTY_HINT_RESOURCE_TYPE, "Reference"); } }; template <> struct GetTypeInfo<const RefPtr &> { enum { VARIANT_TYPE = Variant::OBJECT }; static inline PropertyInfo get_class_info() { - return PropertyInfo(Variant::OBJECT,String(),PROPERTY_HINT_RESOURCE_TYPE,"Reference"); + return PropertyInfo(Variant::OBJECT, String(), PROPERTY_HINT_RESOURCE_TYPE, "Reference"); } }; - //for variant -template<> +template <> struct GetTypeInfo<Variant> { enum { VARIANT_TYPE = Variant::NIL }; static inline PropertyInfo get_class_info() { - return PropertyInfo(Variant::NIL,String(),PROPERTY_HINT_NONE,String(),PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_NIL_IS_VARIANT); + return PropertyInfo(Variant::NIL, String(), PROPERTY_HINT_NONE, String(), PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_NIL_IS_VARIANT); } }; -template<> -struct GetTypeInfo<const Variant&> { +template <> +struct GetTypeInfo<const Variant &> { enum { VARIANT_TYPE = Variant::NIL }; static inline PropertyInfo get_class_info() { - return PropertyInfo(Variant::NIL,String(),PROPERTY_HINT_NONE,String(),PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_NIL_IS_VARIANT); + return PropertyInfo(Variant::NIL, String(), PROPERTY_HINT_NONE, String(), PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_NIL_IS_VARIANT); } }; - #define MAKE_TEMPLATE_TYPE_INFO(m_template, m_type, m_var_type) \ template <> \ struct GetTypeInfo<m_template<m_type> > { \ enum { VARIANT_TYPE = m_var_type }; \ - static inline PropertyInfo get_class_info() { \ - return PropertyInfo((Variant::Type)VARIANT_TYPE,String()); \ + static inline PropertyInfo get_class_info() { \ + return PropertyInfo((Variant::Type)VARIANT_TYPE, String()); \ } \ }; \ template <> \ struct GetTypeInfo<const m_template<m_type> &> { \ enum { VARIANT_TYPE = m_var_type }; \ - static inline PropertyInfo get_class_info() { \ - return PropertyInfo((Variant::Type)VARIANT_TYPE,String()); \ + static inline PropertyInfo get_class_info() { \ + return PropertyInfo((Variant::Type)VARIANT_TYPE, String()); \ } \ }; @@ -178,7 +176,6 @@ struct GetTypeInfo<T *, typename EnableIf<TypeInherits<Object, T>::value>::type> static inline PropertyInfo get_class_info() { return PropertyInfo(StringName(T::get_class_static())); } - }; template <typename T> @@ -190,13 +187,13 @@ struct GetTypeInfo<const T *, typename EnableIf<TypeInherits<Object, T>::value>: } }; -#define TEMPL_MAKE_ENUM_TYPE_INFO(m_enum, m_impl) \ - template <> \ - struct GetTypeInfo<m_impl> { \ - enum { VARIANT_TYPE = Variant::INT }; \ - static inline PropertyInfo get_class_info() { \ - return PropertyInfo(Variant::INT,String(),PROPERTY_HINT_NONE,String(),PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_CLASS_IS_ENUM,String(#m_enum).replace("::",".")); \ - } \ +#define TEMPL_MAKE_ENUM_TYPE_INFO(m_enum, m_impl) \ + template <> \ + struct GetTypeInfo<m_impl> { \ + enum { VARIANT_TYPE = Variant::INT }; \ + static inline PropertyInfo get_class_info() { \ + return PropertyInfo(Variant::INT, String(), PROPERTY_HINT_NONE, String(), PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_CLASS_IS_ENUM, String(#m_enum).replace("::", ".")); \ + } \ }; #define MAKE_ENUM_TYPE_INFO(m_enum) \ @@ -212,9 +209,15 @@ inline StringName __constant_get_enum_name(T param, const String &p_constant) { return GetTypeInfo<T>::get_class_info().class_name; } +#define CLASS_INFO(m_type) \ + (GetTypeInfo<m_type *>::VARIANT_TYPE != Variant::NIL ? \ + GetTypeInfo<m_type *>::get_class_info() : \ + GetTypeInfo<m_type>::get_class_info()) + #else #define MAKE_ENUM_TYPE_INFO(m_enum) +#define CLASS_INFO(m_type) #endif // DEBUG_METHODS_ENABLED diff --git a/drivers/SCsub b/drivers/SCsub index 73a3f7898a..b8bba91378 100644 --- a/drivers/SCsub +++ b/drivers/SCsub @@ -16,6 +16,7 @@ SConscript('alsa/SCsub') SConscript('pulseaudio/SCsub') if (env["platform"] == "windows"): SConscript("rtaudio/SCsub") + SConscript("wasapi/SCsub") if (env["xaudio2"] == "yes"): SConscript("xaudio2/SCsub") diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp index 9c7a1dd859..f4dd9682a1 100644 --- a/drivers/gles3/rasterizer_scene_gles3.cpp +++ b/drivers/gles3/rasterizer_scene_gles3.cpp @@ -3259,6 +3259,8 @@ void RasterizerSceneGLES3::_render_mrts(Environment *env, const CameraMatrix &p_ state.ssao_blur_shader.set_uniform(SsaoBlurShaderGLES3::CAMERA_Z_NEAR, p_cam_projection.get_z_near()); GLint axis[2] = { i, 1 - i }; glUniform2iv(state.ssao_blur_shader.get_uniform(SsaoBlurShaderGLES3::AXIS), 1, axis); + glUniform2iv(state.ssao_blur_shader.get_uniform(SsaoBlurShaderGLES3::SCREEN_SIZE), 1, ss); + glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, storage->frame.current_rt->effects.ssao.blur_red[i]); glActiveTexture(GL_TEXTURE1); diff --git a/drivers/gles3/rasterizer_scene_gles3.h b/drivers/gles3/rasterizer_scene_gles3.h index 1ab2afe664..659408b455 100644 --- a/drivers/gles3/rasterizer_scene_gles3.h +++ b/drivers/gles3/rasterizer_scene_gles3.h @@ -108,7 +108,7 @@ public: TonemapShaderGLES3 tonemap_shader; struct SceneDataUBO { - + //this is a std140 compatible struct. Please read the OpenGL 3.3 Specificaiton spec before doing any changes float projection_matrix[16]; float camera_inverse_matrix[16]; float camera_matrix[16]; @@ -133,12 +133,12 @@ public: float subsurface_scatter_width; float ambient_occlusion_affect_light; - bool fog_depth_enabled; + uint32_t fog_depth_enabled; float fog_depth_begin; float fog_depth_curve; - bool fog_transmit_enabled; + uint32_t fog_transmit_enabled; float fog_transmit_curve; - bool fog_height_enabled; + uint32_t fog_height_enabled; float fog_height_min; float fog_height_max; float fog_height_curve; diff --git a/drivers/gles3/shader_compiler_gles3.cpp b/drivers/gles3/shader_compiler_gles3.cpp index d793ea446d..c308e9eddb 100644 --- a/drivers/gles3/shader_compiler_gles3.cpp +++ b/drivers/gles3/shader_compiler_gles3.cpp @@ -608,6 +608,9 @@ String ShaderCompilerGLES3::_dump_node_code(SL::Node *p_node, int p_level, Gener } else { code = "return;"; } + } else if (cfnode->flow_op == SL::FLOW_OP_DISCARD) { + + code = "discard;"; } } break; @@ -752,7 +755,6 @@ ShaderCompilerGLES3::ShaderCompilerGLES3() { actions[VS::SHADER_SPATIAL].renames["SSS_STRENGTH"] = "sss_strength"; actions[VS::SHADER_SPATIAL].renames["AO"] = "ao"; actions[VS::SHADER_SPATIAL].renames["EMISSION"] = "emission"; - actions[VS::SHADER_SPATIAL].renames["DISCARD"] = "_discard"; //actions[VS::SHADER_SPATIAL].renames["SCREEN_UV"]=ShaderLanguage::TYPE_VEC2; actions[VS::SHADER_SPATIAL].renames["POINT_COORD"] = "gl_PointCoord"; actions[VS::SHADER_SPATIAL].renames["INSTANCE_CUSTOM"] = "instance_custom"; diff --git a/drivers/gles3/shaders/SCsub b/drivers/gles3/shaders/SCsub index 0c69c8cf74..f1811fa7b5 100644 --- a/drivers/gles3/shaders/SCsub +++ b/drivers/gles3/shaders/SCsub @@ -2,7 +2,7 @@ Import('env') -if env['BUILDERS'].has_key('GLES3_GLSL'): +if 'GLES3_GLSL' in env['BUILDERS']: env.GLES3_GLSL('copy.glsl'); env.GLES3_GLSL('resolve.glsl'); env.GLES3_GLSL('canvas.glsl'); diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl index c9e9dacdb5..ef4925895c 100644 --- a/drivers/gles3/shaders/scene.glsl +++ b/drivers/gles3/shaders/scene.glsl @@ -1559,10 +1559,6 @@ void main() { vec2 screen_uv = gl_FragCoord.xy*screen_pixel_size; #endif -#if defined(ENABLE_DISCARD) - bool discard_=false; -#endif - #if defined (ENABLE_SSS) float sss_strength=0.0; #endif @@ -1603,13 +1599,6 @@ FRAGMENT_SHADER_CODE #endif -#if defined(ENABLE_DISCARD) - if (discard_) { - //easy to eliminate dead code - discard; - } -#endif - #ifdef ENABLE_CLIP_ALPHA if (albedo.a<0.99) { //used for doublepass and shadowmapping @@ -1971,7 +1960,6 @@ FRAGMENT_SHADER_CODE #ifdef SHADELESS - frag_color=vec4(albedo,alpha); diffuse_buffer=vec4(albedo.rgb,0.0); specular_buffer=vec4(0.0); diff --git a/drivers/gles3/shaders/ssao_blur.glsl b/drivers/gles3/shaders/ssao_blur.glsl index ce4154f50c..c7c978dc37 100644 --- a/drivers/gles3/shaders/ssao_blur.glsl +++ b/drivers/gles3/shaders/ssao_blur.glsl @@ -56,6 +56,8 @@ uniform ivec2 axis; uniform float camera_z_far; uniform float camera_z_near; +uniform ivec2 screen_size; + void main() { ivec2 ssC = ivec2(gl_FragCoord.xy); @@ -83,6 +85,7 @@ void main() { float totalWeight = BASE; sum *= totalWeight; + ivec2 clamp_limit = screen_size - ivec2(1); for (int r = -R; r <= R; ++r) { // We already handled the zero case above. This loop should be unrolled and the static branch optimized out, @@ -90,8 +93,8 @@ void main() { if (r != 0) { ivec2 ppos = ssC + axis * (r * SCALE); - float value = texelFetch(source_ssao, ppos, 0).r; - float temp_depth = texelFetch(source_depth, ssC, 0).r; + float value = texelFetch(source_ssao, clamp(ppos,ivec2(0),clamp_limit), 0).r; + float temp_depth = texelFetch(source_depth, clamp(ssC,ivec2(0),clamp_limit), 0).r; temp_depth = temp_depth * 2.0 - 1.0; temp_depth = 2.0 * camera_z_near * camera_z_far / (camera_z_far + camera_z_near - temp_depth * (camera_z_far - camera_z_near)); diff --git a/drivers/rtaudio/audio_driver_rtaudio.cpp b/drivers/rtaudio/audio_driver_rtaudio.cpp index 8e52b53ad6..7de3ff192e 100644 --- a/drivers/rtaudio/audio_driver_rtaudio.cpp +++ b/drivers/rtaudio/audio_driver_rtaudio.cpp @@ -104,21 +104,14 @@ Error AudioDriverRtAudio::init() { RtAudio::StreamOptions options; // set the desired numberOfBuffers - unsigned int target_number_of_buffers = 4; - options.numberOfBuffers = target_number_of_buffers; - - //options. - //RtAudioStreamFlags flags; /*!< A bit-mask of stream flags (RTAUDIO_NONINTERLEAVED, RTAUDIO_MINIMIZE_LATENCY, RTAUDIO_HOG_DEVICE). */// - //unsigned int numberOfBuffers; /*!< Number of stream buffers. */ - //std::string streamName; /*!< A stream name (currently used only in Jack). */ - //int priority; /*!< Scheduling priority of callback thread (only used with flag RTAUDIO_SCHEDULE_REALTIME). */ + options.numberOfBuffers = 4; parameters.firstChannel = 0; mix_rate = GLOBAL_DEF("audio/mix_rate", 44100); int latency = GLOBAL_DEF("audio/output_latency", 25); - // calculate desired buffer_size, taking the desired numberOfBuffers into account (latency depends on numberOfBuffers*buffer_size) - unsigned int buffer_size = closest_power_of_2(latency * mix_rate / 1000 / target_number_of_buffers); + // calculate desired buffer_size + unsigned int buffer_size = closest_power_of_2(latency * mix_rate / 1000); if (OS::get_singleton()->is_stdout_verbose()) { print_line("audio buffer size: " + itos(buffer_size)); @@ -126,56 +119,28 @@ Error AudioDriverRtAudio::init() { short int tries = 2; - while (true) { - while (true) { - switch (speaker_mode) { - case SPEAKER_MODE_STEREO: parameters.nChannels = 2; break; - case SPEAKER_SURROUND_51: parameters.nChannels = 6; break; - case SPEAKER_SURROUND_71: parameters.nChannels = 8; break; - }; - - try { - dac->openStream(¶meters, NULL, RTAUDIO_SINT32, mix_rate, &buffer_size, &callback, this, &options); - active = true; - - break; - } catch (RtAudioError &e) { - // try with less channels - ERR_PRINT("Unable to open audio, retrying with fewer channels.."); - - switch (speaker_mode) { - case SPEAKER_MODE_STEREO: speaker_mode = SPEAKER_MODE_STEREO; break; - case SPEAKER_SURROUND_51: speaker_mode = SPEAKER_SURROUND_51; break; - case SPEAKER_SURROUND_71: speaker_mode = SPEAKER_SURROUND_71; break; - }; - } - } + while (tries >= 0) { + switch (speaker_mode) { + case SPEAKER_MODE_STEREO: parameters.nChannels = 2; break; + case SPEAKER_SURROUND_51: parameters.nChannels = 6; break; + case SPEAKER_SURROUND_71: parameters.nChannels = 8; break; + }; - // compare actual numberOfBuffers with the desired one. If not equal, close and reopen the stream with adjusted buffer size, so the desired output_latency is still correct - if (target_number_of_buffers != options.numberOfBuffers) { - if (tries <= 0) { - ERR_EXPLAIN("RtAudio: Unable to set correct number of buffers."); - ERR_FAIL_V(ERR_UNAVAILABLE); - break; - } + try { + dac->openStream(¶meters, NULL, RTAUDIO_SINT32, mix_rate, &buffer_size, &callback, this, &options); + active = true; - try { - dac->closeStream(); - active = false; - } catch (RtAudioError &e) { - ERR_PRINT(e.what()); - ERR_FAIL_V(ERR_UNAVAILABLE); - break; + break; + } catch (RtAudioError &e) { + // try with less channels + ERR_PRINT("Unable to open audio, retrying with fewer channels.."); + + switch (speaker_mode) { + case SPEAKER_SURROUND_51: speaker_mode = SPEAKER_MODE_STEREO; break; + case SPEAKER_SURROUND_71: speaker_mode = SPEAKER_SURROUND_51; break; } - if (OS::get_singleton()->is_stdout_verbose()) - print_line("RtAudio: Desired number of buffers (" + itos(target_number_of_buffers) + ") not available. Using " + itos(options.numberOfBuffers) + " instead. Reopening stream with adjusted buffer_size."); - // new buffer size dependent on the ratio between set and actual numberOfBuffers - buffer_size = buffer_size / (options.numberOfBuffers / target_number_of_buffers); - target_number_of_buffers = options.numberOfBuffers; tries--; - } else { - break; } } @@ -231,6 +196,7 @@ void AudioDriverRtAudio::finish() { AudioDriverRtAudio::AudioDriverRtAudio() { + active = false; mutex = NULL; dac = NULL; mix_rate = 44100; diff --git a/drivers/unix/SCsub b/drivers/unix/SCsub index 96efc91b7a..5ced44dfda 100644 --- a/drivers/unix/SCsub +++ b/drivers/unix/SCsub @@ -8,7 +8,7 @@ g_set_p += 'String OS_Unix::get_global_settings_path() const {\n' g_set_p += '\treturn "' + env["unix_global_settings_path"] + '";\n' g_set_p += '}\n' g_set_p += '#endif' -f = open("os_unix_global_settings_path.gen.cpp", "wb") +f = open("os_unix_global_settings_path.gen.cpp", "w") f.write(g_set_p) f.close() diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index 992b12b7cd..75c8a153f6 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -315,7 +315,9 @@ OS::TimeZoneInfo OS_Unix::get_time_zone_info() const { void OS_Unix::delay_usec(uint32_t p_usec) const { - usleep(p_usec); + struct timespec rem = { p_usec / 1000000, (p_usec % 1000000) * 1000 }; + while (nanosleep(&rem, &rem) == EINTR) { + } } uint64_t OS_Unix::get_ticks_usec() const { diff --git a/drivers/unix/thread_posix.cpp b/drivers/unix/thread_posix.cpp index 2dd0b4a70a..5908246929 100644 --- a/drivers/unix/thread_posix.cpp +++ b/drivers/unix/thread_posix.cpp @@ -36,8 +36,18 @@ #include <pthread_np.h> #endif +#include "core/safe_refcount.h" #include "os/memory.h" +static pthread_key_t _create_thread_id_key() { + pthread_key_t key; + pthread_key_create(&key, NULL); + return key; +} + +pthread_key_t ThreadPosix::thread_id_key = _create_thread_id_key(); +Thread::ID ThreadPosix::next_thread_id = 0; + Thread::ID ThreadPosix::get_id() const { return id; @@ -51,7 +61,8 @@ Thread *ThreadPosix::create_thread_posix() { void *ThreadPosix::thread_callback(void *userdata) { ThreadPosix *t = reinterpret_cast<ThreadPosix *>(userdata); - t->id = (ID)pthread_self(); + t->id = atomic_increment(&next_thread_id); + pthread_setspecific(thread_id_key, (void *)t->id); ScriptServer::thread_enter(); //scripts may need to attach a stack @@ -77,7 +88,7 @@ Thread *ThreadPosix::create_func_posix(ThreadCreateCallback p_callback, void *p_ } Thread::ID ThreadPosix::get_thread_id_func_posix() { - return (ID)pthread_self(); + return (ID)pthread_getspecific(thread_id_key); } void ThreadPosix::wait_to_finish_func_posix(Thread *p_thread) { diff --git a/drivers/unix/thread_posix.h b/drivers/unix/thread_posix.h index a188d9c346..d6a41ed119 100644 --- a/drivers/unix/thread_posix.h +++ b/drivers/unix/thread_posix.h @@ -42,6 +42,9 @@ class ThreadPosix : public Thread { + static pthread_key_t thread_id_key; + static ID next_thread_id; + pthread_t pthread; pthread_attr_t pthread_attr; ThreadCreateCallback callback; diff --git a/drivers/wasapi/SCsub b/drivers/wasapi/SCsub new file mode 100644 index 0000000000..233593b0f9 --- /dev/null +++ b/drivers/wasapi/SCsub @@ -0,0 +1,8 @@ +#!/usr/bin/env python + +Import('env') + +# Driver source files +env.add_source_files(env.drivers_sources, "*.cpp") + +Export('env') diff --git a/drivers/wasapi/audio_driver_wasapi.cpp b/drivers/wasapi/audio_driver_wasapi.cpp new file mode 100644 index 0000000000..6e01b5f524 --- /dev/null +++ b/drivers/wasapi/audio_driver_wasapi.cpp @@ -0,0 +1,351 @@ +/*************************************************************************/ +/* audio_driver_wasapi.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +#ifdef WASAPI_ENABLED + +#include "audio_driver_wasapi.h" + +#include "os/os.h" +#include "project_settings.h" + +const CLSID CLSID_MMDeviceEnumerator = __uuidof(MMDeviceEnumerator); +const IID IID_IMMDeviceEnumerator = __uuidof(IMMDeviceEnumerator); +const IID IID_IAudioClient = __uuidof(IAudioClient); +const IID IID_IAudioRenderClient = __uuidof(IAudioRenderClient); + +Error AudioDriverWASAPI::init_device() { + + WAVEFORMATEX *pwfex; + IMMDeviceEnumerator *enumerator = NULL; + IMMDevice *device = NULL; + + CoInitialize(NULL); + + HRESULT hr = CoCreateInstance(CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, IID_IMMDeviceEnumerator, (void **)&enumerator); + ERR_FAIL_COND_V(hr != S_OK, ERR_CANT_OPEN); + + hr = enumerator->GetDefaultAudioEndpoint(eRender, eConsole, &device); + ERR_FAIL_COND_V(hr != S_OK, ERR_CANT_OPEN); + + hr = device->Activate(IID_IAudioClient, CLSCTX_ALL, NULL, (void **)&audio_client); + ERR_FAIL_COND_V(hr != S_OK, ERR_CANT_OPEN); + + hr = audio_client->GetMixFormat(&pwfex); + ERR_FAIL_COND_V(hr != S_OK, ERR_CANT_OPEN); + + // Since we're using WASAPI Shared Mode we can't control any of these, we just tag along + channels = pwfex->nChannels; + mix_rate = pwfex->nSamplesPerSec; + format_tag = pwfex->wFormatTag; + bits_per_sample = pwfex->wBitsPerSample; + + if (format_tag == WAVE_FORMAT_EXTENSIBLE) { + WAVEFORMATEXTENSIBLE *wfex = (WAVEFORMATEXTENSIBLE *)pwfex; + + if (wfex->SubFormat == KSDATAFORMAT_SUBTYPE_PCM) { + format_tag = WAVE_FORMAT_PCM; + } else if (wfex->SubFormat == KSDATAFORMAT_SUBTYPE_IEEE_FLOAT) { + format_tag = WAVE_FORMAT_IEEE_FLOAT; + } else { + ERR_PRINT("WASAPI: Format not supported"); + ERR_FAIL_V(ERR_CANT_OPEN); + } + } else { + if (format_tag != WAVE_FORMAT_PCM && format_tag != WAVE_FORMAT_IEEE_FLOAT) { + ERR_PRINT("WASAPI: Format not supported"); + ERR_FAIL_V(ERR_CANT_OPEN); + } + } + + int latency = GLOBAL_DEF("audio/output_latency", 25); + buffer_size = closest_power_of_2(latency * mix_rate / 1000); + + if (OS::get_singleton()->is_stdout_verbose()) { + print_line("audio buffer size: " + itos(buffer_size)); + } + + hr = audio_client->Initialize(AUDCLNT_SHAREMODE_SHARED, AUDCLNT_STREAMFLAGS_EVENTCALLBACK, 0, 0, pwfex, NULL); + ERR_FAIL_COND_V(hr != S_OK, ERR_CANT_OPEN); + + event = CreateEvent(NULL, FALSE, FALSE, NULL); + ERR_FAIL_COND_V(event == NULL, ERR_CANT_OPEN); + + hr = audio_client->SetEventHandle(event); + ERR_FAIL_COND_V(hr != S_OK, ERR_CANT_OPEN); + + hr = audio_client->GetService(IID_IAudioRenderClient, (void **)&render_client); + ERR_FAIL_COND_V(hr != S_OK, ERR_CANT_OPEN); + + hr = audio_client->GetBufferSize(&max_frames); + ERR_FAIL_COND_V(hr != S_OK, ERR_CANT_OPEN); + + samples_in.resize(buffer_size); + buffer_frames = buffer_size / channels; + + return OK; +} + +Error AudioDriverWASAPI::finish_device() { + + if (audio_client) { + if (active) { + audio_client->Stop(); + active = false; + } + } + + if (render_client) { + render_client->Release(); + render_client = NULL; + } + + if (audio_client) { + audio_client->Release(); + audio_client = NULL; + } + + return OK; +} + +Error AudioDriverWASAPI::init() { + + Error err = init_device(); + ERR_FAIL_COND_V(err != OK, err); + + active = false; + exit_thread = false; + thread_exited = false; + + mutex = Mutex::create(true); + thread = Thread::create(thread_func, this); + + return OK; +} + +Error AudioDriverWASAPI::reopen() { + Error err = finish_device(); + if (err != OK) { + ERR_PRINT("WASAPI: finish_device error"); + } else { + err = init_device(); + if (err != OK) { + ERR_PRINT("WASAPI: init_device error"); + } else { + start(); + } + } + + return err; +} + +int AudioDriverWASAPI::get_mix_rate() const { + + return mix_rate; +} + +AudioDriver::SpeakerMode AudioDriverWASAPI::get_speaker_mode() const { + + return SPEAKER_MODE_STEREO; +} + +void AudioDriverWASAPI::thread_func(void *p_udata) { + + AudioDriverWASAPI *ad = (AudioDriverWASAPI *)p_udata; + + while (!ad->exit_thread) { + if (ad->active) { + ad->lock(); + + ad->audio_server_process(ad->buffer_frames, ad->samples_in.ptr()); + + ad->unlock(); + } else { + for (unsigned int i = 0; i < ad->buffer_size; i++) { + ad->samples_in[i] = 0; + } + } + + unsigned int left_frames = ad->buffer_frames; + unsigned int buffer_idx = 0; + while (left_frames > 0) { + WaitForSingleObject(ad->event, 1000); + + UINT32 cur_frames; + HRESULT hr = ad->audio_client->GetCurrentPadding(&cur_frames); + if (hr == S_OK) { + // Check how much frames are available on the WASAPI buffer + UINT32 avail_frames = ad->max_frames - cur_frames; + UINT32 write_frames = avail_frames > left_frames ? left_frames : avail_frames; + + BYTE *buffer = NULL; + hr = ad->render_client->GetBuffer(write_frames, &buffer); + if (hr == S_OK) { + // We're using WASAPI Shared Mode so we must convert the buffer + + if (ad->format_tag == WAVE_FORMAT_PCM) { + switch (ad->bits_per_sample) { + case 8: + for (unsigned int i = 0; i < write_frames * ad->channels; i++) { + ((int8_t *)buffer)[i] = ad->samples_in[buffer_idx++] >> 24; + } + break; + + case 16: + for (unsigned int i = 0; i < write_frames * ad->channels; i++) { + ((int16_t *)buffer)[i] = ad->samples_in[buffer_idx++] >> 16; + } + break; + + case 24: + for (unsigned int i = 0; i < write_frames * ad->channels; i++) { + int32_t sample = ad->samples_in[buffer_idx++]; + ((int8_t *)buffer)[i * 3 + 2] = sample >> 24; + ((int8_t *)buffer)[i * 3 + 1] = sample >> 16; + ((int8_t *)buffer)[i * 3 + 0] = sample >> 8; + } + break; + + case 32: + for (unsigned int i = 0; i < write_frames * ad->channels; i++) { + ((int32_t *)buffer)[i] = ad->samples_in[buffer_idx++]; + } + break; + } + } else if (ad->format_tag == WAVE_FORMAT_IEEE_FLOAT) { + for (unsigned int i = 0; i < write_frames * ad->channels; i++) { + ((float *)buffer)[i] = (ad->samples_in[buffer_idx++] >> 16) / 32768.f; + } + } else { + ERR_PRINT("WASAPI: Unknown format tag"); + ad->exit_thread = true; + } + + hr = ad->render_client->ReleaseBuffer(write_frames, 0); + if (hr != S_OK) { + ERR_PRINT("WASAPI: Release buffer error"); + } + + left_frames -= write_frames; + } else if (hr == AUDCLNT_E_DEVICE_INVALIDATED) { + // Device is not valid anymore, reopen it + + Error err = ad->reopen(); + if (err != OK) { + ad->exit_thread = true; + } else { + // We reopened the device and samples_in may have resized, so invalidate the current left_frames + left_frames = 0; + } + } else { + ERR_PRINT("WASAPI: Get buffer error"); + ad->exit_thread = true; + } + } else if (hr == AUDCLNT_E_DEVICE_INVALIDATED) { + // Device is not valid anymore, reopen it + + Error err = ad->reopen(); + if (err != OK) { + ad->exit_thread = true; + } else { + // We reopened the device and samples_in may have resized, so invalidate the current left_frames + left_frames = 0; + } + } else { + ERR_PRINT("WASAPI: GetCurrentPadding error"); + } + } + } + + ad->thread_exited = true; +} + +void AudioDriverWASAPI::start() { + + HRESULT hr = audio_client->Start(); + if (hr != S_OK) { + ERR_PRINT("WASAPI: Start failed"); + } else { + active = true; + } +} + +void AudioDriverWASAPI::lock() { + + if (mutex) + mutex->lock(); +} + +void AudioDriverWASAPI::unlock() { + + if (mutex) + mutex->unlock(); +} + +void AudioDriverWASAPI::finish() { + + if (thread) { + exit_thread = true; + Thread::wait_to_finish(thread); + + memdelete(thread); + thread = NULL; + } + + finish_device(); + + if (mutex) { + memdelete(mutex); + mutex = NULL; + } +} + +AudioDriverWASAPI::AudioDriverWASAPI() { + + audio_client = NULL; + render_client = NULL; + mutex = NULL; + thread = NULL; + + max_frames = 0; + format_tag = 0; + bits_per_sample = 0; + + samples_in.clear(); + + buffer_size = 0; + channels = 0; + mix_rate = 0; + buffer_frames = 0; + + thread_exited = false; + exit_thread = false; + active = false; +} + +#endif diff --git a/drivers/wasapi/audio_driver_wasapi.h b/drivers/wasapi/audio_driver_wasapi.h new file mode 100644 index 0000000000..b91751f87e --- /dev/null +++ b/drivers/wasapi/audio_driver_wasapi.h @@ -0,0 +1,89 @@ +/*************************************************************************/ +/* audio_driver_wasapi.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +#ifndef AUDIO_DRIVER_WASAPI_H +#define AUDIO_DRIVER_WASAPI_H + +#ifdef WASAPI_ENABLED + +#include "core/os/mutex.h" +#include "core/os/thread.h" +#include "servers/audio_server.h" + +#include <audioclient.h> +#include <mmdeviceapi.h> +#include <windows.h> + +class AudioDriverWASAPI : public AudioDriver { + + HANDLE event; + IAudioClient *audio_client; + IAudioRenderClient *render_client; + Mutex *mutex; + Thread *thread; + + UINT32 max_frames; + WORD format_tag; + WORD bits_per_sample; + + Vector<int32_t> samples_in; + + unsigned int buffer_size; + unsigned int channels; + int mix_rate; + int buffer_frames; + + bool thread_exited; + mutable bool exit_thread; + bool active; + + static void thread_func(void *p_udata); + + Error init_device(); + Error finish_device(); + Error reopen(); + +public: + virtual const char *get_name() const { + return "WASAPI"; + } + + virtual Error init(); + virtual void start(); + virtual int get_mix_rate() const; + virtual SpeakerMode get_speaker_mode() const; + virtual void lock(); + virtual void unlock(); + virtual void finish(); + + AudioDriverWASAPI(); +}; + +#endif // AUDIO_DRIVER_WASAPI_H +#endif diff --git a/editor/SCsub b/editor/SCsub index b9eead3dfc..172447147c 100644 --- a/editor/SCsub +++ b/editor/SCsub @@ -4,6 +4,7 @@ Import('env') env.editor_sources = [] import os +from compat import encode_utf8, byte_to_str, open_utf8 def make_certs_header(target, source, env): @@ -11,7 +12,7 @@ def make_certs_header(target, source, env): src = source[0].srcnode().abspath dst = target[0].srcnode().abspath f = open(src, "rb") - g = open(dst, "wb") + g = open_utf8(dst, "w") buf = f.read() decomp_size = len(buf) import zlib @@ -24,7 +25,7 @@ def make_certs_header(target, source, env): g.write("static const int _certs_uncompressed_size=" + str(decomp_size) + ";\n") g.write("static const unsigned char _certs_compressed[]={\n") for i in range(len(buf)): - g.write(str(ord(buf[i])) + ",\n") + g.write(byte_to_str(buf[i]) + ",\n") g.write("};\n") g.write("#endif") @@ -32,20 +33,20 @@ def make_certs_header(target, source, env): def make_doc_header(target, source, env): dst = target[0].srcnode().abspath - g = open(dst, "wb") + g = open_utf8(dst, "w") buf = "" docbegin = "" docend = "" for s in source: src = s.srcnode().abspath - f = open(src, "rb") + f = open_utf8(src, "r") content = f.read() buf += content[content.find("<class"): content.rfind("</doc>")] if len(docbegin) == 0: docbegin = content[0: content.find("<class")] if len(docend) == 0: docend = content[content.rfind("</doc>"): len(buf)] - buf = docbegin + buf + docend + buf = encode_utf8(docbegin + buf + docend) decomp_size = len(buf) import zlib buf = zlib.compress(buf) @@ -57,7 +58,7 @@ def make_doc_header(target, source, env): g.write("static const int _doc_data_uncompressed_size=" + str(decomp_size) + ";\n") g.write("static const unsigned char _doc_data_compressed[]={\n") for i in range(len(buf)): - g.write(str(ord(buf[i])) + ",\n") + g.write(byte_to_str(buf[i]) + ",\n") g.write("};\n") g.write("#endif") @@ -66,7 +67,7 @@ def make_fonts_header(target, source, env): dst = target[0].srcnode().abspath - g = open(dst, "wb") + g = open_utf8(dst, "w") g.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n") g.write("#ifndef _EDITOR_FONTS_H\n") @@ -84,7 +85,7 @@ def make_fonts_header(target, source, env): g.write("static const int _font_" + name + "_size=" + str(len(buf)) + ";\n") g.write("static const unsigned char _font_" + name + "[]={\n") for i in range(len(buf)): - g.write(str(ord(buf[i])) + ",\n") + g.write(byte_to_str(buf[i]) + ",\n") g.write("};\n") @@ -95,7 +96,7 @@ def make_translations_header(target, source, env): dst = target[0].srcnode().abspath - g = open(dst, "wb") + g = open_utf8(dst, "w") g.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n") g.write("#ifndef _EDITOR_TRANSLATIONS_H\n") @@ -119,7 +120,7 @@ def make_translations_header(target, source, env): #g.write("static const int _translation_"+name+"_uncompressed_size="+str(decomp_size)+";\n") g.write("static const unsigned char _translation_" + name + "_compressed[]={\n") for i in range(len(buf)): - g.write(str(ord(buf[i])) + ",\n") + g.write(byte_to_str(buf[i]) + ",\n") g.write("};\n") @@ -146,8 +147,8 @@ def make_authors_header(target, source, env): src = source[0].srcnode().abspath dst = target[0].srcnode().abspath - f = open(src, "rb") - g = open(dst, "wb") + f = open_utf8(src, "r") + g = open_utf8(dst, "w") g.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n") g.write("#ifndef _EDITOR_AUTHORS_H\n") @@ -188,9 +189,9 @@ def make_license_header(target, source, env): src_copyright = source[0].srcnode().abspath src_license = source[1].srcnode().abspath dst = target[0].srcnode().abspath - f = open(src_license, "rb") - fc = open(src_copyright, "rb") - g = open(dst, "wb") + f = open_utf8(src_license, "r") + fc = open_utf8(src_copyright, "r") + g = open_utf8(dst, "w") g.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n") g.write("#ifndef _EDITOR_LICENSE_H\n") @@ -351,10 +352,10 @@ if (env["tools"] == "yes"): reg_exporters = 'void register_exporters() {\n' for e in env.platform_exporters: env.editor_sources.append("#platform/" + e + "/export/export.cpp") - reg_exporters += '\tregister_' + e + '_exporter();\n' + reg_exporters += '\tregister_' + e + '_exporter();\n' reg_exporters_inc += '#include "platform/' + e + '/export/export.h"\n' reg_exporters += '}\n' - f = open("register_exporters.gen.cpp", "wb") + f = open_utf8("register_exporters.gen.cpp", "w") f.write(reg_exporters_inc) f.write(reg_exporters) f.close() diff --git a/editor/doc/doc_data.cpp b/editor/doc/doc_data.cpp index 208341add3..5975e54356 100644 --- a/editor/doc/doc_data.cpp +++ b/editor/doc/doc_data.cpp @@ -163,6 +163,43 @@ void DocData::remove_from(const DocData &p_data) { } } +static void return_doc_from_retinfo(DocData::MethodDoc &p_method, const PropertyInfo &p_retinfo) { + + if (p_retinfo.type == Variant::INT && p_retinfo.usage & PROPERTY_USAGE_CLASS_IS_ENUM) { + p_method.return_enum = p_retinfo.class_name; + p_method.return_type = "int"; + } else if (p_retinfo.class_name != StringName()) { + p_method.return_type = p_retinfo.class_name; + } else if (p_retinfo.hint == PROPERTY_HINT_RESOURCE_TYPE) { + p_method.return_type = p_retinfo.hint_string; + } else if (p_retinfo.type == Variant::NIL && p_retinfo.usage & PROPERTY_USAGE_NIL_IS_VARIANT) { + p_method.return_type = "Variant"; + } else if (p_retinfo.type == Variant::NIL) { + p_method.return_type = "void"; + } else { + p_method.return_type = Variant::get_type_name(p_retinfo.type); + } +} + +static void argument_doc_from_arginfo(DocData::ArgumentDoc &p_argument, const PropertyInfo &p_arginfo) { + + p_argument.name = p_arginfo.name; + + if (p_arginfo.type == Variant::INT && p_arginfo.usage & PROPERTY_USAGE_CLASS_IS_ENUM) { + p_argument.enumeration = p_arginfo.class_name; + p_argument.type = "int"; + } else if (p_arginfo.class_name != StringName()) { + p_argument.type = p_arginfo.class_name; + } else if (p_arginfo.hint == PROPERTY_HINT_RESOURCE_TYPE) { + p_argument.type = p_arginfo.hint_string; + } else if (p_arginfo.type == Variant::NIL) { + // Parameters cannot be void, so PROPERTY_USAGE_NIL_IS_VARIANT is not necessary + p_argument.type = "Variant"; + } else { + p_argument.type = Variant::get_type_name(p_arginfo.type); + } +} + void DocData::generate(bool p_basic_types) { List<StringName> classes; @@ -263,51 +300,17 @@ void DocData::generate(bool p_basic_types) { for (int i = -1; i < E->get().arguments.size(); i++) { if (i == -1) { - #ifdef DEBUG_METHODS_ENABLED - - PropertyInfo retinfo = E->get().return_val; - - if (retinfo.type == Variant::INT && retinfo.usage & PROPERTY_USAGE_CLASS_IS_ENUM) { - method.return_enum = retinfo.class_name; - method.return_type = "int"; - } else if (retinfo.class_name != StringName()) { - method.return_type = retinfo.class_name; - } else if (retinfo.hint == PROPERTY_HINT_RESOURCE_TYPE) { - - method.return_type = retinfo.hint_string; - } else if (retinfo.type == Variant::NIL && retinfo.usage & PROPERTY_USAGE_NIL_IS_VARIANT) { - - method.return_type = "Variant"; - } else if (retinfo.type == Variant::NIL) { - method.return_type = "void"; - } else { - method.return_type = Variant::get_type_name(retinfo.type); - } + return_doc_from_retinfo(method, E->get().return_val); #endif - } else { - ArgumentDoc argument; - - PropertyInfo arginfo = E->get().arguments[i]; + const PropertyInfo &arginfo = E->get().arguments[i]; - if (arginfo.type == Variant::INT && arginfo.usage & PROPERTY_USAGE_CLASS_IS_ENUM) { - argument.enumeration = arginfo.class_name; - argument.type = "int"; - } else if (arginfo.class_name != StringName()) { - argument.type = arginfo.class_name; - } else if (arginfo.hint == PROPERTY_HINT_RESOURCE_TYPE) { + ArgumentDoc argument; - argument.type = arginfo.hint_string; - } else if (arginfo.type == Variant::NIL && arginfo.usage & PROPERTY_USAGE_NIL_IS_VARIANT) { + argument_doc_from_arginfo(argument, arginfo); - argument.type = "Variant"; - } else { - argument.type = Variant::get_type_name(arginfo.type); - } - - argument.name = E->get().arguments[i].name; int darg_idx = i - (E->get().arguments.size() - E->get().default_arguments.size()); if (darg_idx >= 0) { @@ -464,26 +467,26 @@ void DocData::generate(bool p_basic_types) { for (int i = 0; i < mi.arguments.size(); i++) { - ArgumentDoc arg; - PropertyInfo pi = mi.arguments[i]; + PropertyInfo arginfo = mi.arguments[i]; - arg.name = pi.name; - //print_line("arg name: "+arg.name); - if (pi.type == Variant::NIL) - arg.type = "var"; + ArgumentDoc ad; + ad.name = arginfo.name; + + if (arginfo.type == Variant::NIL) + ad.type = "var"; else - arg.type = Variant::get_type_name(pi.type); + ad.type = Variant::get_type_name(arginfo.type); + int defarg = mi.default_arguments.size() - mi.arguments.size() + i; if (defarg >= 0) - arg.default_value = mi.default_arguments[defarg]; + ad.default_value = mi.default_arguments[defarg]; - method.arguments.push_back(arg); + method.arguments.push_back(ad); } if (mi.return_val.type == Variant::NIL) { if (mi.return_val.name != "") method.return_type = "var"; - } else { method.return_type = Variant::get_type_name(mi.return_val.type); } @@ -572,26 +575,19 @@ void DocData::generate(bool p_basic_types) { MethodInfo &mi = E->get(); MethodDoc md; md.name = mi.name; - if (mi.return_val.name != "") - md.return_type = mi.return_val.name; - else if (mi.name.find(":") != -1) { - md.return_type = mi.name.get_slice(":", 1); - md.name = mi.name.get_slice(":", 0); - } else - md.return_type = Variant::get_type_name(mi.return_val.type); - - for (int i = 0; i < mi.arguments.size(); i++) { - PropertyInfo &pi = mi.arguments[i]; + if (mi.flags & METHOD_FLAG_VARARG) { + if (md.qualifiers != "") + md.qualifiers += " "; + md.qualifiers += "vararg"; + } - ArgumentDoc ad; - ad.name = pi.name; + return_doc_from_retinfo(md, mi.return_val); - if (pi.type == Variant::NIL) - ad.type = "Variant"; - else - ad.type = Variant::get_type_name(pi.type); + for (int i = 0; i < mi.arguments.size(); i++) { + ArgumentDoc ad; + argument_doc_from_arginfo(ad, mi.arguments[i]); md.arguments.push_back(ad); } diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index ca1b86635c..cee65387f5 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -559,7 +559,7 @@ void EditorNode::_menu_confirm_current() { _menu_option_confirm(current_option, true); } -void EditorNode::_dialog_display_file_error(String p_file, Error p_error) { +void EditorNode::_dialog_display_save_error(String p_file, Error p_error) { if (p_error) { @@ -586,6 +586,41 @@ void EditorNode::_dialog_display_file_error(String p_file, Error p_error) { } } +void EditorNode::_dialog_display_load_error(String p_file, Error p_error) { + + if (p_error) { + + current_option = -1; + accept->get_ok()->set_text(TTR("I see..")); + + switch (p_error) { + + case ERR_CANT_OPEN: { + + accept->set_text(vformat(TTR("Can't open '%s'."), p_file.get_file())); + } break; + case ERR_PARSE_ERROR: { + + accept->set_text(vformat(TTR("Error while parsing '%s'."), p_file.get_file())); + } break; + case ERR_FILE_CORRUPT: { + + accept->set_text(vformat(TTR("Unexpected end of file '%s'."), p_file.get_file())); + } break; + case ERR_FILE_NOT_FOUND: { + + accept->set_text(vformat(TTR("Missing '%s' or its dependencies."), p_file.get_file())); + } break; + default: { + + accept->set_text(vformat(TTR("Error while loading '%s'."), p_file.get_file())); + } break; + } + + accept->popup_centered_minsize(); + } +} + void EditorNode::_get_scene_metadata(const String &p_file) { Node *scene = editor_data.get_edited_scene_root(); @@ -899,7 +934,7 @@ void EditorNode::_save_scene(String p_file, int idx) { _update_scene_tabs(); } else { - _dialog_display_file_error(p_file, err); + _dialog_display_save_error(p_file, err); } } @@ -908,8 +943,10 @@ void EditorNode::_save_all_scenes() { for (int i = 0; i < editor_data.get_edited_scene_count(); i++) { Node *scene = editor_data.get_edited_scene_root(i); if (scene && scene->get_filename() != "") { - // save in background if in the script editor - _save_scene_with_preview(scene->get_filename()); + if (i != editor_data.get_edited_scene()) + _save_scene(scene->get_filename(), i); + else + _save_scene_with_preview(scene->get_filename()); } // else: ignore new scenes } @@ -971,26 +1008,6 @@ void EditorNode::_dialog_action(String p_file) { //would be nice to show the project manager opened with the highlighted field.. _run(false, ""); // automatically run the project } break; - case FILE_RUN_SCRIPT: { - - Ref<Script> scr = ResourceLoader::load(p_file, "Script", true); - if (scr.is_null()) { - add_io_error("Script Failed to Load:\n" + p_file); - return; - } - if (!scr->is_tool()) { - - add_io_error("Script is not tool, will not be able to run:\n" + p_file); - return; - } - - Ref<EditorScript> es = memnew(EditorScript); - es->set_script(scr.get_ref_ptr()); - es->set_editor(this); - es->_run(); - - get_undo_redo()->clear_history(); - } break; case FILE_CLOSE: case FILE_CLOSE_ALL_AND_QUIT: case FILE_CLOSE_ALL_AND_RUN_PROJECT_MANAGER: @@ -1003,7 +1020,10 @@ void EditorNode::_dialog_action(String p_file) { if (file->get_mode() == EditorFileDialog::MODE_SAVE_FILE) { _save_default_environment(); - _save_scene_with_preview(p_file); + if (scene_idx != editor_data.get_edited_scene()) + _save_scene(p_file, scene_idx); + else + _save_scene_with_preview(p_file); if (scene_idx != -1) _discard_changes(); @@ -1653,10 +1673,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { quick_open->set_title(TTR("Quick Open Script..")); } break; - case FILE_RUN_SCRIPT: { - - file_script->popup_centered_ratio(); - } break; case FILE_OPEN_PREV: { if (previous_scenes.empty()) @@ -1686,8 +1702,10 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { Node *scene = editor_data.get_edited_scene_root(scene_idx); if (scene && scene->get_filename() != "") { - // save in background if in the script editor - _save_scene_with_preview(scene->get_filename()); + if (scene_idx != editor_data.get_edited_scene()) + _save_scene(scene->get_filename(), scene_idx); + else + _save_scene_with_preview(scene->get_filename()); if (scene_idx != -1) _discard_changes(); @@ -2210,14 +2228,19 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { update_menu->get_popup()->set_item_checked(0, true); update_menu->get_popup()->set_item_checked(1, false); OS::get_singleton()->set_low_processor_usage_mode(false); - EditorSettings::get_singleton()->set_project_metadata("editor_options", "update_mode", SETTINGS_UPDATE_ALWAYS); + EditorSettings::get_singleton()->set_project_metadata("editor_options", "update_always", true); + + current_option = -1; + accept->get_ok()->set_text(TTR("I see..")); + accept->set_text(TTR("This option is deprecated. Situations where refresh must be forced are now considered a bug. Please report.")); + accept->popup_centered_minsize(); } break; case SETTINGS_UPDATE_CHANGES: { update_menu->get_popup()->set_item_checked(0, false); update_menu->get_popup()->set_item_checked(1, true); OS::get_singleton()->set_low_processor_usage_mode(true); - EditorSettings::get_singleton()->set_project_metadata("editor_options", "update_mode", SETTINGS_UPDATE_CHANGES); + EditorSettings::get_singleton()->set_project_metadata("editor_options", "update_always", false); } break; case SETTINGS_UPDATE_SPINNER_HIDE: { @@ -2805,13 +2828,11 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b dependency_errors.clear(); - Ref<PackedScene> sdata = ResourceLoader::load(lpath, "", true); + Error err; + Ref<PackedScene> sdata = ResourceLoader::load(lpath, "", true, &err); if (!sdata.is_valid()) { - current_option = -1; - accept->get_ok()->set_text(TTR("Ugh")); - accept->set_text(TTR("Error loading scene.")); - accept->popup_centered_minsize(); + _dialog_display_load_error(lpath, err); opening_prev = false; if (prev != -1) { @@ -2868,10 +2889,7 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b if (!new_scene) { sdata.unref(); - current_option = -1; - accept->get_ok()->set_text(TTR("Ugh")); - accept->set_text(TTR("Error loading scene.")); - accept->popup_centered_minsize(); + _dialog_display_load_error(lpath, ERR_FILE_NOT_FOUND); opening_prev = false; if (prev != -1) { set_current_scene(prev); @@ -4810,7 +4828,7 @@ EditorNode::EditorNode() { p->add_item(TTR("Project Settings"), RUN_SETTINGS); p->add_separator(); p->connect("id_pressed", this, "_menu_option"); - p->add_item(TTR("Run Script"), FILE_RUN_SCRIPT, KEY_MASK_SHIFT + KEY_MASK_CMD + KEY_R); + //p->add_item(TTR("Run Script"), FILE_RUN_SCRIPT, KEY_MASK_SHIFT + KEY_MASK_CMD + KEY_R); p->add_item(TTR("Export"), FILE_EXPORT_PROJECT); PopupMenu *tool_menu = memnew(PopupMenu); @@ -4979,9 +4997,9 @@ EditorNode::EditorNode() { p->add_check_item(TTR("Update Changes"), SETTINGS_UPDATE_CHANGES); p->add_separator(); p->add_check_item(TTR("Disable Update Spinner"), SETTINGS_UPDATE_SPINNER_HIDE); - int update_mode = EditorSettings::get_singleton()->get_project_metadata("editor_options", "update_mode", SETTINGS_UPDATE_CHANGES); + int update_always = EditorSettings::get_singleton()->get_project_metadata("editor_options", "update_always", false); int hide_spinner = EditorSettings::get_singleton()->get_project_metadata("editor_options", "update_spinner_hide", false); - _menu_option(update_mode); + _menu_option(update_always ? SETTINGS_UPDATE_ALWAYS : SETTINGS_UPDATE_CHANGES); if (hide_spinner) { _menu_option(SETTINGS_UPDATE_SPINNER_HIDE); } diff --git a/editor/editor_node.h b/editor/editor_node.h index 1d065ebbbd..445ef4922e 100644 --- a/editor/editor_node.h +++ b/editor/editor_node.h @@ -129,7 +129,6 @@ private: FILE_OPEN_OLD_SCENE, FILE_QUICK_OPEN_SCENE, FILE_QUICK_OPEN_SCRIPT, - FILE_RUN_SCRIPT, FILE_OPEN_PREV, FILE_CLOSE, FILE_CLOSE_ALL_AND_QUIT, @@ -405,7 +404,8 @@ private: void _dialog_action(String p_file); void _edit_current(); - void _dialog_display_file_error(String p_file, Error p_error); + void _dialog_display_save_error(String p_file, Error p_error); + void _dialog_display_load_error(String p_file, Error p_error); int current_option; void _resource_created(); diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index 06e4bb5aa6..86acfcc50e 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -32,10 +32,121 @@ #include "editor/editor_node.h" #include "editor/editor_settings.h" #include "editor_resource_preview.h" +#include "main/main.h" #include "plugins/canvas_item_editor_plugin.h" #include "plugins/spatial_editor_plugin.h" #include "scene/3d/camera.h" #include "scene/gui/popup_menu.h" +#include "servers/visual_server.h" +Array EditorInterface::_make_mesh_previews(const Array &p_meshes, int p_preview_size) { + + Vector<Ref<Mesh> > meshes; + + for (int i = 0; i < p_meshes.size(); i++) { + meshes.push_back(p_meshes[i]); + } + + Vector<Ref<Texture> > textures = make_mesh_previews(meshes, p_preview_size); + Array ret; + for (int i = 0; i < textures.size(); i++) { + ret.push_back(textures[i]); + } + + return ret; +} + +Vector<Ref<Texture> > EditorInterface::make_mesh_previews(const Vector<Ref<Mesh> > &p_meshes, int p_preview_size) { + + int size = p_preview_size; + + RID scenario = VS::get_singleton()->scenario_create(); + + RID viewport = VS::get_singleton()->viewport_create(); + VS::get_singleton()->viewport_set_update_mode(viewport, VS::VIEWPORT_UPDATE_ALWAYS); + VS::get_singleton()->viewport_set_vflip(viewport, true); + VS::get_singleton()->viewport_set_scenario(viewport, scenario); + VS::get_singleton()->viewport_set_size(viewport, size, size); + VS::get_singleton()->viewport_set_transparent_background(viewport, true); + VS::get_singleton()->viewport_set_active(viewport, true); + RID viewport_texture = VS::get_singleton()->viewport_get_texture(viewport); + + RID camera = VS::get_singleton()->camera_create(); + VS::get_singleton()->viewport_attach_camera(viewport, camera); + VS::get_singleton()->camera_set_transform(camera, Transform(Basis(), Vector3(0, 0, 3))); + //VS::get_singleton()->camera_set_perspective(camera,45,0.1,10); + VS::get_singleton()->camera_set_orthogonal(camera, 1.0, 0.01, 1000.0); + + RID light = VS::get_singleton()->light_create(VS::LIGHT_DIRECTIONAL); + RID light_instance = VS::get_singleton()->instance_create2(light, scenario); + VS::get_singleton()->instance_set_transform(light_instance, Transform().looking_at(Vector3(-1, -1, -1), Vector3(0, 1, 0))); + + RID light2 = VS::get_singleton()->light_create(VS::LIGHT_DIRECTIONAL); + VS::get_singleton()->light_set_color(light2, Color(0.7, 0.7, 0.7)); + //VS::get_singleton()->light_set_color(light2, VS::LIGHT_COLOR_SPECULAR, Color(0.0, 0.0, 0.0)); + RID light_instance2 = VS::get_singleton()->instance_create2(light2, scenario); + + VS::get_singleton()->instance_set_transform(light_instance2, Transform().looking_at(Vector3(0, 1, 0), Vector3(0, 0, 1))); + + //sphere = VS::get_singleton()->mesh_create(); + RID mesh_instance = VS::get_singleton()->instance_create(); + VS::get_singleton()->instance_set_scenario(mesh_instance, scenario); + + EditorProgress ep("mlib", TTR("Creating Mesh Previews"), p_meshes.size()); + + Vector<Ref<Texture> > textures; + + for (int i = 0; i < p_meshes.size(); i++) { + + Ref<Mesh> mesh = p_meshes[i]; + if (!mesh.is_valid()) { + textures.push_back(Ref<Texture>()); + continue; + } + Rect3 aabb = mesh->get_aabb(); + print_line("aabb: " + aabb); + Vector3 ofs = aabb.position + aabb.size * 0.5; + aabb.position -= ofs; + Transform xform; + xform.basis = Basis().rotated(Vector3(0, 1, 0), -Math_PI * 0.25); + xform.basis = Basis().rotated(Vector3(1, 0, 0), Math_PI * 0.25) * xform.basis; + Rect3 rot_aabb = xform.xform(aabb); + print_line("rot_aabb: " + rot_aabb); + float m = MAX(rot_aabb.size.x, rot_aabb.size.y) * 0.5; + if (m == 0) + continue; + m = 1.0 / m; + m *= 0.5; + print_line("scale: " + rtos(m)); + xform.basis.scale(Vector3(m, m, m)); + xform.origin = -xform.basis.xform(ofs); //-ofs*m; + xform.origin.z -= rot_aabb.size.z * 2; + RID inst = VS::get_singleton()->instance_create2(mesh->get_rid(), scenario); + VS::get_singleton()->instance_set_transform(inst, xform); + ep.step(TTR("Thumbnail.."), i); + Main::iteration(); + Main::iteration(); + Ref<Image> img = VS::get_singleton()->texture_get_data(viewport_texture); + ERR_CONTINUE(!img.is_valid() || img->empty()); + Ref<ImageTexture> it(memnew(ImageTexture)); + it->create_from_image(img); + + //print_line("loaded image, size: "+rtos(m)+" dist: "+rtos(dist)+" empty?"+itos(img.empty())+" w: "+itos(it->get_width())+" h: "+itos(it->get_height())); + VS::get_singleton()->free(inst); + + textures.push_back(it); + } + + VS::get_singleton()->free(mesh_instance); + VS::get_singleton()->free(viewport); + VS::get_singleton()->free(light); + VS::get_singleton()->free(light_instance); + VS::get_singleton()->free(light2); + VS::get_singleton()->free(light_instance2); + VS::get_singleton()->free(camera); + VS::get_singleton()->free(scenario); + + return textures; +} Control *EditorInterface::get_editor_viewport() { @@ -145,6 +256,7 @@ void EditorInterface::_bind_methods() { ClassDB::bind_method(D_METHOD("get_resource_previewer"), &EditorInterface::get_resource_previewer); ClassDB::bind_method(D_METHOD("get_resource_filesystem"), &EditorInterface::get_resource_file_system); ClassDB::bind_method(D_METHOD("get_editor_viewport"), &EditorInterface::get_editor_viewport); + ClassDB::bind_method(D_METHOD("make_mesh_previews"), &EditorInterface::_make_mesh_previews); ClassDB::bind_method(D_METHOD("save_scene"), &EditorInterface::save_scene); ClassDB::bind_method(D_METHOD("save_scene_as", "path", "with_preview"), &EditorInterface::save_scene_as, DEFVAL(true)); @@ -478,9 +590,9 @@ void EditorPlugin::_bind_methods() { ClassDB::bind_method(D_METHOD("get_editor_interface"), &EditorPlugin::get_editor_interface); ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "forward_canvas_gui_input", PropertyInfo(Variant::TRANSFORM2D, "canvas_xform"), PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent"))); - ClassDB::add_virtual_method(get_class_static(), MethodInfo("forward_draw_over_canvas", PropertyInfo(Variant::TRANSFORM2D, "canvas_xform"), PropertyInfo(Variant::OBJECT, "canvas:Control"))); + ClassDB::add_virtual_method(get_class_static(), MethodInfo("forward_draw_over_canvas", PropertyInfo(Variant::TRANSFORM2D, "canvas_xform"), PropertyInfo(Variant::OBJECT, "canvas", PROPERTY_HINT_RESOURCE_TYPE, "Control"))); ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "forward_spatial_gui_input", PropertyInfo(Variant::OBJECT, "camera", PROPERTY_HINT_RESOURCE_TYPE, "Camera"), PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent"))); - MethodInfo gizmo = MethodInfo(Variant::OBJECT, "create_spatial_gizmo", PropertyInfo(Variant::OBJECT, "for_spatial:Spatial")); + MethodInfo gizmo = MethodInfo(Variant::OBJECT, "create_spatial_gizmo", PropertyInfo(Variant::OBJECT, "for_spatial", PROPERTY_HINT_RESOURCE_TYPE, "Spatial")); gizmo.return_val.hint = PROPERTY_HINT_RESOURCE_TYPE; gizmo.return_val.hint_string = "EditorSpatialGizmo"; ClassDB::add_virtual_method(get_class_static(), gizmo); @@ -498,9 +610,9 @@ void EditorPlugin::_bind_methods() { ClassDB::add_virtual_method(get_class_static(), MethodInfo("set_window_layout", PropertyInfo(Variant::OBJECT, "layout", PROPERTY_HINT_RESOURCE_TYPE, "ConfigFile"))); ClassDB::add_virtual_method(get_class_static(), MethodInfo("get_window_layout", PropertyInfo(Variant::OBJECT, "layout", PROPERTY_HINT_RESOURCE_TYPE, "ConfigFile"))); - ADD_SIGNAL(MethodInfo("scene_changed", PropertyInfo(Variant::OBJECT, "scene_root:Node"))); - ADD_SIGNAL(MethodInfo("scene_closed", PropertyInfo(Variant::STRING, "filepath:String"))); - ADD_SIGNAL(MethodInfo("main_screen_changed", PropertyInfo(Variant::STRING, "screen_name:String"))); + ADD_SIGNAL(MethodInfo("scene_changed", PropertyInfo(Variant::OBJECT, "scene_root", PROPERTY_HINT_RESOURCE_TYPE, "Node"))); + ADD_SIGNAL(MethodInfo("scene_closed", PropertyInfo(Variant::STRING, "filepath"))); + ADD_SIGNAL(MethodInfo("main_screen_changed", PropertyInfo(Variant::STRING, "screen_name"))); BIND_ENUM_CONSTANT(CONTAINER_TOOLBAR); BIND_ENUM_CONSTANT(CONTAINER_SPATIAL_EDITOR_MENU); diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h index ce75cfd27a..99328f8149 100644 --- a/editor/editor_plugin.h +++ b/editor/editor_plugin.h @@ -61,6 +61,8 @@ protected: static void _bind_methods(); static EditorInterface *singleton; + Array _make_mesh_previews(const Array &p_meshes, int p_preview_size); + public: static EditorInterface *get_singleton() { return singleton; } @@ -86,6 +88,8 @@ public: Error save_scene(); void save_scene_as(const String &p_scene, bool p_with_preview = true); + Vector<Ref<Texture> > make_mesh_previews(const Vector<Ref<Mesh> > &p_meshes, int p_preview_size); + EditorInterface(); }; diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp index ee477b7c18..437ad5ac3f 100644 --- a/editor/editor_resource_preview.cpp +++ b/editor/editor_resource_preview.cpp @@ -69,8 +69,8 @@ Ref<Texture> EditorResourcePreviewGenerator::generate_from_path(const String &p_ void EditorResourcePreviewGenerator::_bind_methods() { ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "handles", PropertyInfo(Variant::STRING, "type"))); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::OBJECT, "generate:Texture", PropertyInfo(Variant::OBJECT, "from", PROPERTY_HINT_RESOURCE_TYPE, "Resource"))); - ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::OBJECT, "generate_from_path:Texture", PropertyInfo(Variant::STRING, "path", PROPERTY_HINT_FILE))); + ClassDB::add_virtual_method(get_class_static(), MethodInfo(CLASS_INFO(Texture), "generate", PropertyInfo(Variant::OBJECT, "from", PROPERTY_HINT_RESOURCE_TYPE, "Resource"))); + ClassDB::add_virtual_method(get_class_static(), MethodInfo(CLASS_INFO(Texture), "generate_from_path", PropertyInfo(Variant::STRING, "path", PROPERTY_HINT_FILE))); } EditorResourcePreviewGenerator::EditorResourcePreviewGenerator() { diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index c30ffd4b4e..6398bd1623 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -674,6 +674,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { set("editors/3d/warped_mouse_panning", true); set("editors/3d/orbit_sensitivity", 0.4); + set("editors/3d/freelook_inertia", 3); set("editors/3d/freelook_base_speed", 1); @@ -693,6 +694,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { set("editors/2d/pan_speed", 20); set("editors/poly_editor/point_grab_radius", 8); + set("editors/poly_editor/show_previous_outline", true); set("run/window_placement/rect", 1); hints["run/window_placement/rect"] = PropertyInfo(Variant::INT, "run/window_placement/rect", PROPERTY_HINT_ENUM, "Top Left,Centered,Custom Position,Force Maximized,Force Fullscreen"); diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index a527701563..aa2b8913df 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -93,8 +93,11 @@ Ref<ImageTexture> editor_generate_icon(int p_index, bool dark_theme = true) { Ref<ImageTexture> icon = memnew(ImageTexture); Ref<Image> img = memnew(Image); + // dumb gizmo check + bool is_gizmo = String(editor_icons_names[p_index]).begins_with("Gizmo"); + ImageLoaderSVG::create_image_from_string(img, dark_theme ? editor_icons_sources[p_index] : editor_icons_sources_dark[p_index], EDSCALE, true); - if ((EDSCALE - (float)((int)EDSCALE)) > 0.0) + if ((EDSCALE - (float)((int)EDSCALE)) > 0.0 || is_gizmo) icon->create_from_image(img); // in this case filter really helps else icon->create_from_image(img, 0); diff --git a/editor/icons/SCsub b/editor/icons/SCsub index 86c51a50f3..07fe45ce11 100644 --- a/editor/icons/SCsub +++ b/editor/icons/SCsub @@ -1,18 +1,17 @@ #!/usr/bin/env python Import('env') - +from compat import StringIO def make_editor_icons_action(target, source, env): import os - import cStringIO dst = target[0].srcnode().abspath svg_icons = source - whites = cStringIO.StringIO() - darks = cStringIO.StringIO() + whites = StringIO() + darks = StringIO() for f in svg_icons: @@ -48,7 +47,7 @@ def make_editor_icons_action(target, source, env): whites.write('\n') darks.write('\n') - s = cStringIO.StringIO() + s = StringIO() s.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n") s.write("#ifndef _EDITOR_ICONS_H\n") s.write("#define _EDITOR_ICONS_H\n") @@ -75,7 +74,7 @@ def make_editor_icons_action(target, source, env): s.write("#endif\n") - f = open(dst, "wb") + f = open(dst, "w") f.write(s.getvalue()) f.close() s.close() diff --git a/editor/icons/dark/icon_array_mesh.svg b/editor/icons/dark/icon_array_mesh.svg new file mode 100644 index 0000000000..39f11880a8 --- /dev/null +++ b/editor/icons/dark/icon_array_mesh.svg @@ -0,0 +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="m3 1a2 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 -2zm10 0a2 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-2 7v3h-3v2h3v3h2v-3h3v-2h-3v-3h-2zm-8 3a2 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" dominant-baseline="auto" fill="#fea900" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian: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"/> +</g> +</svg> diff --git a/editor/icons/dark/icon_audio_effect_amplify.svg b/editor/icons/dark/icon_audio_effect_amplify.svg index 3a37ae26fd..be4a4721c1 100644 --- a/editor/icons/dark/icon_audio_effect_amplify.svg +++ b/editor/icons/dark/icon_audio_effect_amplify.svg @@ -7,6 +7,6 @@ </linearGradient> </defs> <g transform="translate(0 -1036.4)"> -<path transform="translate(0 1036.4)" d="m15 1-14 7h14zm-13 9v1h2v-1zm2 1v1h-2v-1h-1v4h1v-2h2v2h1v-4zm2-1v5h1v-4h1v4h1v-4h1v-1zm4 1v4h1v-4zm2-1v5h1v-2h2v-3zm1 1h1v1h-1z" fill="url(#a)"/> +<path transform="translate(0 1036.4)" d="m2 1v8h2v-2h2v-2h-2v-2h3v-2zm6 0 2 4-2 4h2l1-2 1 2h2l-2-4 2-4h-2l-1 2-1-2zm-6 9v1h2v-1zm2 1v1h-2v-1h-1v4h1v-2h2v2h1v-4zm2-1v5h1v-4h1v4h1v-4h1v-1zm4 1v4h1v-4zm2-1v5h1v-2h2v-3zm1 1h1v1h-1z" fill="url(#a)"/> </g> </svg> diff --git a/editor/icons/dark/icon_clear.svg b/editor/icons/dark/icon_clear.svg new file mode 100644 index 0000000000..7f7564b876 --- /dev/null +++ b/editor/icons/dark/icon_clear.svg @@ -0,0 +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="m8 1a1 1 0 0 0 -1 1v5h-2c-1.108 0-2 0.892-2 2v1h10v-1c0-1.108-0.892-2-2-2h-2v-5a1 1 0 0 0 -1 -1zm-5 10v4l10-1v-3h-10z" fill="#4f4f4f" fill-opacity=".99608"/> +</g> +</svg> diff --git a/editor/icons/dark/icon_collision_2d.svg b/editor/icons/dark/icon_collision_polygon_2d.svg index a1e6d9fbef..a1e6d9fbef 100644 --- a/editor/icons/dark/icon_collision_2d.svg +++ b/editor/icons/dark/icon_collision_polygon_2d.svg diff --git a/editor/icons/dark/icon_cube_mesh.svg b/editor/icons/dark/icon_cube_mesh.svg index cf5589e942..770e4c33e8 100644 --- a/editor/icons/dark/icon_cube_mesh.svg +++ b/editor/icons/dark/icon_cube_mesh.svg @@ -1,5 +1,5 @@ <svg width="16" height="16" version="1.1" viewBox="0 0 14.999999 14.999999" xmlns="http://www.w3.org/2000/svg"> <g transform="translate(0 -1037.4)"> -<path d="m7.5 1038.2-6.5625 3.2804v6.772l0.49015 0.246 6.0723 3.0344 6.5625-3.2804v-6.772zm0 1.9831 3.6926 1.8463-3.6926 1.8463-3.6926-1.8463zm-4.7889 3.2804 3.9022 1.9502v3.6944l-3.9022-1.952zm9.5779 0v3.6926l-3.9022 1.952v-3.6944z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#fea900" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian: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"/> +<path d="m7.5 1038.2-6.5625 3.2804v6.772l6.5625 3.2804 6.5625-3.2804v-6.772zm0 1.9831 3.6926 1.8463-3.6926 1.8463-3.6926-1.8463zm-4.7889 3.2804 3.9022 1.9502v3.6944l-3.9022-1.952zm9.5779 0v3.6926l-3.9022 1.952v-3.6944z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#fea900" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian: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"/> </g> </svg> diff --git a/editor/icons/dark/icon_file_big_broken.svg b/editor/icons/dark/icon_file_big_broken.svg new file mode 100644 index 0000000000..50fe2772df --- /dev/null +++ b/editor/icons/dark/icon_file_big_broken.svg @@ -0,0 +1,7 @@ +<svg width="64" height="64" version="1.1" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg"> +<g transform="translate(0 -988.36)"> +<g transform="translate(0 -1.6949e-5)"> +<path transform="translate(0 988.36)" d="m14 5c-2.1987 0-4 1.8013-4 4v26.172a1.0001 1.0001 0 0 0 1.707 0.70703l3.293-3.293 9.293 9.293a1.0001 1.0001 0 0 0 1.4141 0l9.293-9.293 9.293 9.293a1.0001 1.0001 0 0 0 1.4141 0l8-8a1.0001 1.0001 0 0 0 0.29297 -0.70703v-11.172a1.0001 1.0001 0 0 0 -0.29297 -0.70703l-16-16a1.0001 1.0001 0 0 0 -0.70703 -0.29297h-23zm0 2h22v12c0 2.1987 1.8013 4 4 4h12v9.7578l-7 7-9.293-9.293a1.0001 1.0001 0 0 0 -1.4141 0l-9.293 9.293-9.293-9.293a1.0001 1.0001 0 0 0 -1.4141 0l-2.293 2.293v-23.758c0-1.1253 0.87473-2 2-2zm0.98438 28.83a1.0001 1.0001 0 0 0 -0.69141 0.29297l-4 4a1.0001 1.0001 0 0 0 -0.29297 0.70703v14.17c0 2.1987 1.8013 4 4 4h36c2.1987 0 4-1.8013 4-4v-16.17a1.0001 1.0001 0 0 0 -1.707 -0.70703l-7.293 7.293-9.293-9.293a1.0001 1.0001 0 0 0 -1.4141 0l-9.293 9.293-9.293-9.293a1.0001 1.0001 0 0 0 -0.72266 -0.29297zm0.015625 2.4141l9.293 9.293a1.0001 1.0001 0 0 0 1.4141 0l9.293-9.293 9.293 9.293a1.0001 1.0001 0 0 0 1.4141 0l6.293-6.293v13.756c0 1.1253-0.87473 2-2 2h-36c-1.1253 0-2-0.87473-2-2v-13.756l3-3z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#ff4040" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian: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"/> +</g> +</g> +</svg> diff --git a/editor/icons/dark/icon_file_big_dead.svg b/editor/icons/dark/icon_file_big_dead.svg new file mode 100644 index 0000000000..f6dabc0440 --- /dev/null +++ b/editor/icons/dark/icon_file_big_dead.svg @@ -0,0 +1,7 @@ +<svg width="64" height="64" version="1.1" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg"> +<g transform="translate(0 -988.36)"> +<g transform="translate(0 -1.6949e-5)"> +<path d="m14 993.36c-2.1987 0-4 1.8013-4 4v46c0 2.1987 1.8013 4 4 4h36c2.1987 0 4-1.8013 4-4v-33h-0.0078c2e-3 -0.2483-0.0793-0.501-0.28516-0.707l-16-16c-0.18788-0.18693-0.44247-0.28939-0.70704-0.28907v-4e-3zm0 2h22v12c0 2.1987 1.8013 4 4 4h12v32c0 1.1253-0.87472 2-2 2h-36c-1.1253 0-2-0.8747-2-2v-46c0-1.1253 0.87472-2 2-2zm2.9512 22.002a1 1 0 0 0 -0.60938 0.2461 1 1 0 0 0 -0.09375 1.4121l2.9238 3.3398-2.9238 3.3418a1 1 0 0 0 0.09375 1.4121 1 1 0 0 0 1.4102 -0.094l2.748-3.1407 2.748 3.1407a1 1 0 0 0 1.4102 0.094 1 1 0 0 0 0.09375 -1.4121l-2.9238-3.3418 2.9238-3.3398a1 1 0 0 0 -0.09375 -1.4121 1 1 0 0 0 -0.63867 -0.2461 1 1 0 0 0 -0.77148 0.3398l-2.748 3.1406-2.748-3.1406a1 1 0 0 0 -0.80078 -0.3398zm23 0a1 1 0 0 0 -0.60938 0.2461 1 1 0 0 0 -0.09375 1.4121l2.9238 3.3398-2.9238 3.3418a1 1 0 0 0 0.09375 1.4121 1 1 0 0 0 1.4102 -0.094l2.748-3.1407 2.748 3.1407a1 1 0 0 0 1.4102 0.094 1 1 0 0 0 0.09375 -1.4121l-2.9238-3.3418 2.9238-3.3398a1 1 0 0 0 -0.09375 -1.4121 1 1 0 0 0 -0.63867 -0.2461 1 1 0 0 0 -0.77148 0.3398l-2.748 3.1406-2.748-3.1406a1 1 0 0 0 -0.80078 -0.3398zm-18.951 13.998a1 1 0 0 0 -1 1 1 1 0 0 0 1 1h3v3c0 2.7527 2.2473 5 5 5s5-2.2473 5-5v-3h9a1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1zm5 2h6v3c0 1.6793-1.3207 3-3 3s-3-1.3207-3-3z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#ff4040" 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"/> +</g> +</g> +</svg> diff --git a/editor/icons/dark/icon_file_broken.svg b/editor/icons/dark/icon_file_broken.svg new file mode 100644 index 0000000000..cc5358e433 --- /dev/null +++ b/editor/icons/dark/icon_file_broken.svg @@ -0,0 +1,7 @@ +<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 -1.6949e-5)"> +<path transform="translate(0 1036.4)" d="m2 1v8.5859l1.293-1.293a1.0001 1.0001 0 0 1 0.69141 -0.29102 1.0001 1.0001 0 0 1 0.72266 0.29102l2.293 2.293 2.293-2.293a1.0001 1.0001 0 0 1 1.4141 0l2.293 2.293 1-1v-3.5859h-5v-5h-7zm8 0v4h4l-4-4zm-6 9.4141l-2 2v2.5859h12v-2.5859l-0.29297 0.29297a1.0001 1.0001 0 0 1 -1.4141 0l-2.293-2.293-2.293 2.293a1.0001 1.0001 0 0 1 -1.4141 0l-2.293-2.293z" fill="#ff4040"/> +</g> +</g> +</svg> diff --git a/editor/icons/dark/icon_gizmo_camera.svg b/editor/icons/dark/icon_gizmo_camera.svg new file mode 100644 index 0000000000..f6e5f885e7 --- /dev/null +++ b/editor/icons/dark/icon_gizmo_camera.svg @@ -0,0 +1,5 @@ +<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"> +<g transform="translate(0 -924.36)"> +<path d="m76 944.36a24 24 0 0 0 -23.906 22.219 24 24 0 0 0 -16.094 -6.2192 24 24 0 0 0 -24 24 24 24 0 0 0 16 22.594v17.406c0 4.432 3.5679 8 8 8h48c4.4321 0 8-3.568 8-8v-8l24 16v-48l-24 16v-14.156a24 24 0 0 0 8 -17.844 24 24 0 0 0 -24 -24z" fill="#f7f5cf"/> +</g> +</svg> diff --git a/editor/icons/dark/icon_gizmo_directional_light.svg b/editor/icons/dark/icon_gizmo_directional_light.svg index a8739a5a78..f7fa732501 100644 --- a/editor/icons/dark/icon_gizmo_directional_light.svg +++ b/editor/icons/dark/icon_gizmo_directional_light.svg @@ -1,5 +1,5 @@ <svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"> <g transform="translate(0 -924.36)"> -<path transform="translate(0 924.36)" d="m64 4a8 8 0 0 0 -8 8v12a8 8 0 0 0 8 8 8 8 0 0 0 8 -8v-12a8 8 0 0 0 -8 -8zm-36.887 15.23a8 8 0 0 0 -5.5391 2.3438 8 8 0 0 0 0 11.312l8.4844 8.4863a8 8 0 0 0 11.314 0 8 8 0 0 0 0 -11.314l-8.4863-8.4844a8 8 0 0 0 -5.7734 -2.3438zm73.539 0a8 8 0 0 0 -5.5391 2.3438l-8.4863 8.4844a8 8 0 0 0 0 11.314 8 8 0 0 0 11.314 0l8.4844-8.4863a8 8 0 0 0 0 -11.312 8 8 0 0 0 -5.7734 -2.3438zm-36.652 20.77a24 24 0 0 0 -24 24 24 24 0 0 0 24 24 24 24 0 0 0 24 -24 24 24 0 0 0 -24 -24zm-52 16a8 8 0 0 0 -8 8 8 8 0 0 0 8 8h12a8 8 0 0 0 8 -8 8 8 0 0 0 -8 -8h-12zm92 0a8 8 0 0 0 -8 8 8 8 0 0 0 8 8h12a8 8 0 0 0 8 -8 8 8 0 0 0 -8 -8h-12zm-68.4 28.285a8 8 0 0 0 -5.541 2.3418l-8.4844 8.4863a8 8 0 0 0 0 11.312 8 8 0 0 0 11.312 0l8.4863-8.4844a8 8 0 0 0 0 -11.314 8 8 0 0 0 -5.7734 -2.3418zm56.568 0a8 8 0 0 0 -5.541 2.3418 8 8 0 0 0 0 11.314l8.4863 8.4844a8 8 0 0 0 11.312 0 8 8 0 0 0 0 -11.312l-8.4844-8.4863a8 8 0 0 0 -5.7734 -2.3418zm-28.168 11.715a8 8 0 0 0 -8 8v12a8 8 0 0 0 8 8 8 8 0 0 0 8 -8v-12a8 8 0 0 0 -8 -8z" fill="#f7f5cf"/> +<path transform="translate(0 924.36)" d="m64 8c-2.216 0-4 1.784-4 4v16c0 2.216 1.784 4 4 4s4-1.784 4-4v-16c0-2.216-1.784-4-4-4zm-36.77 15.227c-1.0225 0-2.0447 0.39231-2.8281 1.1758-1.5669 1.5669-1.5669 4.0893 0 5.6562l11.312 11.314c1.5669 1.5669 4.0913 1.5669 5.6582 0s1.5669-4.0913 0-5.6582l-11.314-11.312c-0.78348-0.78348-1.8056-1.1758-2.8281-1.1758zm73.539 0c-1.0225 0-2.0446 0.39231-2.8281 1.1758l-11.314 11.312c-1.5669 1.5669-1.5669 4.0913 0 5.6582s4.0913 1.5669 5.6582 0l11.313-11.314c1.5669-1.5669 1.5669-4.0893 0-5.6562-0.78348-0.78348-1.8056-1.1758-2.8281-1.1758zm-36.77 20.773c-11.046 1e-5 -20 8.9543-20 20 7e-6 11.046 8.9543 20 20 20s20-8.9543 20-20c-8e-6 -11.046-8.9543-20-20-20zm-52 16c-2.216 0-4 1.784-4 4s1.784 4 4 4h16c2.216 0 4-1.784 4-4s-1.784-4-4-4h-16zm88 0c-2.216 0-4 1.784-4 4s1.784 4 4 4h16c2.216 0 4-1.784 4-4s-1.784-4-4-4h-16zm-61.455 25.453c-1.0225 0-2.0466 0.39035-2.8301 1.1738l-11.312 11.314c-1.5669 1.5669-1.5669 4.0893 0 5.6563 1.5669 1.5669 4.0893 1.5669 5.6562 0l11.314-11.313c1.5669-1.5669 1.5669-4.0913 0-5.6582-0.78347-0.78347-1.8056-1.1738-2.8281-1.1738zm50.91 0c-1.0225 0-2.0447 0.39035-2.8281 1.1738-1.5669 1.5669-1.5669 4.0913 0 5.6582l11.314 11.313c1.5669 1.5669 4.0893 1.5669 5.6563 0 1.5669-1.567 1.5669-4.0893 0-5.6563l-11.313-11.314c-0.78347-0.78347-1.8076-1.1738-2.8301-1.1738zm-25.455 10.547c-2.216 0-4 1.784-4 4v16c0 2.216 1.784 4 4 4s4-1.784 4-4v-16c0-2.216-1.784-4-4-4z" fill="#f7f5cf"/> </g> </svg> diff --git a/editor/icons/dark/icon_gizmo_g_i_probe.svg b/editor/icons/dark/icon_gizmo_g_i_probe.svg new file mode 100644 index 0000000000..7d3adf4196 --- /dev/null +++ b/editor/icons/dark/icon_gizmo_g_i_probe.svg @@ -0,0 +1,5 @@ +<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"> +<g transform="translate(0 -924.36)"> +<path transform="translate(0 924.36)" d="m12 8a4.0004 4.0004 0 0 0 -4 4v104a4.0004 4.0004 0 0 0 4 4h60v-8h-56v-96h96v8h8v-12a4.0004 4.0004 0 0 0 -4 -4h-104zm27.715 17.951c-1.2324 0.086154-2.3996 0.76492-3.0664 1.9199l-0.14844 0.25781c-1.0669 1.848-0.43784 4.1948 1.4102 5.2617l10.648 6.1484c1.848 1.0669 4.1948 0.43784 5.2617-1.4102l0.14844-0.25781c1.0669-1.848 0.43784-4.1948-1.4102-5.2617l-10.648-6.1484c-0.693-0.4001-1.4558-0.56146-2.1953-0.50977zm52.285 2.0488a32 32 0 0 0 -32 32 32 32 0 0 0 16 27.668v8.332c0 4.432 3.568 8 8 8h16c4.432 0 8-3.568 8-8v-8.3223a32 32 0 0 0 16 -27.678 32 32 0 0 0 -32 -32zm0 12a20 20 0 0 1 20 20 20 20 0 0 1 -20 20 20 20 0 0 1 -20 -20 20 20 0 0 1 20 -20zm-60.148 16c-2.1339 0-3.8516 1.7177-3.8516 3.8516v0.29688c0 2.1339 1.7177 3.8516 3.8516 3.8516h12.297c2.1339 0 3.8516-1.7177 3.8516-3.8516v-0.29688c0-2.1339-1.7177-3.8516-3.8516-3.8516h-12.297zm18.902 23.951c-0.73947-0.051693-1.5023 0.10966-2.1953 0.50977l-10.648 6.1484c-1.848 1.0669-2.4771 3.4137-1.4102 5.2617l0.14844 0.25781c1.0669 1.848 3.4137 2.4771 5.2617 1.4102l10.648-6.1484c1.848-1.0669 2.4771-3.4137 1.4102-5.2617l-0.14844-0.25781c-0.66684-1.155-1.834-1.8338-3.0664-1.9199zm33.246 32.049v8h16v-8h-16z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#f7f5cf" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian: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"/> +</g> +</svg> diff --git a/editor/icons/dark/icon_gizmo_particles.svg b/editor/icons/dark/icon_gizmo_particles.svg new file mode 100644 index 0000000000..05fc84619e --- /dev/null +++ b/editor/icons/dark/icon_gizmo_particles.svg @@ -0,0 +1,5 @@ +<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"> +<g transform="translate(0 -924.36)"> +<path transform="translate(0 924.36)" d="m64 8a36 40 0 0 0 -35.311 32.256 24 24 0 0 0 -20.689 23.744 24 24 0 0 0 24 24h64a24 24 0 0 0 24 -24 24 24 0 0 0 -20.715 -23.746 36 40 0 0 0 -35.285 -32.254zm-32 88a8 8 0 0 0 -8 8 8 8 0 0 0 8 8 8 8 0 0 0 8 -8 8 8 0 0 0 -8 -8zm64 0a8 8 0 0 0 -8 8 8 8 0 0 0 8 8 8 8 0 0 0 8 -8 8 8 0 0 0 -8 -8zm-32 8a8 8 0 0 0 -8 8 8 8 0 0 0 8 8 8 8 0 0 0 8 -8 8 8 0 0 0 -8 -8z" fill="#f7f5cf"/> +</g> +</svg> diff --git a/editor/icons/dark/icon_gizmo_reflection_probe.svg b/editor/icons/dark/icon_gizmo_reflection_probe.svg new file mode 100644 index 0000000000..6d80e73b8c --- /dev/null +++ b/editor/icons/dark/icon_gizmo_reflection_probe.svg @@ -0,0 +1,5 @@ +<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"> +<g transform="translate(0 -924.36)"> +<path transform="translate(0 924.36)" d="m12 8a4.0004 4.0004 0 0 0 -4 4v24h8v-20h96v8h8v-12a4.0004 4.0004 0 0 0 -4 -4h-104zm76 28a4 4 0 0 0 -4 4 4 4 0 0 0 4 4h18.732l-42.957 50.119-44.947-44.947-5.6562 5.6582 48 48a4.0004 4.0004 0 0 0 5.8652 -0.22656l44.963-52.457v17.854a4 4 0 0 0 4 4 4 4 0 0 0 4 -4v-28a4.0004 4.0004 0 0 0 -4 -4h-28zm-80 52v28a4.0004 4.0004 0 0 0 4 4h104a4.0004 4.0004 0 0 0 4 -4v-28h-8v24h-96v-24h-8z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#f7f5cf" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian: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"/> +</g> +</svg> diff --git a/editor/icons/dark/icon_gizmo_spatial_sample_player.svg b/editor/icons/dark/icon_gizmo_spatial_sample_player.svg index d40fe230ac..7dbb4744be 100644 --- a/editor/icons/dark/icon_gizmo_spatial_sample_player.svg +++ b/editor/icons/dark/icon_gizmo_spatial_sample_player.svg @@ -1,5 +1,5 @@ <svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"> <g transform="translate(0 -924.36)"> -<path transform="translate(0 924.36)" d="m63.883 12.004a4.0004 4.0004 0 0 0 -2.7109 1.168l-30.828 30.83h-14.344a4.0004 4.0004 0 0 0 -4 4v32a4.0004 4.0004 0 0 0 4 4h14.344l30.828 30.828a4.0004 4.0004 0 0 0 6.8281 -2.8281v-96.002a4.0004 4.0004 0 0 0 -4.1172 -3.9961zm46.117 5.9961a6 6 0 0 0 -6 6v80a6 6 0 0 0 6 6 6 6 0 0 0 6 -6v-80a6 6 0 0 0 -6 -6zm-24 24a6 6 0 0 0 -6 6v32h0.34961a6 6 0 0 0 5.6504 4 6 6 0 0 0 5.6484 -4h0.35156v-32a6 6 0 0 0 -6 -6z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#f7f5cf" 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-east-asian: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"/> +<path transform="translate(0 924.36)" d="m63.883 12.004c-1.0195 0.0295-1.9892 0.4473-2.7109 1.168l-30.828 30.83h-14.344c-2.209 2.21e-4 -3.9998 1.791-4 4v32c2.21e-4 2.209 1.791 3.9998 4 4h14.344l30.828 30.828c2.52 2.5182 6.8267 0.73442 6.8281-2.8281v-96.002c-0.0015-2.2541-1.8641-4.0619-4.1172-3.9961zm48.117 3.9961a4 4 0 0 0 -4 4v88a4 4 0 0 0 4 4 4 4 0 0 0 4 -4v-88a4 4 0 0 0 -4 -4zm-24 24a4 4 0 0 0 -4 4v40a4 4 0 0 0 4 4 4 4 0 0 0 4 -4v-40a4 4 0 0 0 -4 -4z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#f7f5cf" 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-east-asian: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"/> </g> </svg> diff --git a/editor/icons/dark/icon_gizmo_spot_light.svg b/editor/icons/dark/icon_gizmo_spot_light.svg new file mode 100644 index 0000000000..9b4ddadd17 --- /dev/null +++ b/editor/icons/dark/icon_gizmo_spot_light.svg @@ -0,0 +1,5 @@ +<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"> +<g transform="translate(0 -924.36)"> +<path transform="translate(0 924.36)" d="m52 8c-4.432 0-8 3.568-8 8v12 16.875a40 36 0 0 0 -20 31.125h28a12 12 0 0 0 12 12 12 12 0 0 0 12 -12h28a40 36 0 0 0 -20 -31.141v-20.859-8c0-4.432-3.568-8-8-8h-24zm-11.969 78.006c-0.76793-0.053681-1.5596 0.1138-2.2793 0.5293l-10.393 6c-1.9191 1.108-2.5728 3.5457-1.4648 5.4648s3.5457 2.5728 5.4648 1.4648l10.393-6c1.9191-1.108 2.5709-3.5457 1.4629-5.4648-0.6925-1.1994-1.9037-1.9047-3.1836-1.9941zm47.938 0c-1.2799 0.08947-2.4911 0.7947-3.1836 1.9941-1.108 1.9191-0.45622 4.3568 1.4629 5.4648l10.393 6c1.9191 1.108 4.3568 0.45427 5.4648-1.4648s0.45427-4.3568-1.4648-5.4648l-10.393-6c-0.71967-0.4155-1.5114-0.58298-2.2793-0.5293zm-23.969 13.994c-2.216 0-4 1.784-4 4v12c0 2.216 1.784 4 4 4s4-1.784 4-4v-12c0-2.216-1.784-4-4-4z" fill="#f7f5cf" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.1082"/> +</g> +</svg> diff --git a/editor/icons/dark/icon_move_down.svg b/editor/icons/dark/icon_move_down.svg index 437ae2146f..c060f98597 100644 --- a/editor/icons/dark/icon_move_down.svg +++ b/editor/icons/dark/icon_move_down.svg @@ -1,6 +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)" fill="none" stroke="#4f4f4f" stroke-linecap="round" stroke-opacity=".99608" stroke-width="2"> -<path d="m4 1045.3 4 5 4-5" stroke-linejoin="round"/> -<path d="m8 1038.3v11"/> +<g transform="translate(0 -1036.4)"> +<path d="m7.9964 1051.4a1.0002 1.0001 0 0 1 -0.77738 -0.377l-4.0002-5a1.0001 1 0 0 1 0.15626 -1.4043 1.0001 1 0 0 1 1.4063 0.1563l2.2189 2.7734v-5.1484a1.0001 1 0 0 1 1.0001 -1 1.0001 1 0 0 1 1.0001 1v5.1484l2.2189-2.7734a1.0001 1 0 0 1 1.4063 -0.1563 1.0001 1 0 0 1 0.15626 1.4043l-4.0002 5a1.0002 1.0001 0 0 1 -0.7852 0.377zm0.00391-12a1.0001 1 0 0 1 -1.0001 -1 1.0001 1 0 0 1 1.0001 -1 1.0001 1 0 0 1 1.0001 1 1.0001 1 0 0 1 -1.0001 1z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#4f4f4f" fill-opacity=".99608" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian: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"/> </g> </svg> diff --git a/editor/icons/dark/icon_move_up.svg b/editor/icons/dark/icon_move_up.svg index cf948b75a4..c97166020b 100644 --- a/editor/icons/dark/icon_move_up.svg +++ b/editor/icons/dark/icon_move_up.svg @@ -1,6 +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)" fill="none" stroke="#4f4f4f" stroke-linecap="round" stroke-opacity=".99608" stroke-width="2"> -<path d="m4 1043.4 4-5 4 5" stroke-linejoin="round"/> -<path d="m8 1050.4v-11"/> +<g transform="translate(0 -1036.4)"> +<path d="m7.9964 1037.4a1.0002 1.0001 0 0 0 -0.77739 0.377l-4.0002 5a1.0001 1 0 0 0 0.15626 1.4043 1.0001 1 0 0 0 1.4063 -0.1563l2.2189-2.7734v5.1484a1.0001 1 0 0 0 1.0001 1 1.0001 1 0 0 0 1.0001 -1v-5.1484l2.2189 2.7734a1.0001 1 0 0 0 1.4063 0.1563 1.0001 1 0 0 0 0.15626 -1.4043l-4.0002-5a1.0002 1.0001 0 0 0 -0.7852 -0.377zm0.00391 12a1.0001 1 0 0 0 -1.0001 1 1.0001 1 0 0 0 1.0001 1 1.0001 1 0 0 0 1.0001 -1 1.0001 1 0 0 0 -1.0001 -1z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#4f4f4f" fill-opacity=".99608" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian: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"/> </g> </svg> diff --git a/editor/icons/dark/icon_multi_mesh.svg b/editor/icons/dark/icon_multi_mesh.svg index 50504f9924..6121886fa0 100644 --- a/editor/icons/dark/icon_multi_mesh.svg +++ b/editor/icons/dark/icon_multi_mesh.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="m3 1a2 2 0 0 0 -2 2 2 2 0 0 0 1 1.7305v6.541a2 2 0 0 0 -1 1.7285 2 2 0 0 0 2 2 2 2 0 0 0 1.7305 -1h1.2695v-1-1h-1.2715a2 2 0 0 0 -0.72852 -0.73047v-5.8555l3.5859 3.5859h1.4141v-1-0.41406l-3.5859-3.5859h5.8574a2 2 0 0 0 0.72852 0.72656v1.2734h2v-1.2695a2 2 0 0 0 1 -1.7305 2 2 0 0 0 -2 -2 2 2 0 0 0 -1.7305 1h-6.541a2 2 0 0 0 -1.7285 -1zm8 7v1.5859 1.4141h-1.4141-1.5859v1 1h3v1 2h2v-1-2h2 1v-2h-2-1v-3h-1-1z" fill="#fea900"/> +<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.89543-2 2 5.649e-4 0.71397 0.38169 1.3735 1 1.7305v6.541c-0.61771 0.35663-0.99874 1.0152-1 1.7285 0 1.1046 0.89543 2 2 2 0.71397-5.65e-4 1.3735-0.38169 1.7305-1h1.2695v-2h-1.2715c-0.17478-0.30301-0.42598-0.55488-0.72852-0.73047v-5.8555l3.5859 3.5859h1.4141v-1.4141l-3.5859-3.5859h5.8574c0.17532 0.30158 0.42647 0.55205 0.72852 0.72656v1.2734h2v-1.2695c0.61831-0.35698 0.99944-1.0165 1-1.7305 0-1.1046-0.89543-2-2-2-0.71397 5.648e-4 -1.3735 0.38169-1.7305 1h-6.541c-0.35663-0.61771-1.0152-0.99874-1.7285-1zm8 7v3h-3v2h3v3h2v-3h3v-2h-3v-3z" fill="#fea900"/> </g> </svg> diff --git a/editor/icons/dark/icon_multi_mesh_instance.svg b/editor/icons/dark/icon_multi_mesh_instance.svg index 563ec70f32..96eee34c8f 100644 --- a/editor/icons/dark/icon_multi_mesh_instance.svg +++ b/editor/icons/dark/icon_multi_mesh_instance.svg @@ -1,6 +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)" fill="#ff5f5f" fill-opacity=".99608"> -<path transform="translate(0 1036.4)" d="m3 1a2 2 0 0 0 -2 2 2 2 0 0 0 1 1.7305v6.541a2 2 0 0 0 -1 1.7285 2 2 0 0 0 2 2 2 2 0 0 0 1.7305 -1h1.2695v-1-1h-1.2715a2 2 0 0 0 -0.72852 -0.73047v-5.8555l3.5859 3.5859h1.4141v-1-0.41406l-3.5859-3.5859h5.8574a2 2 0 0 0 0.72852 0.72656v1.2734h2v-1.2695a2 2 0 0 0 1 -1.7305 2 2 0 0 0 -2 -2 2 2 0 0 0 -1.7305 1h-6.541a2 2 0 0 0 -1.7285 -1zm9 7v2.5859l-1-1v1.4141h-1.4141l1 1h-2.5859v1h1 2v1h0.27148a2 2 0 0 0 1.7285 1v-2h2a2 2 0 0 0 -1.0312 -1.75h0.03125v-0.25h-1v-3h-1z"/> -<path d="m11 1044.4v3h-3v2h3v3h2v-3h3v-2h-3v-3h-2z"/> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.89543-2 2 5.649e-4 0.71397 0.38169 1.3735 1 1.7305v6.541c-0.61771 0.35663-0.99874 1.0152-1 1.7285 0 1.1046 0.89543 2 2 2 0.71397-5.65e-4 1.3735-0.38169 1.7305-1h1.2695v-2h-1.2715c-0.17478-0.30301-0.42598-0.55488-0.72852-0.73047v-5.8555l3.5859 3.5859h1.4141v-1.4141l-3.5859-3.5859h5.8574c0.17532 0.30158 0.42647 0.55205 0.72852 0.72656v1.2734h2v-1.2695c0.61831-0.35698 0.99944-1.0165 1-1.7305 0-1.1046-0.89543-2-2-2-0.71397 5.648e-4 -1.3735 0.38169-1.7305 1h-6.541c-0.35663-0.61771-1.0152-0.99874-1.7285-1zm8 7v3h-3v2h3v3h2v-3h3v-2h-3v-3z" fill="#ff5f5f" fill-opacity=".99608"/> </g> </svg> diff --git a/editor/icons/dark/icon_navigation_mesh_instance.svg b/editor/icons/dark/icon_navigation_mesh_instance.svg index 295bef078f..aea815c1c2 100644 --- a/editor/icons/dark/icon_navigation_mesh_instance.svg +++ b/editor/icons/dark/icon_navigation_mesh_instance.svg @@ -1,7 +1,6 @@ <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)" fill="#ff5f5f" fill-opacity=".99608"> -<path transform="translate(0 1036.4)" d="m3 1a2 2 0 0 0 -2 2 2 2 0 0 0 1 1.7305v6.541a2 2 0 0 0 -1 1.7285 2 2 0 0 0 2 2 2 2 0 0 0 1.7305 -1h2.5078l0.75-2h-3.2598a2 2 0 0 0 -0.72852 -0.73047v-5.8555l4.6973 4.6973 0.77148-2.0566-4.0547-4.0547h5.8574a2 2 0 0 0 0.72852 0.73047v0.27148a2.0002 2.0002 0 0 1 0.023438 0 2.0002 2.0002 0 0 1 1.8496 1.2969l0.12695 0.33789v-1.9082a2 2 0 0 0 1 -1.7285 2 2 0 0 0 -2 -2 2 2 0 0 0 -1.7305 1h-6.541a2 2 0 0 0 -1.7285 -1z"/> -<path d="m15 1051.4-3-8-3 8 3-2z" fill-rule="evenodd"/> +<path transform="translate(0 1036.4)" d="m3 1a2 2 0 0 0 -2 2 2 2 0 0 0 1 1.7305v6.541a2 2 0 0 0 -1 1.7285 2 2 0 0 0 2 2 2 2 0 0 0 1.7305 -1h2.5078l0.75-2h-3.2598a2 2 0 0 0 -0.72852 -0.73047v-5.8555l4.6973 4.6973 0.77148-2.0566-4.0547-4.0547h5.8574a2 2 0 0 0 0.72852 0.73047v0.27148a2.0002 2.0002 0 0 1 0.023438 0 2.0002 2.0002 0 0 1 1.8496 1.2969l0.12695 0.33789v-1.9082a2 2 0 0 0 1 -1.7285 2 2 0 0 0 -2 -2 2 2 0 0 0 -1.7305 1h-6.541a2 2 0 0 0 -1.7285 -1zm9 6l-3 8 3-2 3 2-3-8z"/> <rect x="12" y="1040.4" width="2" height="1"/> <rect x="12" y="1040.4" width="2" height="1"/> </g> diff --git a/editor/icons/dark/icon_packed_data_container.svg b/editor/icons/dark/icon_packed_data_container.svg index 6f306165e5..9e64b3570c 100644 --- a/editor/icons/dark/icon_packed_data_container.svg +++ b/editor/icons/dark/icon_packed_data_container.svg @@ -1,13 +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="m2 1038.4v12h12v-12z" fill="none" stroke="#4f4f4f" stroke-linejoin="round" stroke-width="2"/> -<rect x="4" y="1040.4" width="2" height="2" fill="#4f4f4f"/> -<rect x="4" y="1043.4" width="2" height="2" fill="#4f4f4f"/> -<rect x="4" y="1046.4" width="2" height="2" fill="#4f4f4f"/> -<rect x="7" y="1040.4" width="2" height="2" fill="#4f4f4f"/> -<rect x="7" y="1043.4" width="2" height="2" fill="#4f4f4f"/> -<rect x="7" y="1046.4" width="2" height="2" fill="#4f4f4f"/> -<rect x="10" y="1040.4" width="2" height="2" fill="#4f4f4f"/> -<rect x="10" y="1043.4" width="2" height="2" fill="#4f4f4f"/> +<path transform="translate(0 1036.4)" d="m2 1a1.0001 1.0001 0 0 0 -1 1v12a1.0001 1.0001 0 0 0 1 1h12a1.0001 1.0001 0 0 0 1 -1v-12a1.0001 1.0001 0 0 0 -1 -1h-12zm1 2h10v10h-10v-10zm1 1v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm-6 3v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm-6 3v2h2v-2h-2zm3 0v2h2v-2h-2z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#4f4f4f" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian: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"/> </g> </svg> diff --git a/editor/icons/dark/icon_particle_attractor_2d.svg b/editor/icons/dark/icon_particle_attractor_2d.svg index 48e1979f13..436bff9b04 100644 --- a/editor/icons/dark/icon_particle_attractor_2d.svg +++ b/editor/icons/dark/icon_particle_attractor_2d.svg @@ -1,9 +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)" fill="#6d90ff" fill-opacity=".98824"> -<path transform="translate(0 1036.4)" d="m8 1a3 7 0 0 0 -3 7 3 7 0 0 0 3 7 3 7 0 0 0 3 -7 3 7 0 0 0 -3 -7zm0 1a2 6 0 0 1 2 6 2 6 0 0 1 -2 6 2 6 0 0 1 -2 -6 2 6 0 0 1 2 -6z"/> -<path d="m1 1044.4a7 3 0 0 0 7 3 7 3 0 0 0 7 -3 7 3 0 0 0 -7 -3 7 3 0 0 0 -7 3zm1 0a6 2 0 0 1 6 -2 6 2 0 0 1 6 2 6 2 0 0 1 -6 2 6 2 0 0 1 -6 -2z"/> -<path d="m3.0503 1049.3a3 7 45 0 0 7.0711 -2.8284 3 7 45 0 0 2.8284 -7.071 3 7 45 0 0 -7.0711 2.8284 3 7 45 0 0 -2.8284 7.071zm0.70711-0.7071a2 6 45 0 1 2.8284 -5.6568 2 6 45 0 1 5.6569 -2.8284 2 6 45 0 1 -2.8284 5.6568 2 6 45 0 1 -5.6569 2.8284z"/> -<path d="m12.95 1049.3a7 3 45 0 0 -2.8284 -7.071 7 3 45 0 0 -7.071 -2.8284 7 3 45 0 0 2.8284 7.071 7 3 45 0 0 7.071 2.8284zm-0.7071-0.7071a6 2 45 0 1 -5.6568 -2.8284 6 2 45 0 1 -2.8284 -5.6568 6 2 45 0 1 5.6568 2.8284 6 2 45 0 1 2.8284 5.6568z"/> -<circle cx="8" cy="1044.4" r="1"/> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m8 1a3 7 0 0 0 -2.0801 1.9668 7 3 45 0 0 -2.8691 0.083984 7 3 45 0 0 -0.080078 2.8633 7 3 0 0 0 -1.9707 2.0859 7 3 0 0 0 1.9668 2.0801 3 7 45 0 0 0.083984 2.8691 3 7 45 0 0 2.8633 0.080078 3 7 0 0 0 2.0859 1.9707 3 7 0 0 0 2.0801 -1.9668 7 3 45 0 0 2.8691 -0.083984 7 3 45 0 0 0.080078 -2.8633 7 3 0 0 0 1.9707 -2.0859 7 3 0 0 0 -1.9668 -2.0801 3 7 45 0 0 -0.083984 -2.8691 3 7 45 0 0 -2.8633 -0.080078 3 7 0 0 0 -2.0859 -1.9707zm0 1a2 6 0 0 1 1.2598 1.3438 3 7 45 0 0 -1.2578 0.75977 7 3 45 0 0 -1.2637 -0.75781 2 6 0 0 1 1.2617 -1.3457zm-3.6348 1.5293a6 2 45 0 1 1.2344 0.28906 3 7 0 0 0 -0.35352 1.4238 7 3 0 0 0 -1.4297 0.35742 6 2 45 0 1 -0.058594 -1.8418 6 2 45 0 1 0.60742 -0.22852zm7.0762 0.0039062a2 6 45 0 1 0.80078 0.22461 2 6 45 0 1 -0.060547 1.8418 7 3 0 0 0 -1.4238 -0.35352 3 7 0 0 0 -0.35742 -1.4297 2 6 45 0 1 1.041 -0.2832zm-4.998 0.70703a6 2 45 0 1 0.74023 0.4707 3 7 45 0 0 -0.41211 0.33984 7 3 0 0 0 -0.52344 0.048828 2 6 0 0 1 0.19531 -0.85938zm3.1152 0.0019531a2 6 0 0 1 0.18945 0.85547 7 3 0 0 0 -0.5293 -0.050781 7 3 45 0 0 -0.4043 -0.33594 2 6 45 0 1 0.74414 -0.46875zm-1.5586 1.7578a6 2 0 0 1 0.82031 0.021484 6 2 45 0 1 0.59375 0.56445 6 2 45 0 1 0.56445 0.59375 2 6 0 0 1 0.021484 0.82031 2 6 0 0 1 -0.021484 0.82031 2 6 45 0 1 -0.56445 0.59375 2 6 45 0 1 -0.59375 0.56445 6 2 0 0 1 -0.82031 0.021484 6 2 0 0 1 -0.82031 -0.021484 6 2 45 0 1 -0.59375 -0.56445 6 2 45 0 1 -0.56445 -0.59375 2 6 0 0 1 -0.021484 -0.82031 2 6 0 0 1 0.021484 -0.82031 2 6 45 0 1 0.56445 -0.59375 2 6 45 0 1 0.59375 -0.56445 6 2 0 0 1 0.82031 -0.021484zm2.9004 0.24805a6 2 0 0 1 0.85938 0.19531 2 6 45 0 1 -0.4707 0.74023 7 3 45 0 0 -0.33984 -0.41211 3 7 0 0 0 -0.048828 -0.52344zm-5.8027 0.0039062a3 7 0 0 0 -0.050781 0.5293 3 7 45 0 0 -0.33594 0.4043 6 2 45 0 1 -0.46875 -0.74414 6 2 0 0 1 0.85547 -0.18945zm7.5566 0.48633a6 2 0 0 1 1.3457 1.2617 6 2 0 0 1 -1.3438 1.2598 7 3 45 0 0 -0.75977 -1.2578 3 7 45 0 0 0.75781 -1.2637zm-9.3105 0.0019532a7 3 45 0 0 0.75977 1.2578 3 7 45 0 0 -0.75781 1.2637 6 2 0 0 1 -1.3457 -1.2617 6 2 0 0 1 1.3438 -1.2598zm4.6562 0.25977a1 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 -1zm3.2891 1.8145a6 2 45 0 1 0.46875 0.74414 6 2 0 0 1 -0.85547 0.18945 3 7 0 0 0 0.050781 -0.5293 3 7 45 0 0 0.33594 -0.4043zm-6.5781 0.0019531a7 3 45 0 0 0.33984 0.41211 3 7 0 0 0 0.048828 0.52344 6 2 0 0 1 -0.85938 -0.19531 2 6 45 0 1 0.4707 -0.74023zm-0.89258 1.584a7 3 0 0 0 1.4238 0.35352 3 7 0 0 0 0.35742 1.4297 2 6 45 0 1 -1.8418 0.058594 2 6 45 0 1 0.060547 -1.8418zm8.3652 0a6 2 45 0 1 0.058594 1.8418 6 2 45 0 1 -1.8418 -0.060547 3 7 0 0 0 0.35352 -1.4238 7 3 0 0 0 1.4297 -0.35742zm-2.4316 0.5a2 6 0 0 1 -0.19531 0.85938 6 2 45 0 1 -0.74023 -0.4707 3 7 45 0 0 0.41211 -0.33984 7 3 0 0 0 0.52344 -0.048828zm-3.5 0.001953a7 3 0 0 0 0.5293 0.050781 7 3 45 0 0 0.4043 0.33594 2 6 45 0 1 -0.74414 0.46875 2 6 0 0 1 -0.18945 -0.85547zm1.7461 0.99414a7 3 45 0 0 1.2637 0.75781 2 6 0 0 1 -1.2617 1.3457 2 6 0 0 1 -1.2598 -1.3438 3 7 45 0 0 1.2578 -0.75977z" fill="#6d90ff" fill-opacity=".98824"/> </g> </svg> diff --git a/editor/icons/dark/icon_particles.svg b/editor/icons/dark/icon_particles.svg index b5d0558eae..7755b7519c 100644 --- a/editor/icons/dark/icon_particles.svg +++ b/editor/icons/dark/icon_particles.svg @@ -1,11 +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)" fill="#ff5f5f" fill-opacity=".99608"> -<circle cx="4" cy="1044.4" r="3"/> -<ellipse cx="8" cy="1042.4" rx="4.5" ry="5"/> -<path d="m4 1047.4h8v-4h-8z" fill-rule="evenodd"/> -<circle cx="12" cy="1044.4" r="3"/> -<circle cx="4" cy="1049.4" r="1"/> -<circle cx="12" cy="1049.4" r="1"/> -<circle cx="8" cy="1050.4" r="1"/> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m8 1a4.5 5 0 0 0 -4.4141 4.0312 3 3 0 0 0 -2.5859 2.9688 3 3 0 0 0 3 3h8a3 3 0 0 0 3 -3 3 3 0 0 0 -2.5898 -2.9668 4.5 5 0 0 0 -4.4102 -4.0332zm-4 11a1 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 -1zm8 0a1 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 -1zm-4 1a1 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="#ff5f5f" fill-opacity=".99608"/> </g> </svg> diff --git a/editor/icons/dark/icon_reflection_probe.svg b/editor/icons/dark/icon_reflection_probe.svg index daafbff1ea..0cb1c8e723 100644 --- a/editor/icons/dark/icon_reflection_probe.svg +++ b/editor/icons/dark/icon_reflection_probe.svg @@ -1,5 +1,7 @@ <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.9629 1.002a1.0001 1.0001 0 0 0 -0.41016 0.10352l-6 3a1.0001 1.0001 0 0 0 -0.55273 0.89453v6a1.0001 1.0001 0 0 0 0.55273 0.89453l6 3a1.0001 1.0001 0 0 0 0.89453 0l6-3a1.0001 1.0001 0 0 0 0.55273 -0.89453v-6a1.0001 1.0001 0 0 0 -0.55273 -0.89453l-6-3a1.0001 1.0001 0 0 0 -0.48438 -0.10352zm-0.96289 2.6172v8.7637l-4-2v-4.7637l4-2zm2 0l4 2v4.7637l-4 2v-8.7637z" color="#000000" color-rendering="auto" fill="#ff5f5f" fill-opacity=".99608" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;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"/> +<g transform="translate(0 -1036.4)" fill="none" stroke="#ff5f5f" stroke-linejoin="round" stroke-opacity=".99608" stroke-width="2"> +<path d="m2 1045.4v5h12v-4"/> +<path d="m2 1040.4 5 6 7-7"/> +<path d="m14 1043.4v-4h-4" stroke-linecap="round"/> </g> </svg> diff --git a/editor/icons/dark/icon_sprite_frames.svg b/editor/icons/dark/icon_sprite_frames.svg index e4f85236b4..ce87ca2b22 100644 --- a/editor/icons/dark/icon_sprite_frames.svg +++ b/editor/icons/dark/icon_sprite_frames.svg @@ -1,11 +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)" fill="#4f4f4f"> -<rect x="10" y="1046.4" width="2" height="2"/> -<rect x="13" y="1046.4" width="2" height="2"/> -<rect x="10" y="1049.4" width="2" height="2"/> -<rect x="13" y="1049.4" width="2" height="2"/> -<path transform="translate(0 1036.4)" d="m6 1a5 5 0 0 0 -5 5 5 5 0 0 0 5 5 5 5 0 0 0 5 -5 5 5 0 0 0 -5 -5zm-3 4a1 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 -1zm6 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 -1zm-1.0039 2.4922a0.50005 0.50005 0 0 1 0.35742 0.86133c-0.61785 0.6179-1.4924 0.89648-2.3535 0.89648s-1.7357-0.27858-2.3535-0.89648a0.50005 0.50005 0 0 1 0.34766 -0.85742 0.50005 0.50005 0 0 1 0.35938 0.15039c0.38215 0.3822 1.0076 0.60352 1.6465 0.60352s1.2643-0.22132 1.6465-0.60352a0.50005 0.50005 0 0 1 0.34961 -0.1543z"/> -<rect x="13" y="1043.4" width="2" height="2"/> -<rect x="7" y="1049.4" width="2" height="2"/> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m6 1a5 5 0 0 0 -5 5 5 5 0 0 0 5 5 5 5 0 0 0 5 -5 5 5 0 0 0 -5 -5zm-3 4a1 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 -1zm6 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 2v2h2v-2h-2zm-5.0039 0.49219a0.50005 0.50005 0 0 1 0.35742 0.86133c-0.61785 0.6179-1.4924 0.89648-2.3535 0.89648s-1.7357-0.27858-2.3535-0.89648a0.50005 0.50005 0 0 1 0.34766 -0.85742 0.50005 0.50005 0 0 1 0.35938 0.15039c0.38215 0.3822 1.0076 0.60352 1.6465 0.60352s1.2643-0.22132 1.6465-0.60352a0.50005 0.50005 0 0 1 0.34961 -0.1543zm2.0039 2.5078v2h2v-2h-2zm3 0v2h2v-2h-2zm-6 3v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2z" fill="#4f4f4f"/> </g> </svg> diff --git a/editor/icons/dark/icon_tile_set.svg b/editor/icons/dark/icon_tile_set.svg index 547af99872..e78867d81d 100644 --- a/editor/icons/dark/icon_tile_set.svg +++ b/editor/icons/dark/icon_tile_set.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="m1 1v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm-12 3v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm-12 3v2h2v-2h-2zm3 0v2h2v-2h-2zm5 1v1 5 1h5c0.55228 0 1-0.44772 1-1v-5c0-0.55228-0.44772-1-1-1v4l-1-1-1 1v-4h-3zm-8 2v2h2v-2h-2zm3 0v2h2v-2h-2zm-3 3v2h2v-2h-2zm3 0v2h2v-2h-2z" fill="#4f4f4f"/> +<path transform="translate(0 1036.4)" d="m1 1v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm-12 3v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm-12 3v2h2v-2zm3 0v2h2v-2zm5 1v7h5c0.55228 0 1-0.44772 1-1v-5c0-0.55228-0.44772-1-1-1v4l-1-1-1 1v-4zm-8 2v2h2v-2zm3 0v2h2v-2zm-3 3v2h2v-2zm3 0v2h2v-2z" fill="#4f4f4f"/> </g> </svg> diff --git a/editor/icons/dark/icon_tool_button.svg b/editor/icons/dark/icon_tool_button.svg index db3fdb8c84..541e62aed4 100644 --- a/editor/icons/dark/icon_tool_button.svg +++ b/editor/icons/dark/icon_tool_button.svg @@ -1,11 +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)"> -<rect x="2" y="1047.4" width="6" height="4" ry="1.5" fill="#29d739"/> -<rect x="1" y="1049.4" width="8" height="2" ry="0" fill="#29d739"/> -<path d="m2 1042.4 3 2 3-2" fill="none" stroke="#29d739" stroke-linejoin="round" stroke-width="2"/> -<path d="m5 1039.4v5" fill="none" stroke="#29d739" stroke-width="2"/> -<g transform="translate(9,-1)" fill="#29d739"> -<path d="m2 1038.5c-1.1979 0.4235-1.999 1.5557-2 2.8262 9.552e-4 1.2705 0.80214 2.4027 2 2.8262v7.1738c0 0.554 0.446 1 1 1s1-0.446 1-1v-7.1758c1.1972-0.4232 1.9982-1.5544 2-2.8242-0.00178-1.2698-0.80282-2.401-2-2.8242v2.8242c0 0.5523-0.44772 1-1 1s-1-0.4477-1-1z" fill="#29d739"/> -</g> +<path transform="translate(0 1036.4)" d="m11 1.1738c-1.1979 0.4235-1.999 1.5557-2 2.8262 9.552e-4 1.2705 0.80214 2.4027 2 2.8262v7.1738c0 0.554 0.446 1 1 1s1-0.446 1-1v-7.1758c1.1972-0.4232 1.9982-1.5544 2-2.8242-0.0018-1.2698-0.80282-2.401-2-2.8242v2.8242c0 0.5523-0.44772 1-1 1s-1-0.4477-1-1zm-7 1.8262v3.1328l-1.4453-0.96484-1.1094 1.6641 3 2c0.3359 0.22389 0.77347 0.22389 1.1094 0l3-2-1.1094-1.6641-1.4453 0.96484v-3.1328zm-0.5 8c-0.831 0-1.5 0.669-1.5 1.5v0.5h-1v2h8v-2h-1v-0.5c0-0.831-0.669-1.5-1.5-1.5z" fill="#29d739"/> </g> </svg> diff --git a/editor/icons/dark/icon_transpose.svg b/editor/icons/dark/icon_transpose.svg index 551c83137a..c61e0ba3bd 100644 --- a/editor/icons/dark/icon_transpose.svg +++ b/editor/icons/dark/icon_transpose.svg @@ -1,12 +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)" fill="#4f4f4f"> -<rect x="1" y="1037.4" width="2" height="14"/> -<rect x="1" y="1037.4" width="14" height="2"/> -<rect x="1" y="1049.4" width="7" height="2"/> -<rect x="6" y="1037.4" width="2" height="14"/> -<rect x="1" y="1042.4" width="14" height="2"/> -<rect transform="rotate(90)" x="1037.4" y="-15" width="7" height="2"/> -<path d="m15 1051.4h-5l5-5z" fill-rule="evenodd"/> -<rect x="8" y="1039.4" width="5" height="3"/> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m1 1v14h7v-7h7v-7zm2 2h3v3h-3zm0 5h3v5h-3zm12 2-5 5h5z" fill="#4f4f4f"/> </g> </svg> diff --git a/editor/icons/dark/icon_tree.svg b/editor/icons/dark/icon_tree.svg index 27855a9e6d..7995ce00ee 100644 --- a/editor/icons/dark/icon_tree.svg +++ b/editor/icons/dark/icon_tree.svg @@ -1,13 +1,6 @@ <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)"> -<rect x="20" y="1042.4" width="1" height="1" fill="#fefeff"/> <rect x="29" y="1042.4" width="1" height="1" fill="#fefeff"/> -<rect x="1" y="1037.4" width="14" height="2" fill="#29d739"/> -<rect x="6" y="1041.4" width="9" height="2" fill="#29d739"/> -<rect x="7" y="1045.4" width="8" height="2" fill="#29d739"/> -<rect x="7" y="1049.4" width="8" height="2" fill="#29d739"/> -<path d="m2 1038.4v4h4" fill="none" stroke="#29d739" stroke-linejoin="round" stroke-width="2"/> -<path d="m6 1042.4v4h3" fill="none" stroke="#29d739" stroke-linejoin="round" stroke-width="2"/> -<path d="m2 1040.4v10h7" fill="none" stroke="#29d739" stroke-linejoin="round" stroke-width="2"/> +<path transform="translate(0 1036.4)" d="m1 1v13c5.52e-5 0.55226 0.44774 0.99994 1 1h13v-2h-12v-6h2v3c5.52e-5 0.55226 0.44774 0.99994 1 1h9v-2h-8v-2h8v-2h-12v-2h12v-2z" fill="#29d739"/> </g> </svg> diff --git a/editor/icons/dark/icon_v_slider.svg b/editor/icons/dark/icon_v_slider.svg index 0ef58d34e5..1d43e99704 100644 --- a/editor/icons/dark/icon_v_slider.svg +++ b/editor/icons/dark/icon_v_slider.svg @@ -1,10 +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="m6 1050.4a1.0001 1.0001 0 1 1 -2 0v-2.1308a4 4 0 0 0 1 0.1308 4 4 0 0 0 1 -0.1328zm0-9.8691a4 4 0 0 0 -1 -0.1309 4 4 0 0 0 -1 0.1329v-2.1329a1.0001 1.0001 0 1 1 2 0z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#29d739" 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"/> -<circle transform="matrix(0,-1,-1,0,0,0)" cx="-1039.4" cy="-5" r="2" fill="#29d739"/> -<path d="m12 1038.4h-2" fill="none" stroke="#29d739" stroke-linecap="round" stroke-width="2"/> -<path d="m11 1044.4v0" fill="none" stroke="#29d739" stroke-linecap="round" stroke-width="2"/> -<path d="m12 1050.4h-2" fill="none" stroke="#29d739" stroke-linecap="round" stroke-width="2"/> -<path d="m6 1049.4h-2v-6.1308a4 4 0 0 0 1 0.1308 4 4 0 0 0 1 -0.1328z" fill="#29d739"/> +<path transform="translate(0 1036.4)" d="m5.0156 0.98633a1.0001 1.0001 0 0 0 -0.25977 0.029297 2 2 0 0 0 -1.7559 1.9844 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -1.7539 -1.9824 1.0001 1.0001 0 0 0 -0.23047 -0.03125zm4.9844 0.013672a1 1 0 0 0 -1 1 1 1 0 0 0 1 1h2a1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1h-2zm-4 5.8672a4 4 0 0 1 -1 0.13281 4 4 0 0 1 -1 -0.13086v5 1.1309 1a1.0001 1.0001 0 1 0 2 0v-1-1.1328-5zm5 0.13281a1 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 -1zm-1 6a1 1 0 0 0 -1 1 1 1 0 0 0 1 1h2a1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1h-2z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#29d739" 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"/> </g> </svg> diff --git a/editor/icons/dark/icon_v_split_container.svg b/editor/icons/dark/icon_v_split_container.svg index 4ad51b4fbe..7be96acf87 100644 --- a/editor/icons/dark/icon_v_split_container.svg +++ b/editor/icons/dark/icon_v_split_container.svg @@ -1,8 +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)" fill="#29d739"> -<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.89543-2 2v10c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.89543 2-2v-10c0-1.1046-0.89543-2-2-2zm0 2h10v10h-10z"/> -<rect transform="rotate(90)" x="1043.4" y="-13" width="2" height="10"/> -<path d="m10 1045.4h-4l2 2z"/> -<path d="m10 1043.4-2-2-2 2z"/> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.89543-2 2v10c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.89543 2-2v-10c0-1.1046-0.89543-2-2-2h-10zm0 2h10v4h-3l-2-2-2 2h-3v-4zm0 6h3l2 2 2-2h3v4h-10v-4z" fill="#29d739"/> </g> </svg> diff --git a/editor/icons/dark/icon_vehicle_body.svg b/editor/icons/dark/icon_vehicle_body.svg index 1afbe9229d..227b354baa 100644 --- a/editor/icons/dark/icon_vehicle_body.svg +++ b/editor/icons/dark/icon_vehicle_body.svg @@ -1,7 +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)" fill="#ff5f5f" fill-opacity=".99608"> -<path transform="translate(0 1036.4)" d="m5 3a1 1 0 0 0 -1 1l-1 3h-2v4h1.0508c0.23167-1.1411 1.2398-2 2.4492-2s2.2175 0.85893 2.4492 2h2.1016c0.23167-1.1411 1.2398-2 2.4492-2s2.2175 0.85893 2.4492 2h1.0508v-4h-4v-4h-6zm1 1h4v3h-4v-3z"/> -<circle cx="4.5" cy="1047.9" r="1.5"/> -<circle cx="11.5" cy="1047.9" r="1.5"/> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m5 3a1 1 0 0 0 -1 1l-1 3h-2v4h1.0508c0.23167-1.1411 1.2398-2 2.4492-2s2.2175 0.85893 2.4492 2h2.1016c0.23167-1.1411 1.2398-2 2.4492-2s2.2175 0.85893 2.4492 2h1.0508v-4h-4v-4h-6zm1 1h4v3h-4v-3zm-1.5 6a1.5 1.5 0 0 0 -1.5 1.5 1.5 1.5 0 0 0 1.5 1.5 1.5 1.5 0 0 0 1.5 -1.5 1.5 1.5 0 0 0 -1.5 -1.5zm7 0a1.5 1.5 0 0 0 -1.5 1.5 1.5 1.5 0 0 0 1.5 1.5 1.5 1.5 0 0 0 1.5 -1.5 1.5 1.5 0 0 0 -1.5 -1.5z" fill="#ff5f5f" fill-opacity=".99608"/> </g> </svg> diff --git a/editor/icons/dark/icon_viewport_sprite.svg b/editor/icons/dark/icon_viewport_sprite.svg index e2addce984..e1c8a9de46 100644 --- a/editor/icons/dark/icon_viewport_sprite.svg +++ b/editor/icons/dark/icon_viewport_sprite.svg @@ -2,9 +2,6 @@ <g transform="translate(0 -1036.4)"> <rect x="20" y="1042.4" width="1" height="1" fill="#fefeff"/> <rect x="29" y="1042.4" width="1" height="1" fill="#fefeff"/> -<path transform="translate(0 1036.4)" d="m3 2c-0.5304 8.01e-5 -1.0391 0.21085-1.4141 0.58594-0.37509 0.37501-0.58586 0.88366-0.58594 1.4141v8c8.03e-5 0.5304 0.21085 1.0391 0.58594 1.4141 0.37501 0.37509 0.88366 0.58586 1.4141 0.58594h10c1.1046 0 2-0.89543 2-2v-8c0-1.1046-0.89543-2-2-2zm0 1h10c0.55228 9.6e-6 0.99999 0.44772 1 1v8c-1e-5 0.55228-0.44772 0.99999-1 1h-10c-0.55228-1e-5 -0.99999-0.44772-1-1v-8c9.6e-6 -0.55228 0.44772-0.99999 1-1z" fill="#6d90ff" fill-opacity=".98824"/> -<rect x="4" y="1042.4" width="2" height="2" fill="#6d90ff" fill-opacity=".98824"/> -<rect x="10" y="1042.4" width="2" height="2" fill="#6d90ff" fill-opacity=".98824"/> -<rect x="4" y="1045.4" width="8" height="1" fill="#6d90ff" fill-opacity=".98824"/> +<path transform="translate(0 1036.4)" d="m3 2c-0.5304 8.01e-5 -1.0391 0.21085-1.4141 0.58594-0.37509 0.37501-0.58586 0.88366-0.58594 1.4141v8c8.03e-5 0.5304 0.21085 1.0391 0.58594 1.4141 0.37501 0.37509 0.88366 0.58586 1.4141 0.58594h10c1.1046 0 2-0.89543 2-2v-8c0-1.1046-0.89543-2-2-2h-10zm0 1h10c0.55228 9.6e-6 0.99999 0.44772 1 1v8c-1e-5 0.55228-0.44772 0.99999-1 1h-10c-0.55228-1e-5 -0.99999-0.44772-1-1v-8c9.6e-6 -0.55228 0.44772-0.99999 1-1zm1 3v2h2v-2h-2zm6 0v2h2v-2h-2zm-6 3v1h8v-1h-8z" fill="#6d90ff" fill-opacity=".98824"/> </g> </svg> diff --git a/editor/icons/dark/icon_visibility_enabler.svg b/editor/icons/dark/icon_visibility_enabler.svg index 0bc3449b07..35f5ae34f1 100644 --- a/editor/icons/dark/icon_visibility_enabler.svg +++ b/editor/icons/dark/icon_visibility_enabler.svg @@ -1,9 +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)" fill="#ff5f5f" fill-opacity=".99608"> -<g transform="translate(-.00015202)"> -<path transform="translate(0 1036.4)" d="m8 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.00586 0.57031c1.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.55273c-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 -4z" color="#000000" color-rendering="auto" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;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"/> -<circle cx="8" cy="1044.4" r="2"/> -</g> -<path transform="translate(0 1036.4)" d="m1 1v3h1v-2h2v-1h-3zm11 0v1h2v2h1v-3h-3zm-11 11v3h3v-1h-2v-2h-1zm13 0v2h-2v1h3v-3h-1z"/> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m1 1v3h1v-2h2v-1h-3zm11 0v1h2v2h1v-3h-3zm-4 1c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.0058594 0.57031c1.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.55273c-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 -2zm-7 6v3h3v-1h-2v-2h-1zm13 0v2h-2v1h3v-3h-1z" color="#000000" color-rendering="auto" fill="#ff5f5f" fill-opacity=".99608" 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"/> </g> </svg> diff --git a/editor/icons/dark/icon_visibility_enabler_2d.svg b/editor/icons/dark/icon_visibility_enabler_2d.svg index 23a66501f7..9c627461dc 100644 --- a/editor/icons/dark/icon_visibility_enabler_2d.svg +++ b/editor/icons/dark/icon_visibility_enabler_2d.svg @@ -1,9 +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)" fill="#6d90ff" fill-opacity=".98824"> -<g transform="translate(-.00015202)"> -<path transform="translate(0 1036.4)" d="m8 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.00586 0.57031c1.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.55273c-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 -4z" color="#000000" color-rendering="auto" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;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"/> -<circle cx="8" cy="1044.4" r="2"/> -</g> -<path transform="translate(0 1036.4)" d="m1 1v3h1v-2h2v-1h-3zm11 0v1h2v2h1v-3h-3zm-11 11v3h3v-1h-2v-2h-1zm13 0v2h-2v1h3v-3h-1z"/> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m1 1v3h1v-2h2v-1h-3zm11 0v1h2v2h1v-3h-3zm-4 1c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.0058594 0.57031c1.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.55273c-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 -2zm-7 6v3h3v-1h-2v-2h-1zm13 0v2h-2v1h3v-3h-1z" color="#000000" color-rendering="auto" fill="#6d90ff" fill-opacity=".98824" 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"/> </g> </svg> diff --git a/editor/icons/dark/icon_visibility_notifier.svg b/editor/icons/dark/icon_visibility_notifier.svg index d4c56afd65..9dddddf8ac 100644 --- a/editor/icons/dark/icon_visibility_notifier.svg +++ b/editor/icons/dark/icon_visibility_notifier.svg @@ -1,7 +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)" fill="#ff5f5f" fill-opacity=".99608"> -<path transform="translate(0 1036.4)" d="m8 3c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.0058594 0.57031c1.1244 3.9354 4.4609 5.7246 6.9609 5.7246 1.4907 0 3.2717-0.65207 4.7109-2h-0.71094-2v-0.54102a4 4 0 0 1 -2 0.54102 4 4 0 0 1 -4 -4 4 4 0 0 1 4 -4 4 4 0 0 1 2 0.54102v-2.1816c-0.68312-0.23834-1.3644-0.35938-2-0.35938zm0 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 -2z" color="#000000" color-rendering="auto" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;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"/> -<rect x="12" y="1037.4" width="2" height="6"/> -<rect transform="scale(1,-1)" x="12" y="-1047.4" width="2" height="2"/> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m12 1v6h2v-6h-2zm-4 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.0058594 0.57031c1.1244 3.9354 4.4609 5.7246 6.9609 5.7246 1.4907 0 3.2717-0.65207 4.7109-2h-0.71094-2v-0.54102a4 4 0 0 1 -2 0.54102 4 4 0 0 1 -4 -4 4 4 0 0 1 4 -4 4 4 0 0 1 2 0.54102v-2.1816c-0.68312-0.23834-1.3644-0.35938-2-0.35938zm0 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 -2zm4 2v2h2v-2h-2z" color="#000000" color-rendering="auto" fill="#ff5f5f" fill-opacity=".99608" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;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"/> </g> </svg> diff --git a/editor/icons/dark/icon_visible.svg b/editor/icons/dark/icon_visible.svg index 784cd15d1e..075aa00b8f 100644 --- a/editor/icons/dark/icon_visible.svg +++ b/editor/icons/dark/icon_visible.svg @@ -1,6 +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)" fill="#4f4f4f"> -<path transform="translate(0 1036.4)" d="m8 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.0058594 0.57031c1.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.55273c-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 -4z" color="#000000" color-rendering="auto" fill-opacity=".99608" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;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"/> -<circle cx="8" cy="1044.4" r="2"/> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m8 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.0058594 0.57031c1.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.55273c-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="#4f4f4f" fill-opacity=".99608" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;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"/> </g> </svg> diff --git a/editor/icons/dark/icon_world_environment.svg b/editor/icons/dark/icon_world_environment.svg index c80e78f178..878a3184d7 100644 --- a/editor/icons/dark/icon_world_environment.svg +++ b/editor/icons/dark/icon_world_environment.svg @@ -1,8 +1,6 @@ <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)" fill="none" stroke="#ff5f5f" stroke-opacity=".99608"> -<circle cx="8" cy="1044.4" r="6" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> -<path d="m2 1044.4c4.5932 1.582 8.3985 1.0627 12 0" stroke-width="1.5"/> -<path d="m8 1038.4c-3 4-3 8 0 12" stroke-width="1.5"/> -<path d="m8 1038.4c3 4 3 8 0 12" stroke-width="1.5"/> +<g transform="translate(0 -1036.4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> +<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm-1.7305 2.3125c-0.83125 1.5372-1.2685 3.1037-1.2695 4.6816-0.64057-0.11251-1.3005-0.27158-1.9766-0.47266a5 5 0 0 1 3.2461 -4.209zm3.4629 0.0039062a5 5 0 0 1 3.2383 4.1875c-0.65187 0.17448-1.3077 0.32867-1.9727 0.44922-0.00845-1.5627-0.44294-3.1141-1.2656-4.6367zm-1.7324 0.0078126c1.0126 1.593 1.5 3.1425 1.5 4.6758 0 0.054042-0.0066161 0.10803-0.0078125 0.16211-0.96392 0.096801-1.9566 0.1103-2.9844 0.027344-0.0016335-0.063192-0.0078125-0.12632-0.0078125-0.18945 0-1.5333 0.48744-3.0828 1.5-4.6758zm4.8789 5.7578a5 5 0 0 1 -3.1484 3.6055c0.57106-1.0564 0.95277-2.1268 1.1367-3.2051 0.68204-0.10905 1.3556-0.23789 2.0117-0.40039zm-9.7461 0.033203c0.68377 0.18153 1.3555 0.33345 2.0098 0.43164 0.18781 1.0551 0.56647 2.1026 1.125 3.1367a5 5 0 0 1 -3.1348 -3.5684zm6.168 0.55469c-0.22615 0.98866-0.65424 1.9884-1.3008 3.0059-0.63811-1.0042-1.0645-1.9908-1.293-2.9668 0.89027 0.054126 1.7517 0.029377 2.5938-0.039062z" fill="#ff5f5f" fill-opacity=".99608"/> +<path transform="translate(0 1036.4)" d="m8 1v2.3242c1.0126 1.593 1.5 3.1425 1.5 4.6758 0 0.054042-0.0066161 0.10803-0.0078125 0.16211-0.4894 0.049148-0.98713 0.077552-1.4922 0.082031v1.4922c0.43915-0.0075968 0.87287-0.031628 1.3008-0.066406-0.22615 0.98866-0.65424 1.9884-1.3008 3.0059v2.3242a7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm1.7324 2.3164a5 5 0 0 1 3.2383 4.1875c-0.65187 0.17448-1.3077 0.32867-1.9727 0.44922-0.00845-1.5627-0.44294-3.1141-1.2656-4.6367zm3.1465 5.7656a5 5 0 0 1 -3.1484 3.6055c0.57106-1.0564 0.95277-2.1268 1.1367-3.2051 0.68204-0.10905 1.3556-0.23789 2.0117-0.40039z" fill="#6d90ff"/> </g> </svg> diff --git a/editor/icons/dark/icon_y_sort.svg b/editor/icons/dark/icon_y_sort.svg index 914ecfed0d..233dafd843 100644 --- a/editor/icons/dark/icon_y_sort.svg +++ b/editor/icons/dark/icon_y_sort.svg @@ -1,8 +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)" fill="#6d90ff" fill-opacity=".98824"> -<rect x="9" y="1038.4" width="6" height="2"/> -<path d="m3 1048.4h-2l3 3 3-3h-2v-8h2l-3-3-3 3h2z"/> -<rect x="9" y="1043.4" width="4" height="2"/> -<rect x="9" y="1048.4" width="2" height="2"/> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m4 1l-3 3h2v8h-2l3 3 3-3h-2v-8h2l-3-3zm5 1v2h6v-2h-6zm0 5v2h4v-2h-4zm0 5v2h2v-2h-2z" fill="#6d90ff" fill-opacity=".98824"/> </g> </svg> diff --git a/editor/icons/icon_array_mesh.svg b/editor/icons/icon_array_mesh.svg new file mode 100644 index 0000000000..68890c4366 --- /dev/null +++ b/editor/icons/icon_array_mesh.svg @@ -0,0 +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="m3 1a2 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 -2zm10 0a2 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-2 7v3h-3v2h3v3h2v-3h3v-2h-3v-3h-2zm-8 3a2 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" dominant-baseline="auto" fill="#ffd684" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian: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"/> +</g> +</svg> diff --git a/editor/icons/icon_audio_effect_amplify.svg b/editor/icons/icon_audio_effect_amplify.svg index 1cb9be9b10..20612bbaf3 100644 --- a/editor/icons/icon_audio_effect_amplify.svg +++ b/editor/icons/icon_audio_effect_amplify.svg @@ -7,6 +7,6 @@ </linearGradient> </defs> <g transform="translate(0 -1036.4)"> -<path transform="translate(0 1036.4)" d="m15 1-14 7h14zm-13 9v1h2v-1zm2 1v1h-2v-1h-1v4h1v-2h2v2h1v-4zm2-1v5h1v-4h1v4h1v-4h1v-1zm4 1v4h1v-4zm2-1v5h1v-2h2v-3zm1 1h1v1h-1z" fill="url(#a)"/> +<path transform="translate(0 1036.4)" d="m2 1v8h2v-2h2v-2h-2v-2h3v-2zm6 0 2 4-2 4h2l1-2 1 2h2l-2-4 2-4h-2l-1 2-1-2zm-6 9v1h2v-1zm2 1v1h-2v-1h-1v4h1v-2h2v2h1v-4zm2-1v5h1v-4h1v4h1v-4h1v-1zm4 1v4h1v-4zm2-1v5h1v-2h2v-3zm1 1h1v1h-1z" fill="url(#a)"/> </g> </svg> diff --git a/editor/icons/icon_clear.svg b/editor/icons/icon_clear.svg new file mode 100644 index 0000000000..533054e37b --- /dev/null +++ b/editor/icons/icon_clear.svg @@ -0,0 +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="m8 1a1 1 0 0 0 -1 1v5h-2c-1.108 0-2 0.892-2 2v1h10v-1c0-1.108-0.892-2-2-2h-2v-5a1 1 0 0 0 -1 -1zm-5 10v4l10-1v-3h-10z" fill="#e0e0e0" fill-opacity=".99608"/> +</g> +</svg> diff --git a/editor/icons/icon_collision_2d.svg b/editor/icons/icon_collision_polygon_2d.svg index 9d90a66c6f..9d90a66c6f 100644 --- a/editor/icons/icon_collision_2d.svg +++ b/editor/icons/icon_collision_polygon_2d.svg diff --git a/editor/icons/icon_cube_mesh.svg b/editor/icons/icon_cube_mesh.svg index 0ed3e5e12f..45275216ab 100644 --- a/editor/icons/icon_cube_mesh.svg +++ b/editor/icons/icon_cube_mesh.svg @@ -1,5 +1,5 @@ <svg width="16" height="16" version="1.1" viewBox="0 0 14.999999 14.999999" xmlns="http://www.w3.org/2000/svg"> <g transform="translate(0 -1037.4)"> -<path d="m7.5 1038.2-6.5625 3.2804v6.772l0.49015 0.246 6.0723 3.0344 6.5625-3.2804v-6.772zm0 1.9831 3.6926 1.8463-3.6926 1.8463-3.6926-1.8463zm-4.7889 3.2804 3.9022 1.9502v3.6944l-3.9022-1.952zm9.5779 0v3.6926l-3.9022 1.952v-3.6944z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#ffd684" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian: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"/> +<path d="m7.5 1038.2-6.5625 3.2804v6.772l6.5625 3.2804 6.5625-3.2804v-6.772zm0 1.9831 3.6926 1.8463-3.6926 1.8463-3.6926-1.8463zm-4.7889 3.2804 3.9022 1.9502v3.6944l-3.9022-1.952zm9.5779 0v3.6926l-3.9022 1.952v-3.6944z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#ffd684" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian: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"/> </g> </svg> diff --git a/editor/icons/icon_file_big_broken.svg b/editor/icons/icon_file_big_broken.svg new file mode 100644 index 0000000000..167bb1bb5f --- /dev/null +++ b/editor/icons/icon_file_big_broken.svg @@ -0,0 +1,7 @@ +<svg width="64" height="64" version="1.1" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg"> +<g transform="translate(0 -988.36)"> +<g transform="translate(0 -1.6949e-5)"> +<path transform="translate(0 988.36)" d="m14 5c-2.1987 0-4 1.8013-4 4v26.172a1.0001 1.0001 0 0 0 1.707 0.70703l3.293-3.293 9.293 9.293a1.0001 1.0001 0 0 0 1.4141 0l9.293-9.293 9.293 9.293a1.0001 1.0001 0 0 0 1.4141 0l8-8a1.0001 1.0001 0 0 0 0.29297 -0.70703v-11.172a1.0001 1.0001 0 0 0 -0.29297 -0.70703l-16-16a1.0001 1.0001 0 0 0 -0.70703 -0.29297h-23zm0 2h22v12c0 2.1987 1.8013 4 4 4h12v9.7578l-7 7-9.293-9.293a1.0001 1.0001 0 0 0 -1.4141 0l-9.293 9.293-9.293-9.293a1.0001 1.0001 0 0 0 -1.4141 0l-2.293 2.293v-23.758c0-1.1253 0.87473-2 2-2zm0.98438 28.83a1.0001 1.0001 0 0 0 -0.69141 0.29297l-4 4a1.0001 1.0001 0 0 0 -0.29297 0.70703v14.17c0 2.1987 1.8013 4 4 4h36c2.1987 0 4-1.8013 4-4v-16.17a1.0001 1.0001 0 0 0 -1.707 -0.70703l-7.293 7.293-9.293-9.293a1.0001 1.0001 0 0 0 -1.4141 0l-9.293 9.293-9.293-9.293a1.0001 1.0001 0 0 0 -0.72266 -0.29297zm0.015625 2.4141l9.293 9.293a1.0001 1.0001 0 0 0 1.4141 0l9.293-9.293 9.293 9.293a1.0001 1.0001 0 0 0 1.4141 0l6.293-6.293v13.756c0 1.1253-0.87473 2-2 2h-36c-1.1253 0-2-0.87473-2-2v-13.756l3-3z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#ff8484" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian: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"/> +</g> +</g> +</svg> diff --git a/editor/icons/icon_file_big_dead.svg b/editor/icons/icon_file_big_dead.svg new file mode 100644 index 0000000000..c8aab912f1 --- /dev/null +++ b/editor/icons/icon_file_big_dead.svg @@ -0,0 +1,7 @@ +<svg width="64" height="64" version="1.1" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg"> +<g transform="translate(0 -988.36)"> +<g transform="translate(0 -1.6949e-5)"> +<path d="m14 993.36c-2.1987 0-4 1.8013-4 4v46c0 2.1987 1.8013 4 4 4h36c2.1987 0 4-1.8013 4-4v-33h-0.0078c2e-3 -0.2483-0.0793-0.501-0.28516-0.707l-16-16c-0.18788-0.18693-0.44247-0.28939-0.70704-0.28907v-4e-3zm0 2h22v12c0 2.1987 1.8013 4 4 4h12v32c0 1.1253-0.87472 2-2 2h-36c-1.1253 0-2-0.8747-2-2v-46c0-1.1253 0.87472-2 2-2zm2.9512 22.002a1 1 0 0 0 -0.60938 0.2461 1 1 0 0 0 -0.09375 1.4121l2.9238 3.3398-2.9238 3.3418a1 1 0 0 0 0.09375 1.4121 1 1 0 0 0 1.4102 -0.094l2.748-3.1407 2.748 3.1407a1 1 0 0 0 1.4102 0.094 1 1 0 0 0 0.09375 -1.4121l-2.9238-3.3418 2.9238-3.3398a1 1 0 0 0 -0.09375 -1.4121 1 1 0 0 0 -0.63867 -0.2461 1 1 0 0 0 -0.77148 0.3398l-2.748 3.1406-2.748-3.1406a1 1 0 0 0 -0.80078 -0.3398zm23 0a1 1 0 0 0 -0.60938 0.2461 1 1 0 0 0 -0.09375 1.4121l2.9238 3.3398-2.9238 3.3418a1 1 0 0 0 0.09375 1.4121 1 1 0 0 0 1.4102 -0.094l2.748-3.1407 2.748 3.1407a1 1 0 0 0 1.4102 0.094 1 1 0 0 0 0.09375 -1.4121l-2.9238-3.3418 2.9238-3.3398a1 1 0 0 0 -0.09375 -1.4121 1 1 0 0 0 -0.63867 -0.2461 1 1 0 0 0 -0.77148 0.3398l-2.748 3.1406-2.748-3.1406a1 1 0 0 0 -0.80078 -0.3398zm-18.951 13.998a1 1 0 0 0 -1 1 1 1 0 0 0 1 1h3v3c0 2.7527 2.2473 5 5 5s5-2.2473 5-5v-3h9a1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1zm5 2h6v3c0 1.6793-1.3207 3-3 3s-3-1.3207-3-3z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#ff8484" 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"/> +</g> +</g> +</svg> diff --git a/editor/icons/icon_file_broken.svg b/editor/icons/icon_file_broken.svg new file mode 100644 index 0000000000..f352eeb001 --- /dev/null +++ b/editor/icons/icon_file_broken.svg @@ -0,0 +1,7 @@ +<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 -1.6949e-5)"> +<path transform="translate(0 1036.4)" d="m2 1v8.5859l1.293-1.293a1.0001 1.0001 0 0 1 0.69141 -0.29102 1.0001 1.0001 0 0 1 0.72266 0.29102l2.293 2.293 2.293-2.293a1.0001 1.0001 0 0 1 1.4141 0l2.293 2.293 1-1v-3.5859h-5v-5h-7zm8 0v4h4l-4-4zm-6 9.4141l-2 2v2.5859h12v-2.5859l-0.29297 0.29297a1.0001 1.0001 0 0 1 -1.4141 0l-2.293-2.293-2.293 2.293a1.0001 1.0001 0 0 1 -1.4141 0l-2.293-2.293z" fill="#ff8484"/> +</g> +</g> +</svg> diff --git a/editor/icons/icon_gizmo_camera.svg b/editor/icons/icon_gizmo_camera.svg new file mode 100644 index 0000000000..f6e5f885e7 --- /dev/null +++ b/editor/icons/icon_gizmo_camera.svg @@ -0,0 +1,5 @@ +<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"> +<g transform="translate(0 -924.36)"> +<path d="m76 944.36a24 24 0 0 0 -23.906 22.219 24 24 0 0 0 -16.094 -6.2192 24 24 0 0 0 -24 24 24 24 0 0 0 16 22.594v17.406c0 4.432 3.5679 8 8 8h48c4.4321 0 8-3.568 8-8v-8l24 16v-48l-24 16v-14.156a24 24 0 0 0 8 -17.844 24 24 0 0 0 -24 -24z" fill="#f7f5cf"/> +</g> +</svg> diff --git a/editor/icons/icon_gizmo_directional_light.svg b/editor/icons/icon_gizmo_directional_light.svg index a8739a5a78..f7fa732501 100644 --- a/editor/icons/icon_gizmo_directional_light.svg +++ b/editor/icons/icon_gizmo_directional_light.svg @@ -1,5 +1,5 @@ <svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"> <g transform="translate(0 -924.36)"> -<path transform="translate(0 924.36)" d="m64 4a8 8 0 0 0 -8 8v12a8 8 0 0 0 8 8 8 8 0 0 0 8 -8v-12a8 8 0 0 0 -8 -8zm-36.887 15.23a8 8 0 0 0 -5.5391 2.3438 8 8 0 0 0 0 11.312l8.4844 8.4863a8 8 0 0 0 11.314 0 8 8 0 0 0 0 -11.314l-8.4863-8.4844a8 8 0 0 0 -5.7734 -2.3438zm73.539 0a8 8 0 0 0 -5.5391 2.3438l-8.4863 8.4844a8 8 0 0 0 0 11.314 8 8 0 0 0 11.314 0l8.4844-8.4863a8 8 0 0 0 0 -11.312 8 8 0 0 0 -5.7734 -2.3438zm-36.652 20.77a24 24 0 0 0 -24 24 24 24 0 0 0 24 24 24 24 0 0 0 24 -24 24 24 0 0 0 -24 -24zm-52 16a8 8 0 0 0 -8 8 8 8 0 0 0 8 8h12a8 8 0 0 0 8 -8 8 8 0 0 0 -8 -8h-12zm92 0a8 8 0 0 0 -8 8 8 8 0 0 0 8 8h12a8 8 0 0 0 8 -8 8 8 0 0 0 -8 -8h-12zm-68.4 28.285a8 8 0 0 0 -5.541 2.3418l-8.4844 8.4863a8 8 0 0 0 0 11.312 8 8 0 0 0 11.312 0l8.4863-8.4844a8 8 0 0 0 0 -11.314 8 8 0 0 0 -5.7734 -2.3418zm56.568 0a8 8 0 0 0 -5.541 2.3418 8 8 0 0 0 0 11.314l8.4863 8.4844a8 8 0 0 0 11.312 0 8 8 0 0 0 0 -11.312l-8.4844-8.4863a8 8 0 0 0 -5.7734 -2.3418zm-28.168 11.715a8 8 0 0 0 -8 8v12a8 8 0 0 0 8 8 8 8 0 0 0 8 -8v-12a8 8 0 0 0 -8 -8z" fill="#f7f5cf"/> +<path transform="translate(0 924.36)" d="m64 8c-2.216 0-4 1.784-4 4v16c0 2.216 1.784 4 4 4s4-1.784 4-4v-16c0-2.216-1.784-4-4-4zm-36.77 15.227c-1.0225 0-2.0447 0.39231-2.8281 1.1758-1.5669 1.5669-1.5669 4.0893 0 5.6562l11.312 11.314c1.5669 1.5669 4.0913 1.5669 5.6582 0s1.5669-4.0913 0-5.6582l-11.314-11.312c-0.78348-0.78348-1.8056-1.1758-2.8281-1.1758zm73.539 0c-1.0225 0-2.0446 0.39231-2.8281 1.1758l-11.314 11.312c-1.5669 1.5669-1.5669 4.0913 0 5.6582s4.0913 1.5669 5.6582 0l11.313-11.314c1.5669-1.5669 1.5669-4.0893 0-5.6562-0.78348-0.78348-1.8056-1.1758-2.8281-1.1758zm-36.77 20.773c-11.046 1e-5 -20 8.9543-20 20 7e-6 11.046 8.9543 20 20 20s20-8.9543 20-20c-8e-6 -11.046-8.9543-20-20-20zm-52 16c-2.216 0-4 1.784-4 4s1.784 4 4 4h16c2.216 0 4-1.784 4-4s-1.784-4-4-4h-16zm88 0c-2.216 0-4 1.784-4 4s1.784 4 4 4h16c2.216 0 4-1.784 4-4s-1.784-4-4-4h-16zm-61.455 25.453c-1.0225 0-2.0466 0.39035-2.8301 1.1738l-11.312 11.314c-1.5669 1.5669-1.5669 4.0893 0 5.6563 1.5669 1.5669 4.0893 1.5669 5.6562 0l11.314-11.313c1.5669-1.5669 1.5669-4.0913 0-5.6582-0.78347-0.78347-1.8056-1.1738-2.8281-1.1738zm50.91 0c-1.0225 0-2.0447 0.39035-2.8281 1.1738-1.5669 1.5669-1.5669 4.0913 0 5.6582l11.314 11.313c1.5669 1.5669 4.0893 1.5669 5.6563 0 1.5669-1.567 1.5669-4.0893 0-5.6563l-11.313-11.314c-0.78347-0.78347-1.8076-1.1738-2.8301-1.1738zm-25.455 10.547c-2.216 0-4 1.784-4 4v16c0 2.216 1.784 4 4 4s4-1.784 4-4v-16c0-2.216-1.784-4-4-4z" fill="#f7f5cf"/> </g> </svg> diff --git a/editor/icons/icon_gizmo_g_i_probe.svg b/editor/icons/icon_gizmo_g_i_probe.svg new file mode 100644 index 0000000000..7d3adf4196 --- /dev/null +++ b/editor/icons/icon_gizmo_g_i_probe.svg @@ -0,0 +1,5 @@ +<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"> +<g transform="translate(0 -924.36)"> +<path transform="translate(0 924.36)" d="m12 8a4.0004 4.0004 0 0 0 -4 4v104a4.0004 4.0004 0 0 0 4 4h60v-8h-56v-96h96v8h8v-12a4.0004 4.0004 0 0 0 -4 -4h-104zm27.715 17.951c-1.2324 0.086154-2.3996 0.76492-3.0664 1.9199l-0.14844 0.25781c-1.0669 1.848-0.43784 4.1948 1.4102 5.2617l10.648 6.1484c1.848 1.0669 4.1948 0.43784 5.2617-1.4102l0.14844-0.25781c1.0669-1.848 0.43784-4.1948-1.4102-5.2617l-10.648-6.1484c-0.693-0.4001-1.4558-0.56146-2.1953-0.50977zm52.285 2.0488a32 32 0 0 0 -32 32 32 32 0 0 0 16 27.668v8.332c0 4.432 3.568 8 8 8h16c4.432 0 8-3.568 8-8v-8.3223a32 32 0 0 0 16 -27.678 32 32 0 0 0 -32 -32zm0 12a20 20 0 0 1 20 20 20 20 0 0 1 -20 20 20 20 0 0 1 -20 -20 20 20 0 0 1 20 -20zm-60.148 16c-2.1339 0-3.8516 1.7177-3.8516 3.8516v0.29688c0 2.1339 1.7177 3.8516 3.8516 3.8516h12.297c2.1339 0 3.8516-1.7177 3.8516-3.8516v-0.29688c0-2.1339-1.7177-3.8516-3.8516-3.8516h-12.297zm18.902 23.951c-0.73947-0.051693-1.5023 0.10966-2.1953 0.50977l-10.648 6.1484c-1.848 1.0669-2.4771 3.4137-1.4102 5.2617l0.14844 0.25781c1.0669 1.848 3.4137 2.4771 5.2617 1.4102l10.648-6.1484c1.848-1.0669 2.4771-3.4137 1.4102-5.2617l-0.14844-0.25781c-0.66684-1.155-1.834-1.8338-3.0664-1.9199zm33.246 32.049v8h16v-8h-16z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#f7f5cf" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian: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"/> +</g> +</svg> diff --git a/editor/icons/icon_gizmo_particles.svg b/editor/icons/icon_gizmo_particles.svg new file mode 100644 index 0000000000..05fc84619e --- /dev/null +++ b/editor/icons/icon_gizmo_particles.svg @@ -0,0 +1,5 @@ +<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"> +<g transform="translate(0 -924.36)"> +<path transform="translate(0 924.36)" d="m64 8a36 40 0 0 0 -35.311 32.256 24 24 0 0 0 -20.689 23.744 24 24 0 0 0 24 24h64a24 24 0 0 0 24 -24 24 24 0 0 0 -20.715 -23.746 36 40 0 0 0 -35.285 -32.254zm-32 88a8 8 0 0 0 -8 8 8 8 0 0 0 8 8 8 8 0 0 0 8 -8 8 8 0 0 0 -8 -8zm64 0a8 8 0 0 0 -8 8 8 8 0 0 0 8 8 8 8 0 0 0 8 -8 8 8 0 0 0 -8 -8zm-32 8a8 8 0 0 0 -8 8 8 8 0 0 0 8 8 8 8 0 0 0 8 -8 8 8 0 0 0 -8 -8z" fill="#f7f5cf"/> +</g> +</svg> diff --git a/editor/icons/icon_gizmo_reflection_probe.svg b/editor/icons/icon_gizmo_reflection_probe.svg new file mode 100644 index 0000000000..6d80e73b8c --- /dev/null +++ b/editor/icons/icon_gizmo_reflection_probe.svg @@ -0,0 +1,5 @@ +<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"> +<g transform="translate(0 -924.36)"> +<path transform="translate(0 924.36)" d="m12 8a4.0004 4.0004 0 0 0 -4 4v24h8v-20h96v8h8v-12a4.0004 4.0004 0 0 0 -4 -4h-104zm76 28a4 4 0 0 0 -4 4 4 4 0 0 0 4 4h18.732l-42.957 50.119-44.947-44.947-5.6562 5.6582 48 48a4.0004 4.0004 0 0 0 5.8652 -0.22656l44.963-52.457v17.854a4 4 0 0 0 4 4 4 4 0 0 0 4 -4v-28a4.0004 4.0004 0 0 0 -4 -4h-28zm-80 52v28a4.0004 4.0004 0 0 0 4 4h104a4.0004 4.0004 0 0 0 4 -4v-28h-8v24h-96v-24h-8z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#f7f5cf" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian: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"/> +</g> +</svg> diff --git a/editor/icons/icon_gizmo_spatial_sample_player.svg b/editor/icons/icon_gizmo_spatial_sample_player.svg index d40fe230ac..7dbb4744be 100644 --- a/editor/icons/icon_gizmo_spatial_sample_player.svg +++ b/editor/icons/icon_gizmo_spatial_sample_player.svg @@ -1,5 +1,5 @@ <svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"> <g transform="translate(0 -924.36)"> -<path transform="translate(0 924.36)" d="m63.883 12.004a4.0004 4.0004 0 0 0 -2.7109 1.168l-30.828 30.83h-14.344a4.0004 4.0004 0 0 0 -4 4v32a4.0004 4.0004 0 0 0 4 4h14.344l30.828 30.828a4.0004 4.0004 0 0 0 6.8281 -2.8281v-96.002a4.0004 4.0004 0 0 0 -4.1172 -3.9961zm46.117 5.9961a6 6 0 0 0 -6 6v80a6 6 0 0 0 6 6 6 6 0 0 0 6 -6v-80a6 6 0 0 0 -6 -6zm-24 24a6 6 0 0 0 -6 6v32h0.34961a6 6 0 0 0 5.6504 4 6 6 0 0 0 5.6484 -4h0.35156v-32a6 6 0 0 0 -6 -6z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#f7f5cf" 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-east-asian: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"/> +<path transform="translate(0 924.36)" d="m63.883 12.004c-1.0195 0.0295-1.9892 0.4473-2.7109 1.168l-30.828 30.83h-14.344c-2.209 2.21e-4 -3.9998 1.791-4 4v32c2.21e-4 2.209 1.791 3.9998 4 4h14.344l30.828 30.828c2.52 2.5182 6.8267 0.73442 6.8281-2.8281v-96.002c-0.0015-2.2541-1.8641-4.0619-4.1172-3.9961zm48.117 3.9961a4 4 0 0 0 -4 4v88a4 4 0 0 0 4 4 4 4 0 0 0 4 -4v-88a4 4 0 0 0 -4 -4zm-24 24a4 4 0 0 0 -4 4v40a4 4 0 0 0 4 4 4 4 0 0 0 4 -4v-40a4 4 0 0 0 -4 -4z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#f7f5cf" 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-east-asian: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"/> </g> </svg> diff --git a/editor/icons/icon_gizmo_spot_light.svg b/editor/icons/icon_gizmo_spot_light.svg new file mode 100644 index 0000000000..9b4ddadd17 --- /dev/null +++ b/editor/icons/icon_gizmo_spot_light.svg @@ -0,0 +1,5 @@ +<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"> +<g transform="translate(0 -924.36)"> +<path transform="translate(0 924.36)" d="m52 8c-4.432 0-8 3.568-8 8v12 16.875a40 36 0 0 0 -20 31.125h28a12 12 0 0 0 12 12 12 12 0 0 0 12 -12h28a40 36 0 0 0 -20 -31.141v-20.859-8c0-4.432-3.568-8-8-8h-24zm-11.969 78.006c-0.76793-0.053681-1.5596 0.1138-2.2793 0.5293l-10.393 6c-1.9191 1.108-2.5728 3.5457-1.4648 5.4648s3.5457 2.5728 5.4648 1.4648l10.393-6c1.9191-1.108 2.5709-3.5457 1.4629-5.4648-0.6925-1.1994-1.9037-1.9047-3.1836-1.9941zm47.938 0c-1.2799 0.08947-2.4911 0.7947-3.1836 1.9941-1.108 1.9191-0.45622 4.3568 1.4629 5.4648l10.393 6c1.9191 1.108 4.3568 0.45427 5.4648-1.4648s0.45427-4.3568-1.4648-5.4648l-10.393-6c-0.71967-0.4155-1.5114-0.58298-2.2793-0.5293zm-23.969 13.994c-2.216 0-4 1.784-4 4v12c0 2.216 1.784 4 4 4s4-1.784 4-4v-12c0-2.216-1.784-4-4-4z" fill="#f7f5cf" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.1082"/> +</g> +</svg> diff --git a/editor/icons/icon_gui_close_dark.svg b/editor/icons/icon_gui_close_dark.svg deleted file mode 100644 index e511a5d74a..0000000000 --- a/editor/icons/icon_gui_close_dark.svg +++ /dev/null @@ -1,5 +0,0 @@ -<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="m3.7578 2.3438l-1.4141 1.4141 4.2422 4.2422-4.2422 4.2422 1.4141 1.4141 4.2422-4.2422 4.2422 4.2422 1.4141-1.4141-4.2422-4.2422 4.2422-4.2422-1.4141-1.4141-4.2422 4.2422-4.2422-4.2422z" fill-opacity=".89804"/> -</g> -</svg> diff --git a/editor/icons/icon_gui_close_light.svg b/editor/icons/icon_gui_close_light.svg deleted file mode 100644 index ac023b7030..0000000000 --- a/editor/icons/icon_gui_close_light.svg +++ /dev/null @@ -1,5 +0,0 @@ -<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="m3.7578 2.3438l-1.4141 1.4141 4.2422 4.2422-4.2422 4.2422 1.4141 1.4141 4.2422-4.2422 4.2422 4.2422 1.4141-1.4141-4.2422-4.2422 4.2422-4.2422-1.4141-1.4141-4.2422 4.2422-4.2422-4.2422z" fill="#fff" fill-opacity=".89804"/> -</g> -</svg> diff --git a/editor/icons/icon_move_down.svg b/editor/icons/icon_move_down.svg index 28d0d161d8..466fa10205 100644 --- a/editor/icons/icon_move_down.svg +++ b/editor/icons/icon_move_down.svg @@ -1,6 +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)" fill="none" stroke="#e0e0e0" stroke-linecap="round" stroke-opacity=".99608" stroke-width="2"> -<path d="m4 1045.3 4 5 4-5" stroke-linejoin="round"/> -<path d="m8 1038.3v11"/> +<g transform="translate(0 -1036.4)"> +<path d="m7.9964 1051.4a1.0002 1.0001 0 0 1 -0.77738 -0.377l-4.0002-5a1.0001 1 0 0 1 0.15626 -1.4043 1.0001 1 0 0 1 1.4063 0.1563l2.2189 2.7734v-5.1484a1.0001 1 0 0 1 1.0001 -1 1.0001 1 0 0 1 1.0001 1v5.1484l2.2189-2.7734a1.0001 1 0 0 1 1.4063 -0.1563 1.0001 1 0 0 1 0.15626 1.4043l-4.0002 5a1.0002 1.0001 0 0 1 -0.7852 0.377zm0.00391-12a1.0001 1 0 0 1 -1.0001 -1 1.0001 1 0 0 1 1.0001 -1 1.0001 1 0 0 1 1.0001 1 1.0001 1 0 0 1 -1.0001 1z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#e0e0e0" fill-opacity=".99608" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian: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"/> </g> </svg> diff --git a/editor/icons/icon_move_up.svg b/editor/icons/icon_move_up.svg index cd61e66ee7..6e148216d2 100644 --- a/editor/icons/icon_move_up.svg +++ b/editor/icons/icon_move_up.svg @@ -1,6 +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)" fill="none" stroke="#e0e0e0" stroke-linecap="round" stroke-opacity=".99608" stroke-width="2"> -<path d="m4 1043.4 4-5 4 5" stroke-linejoin="round"/> -<path d="m8 1050.4v-11"/> +<g transform="translate(0 -1036.4)"> +<path d="m7.9964 1037.4a1.0002 1.0001 0 0 0 -0.77739 0.377l-4.0002 5a1.0001 1 0 0 0 0.15626 1.4043 1.0001 1 0 0 0 1.4063 -0.1563l2.2189-2.7734v5.1484a1.0001 1 0 0 0 1.0001 1 1.0001 1 0 0 0 1.0001 -1v-5.1484l2.2189 2.7734a1.0001 1 0 0 0 1.4063 0.1563 1.0001 1 0 0 0 0.15626 -1.4043l-4.0002-5a1.0002 1.0001 0 0 0 -0.7852 -0.377zm0.00391 12a1.0001 1 0 0 0 -1.0001 1 1.0001 1 0 0 0 1.0001 1 1.0001 1 0 0 0 1.0001 -1 1.0001 1 0 0 0 -1.0001 -1z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#e0e0e0" fill-opacity=".99608" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian: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"/> </g> </svg> diff --git a/editor/icons/icon_multi_mesh.svg b/editor/icons/icon_multi_mesh.svg index 09fcd9a1a8..2582ba9e51 100644 --- a/editor/icons/icon_multi_mesh.svg +++ b/editor/icons/icon_multi_mesh.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="m3 1a2 2 0 0 0 -2 2 2 2 0 0 0 1 1.7305v6.541a2 2 0 0 0 -1 1.7285 2 2 0 0 0 2 2 2 2 0 0 0 1.7305 -1h1.2695v-1-1h-1.2715a2 2 0 0 0 -0.72852 -0.73047v-5.8555l3.5859 3.5859h1.4141v-1-0.41406l-3.5859-3.5859h5.8574a2 2 0 0 0 0.72852 0.72656v1.2734h2v-1.2695a2 2 0 0 0 1 -1.7305 2 2 0 0 0 -2 -2 2 2 0 0 0 -1.7305 1h-6.541a2 2 0 0 0 -1.7285 -1zm8 7v1.5859 1.4141h-1.4141-1.5859v1 1h3v1 2h2v-1-2h2 1v-2h-2-1v-3h-1-1z" fill="#ffd684"/> +<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.89543-2 2 5.649e-4 0.71397 0.38169 1.3735 1 1.7305v6.541c-0.61771 0.35663-0.99874 1.0152-1 1.7285 0 1.1046 0.89543 2 2 2 0.71397-5.65e-4 1.3735-0.38169 1.7305-1h1.2695v-2h-1.2715c-0.17478-0.30301-0.42598-0.55488-0.72852-0.73047v-5.8555l3.5859 3.5859h1.4141v-1.4141l-3.5859-3.5859h5.8574c0.17532 0.30158 0.42647 0.55205 0.72852 0.72656v1.2734h2v-1.2695c0.61831-0.35698 0.99944-1.0165 1-1.7305 0-1.1046-0.89543-2-2-2-0.71397 5.648e-4 -1.3735 0.38169-1.7305 1h-6.541c-0.35663-0.61771-1.0152-0.99874-1.7285-1zm8 7v3h-3v2h3v3h2v-3h3v-2h-3v-3z" fill="#ffd684"/> </g> </svg> diff --git a/editor/icons/icon_multi_mesh_instance.svg b/editor/icons/icon_multi_mesh_instance.svg index edade9469d..0140f1137b 100644 --- a/editor/icons/icon_multi_mesh_instance.svg +++ b/editor/icons/icon_multi_mesh_instance.svg @@ -1,6 +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)" fill="#fc9c9c" fill-opacity=".99608"> -<path transform="translate(0 1036.4)" d="m3 1a2 2 0 0 0 -2 2 2 2 0 0 0 1 1.7305v6.541a2 2 0 0 0 -1 1.7285 2 2 0 0 0 2 2 2 2 0 0 0 1.7305 -1h1.2695v-1-1h-1.2715a2 2 0 0 0 -0.72852 -0.73047v-5.8555l3.5859 3.5859h1.4141v-1-0.41406l-3.5859-3.5859h5.8574a2 2 0 0 0 0.72852 0.72656v1.2734h2v-1.2695a2 2 0 0 0 1 -1.7305 2 2 0 0 0 -2 -2 2 2 0 0 0 -1.7305 1h-6.541a2 2 0 0 0 -1.7285 -1zm9 7v2.5859l-1-1v1.4141h-1.4141l1 1h-2.5859v1h1 2v1h0.27148a2 2 0 0 0 1.7285 1v-2h2a2 2 0 0 0 -1.0312 -1.75h0.03125v-0.25h-1v-3h-1z"/> -<path d="m11 1044.4v3h-3v2h3v3h2v-3h3v-2h-3v-3h-2z"/> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.89543-2 2 5.649e-4 0.71397 0.38169 1.3735 1 1.7305v6.541c-0.61771 0.35663-0.99874 1.0152-1 1.7285 0 1.1046 0.89543 2 2 2 0.71397-5.65e-4 1.3735-0.38169 1.7305-1h1.2695v-2h-1.2715c-0.17478-0.30301-0.42598-0.55488-0.72852-0.73047v-5.8555l3.5859 3.5859h1.4141v-1.4141l-3.5859-3.5859h5.8574c0.17532 0.30158 0.42647 0.55205 0.72852 0.72656v1.2734h2v-1.2695c0.61831-0.35698 0.99944-1.0165 1-1.7305 0-1.1046-0.89543-2-2-2-0.71397 5.648e-4 -1.3735 0.38169-1.7305 1h-6.541c-0.35663-0.61771-1.0152-0.99874-1.7285-1zm8 7v3h-3v2h3v3h2v-3h3v-2h-3v-3z" fill="#fc9c9c" fill-opacity=".99608"/> </g> </svg> diff --git a/editor/icons/icon_navigation_mesh_instance.svg b/editor/icons/icon_navigation_mesh_instance.svg index 909dbe458f..85c6292290 100644 --- a/editor/icons/icon_navigation_mesh_instance.svg +++ b/editor/icons/icon_navigation_mesh_instance.svg @@ -1,7 +1,6 @@ <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)" fill="#fc9c9c" fill-opacity=".99608"> -<path transform="translate(0 1036.4)" d="m3 1a2 2 0 0 0 -2 2 2 2 0 0 0 1 1.7305v6.541a2 2 0 0 0 -1 1.7285 2 2 0 0 0 2 2 2 2 0 0 0 1.7305 -1h2.5078l0.75-2h-3.2598a2 2 0 0 0 -0.72852 -0.73047v-5.8555l4.6973 4.6973 0.77148-2.0566-4.0547-4.0547h5.8574a2 2 0 0 0 0.72852 0.73047v0.27148a2.0002 2.0002 0 0 1 0.023438 0 2.0002 2.0002 0 0 1 1.8496 1.2969l0.12695 0.33789v-1.9082a2 2 0 0 0 1 -1.7285 2 2 0 0 0 -2 -2 2 2 0 0 0 -1.7305 1h-6.541a2 2 0 0 0 -1.7285 -1z"/> -<path d="m15 1051.4-3-8-3 8 3-2z" fill-rule="evenodd"/> +<path transform="translate(0 1036.4)" d="m3 1a2 2 0 0 0 -2 2 2 2 0 0 0 1 1.7305v6.541a2 2 0 0 0 -1 1.7285 2 2 0 0 0 2 2 2 2 0 0 0 1.7305 -1h2.5078l0.75-2h-3.2598a2 2 0 0 0 -0.72852 -0.73047v-5.8555l4.6973 4.6973 0.77148-2.0566-4.0547-4.0547h5.8574a2 2 0 0 0 0.72852 0.73047v0.27148a2.0002 2.0002 0 0 1 0.023438 0 2.0002 2.0002 0 0 1 1.8496 1.2969l0.12695 0.33789v-1.9082a2 2 0 0 0 1 -1.7285 2 2 0 0 0 -2 -2 2 2 0 0 0 -1.7305 1h-6.541a2 2 0 0 0 -1.7285 -1zm9 6l-3 8 3-2 3 2-3-8z"/> <rect x="12" y="1040.4" width="2" height="1"/> <rect x="12" y="1040.4" width="2" height="1"/> </g> diff --git a/editor/icons/icon_packed_data_container.svg b/editor/icons/icon_packed_data_container.svg index ea347ffe38..dd5aeafb86 100644 --- a/editor/icons/icon_packed_data_container.svg +++ b/editor/icons/icon_packed_data_container.svg @@ -1,13 +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="m2 1038.4v12h12v-12z" fill="none" stroke="#e0e0e0" stroke-linejoin="round" stroke-width="2"/> -<rect x="4" y="1040.4" width="2" height="2" fill="#e0e0e0"/> -<rect x="4" y="1043.4" width="2" height="2" fill="#e0e0e0"/> -<rect x="4" y="1046.4" width="2" height="2" fill="#e0e0e0"/> -<rect x="7" y="1040.4" width="2" height="2" fill="#e0e0e0"/> -<rect x="7" y="1043.4" width="2" height="2" fill="#e0e0e0"/> -<rect x="7" y="1046.4" width="2" height="2" fill="#e0e0e0"/> -<rect x="10" y="1040.4" width="2" height="2" fill="#e0e0e0"/> -<rect x="10" y="1043.4" width="2" height="2" fill="#e0e0e0"/> +<path transform="translate(0 1036.4)" d="m2 1a1.0001 1.0001 0 0 0 -1 1v12a1.0001 1.0001 0 0 0 1 1h12a1.0001 1.0001 0 0 0 1 -1v-12a1.0001 1.0001 0 0 0 -1 -1h-12zm1 2h10v10h-10v-10zm1 1v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm-6 3v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm-6 3v2h2v-2h-2zm3 0v2h2v-2h-2z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#e0e0e0" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian: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"/> </g> </svg> diff --git a/editor/icons/icon_particle_attractor_2d.svg b/editor/icons/icon_particle_attractor_2d.svg index c89742be04..1374304af0 100644 --- a/editor/icons/icon_particle_attractor_2d.svg +++ b/editor/icons/icon_particle_attractor_2d.svg @@ -1,9 +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)" fill="#a5b7f3" fill-opacity=".98824"> -<path transform="translate(0 1036.4)" d="m8 1a3 7 0 0 0 -3 7 3 7 0 0 0 3 7 3 7 0 0 0 3 -7 3 7 0 0 0 -3 -7zm0 1a2 6 0 0 1 2 6 2 6 0 0 1 -2 6 2 6 0 0 1 -2 -6 2 6 0 0 1 2 -6z"/> -<path d="m1 1044.4a7 3 0 0 0 7 3 7 3 0 0 0 7 -3 7 3 0 0 0 -7 -3 7 3 0 0 0 -7 3zm1 0a6 2 0 0 1 6 -2 6 2 0 0 1 6 2 6 2 0 0 1 -6 2 6 2 0 0 1 -6 -2z"/> -<path d="m3.0503 1049.3a3 7 45 0 0 7.0711 -2.8284 3 7 45 0 0 2.8284 -7.071 3 7 45 0 0 -7.0711 2.8284 3 7 45 0 0 -2.8284 7.071zm0.70711-0.7071a2 6 45 0 1 2.8284 -5.6568 2 6 45 0 1 5.6569 -2.8284 2 6 45 0 1 -2.8284 5.6568 2 6 45 0 1 -5.6569 2.8284z"/> -<path d="m12.95 1049.3a7 3 45 0 0 -2.8284 -7.071 7 3 45 0 0 -7.071 -2.8284 7 3 45 0 0 2.8284 7.071 7 3 45 0 0 7.071 2.8284zm-0.7071-0.7071a6 2 45 0 1 -5.6568 -2.8284 6 2 45 0 1 -2.8284 -5.6568 6 2 45 0 1 5.6568 2.8284 6 2 45 0 1 2.8284 5.6568z"/> -<circle cx="8" cy="1044.4" r="1"/> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m8 1a3 7 0 0 0 -2.0801 1.9668 7 3 45 0 0 -2.8691 0.083984 7 3 45 0 0 -0.080078 2.8633 7 3 0 0 0 -1.9707 2.0859 7 3 0 0 0 1.9668 2.0801 3 7 45 0 0 0.083984 2.8691 3 7 45 0 0 2.8633 0.080078 3 7 0 0 0 2.0859 1.9707 3 7 0 0 0 2.0801 -1.9668 7 3 45 0 0 2.8691 -0.083984 7 3 45 0 0 0.080078 -2.8633 7 3 0 0 0 1.9707 -2.0859 7 3 0 0 0 -1.9668 -2.0801 3 7 45 0 0 -0.083984 -2.8691 3 7 45 0 0 -2.8633 -0.080078 3 7 0 0 0 -2.0859 -1.9707zm0 1a2 6 0 0 1 1.2598 1.3438 3 7 45 0 0 -1.2578 0.75977 7 3 45 0 0 -1.2637 -0.75781 2 6 0 0 1 1.2617 -1.3457zm-3.6348 1.5293a6 2 45 0 1 1.2344 0.28906 3 7 0 0 0 -0.35352 1.4238 7 3 0 0 0 -1.4297 0.35742 6 2 45 0 1 -0.058594 -1.8418 6 2 45 0 1 0.60742 -0.22852zm7.0762 0.0039062a2 6 45 0 1 0.80078 0.22461 2 6 45 0 1 -0.060547 1.8418 7 3 0 0 0 -1.4238 -0.35352 3 7 0 0 0 -0.35742 -1.4297 2 6 45 0 1 1.041 -0.2832zm-4.998 0.70703a6 2 45 0 1 0.74023 0.4707 3 7 45 0 0 -0.41211 0.33984 7 3 0 0 0 -0.52344 0.048828 2 6 0 0 1 0.19531 -0.85938zm3.1152 0.0019531a2 6 0 0 1 0.18945 0.85547 7 3 0 0 0 -0.5293 -0.050781 7 3 45 0 0 -0.4043 -0.33594 2 6 45 0 1 0.74414 -0.46875zm-1.5586 1.7578a6 2 0 0 1 0.82031 0.021484 6 2 45 0 1 0.59375 0.56445 6 2 45 0 1 0.56445 0.59375 2 6 0 0 1 0.021484 0.82031 2 6 0 0 1 -0.021484 0.82031 2 6 45 0 1 -0.56445 0.59375 2 6 45 0 1 -0.59375 0.56445 6 2 0 0 1 -0.82031 0.021484 6 2 0 0 1 -0.82031 -0.021484 6 2 45 0 1 -0.59375 -0.56445 6 2 45 0 1 -0.56445 -0.59375 2 6 0 0 1 -0.021484 -0.82031 2 6 0 0 1 0.021484 -0.82031 2 6 45 0 1 0.56445 -0.59375 2 6 45 0 1 0.59375 -0.56445 6 2 0 0 1 0.82031 -0.021484zm2.9004 0.24805a6 2 0 0 1 0.85938 0.19531 2 6 45 0 1 -0.4707 0.74023 7 3 45 0 0 -0.33984 -0.41211 3 7 0 0 0 -0.048828 -0.52344zm-5.8027 0.0039062a3 7 0 0 0 -0.050781 0.5293 3 7 45 0 0 -0.33594 0.4043 6 2 45 0 1 -0.46875 -0.74414 6 2 0 0 1 0.85547 -0.18945zm7.5566 0.48633a6 2 0 0 1 1.3457 1.2617 6 2 0 0 1 -1.3438 1.2598 7 3 45 0 0 -0.75977 -1.2578 3 7 45 0 0 0.75781 -1.2637zm-9.3105 0.0019532a7 3 45 0 0 0.75977 1.2578 3 7 45 0 0 -0.75781 1.2637 6 2 0 0 1 -1.3457 -1.2617 6 2 0 0 1 1.3438 -1.2598zm4.6562 0.25977a1 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 -1zm3.2891 1.8145a6 2 45 0 1 0.46875 0.74414 6 2 0 0 1 -0.85547 0.18945 3 7 0 0 0 0.050781 -0.5293 3 7 45 0 0 0.33594 -0.4043zm-6.5781 0.0019531a7 3 45 0 0 0.33984 0.41211 3 7 0 0 0 0.048828 0.52344 6 2 0 0 1 -0.85938 -0.19531 2 6 45 0 1 0.4707 -0.74023zm-0.89258 1.584a7 3 0 0 0 1.4238 0.35352 3 7 0 0 0 0.35742 1.4297 2 6 45 0 1 -1.8418 0.058594 2 6 45 0 1 0.060547 -1.8418zm8.3652 0a6 2 45 0 1 0.058594 1.8418 6 2 45 0 1 -1.8418 -0.060547 3 7 0 0 0 0.35352 -1.4238 7 3 0 0 0 1.4297 -0.35742zm-2.4316 0.5a2 6 0 0 1 -0.19531 0.85938 6 2 45 0 1 -0.74023 -0.4707 3 7 45 0 0 0.41211 -0.33984 7 3 0 0 0 0.52344 -0.048828zm-3.5 0.001953a7 3 0 0 0 0.5293 0.050781 7 3 45 0 0 0.4043 0.33594 2 6 45 0 1 -0.74414 0.46875 2 6 0 0 1 -0.18945 -0.85547zm1.7461 0.99414a7 3 45 0 0 1.2637 0.75781 2 6 0 0 1 -1.2617 1.3457 2 6 0 0 1 -1.2598 -1.3438 3 7 45 0 0 1.2578 -0.75977z" fill="#a5b7f3" fill-opacity=".98824"/> </g> </svg> diff --git a/editor/icons/icon_particles.svg b/editor/icons/icon_particles.svg index f8a0ec46ec..ff58d4e47a 100644 --- a/editor/icons/icon_particles.svg +++ b/editor/icons/icon_particles.svg @@ -1,11 +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)" fill="#fc9c9c" fill-opacity=".99608"> -<circle cx="4" cy="1044.4" r="3"/> -<ellipse cx="8" cy="1042.4" rx="4.5" ry="5"/> -<path d="m4 1047.4h8v-4h-8z" fill-rule="evenodd"/> -<circle cx="12" cy="1044.4" r="3"/> -<circle cx="4" cy="1049.4" r="1"/> -<circle cx="12" cy="1049.4" r="1"/> -<circle cx="8" cy="1050.4" r="1"/> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m8 1a4.5 5 0 0 0 -4.4141 4.0312 3 3 0 0 0 -2.5859 2.9688 3 3 0 0 0 3 3h8a3 3 0 0 0 3 -3 3 3 0 0 0 -2.5898 -2.9668 4.5 5 0 0 0 -4.4102 -4.0332zm-4 11a1 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 -1zm8 0a1 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 -1zm-4 1a1 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="#fc9c9c" fill-opacity=".99608"/> </g> </svg> diff --git a/editor/icons/icon_reflection_probe.svg b/editor/icons/icon_reflection_probe.svg index ab4ce54802..0a7f537737 100644 --- a/editor/icons/icon_reflection_probe.svg +++ b/editor/icons/icon_reflection_probe.svg @@ -1,5 +1,7 @@ <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.9629 1.002a1.0001 1.0001 0 0 0 -0.41016 0.10352l-6 3a1.0001 1.0001 0 0 0 -0.55273 0.89453v6a1.0001 1.0001 0 0 0 0.55273 0.89453l6 3a1.0001 1.0001 0 0 0 0.89453 0l6-3a1.0001 1.0001 0 0 0 0.55273 -0.89453v-6a1.0001 1.0001 0 0 0 -0.55273 -0.89453l-6-3a1.0001 1.0001 0 0 0 -0.48438 -0.10352zm-0.96289 2.6172v8.7637l-4-2v-4.7637l4-2zm2 0l4 2v4.7637l-4 2v-8.7637z" color="#000000" color-rendering="auto" fill="#fc9c9c" fill-opacity=".99608" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;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"/> +<g transform="translate(0 -1036.4)" fill="none" stroke="#fc9c9c" stroke-linejoin="round" stroke-opacity=".99608" stroke-width="2"> +<path d="m2 1045.4v5h12v-4"/> +<path d="m2 1040.4 5 6 7-7"/> +<path d="m14 1043.4v-4h-4" stroke-linecap="round"/> </g> </svg> diff --git a/editor/icons/icon_sprite_frames.svg b/editor/icons/icon_sprite_frames.svg index 5147ccdb1e..e797819892 100644 --- a/editor/icons/icon_sprite_frames.svg +++ b/editor/icons/icon_sprite_frames.svg @@ -1,11 +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)" fill="#e0e0e0"> -<rect x="10" y="1046.4" width="2" height="2"/> -<rect x="13" y="1046.4" width="2" height="2"/> -<rect x="10" y="1049.4" width="2" height="2"/> -<rect x="13" y="1049.4" width="2" height="2"/> -<path transform="translate(0 1036.4)" d="m6 1a5 5 0 0 0 -5 5 5 5 0 0 0 5 5 5 5 0 0 0 5 -5 5 5 0 0 0 -5 -5zm-3 4a1 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 -1zm6 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 -1zm-1.0039 2.4922a0.50005 0.50005 0 0 1 0.35742 0.86133c-0.61785 0.6179-1.4924 0.89648-2.3535 0.89648s-1.7357-0.27858-2.3535-0.89648a0.50005 0.50005 0 0 1 0.34766 -0.85742 0.50005 0.50005 0 0 1 0.35938 0.15039c0.38215 0.3822 1.0076 0.60352 1.6465 0.60352s1.2643-0.22132 1.6465-0.60352a0.50005 0.50005 0 0 1 0.34961 -0.1543z"/> -<rect x="13" y="1043.4" width="2" height="2"/> -<rect x="7" y="1049.4" width="2" height="2"/> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m6 1a5 5 0 0 0 -5 5 5 5 0 0 0 5 5 5 5 0 0 0 5 -5 5 5 0 0 0 -5 -5zm-3 4a1 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 -1zm6 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 2v2h2v-2h-2zm-5.0039 0.49219a0.50005 0.50005 0 0 1 0.35742 0.86133c-0.61785 0.6179-1.4924 0.89648-2.3535 0.89648s-1.7357-0.27858-2.3535-0.89648a0.50005 0.50005 0 0 1 0.34766 -0.85742 0.50005 0.50005 0 0 1 0.35938 0.15039c0.38215 0.3822 1.0076 0.60352 1.6465 0.60352s1.2643-0.22132 1.6465-0.60352a0.50005 0.50005 0 0 1 0.34961 -0.1543zm2.0039 2.5078v2h2v-2h-2zm3 0v2h2v-2h-2zm-6 3v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2z" fill="#e0e0e0"/> </g> </svg> diff --git a/editor/icons/icon_tile_set.svg b/editor/icons/icon_tile_set.svg index c7be24ae62..935afea397 100644 --- a/editor/icons/icon_tile_set.svg +++ b/editor/icons/icon_tile_set.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="m1 1v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm-12 3v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm-12 3v2h2v-2h-2zm3 0v2h2v-2h-2zm5 1v1 5 1h5c0.55228 0 1-0.44772 1-1v-5c0-0.55228-0.44772-1-1-1v4l-1-1-1 1v-4h-3zm-8 2v2h2v-2h-2zm3 0v2h2v-2h-2zm-3 3v2h2v-2h-2zm3 0v2h2v-2h-2z" fill="#e0e0e0"/> +<path transform="translate(0 1036.4)" d="m1 1v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm-12 3v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm-12 3v2h2v-2zm3 0v2h2v-2zm5 1v7h5c0.55228 0 1-0.44772 1-1v-5c0-0.55228-0.44772-1-1-1v4l-1-1-1 1v-4zm-8 2v2h2v-2zm3 0v2h2v-2zm-3 3v2h2v-2zm3 0v2h2v-2z" fill="#e0e0e0"/> </g> </svg> diff --git a/editor/icons/icon_tool_button.svg b/editor/icons/icon_tool_button.svg index 25bc83e690..4f0c3797f8 100644 --- a/editor/icons/icon_tool_button.svg +++ b/editor/icons/icon_tool_button.svg @@ -1,11 +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)"> -<rect x="2" y="1047.4" width="6" height="4" ry="1.5" fill="#a5efac"/> -<rect x="1" y="1049.4" width="8" height="2" ry="0" fill="#a5efac"/> -<path d="m2 1042.4 3 2 3-2" fill="none" stroke="#a5efac" stroke-linejoin="round" stroke-width="2"/> -<path d="m5 1039.4v5" fill="none" stroke="#a5efac" stroke-width="2"/> -<g transform="translate(9,-1)" fill="#a5efac"> -<path d="m2 1038.5c-1.1979 0.4235-1.999 1.5557-2 2.8262 9.552e-4 1.2705 0.80214 2.4027 2 2.8262v7.1738c0 0.554 0.446 1 1 1s1-0.446 1-1v-7.1758c1.1972-0.4232 1.9982-1.5544 2-2.8242-0.00178-1.2698-0.80282-2.401-2-2.8242v2.8242c0 0.5523-0.44772 1-1 1s-1-0.4477-1-1z" fill="#a5efac"/> -</g> +<path transform="translate(0 1036.4)" d="m11 1.1738c-1.1979 0.4235-1.999 1.5557-2 2.8262 9.552e-4 1.2705 0.80214 2.4027 2 2.8262v7.1738c0 0.554 0.446 1 1 1s1-0.446 1-1v-7.1758c1.1972-0.4232 1.9982-1.5544 2-2.8242-0.0018-1.2698-0.80282-2.401-2-2.8242v2.8242c0 0.5523-0.44772 1-1 1s-1-0.4477-1-1zm-7 1.8262v3.1328l-1.4453-0.96484-1.1094 1.6641 3 2c0.3359 0.22389 0.77347 0.22389 1.1094 0l3-2-1.1094-1.6641-1.4453 0.96484v-3.1328zm-0.5 8c-0.831 0-1.5 0.669-1.5 1.5v0.5h-1v2h8v-2h-1v-0.5c0-0.831-0.669-1.5-1.5-1.5z" fill="#a5efac"/> </g> </svg> diff --git a/editor/icons/icon_transpose.svg b/editor/icons/icon_transpose.svg index d92b37a7b1..7dd194d724 100644 --- a/editor/icons/icon_transpose.svg +++ b/editor/icons/icon_transpose.svg @@ -1,12 +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)" fill="#e0e0e0"> -<rect x="1" y="1037.4" width="2" height="14"/> -<rect x="1" y="1037.4" width="14" height="2"/> -<rect x="1" y="1049.4" width="7" height="2"/> -<rect x="6" y="1037.4" width="2" height="14"/> -<rect x="1" y="1042.4" width="14" height="2"/> -<rect transform="rotate(90)" x="1037.4" y="-15" width="7" height="2"/> -<path d="m15 1051.4h-5l5-5z" fill-rule="evenodd"/> -<rect x="8" y="1039.4" width="5" height="3"/> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m1 1v14h7v-7h7v-7zm2 2h3v3h-3zm0 5h3v5h-3zm12 2-5 5h5z" fill="#e0e0e0"/> </g> </svg> diff --git a/editor/icons/icon_tree.svg b/editor/icons/icon_tree.svg index 093f9d2fc5..62efb9f94f 100644 --- a/editor/icons/icon_tree.svg +++ b/editor/icons/icon_tree.svg @@ -1,13 +1,6 @@ <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)"> -<rect x="20" y="1042.4" width="1" height="1" fill="#fefeff"/> <rect x="29" y="1042.4" width="1" height="1" fill="#fefeff"/> -<rect x="1" y="1037.4" width="14" height="2" fill="#a5efac"/> -<rect x="6" y="1041.4" width="9" height="2" fill="#a5efac"/> -<rect x="7" y="1045.4" width="8" height="2" fill="#a5efac"/> -<rect x="7" y="1049.4" width="8" height="2" fill="#a5efac"/> -<path d="m2 1038.4v4h4" fill="none" stroke="#a5efac" stroke-linejoin="round" stroke-width="2"/> -<path d="m6 1042.4v4h3" fill="none" stroke="#a5efac" stroke-linejoin="round" stroke-width="2"/> -<path d="m2 1040.4v10h7" fill="none" stroke="#a5efac" stroke-linejoin="round" stroke-width="2"/> +<path transform="translate(0 1036.4)" d="m1 1v13c5.52e-5 0.55226 0.44774 0.99994 1 1h13v-2h-12v-6h2v3c5.52e-5 0.55226 0.44774 0.99994 1 1h9v-2h-8v-2h8v-2h-12v-2h12v-2z" fill="#a5efac"/> </g> </svg> diff --git a/editor/icons/icon_v_slider.svg b/editor/icons/icon_v_slider.svg index c016ebd814..2da5fc8dcd 100644 --- a/editor/icons/icon_v_slider.svg +++ b/editor/icons/icon_v_slider.svg @@ -1,10 +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="m6 1050.4a1.0001 1.0001 0 1 1 -2 0v-2.1308a4 4 0 0 0 1 0.1308 4 4 0 0 0 1 -0.1328zm0-9.8691a4 4 0 0 0 -1 -0.1309 4 4 0 0 0 -1 0.1329v-2.1329a1.0001 1.0001 0 1 1 2 0z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#a5efac" 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"/> -<circle transform="matrix(0,-1,-1,0,0,0)" cx="-1039.4" cy="-5" r="2" fill="#a5efac"/> -<path d="m12 1038.4h-2" fill="none" stroke="#a5efac" stroke-linecap="round" stroke-width="2"/> -<path d="m11 1044.4v0" fill="none" stroke="#a5efac" stroke-linecap="round" stroke-width="2"/> -<path d="m12 1050.4h-2" fill="none" stroke="#a5efac" stroke-linecap="round" stroke-width="2"/> -<path d="m6 1049.4h-2v-6.1308a4 4 0 0 0 1 0.1308 4 4 0 0 0 1 -0.1328z" fill="#a5efac"/> +<path transform="translate(0 1036.4)" d="m5.0156 0.98633a1.0001 1.0001 0 0 0 -0.25977 0.029297 2 2 0 0 0 -1.7559 1.9844 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -1.7539 -1.9824 1.0001 1.0001 0 0 0 -0.23047 -0.03125zm4.9844 0.013672a1 1 0 0 0 -1 1 1 1 0 0 0 1 1h2a1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1h-2zm-4 5.8672a4 4 0 0 1 -1 0.13281 4 4 0 0 1 -1 -0.13086v5 1.1309 1a1.0001 1.0001 0 1 0 2 0v-1-1.1328-5zm5 0.13281a1 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 -1zm-1 6a1 1 0 0 0 -1 1 1 1 0 0 0 1 1h2a1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1h-2z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#a5efac" 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"/> </g> </svg> diff --git a/editor/icons/icon_v_split_container.svg b/editor/icons/icon_v_split_container.svg index d038edccc9..3f47d9cade 100644 --- a/editor/icons/icon_v_split_container.svg +++ b/editor/icons/icon_v_split_container.svg @@ -1,8 +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)" fill="#a5efac"> -<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.89543-2 2v10c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.89543 2-2v-10c0-1.1046-0.89543-2-2-2zm0 2h10v10h-10z"/> -<rect transform="rotate(90)" x="1043.4" y="-13" width="2" height="10"/> -<path d="m10 1045.4h-4l2 2z"/> -<path d="m10 1043.4-2-2-2 2z"/> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.89543-2 2v10c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.89543 2-2v-10c0-1.1046-0.89543-2-2-2h-10zm0 2h10v4h-3l-2-2-2 2h-3v-4zm0 6h3l2 2 2-2h3v4h-10v-4z" fill="#a5efac"/> </g> </svg> diff --git a/editor/icons/icon_vehicle_body.svg b/editor/icons/icon_vehicle_body.svg index 6761355d0e..01eb1798eb 100644 --- a/editor/icons/icon_vehicle_body.svg +++ b/editor/icons/icon_vehicle_body.svg @@ -1,7 +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)" fill="#fc9c9c" fill-opacity=".99608"> -<path transform="translate(0 1036.4)" d="m5 3a1 1 0 0 0 -1 1l-1 3h-2v4h1.0508c0.23167-1.1411 1.2398-2 2.4492-2s2.2175 0.85893 2.4492 2h2.1016c0.23167-1.1411 1.2398-2 2.4492-2s2.2175 0.85893 2.4492 2h1.0508v-4h-4v-4h-6zm1 1h4v3h-4v-3z"/> -<circle cx="4.5" cy="1047.9" r="1.5"/> -<circle cx="11.5" cy="1047.9" r="1.5"/> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m5 3a1 1 0 0 0 -1 1l-1 3h-2v4h1.0508c0.23167-1.1411 1.2398-2 2.4492-2s2.2175 0.85893 2.4492 2h2.1016c0.23167-1.1411 1.2398-2 2.4492-2s2.2175 0.85893 2.4492 2h1.0508v-4h-4v-4h-6zm1 1h4v3h-4v-3zm-1.5 6a1.5 1.5 0 0 0 -1.5 1.5 1.5 1.5 0 0 0 1.5 1.5 1.5 1.5 0 0 0 1.5 -1.5 1.5 1.5 0 0 0 -1.5 -1.5zm7 0a1.5 1.5 0 0 0 -1.5 1.5 1.5 1.5 0 0 0 1.5 1.5 1.5 1.5 0 0 0 1.5 -1.5 1.5 1.5 0 0 0 -1.5 -1.5z" fill="#fc9c9c" fill-opacity=".99608"/> </g> </svg> diff --git a/editor/icons/icon_viewport_sprite.svg b/editor/icons/icon_viewport_sprite.svg index 2c8c356102..4b8bbeaeba 100644 --- a/editor/icons/icon_viewport_sprite.svg +++ b/editor/icons/icon_viewport_sprite.svg @@ -2,9 +2,6 @@ <g transform="translate(0 -1036.4)"> <rect x="20" y="1042.4" width="1" height="1" fill="#fefeff"/> <rect x="29" y="1042.4" width="1" height="1" fill="#fefeff"/> -<path transform="translate(0 1036.4)" d="m3 2c-0.5304 8.01e-5 -1.0391 0.21085-1.4141 0.58594-0.37509 0.37501-0.58586 0.88366-0.58594 1.4141v8c8.03e-5 0.5304 0.21085 1.0391 0.58594 1.4141 0.37501 0.37509 0.88366 0.58586 1.4141 0.58594h10c1.1046 0 2-0.89543 2-2v-8c0-1.1046-0.89543-2-2-2zm0 1h10c0.55228 9.6e-6 0.99999 0.44772 1 1v8c-1e-5 0.55228-0.44772 0.99999-1 1h-10c-0.55228-1e-5 -0.99999-0.44772-1-1v-8c9.6e-6 -0.55228 0.44772-0.99999 1-1z" fill="#a5b7f3" fill-opacity=".98824"/> -<rect x="4" y="1042.4" width="2" height="2" fill="#a5b7f3" fill-opacity=".98824"/> -<rect x="10" y="1042.4" width="2" height="2" fill="#a5b7f3" fill-opacity=".98824"/> -<rect x="4" y="1045.4" width="8" height="1" fill="#a5b7f3" fill-opacity=".98824"/> +<path transform="translate(0 1036.4)" d="m3 2c-0.5304 8.01e-5 -1.0391 0.21085-1.4141 0.58594-0.37509 0.37501-0.58586 0.88366-0.58594 1.4141v8c8.03e-5 0.5304 0.21085 1.0391 0.58594 1.4141 0.37501 0.37509 0.88366 0.58586 1.4141 0.58594h10c1.1046 0 2-0.89543 2-2v-8c0-1.1046-0.89543-2-2-2h-10zm0 1h10c0.55228 9.6e-6 0.99999 0.44772 1 1v8c-1e-5 0.55228-0.44772 0.99999-1 1h-10c-0.55228-1e-5 -0.99999-0.44772-1-1v-8c9.6e-6 -0.55228 0.44772-0.99999 1-1zm1 3v2h2v-2h-2zm6 0v2h2v-2h-2zm-6 3v1h8v-1h-8z" fill="#a5b7f3" fill-opacity=".98824"/> </g> </svg> diff --git a/editor/icons/icon_visibility_enabler.svg b/editor/icons/icon_visibility_enabler.svg index 3aa4c6d73f..868437108a 100644 --- a/editor/icons/icon_visibility_enabler.svg +++ b/editor/icons/icon_visibility_enabler.svg @@ -1,9 +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)" fill="#fc9c9c" fill-opacity=".99608"> -<g transform="translate(-.00015202)"> -<path transform="translate(0 1036.4)" d="m8 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.00586 0.57031c1.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.55273c-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 -4z" color="#000000" color-rendering="auto" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;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"/> -<circle cx="8" cy="1044.4" r="2"/> -</g> -<path transform="translate(0 1036.4)" d="m1 1v3h1v-2h2v-1h-3zm11 0v1h2v2h1v-3h-3zm-11 11v3h3v-1h-2v-2h-1zm13 0v2h-2v1h3v-3h-1z"/> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m1 1v3h1v-2h2v-1h-3zm11 0v1h2v2h1v-3h-3zm-4 1c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.0058594 0.57031c1.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.55273c-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 -2zm-7 6v3h3v-1h-2v-2h-1zm13 0v2h-2v1h3v-3h-1z" color="#000000" color-rendering="auto" fill="#fc9c9c" fill-opacity=".99608" 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"/> </g> </svg> diff --git a/editor/icons/icon_visibility_enabler_2d.svg b/editor/icons/icon_visibility_enabler_2d.svg index 15b54c0ba0..1cde98da61 100644 --- a/editor/icons/icon_visibility_enabler_2d.svg +++ b/editor/icons/icon_visibility_enabler_2d.svg @@ -1,9 +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)" fill="#a5b7f3" fill-opacity=".98824"> -<g transform="translate(-.00015202)"> -<path transform="translate(0 1036.4)" d="m8 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.00586 0.57031c1.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.55273c-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 -4z" color="#000000" color-rendering="auto" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;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"/> -<circle cx="8" cy="1044.4" r="2"/> -</g> -<path transform="translate(0 1036.4)" d="m1 1v3h1v-2h2v-1h-3zm11 0v1h2v2h1v-3h-3zm-11 11v3h3v-1h-2v-2h-1zm13 0v2h-2v1h3v-3h-1z"/> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m1 1v3h1v-2h2v-1h-3zm11 0v1h2v2h1v-3h-3zm-4 1c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.0058594 0.57031c1.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.55273c-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 -2zm-7 6v3h3v-1h-2v-2h-1zm13 0v2h-2v1h3v-3h-1z" color="#000000" color-rendering="auto" fill="#a5b7f3" fill-opacity=".98824" 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"/> </g> </svg> diff --git a/editor/icons/icon_visibility_notifier.svg b/editor/icons/icon_visibility_notifier.svg index 807d03869c..2a631f9216 100644 --- a/editor/icons/icon_visibility_notifier.svg +++ b/editor/icons/icon_visibility_notifier.svg @@ -1,7 +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)" fill="#fc9c9c" fill-opacity=".99608"> -<path transform="translate(0 1036.4)" d="m8 3c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.0058594 0.57031c1.1244 3.9354 4.4609 5.7246 6.9609 5.7246 1.4907 0 3.2717-0.65207 4.7109-2h-0.71094-2v-0.54102a4 4 0 0 1 -2 0.54102 4 4 0 0 1 -4 -4 4 4 0 0 1 4 -4 4 4 0 0 1 2 0.54102v-2.1816c-0.68312-0.23834-1.3644-0.35938-2-0.35938zm0 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 -2z" color="#000000" color-rendering="auto" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;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"/> -<rect x="12" y="1037.4" width="2" height="6"/> -<rect transform="scale(1,-1)" x="12" y="-1047.4" width="2" height="2"/> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m12 1v6h2v-6h-2zm-4 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.0058594 0.57031c1.1244 3.9354 4.4609 5.7246 6.9609 5.7246 1.4907 0 3.2717-0.65207 4.7109-2h-0.71094-2v-0.54102a4 4 0 0 1 -2 0.54102 4 4 0 0 1 -4 -4 4 4 0 0 1 4 -4 4 4 0 0 1 2 0.54102v-2.1816c-0.68312-0.23834-1.3644-0.35938-2-0.35938zm0 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 -2zm4 2v2h2v-2h-2z" color="#000000" color-rendering="auto" fill="#fc9c9c" fill-opacity=".99608" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;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"/> </g> </svg> diff --git a/editor/icons/icon_visible.svg b/editor/icons/icon_visible.svg index faa0eabb03..7d157d7b7f 100644 --- a/editor/icons/icon_visible.svg +++ b/editor/icons/icon_visible.svg @@ -1,6 +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)" fill="#e0e0e0"> -<path transform="translate(0 1036.4)" d="m8 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.0058594 0.57031c1.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.55273c-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 -4z" color="#000000" color-rendering="auto" fill-opacity=".99608" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;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"/> -<circle cx="8" cy="1044.4" r="2"/> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m8 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.0058594 0.57031c1.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.55273c-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=".99608" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;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"/> </g> </svg> diff --git a/editor/icons/icon_world_environment.svg b/editor/icons/icon_world_environment.svg index 823c6401be..d7dbd4d73e 100644 --- a/editor/icons/icon_world_environment.svg +++ b/editor/icons/icon_world_environment.svg @@ -1,8 +1,6 @@ <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)" fill="none" stroke="#fc9c9c" stroke-opacity=".99608"> -<circle cx="8" cy="1044.4" r="6" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/> -<path d="m2 1044.4c4.5932 1.582 8.3985 1.0627 12 0" stroke-width="1.5"/> -<path d="m8 1038.4c-3 4-3 8 0 12" stroke-width="1.5"/> -<path d="m8 1038.4c3 4 3 8 0 12" stroke-width="1.5"/> +<g transform="translate(0 -1036.4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"> +<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm-1.7305 2.3125c-0.83125 1.5372-1.2685 3.1037-1.2695 4.6816-0.64057-0.11251-1.3005-0.27158-1.9766-0.47266a5 5 0 0 1 3.2461 -4.209zm3.4629 0.0039062a5 5 0 0 1 3.2383 4.1875c-0.65187 0.17448-1.3077 0.32867-1.9727 0.44922-0.00845-1.5627-0.44294-3.1141-1.2656-4.6367zm-1.7324 0.0078126c1.0126 1.593 1.5 3.1425 1.5 4.6758 0 0.054042-0.0066161 0.10803-0.0078125 0.16211-0.96392 0.096801-1.9566 0.1103-2.9844 0.027344-0.0016335-0.063192-0.0078125-0.12632-0.0078125-0.18945 0-1.5333 0.48744-3.0828 1.5-4.6758zm4.8789 5.7578a5 5 0 0 1 -3.1484 3.6055c0.57106-1.0564 0.95277-2.1268 1.1367-3.2051 0.68204-0.10905 1.3556-0.23789 2.0117-0.40039zm-9.7461 0.033203c0.68377 0.18153 1.3555 0.33345 2.0098 0.43164 0.18781 1.0551 0.56647 2.1026 1.125 3.1367a5 5 0 0 1 -3.1348 -3.5684zm6.168 0.55469c-0.22615 0.98866-0.65424 1.9884-1.3008 3.0059-0.63811-1.0042-1.0645-1.9908-1.293-2.9668 0.89027 0.054126 1.7517 0.029377 2.5938-0.039062z" fill="#fc9c9c" fill-opacity=".99608"/> +<path transform="translate(0 1036.4)" d="m8 1v2.3242c1.0126 1.593 1.5 3.1425 1.5 4.6758 0 0.054042-0.0066161 0.10803-0.0078125 0.16211-0.4894 0.049148-0.98713 0.077552-1.4922 0.082031v1.4922c0.43915-0.0075968 0.87287-0.031628 1.3008-0.066406-0.22615 0.98866-0.65424 1.9884-1.3008 3.0059v2.3242a7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm1.7324 2.3164a5 5 0 0 1 3.2383 4.1875c-0.65187 0.17448-1.3077 0.32867-1.9727 0.44922-0.00845-1.5627-0.44294-3.1141-1.2656-4.6367zm3.1465 5.7656a5 5 0 0 1 -3.1484 3.6055c0.57106-1.0564 0.95277-2.1268 1.1367-3.2051 0.68204-0.10905 1.3556-0.23789 2.0117-0.40039z" fill="#a5b7f3"/> </g> </svg> diff --git a/editor/icons/icon_y_sort.svg b/editor/icons/icon_y_sort.svg index 6ad296ba54..1b48f4b8e3 100644 --- a/editor/icons/icon_y_sort.svg +++ b/editor/icons/icon_y_sort.svg @@ -1,8 +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)" fill="#a5b7f3" fill-opacity=".98824"> -<rect x="9" y="1038.4" width="6" height="2"/> -<path d="m3 1048.4h-2l3 3 3-3h-2v-8h2l-3-3-3 3h2z"/> -<rect x="9" y="1043.4" width="4" height="2"/> -<rect x="9" y="1048.4" width="2" height="2"/> +<g transform="translate(0 -1036.4)"> +<path transform="translate(0 1036.4)" d="m4 1l-3 3h2v8h-2l3 3 3-3h-2v-8h2l-3-3zm5 1v2h6v-2h-6zm0 5v2h4v-2h-4zm0 5v2h2v-2h-2z" fill="#a5b7f3" fill-opacity=".98824"/> </g> </svg> diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp index 86482dad5a..b1991d755b 100644 --- a/editor/import/editor_import_collada.cpp +++ b/editor/import/editor_import_collada.cpp @@ -41,6 +41,7 @@ #include "scene/animation/animation_player.h" #include "scene/resources/animation.h" #include "scene/resources/packed_scene.h" +#include "scene/resources/surface_tool.h" #include <iostream> @@ -868,7 +869,6 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me int normal_pos = (normal_src->stride ? normal_src->stride : 3) * p.indices[src + normal_ofs]; ERR_FAIL_INDEX_V(normal_pos, normal_src->array.size(), ERR_INVALID_DATA); vertex.normal = Vector3(normal_src->array[normal_pos + 0], normal_src->array[normal_pos + 1], normal_src->array[normal_pos + 2]); - vertex.normal.snap(Vector3(0.001, 0.001, 0.001)); if (tangent_src && binormal_src) { @@ -991,18 +991,6 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me } } - PoolVector<int> index_array; - index_array.resize(indices_list.size()); - PoolVector<int>::Write index_arrayw = index_array.write(); - - int iidx = 0; - for (List<int>::Element *F = indices_list.front(); F; F = F->next()) { - - index_arrayw[iidx++] = F->get(); - } - - index_arrayw = PoolVector<int>::Write(); - /*****************/ /* MAKE SURFACES */ /*****************/ @@ -1011,9 +999,6 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me Ref<SpatialMaterial> material; - //find material - Mesh::PrimitiveType primitive = Mesh::PRIMITIVE_TRIANGLES; - { if (p_material_map.has(p.material)) { @@ -1031,212 +1016,73 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me } } - PoolVector<Vector3> final_vertex_array; - PoolVector<Vector3> final_normal_array; - PoolVector<float> final_tangent_array; - PoolVector<Color> final_color_array; - PoolVector<Vector3> final_uv_array; - PoolVector<Vector3> final_uv2_array; - PoolVector<int> final_bone_array; - PoolVector<float> final_weight_array; - - uint32_t final_format = 0; + Ref<SurfaceTool> surftool; + surftool.instance(); + surftool->begin(Mesh::PRIMITIVE_TRIANGLES); - //create format - final_format = Mesh::ARRAY_FORMAT_VERTEX | Mesh::ARRAY_FORMAT_INDEX; - - if (normal_src) { - final_format |= Mesh::ARRAY_FORMAT_NORMAL; - if (uv_src && binormal_src && tangent_src) { - final_format |= Mesh::ARRAY_FORMAT_TANGENT; + for (int k = 0; k < vertex_array.size(); k++) { + if (normal_src) { + surftool->add_normal(vertex_array[k].normal); + if (binormal_src && tangent_src) { + surftool->add_tangent(vertex_array[k].tangent); + } } - } - - if (color_src) - final_format |= Mesh::ARRAY_FORMAT_COLOR; - if (uv_src) - final_format |= Mesh::ARRAY_FORMAT_TEX_UV; - if (uv2_src) - final_format |= Mesh::ARRAY_FORMAT_TEX_UV2; - - if (has_weights) { - final_format |= Mesh::ARRAY_FORMAT_WEIGHTS; - final_format |= Mesh::ARRAY_FORMAT_BONES; - } - - //set arrays - - int vlen = vertex_array.size(); - { //vertices - - PoolVector<Vector3> varray; - varray.resize(vertex_array.size()); - - PoolVector<Vector3>::Write varrayw = varray.write(); - - for (int k = 0; k < vlen; k++) - varrayw[k] = vertex_array[k].vertex; - - varrayw = PoolVector<Vector3>::Write(); - final_vertex_array = varray; - } - - if (uv_src) { //compute uv first, may be needed for computing tangent/bionrmal - PoolVector<Vector3> uvarray; - uvarray.resize(vertex_array.size()); - PoolVector<Vector3>::Write uvarrayw = uvarray.write(); - - for (int k = 0; k < vlen; k++) { - uvarrayw[k] = vertex_array[k].uv; + if (uv_src) { + surftool->add_uv(Vector2(vertex_array[k].uv.x, vertex_array[k].uv.y)); } - - uvarrayw = PoolVector<Vector3>::Write(); - final_uv_array = uvarray; - } - - if (uv2_src) { //compute uv first, may be needed for computing tangent/bionrmal - PoolVector<Vector3> uv2array; - uv2array.resize(vertex_array.size()); - PoolVector<Vector3>::Write uv2arrayw = uv2array.write(); - - for (int k = 0; k < vlen; k++) { - uv2arrayw[k] = vertex_array[k].uv2; + if (uv2_src) { + surftool->add_uv2(Vector2(vertex_array[k].uv2.x, vertex_array[k].uv2.y)); } - - uv2arrayw = PoolVector<Vector3>::Write(); - final_uv2_array = uv2array; - } - - if (normal_src) { - PoolVector<Vector3> narray; - narray.resize(vertex_array.size()); - PoolVector<Vector3>::Write narrayw = narray.write(); - - for (int k = 0; k < vlen; k++) { - narrayw[k] = vertex_array[k].normal; + if (color_src) { + surftool->add_color(vertex_array[k].color); } - narrayw = PoolVector<Vector3>::Write(); - final_normal_array = narray; - - /* - PoolVector<Vector3> altnaray; - _generate_normals(index_array,final_vertex_array,altnaray); - - for(int i=0;i<altnaray.size();i++) - print_line(rtos(altnaray[i].dot(final_normal_array[i]))); - */ - - } else if (primitive == Mesh::PRIMITIVE_TRIANGLES) { - //generate normals (even if unused later) - - _generate_normals(index_array, final_vertex_array, final_normal_array); - if (OS::get_singleton()->is_stdout_verbose()) - print_line("Collada: Triangle mesh lacks normals, so normals were generated."); - final_format |= Mesh::ARRAY_FORMAT_NORMAL; - } - - if (final_normal_array.size() && uv_src && binormal_src && tangent_src && !force_make_tangents) { + if (has_weights) { + Vector<float> weights; + Vector<int> bones; + weights.resize(VS::ARRAY_WEIGHTS_SIZE); + bones.resize(VS::ARRAY_WEIGHTS_SIZE); + //float sum=0.0; + for (int l = 0; l < VS::ARRAY_WEIGHTS_SIZE; l++) { + if (l < vertex_array[k].weights.size()) { + weights[l] = vertex_array[k].weights[l].weight; + bones[l] = vertex_array[k].weights[l].bone_idx; + //sum += vertex_array[k].weights[l].weight; + } else { - PoolVector<real_t> tarray; - tarray.resize(vertex_array.size() * 4); - PoolVector<real_t>::Write tarrayw = tarray.write(); + weights[l] = 0; + bones[l] = 0; + } + } - for (int k = 0; k < vlen; k++) { - tarrayw[k * 4 + 0] = vertex_array[k].tangent.normal.x; - tarrayw[k * 4 + 1] = vertex_array[k].tangent.normal.y; - tarrayw[k * 4 + 2] = vertex_array[k].tangent.normal.z; - tarrayw[k * 4 + 3] = vertex_array[k].tangent.d; + surftool->add_bones(bones); + surftool->add_weights(weights); } - tarrayw = PoolVector<real_t>::Write(); - - final_tangent_array = tarray; - } else if (final_normal_array.size() && primitive == Mesh::PRIMITIVE_TRIANGLES && final_uv_array.size() && (force_make_tangents || (material.is_valid()))) { - //if this uses triangles, there are uvs and the material is using a normalmap, generate tangents and binormals, because they WILL be needed - //generate binormals/tangents - _generate_tangents_and_binormals(index_array, final_vertex_array, final_uv_array, final_normal_array, final_tangent_array); - final_format |= Mesh::ARRAY_FORMAT_TANGENT; - if (OS::get_singleton()->is_stdout_verbose()) - print_line("Collada: Triangle mesh lacks tangents (And normalmap was used), so tangents were generated."); + surftool->add_vertex(vertex_array[k].vertex); } - if (color_src) { - PoolVector<Color> colorarray; - colorarray.resize(vertex_array.size()); - PoolVector<Color>::Write colorarrayw = colorarray.write(); - - for (int k = 0; k < vlen; k++) { - colorarrayw[k] = vertex_array[k].color; - } - - colorarrayw = PoolVector<Color>::Write(); - - final_color_array = colorarray; + for (List<int>::Element *E = indices_list.front(); E; E = E->next()) { + surftool->add_index(E->get()); } - if (has_weights) { - PoolVector<float> weightarray; - PoolVector<int> bonearray; - - weightarray.resize(vertex_array.size() * 4); - PoolVector<float>::Write weightarrayw = weightarray.write(); - bonearray.resize(vertex_array.size() * 4); - PoolVector<int>::Write bonearrayw = bonearray.write(); - - for (int k = 0; k < vlen; k++) { - float sum = 0; - - for (int l = 0; l < VS::ARRAY_WEIGHTS_SIZE; l++) { - if (l < vertex_array[k].weights.size()) { - weightarrayw[k * VS::ARRAY_WEIGHTS_SIZE + l] = vertex_array[k].weights[l].weight; - sum += weightarrayw[k * VS::ARRAY_WEIGHTS_SIZE + l]; - bonearrayw[k * VS::ARRAY_WEIGHTS_SIZE + l] = int(vertex_array[k].weights[l].bone_idx); - //COLLADA_PRINT(itos(k)+": "+rtos(bonearrayw[k*VS::ARRAY_WEIGHTS_SIZE+l])+":"+rtos(weightarray[k*VS::ARRAY_WEIGHTS_SIZE+l])); - } else { - - weightarrayw[k * VS::ARRAY_WEIGHTS_SIZE + l] = 0; - bonearrayw[k * VS::ARRAY_WEIGHTS_SIZE + l] = 0; - } - } - /* - if (sum<0.8) - COLLADA_PRINT("ERROR SUMMING INDEX "+itos(k)+" had weights: "+itos(vertex_array[k].weights.size())); - */ - } + if (!normal_src) { + //should always be normals + surftool->generate_normals(); + } - weightarrayw = PoolVector<float>::Write(); - bonearrayw = PoolVector<int>::Write(); + if ((!binormal_src || !tangent_src) && normal_src && uv_src && force_make_tangents) { - final_weight_array = weightarray; - final_bone_array = bonearray; + surftool->generate_tangents(); } //////////////////////////// // FINALLY CREATE SUFRACE // //////////////////////////// - Array d; + Array d = surftool->commit_to_arrays(); d.resize(VS::ARRAY_MAX); - d[Mesh::ARRAY_INDEX] = index_array; - d[Mesh::ARRAY_VERTEX] = final_vertex_array; - - if (final_normal_array.size()) - d[Mesh::ARRAY_NORMAL] = final_normal_array; - if (final_tangent_array.size()) - d[Mesh::ARRAY_TANGENT] = final_tangent_array; - if (final_uv_array.size()) - d[Mesh::ARRAY_TEX_UV] = final_uv_array; - if (final_uv2_array.size()) - d[Mesh::ARRAY_TEX_UV2] = final_uv2_array; - if (final_color_array.size()) - d[Mesh::ARRAY_COLOR] = final_color_array; - if (final_weight_array.size()) - d[Mesh::ARRAY_WEIGHTS] = final_weight_array; - if (final_bone_array.size()) - d[Mesh::ARRAY_BONES] = final_bone_array; - Array mr; //////////////////////////// @@ -1249,10 +1095,10 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me Array a = p_morph_meshes[mi]->surface_get_arrays(surface); //add valid weight and bone arrays if they exist, TODO check if they are unique to shape (generally not) - if (final_weight_array.size()) - a[Mesh::ARRAY_WEIGHTS] = final_weight_array; - if (final_bone_array.size()) - a[Mesh::ARRAY_BONES] = final_bone_array; + if (has_weights) { + a[Mesh::ARRAY_WEIGHTS] = d[Mesh::ARRAY_WEIGHTS]; + a[Mesh::ARRAY_BONES] = d[Mesh::ARRAY_BONES]; + } a[Mesh::ARRAY_INDEX] = Variant(); //a.resize(Mesh::ARRAY_MAX); //no need for index diff --git a/editor/import/editor_scene_importer_gltf.cpp b/editor/import/editor_scene_importer_gltf.cpp index 1c42bcef8a..2f03e72851 100644 --- a/editor/import/editor_scene_importer_gltf.cpp +++ b/editor/import/editor_scene_importer_gltf.cpp @@ -1216,7 +1216,7 @@ Error EditorSceneImporterGLTF::_parse_materials(GLTFState &state) { if (bct.has("index")) { Ref<Texture> t = _get_texture(state, bct["index"]); material->set_texture(SpatialMaterial::TEXTURE_METALLIC, t); - material->set_metallic_texture_channel(SpatialMaterial::TEXTURE_CHANNEL_RED); + material->set_metallic_texture_channel(SpatialMaterial::TEXTURE_CHANNEL_BLUE); material->set_texture(SpatialMaterial::TEXTURE_ROUGHNESS, t); material->set_roughness_texture_channel(SpatialMaterial::TEXTURE_CHANNEL_GREEN); if (!mr.has("metallicFactor")) { @@ -1243,6 +1243,7 @@ Error EditorSceneImporterGLTF::_parse_materials(GLTFState &state) { Dictionary bct = d["occlusionTexture"]; if (bct.has("index")) { material->set_texture(SpatialMaterial::TEXTURE_AMBIENT_OCCLUSION, _get_texture(state, bct["index"])); + material->set_ao_texture_channel(SpatialMaterial::TEXTURE_CHANNEL_RED); material->set_feature(SpatialMaterial::FEATURE_AMBIENT_OCCLUSION, true); } } diff --git a/editor/import/resource_importer_csv_translation.cpp b/editor/import/resource_importer_csv_translation.cpp index 58f0c7def0..4bbf5ba316 100644 --- a/editor/import/resource_importer_csv_translation.cpp +++ b/editor/import/resource_importer_csv_translation.cpp @@ -73,16 +73,25 @@ String ResourceImporterCSVTranslation::get_preset_name(int p_idx) const { void ResourceImporterCSVTranslation::get_import_options(List<ImportOption> *r_options, int p_preset) const { r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "compress"), true)); + r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "delimiter", PROPERTY_HINT_ENUM, "Comma,Semicolon,Tab"), 0)); } Error ResourceImporterCSVTranslation::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files) { bool compress = p_options["compress"]; + + String delimiter; + switch ((int)p_options["delimiter"]) { + case 0: delimiter = ","; break; + case 1: delimiter = ";"; break; + case 2: delimiter = "\t"; break; + } + FileAccessRef f = FileAccess::open(p_source_file, FileAccess::READ); ERR_FAIL_COND_V(!f, ERR_INVALID_PARAMETER); - Vector<String> line = f->get_csv_line(); + Vector<String> line = f->get_csv_line(delimiter); ERR_FAIL_COND_V(line.size() <= 1, ERR_PARSE_ERROR); Vector<String> locales; @@ -101,7 +110,7 @@ Error ResourceImporterCSVTranslation::import(const String &p_source_file, const translations.push_back(translation); } - line = f->get_csv_line(); + line = f->get_csv_line(delimiter); while (line.size() == locales.size() + 1) { @@ -113,7 +122,7 @@ Error ResourceImporterCSVTranslation::import(const String &p_source_file, const } } - line = f->get_csv_line(); + line = f->get_csv_line(delimiter); } for (int i = 0; i < translations.size(); i++) { diff --git a/editor/plugins/cube_grid_theme_editor_plugin.cpp b/editor/plugins/cube_grid_theme_editor_plugin.cpp index 36c0b44e38..08b38c2ca2 100644 --- a/editor/plugins/cube_grid_theme_editor_plugin.cpp +++ b/editor/plugins/cube_grid_theme_editor_plugin.cpp @@ -150,91 +150,17 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library, //generate previews! if (1) { - Vector<int> ids = p_library->get_item_list(); - RID vp = VS::get_singleton()->viewport_create(); - int size = EditorSettings::get_singleton()->get("editors/grid_map/preview_size"); - - RID scenario = VS::get_singleton()->scenario_create(); - - RID viewport = VS::get_singleton()->viewport_create(); - VS::get_singleton()->viewport_set_update_mode(viewport, VS::VIEWPORT_UPDATE_ALWAYS); - VS::get_singleton()->viewport_set_vflip(viewport, true); - VS::get_singleton()->viewport_set_scenario(viewport, scenario); - VS::get_singleton()->viewport_set_size(viewport, size, size); - VS::get_singleton()->viewport_set_transparent_background(viewport, true); - VS::get_singleton()->viewport_set_active(viewport, true); - RID viewport_texture = VS::get_singleton()->viewport_get_texture(viewport); - - RID camera = VS::get_singleton()->camera_create(); - VS::get_singleton()->viewport_attach_camera(viewport, camera); - VS::get_singleton()->camera_set_transform(camera, Transform(Basis(), Vector3(0, 0, 3))); - //VS::get_singleton()->camera_set_perspective(camera,45,0.1,10); - VS::get_singleton()->camera_set_orthogonal(camera, 1.0, 0.01, 1000.0); - - RID light = VS::get_singleton()->light_create(VS::LIGHT_DIRECTIONAL); - RID light_instance = VS::get_singleton()->instance_create2(light, scenario); - VS::get_singleton()->instance_set_transform(light_instance, Transform().looking_at(Vector3(-1, -1, -1), Vector3(0, 1, 0))); - - RID light2 = VS::get_singleton()->light_create(VS::LIGHT_DIRECTIONAL); - VS::get_singleton()->light_set_color(light2, Color(0.7, 0.7, 0.7)); - //VS::get_singleton()->light_set_color(light2, VS::LIGHT_COLOR_SPECULAR, Color(0.0, 0.0, 0.0)); - RID light_instance2 = VS::get_singleton()->instance_create2(light2, scenario); - - VS::get_singleton()->instance_set_transform(light_instance2, Transform().looking_at(Vector3(0, 1, 0), Vector3(0, 0, 1))); - - //sphere = VS::get_singleton()->mesh_create(); - RID mesh_instance = VS::get_singleton()->instance_create(); - VS::get_singleton()->instance_set_scenario(mesh_instance, scenario); - - EditorProgress ep("mlib", TTR("Creating Mesh Library"), ids.size()); + Vector<Ref<Mesh> > meshes; + Vector<int> ids = p_library->get_item_list(); for (int i = 0; i < ids.size(); i++) { - - int id = ids[i]; - Ref<Mesh> mesh = p_library->get_item_mesh(id); - if (!mesh.is_valid()) - continue; - Rect3 aabb = mesh->get_aabb(); - print_line("aabb: " + aabb); - Vector3 ofs = aabb.position + aabb.size * 0.5; - aabb.position -= ofs; - Transform xform; - xform.basis = Basis().rotated(Vector3(0, 1, 0), -Math_PI * 0.25); - xform.basis = Basis().rotated(Vector3(1, 0, 0), Math_PI * 0.25) * xform.basis; - Rect3 rot_aabb = xform.xform(aabb); - print_line("rot_aabb: " + rot_aabb); - float m = MAX(rot_aabb.size.x, rot_aabb.size.y) * 0.5; - if (m == 0) - continue; - m = 1.0 / m; - m *= 0.5; - print_line("scale: " + rtos(m)); - xform.basis.scale(Vector3(m, m, m)); - xform.origin = -xform.basis.xform(ofs); //-ofs*m; - xform.origin.z -= rot_aabb.size.z * 2; - RID inst = VS::get_singleton()->instance_create2(mesh->get_rid(), scenario); - VS::get_singleton()->instance_set_transform(inst, xform); - ep.step(TTR("Thumbnail.."), i); - Main::iteration(); - Main::iteration(); - Ref<Image> img = VS::get_singleton()->texture_get_data(viewport_texture); - ERR_CONTINUE(!img.is_valid() || img->empty()); - Ref<ImageTexture> it(memnew(ImageTexture)); - it->create_from_image(img); - p_library->set_item_preview(id, it); - - //print_line("loaded image, size: "+rtos(m)+" dist: "+rtos(dist)+" empty?"+itos(img.empty())+" w: "+itos(it->get_width())+" h: "+itos(it->get_height())); - VS::get_singleton()->free(inst); + meshes.push_back(p_library->get_item_mesh(ids[i])); } - VS::get_singleton()->free(mesh_instance); - VS::get_singleton()->free(viewport); - VS::get_singleton()->free(light); - VS::get_singleton()->free(light_instance); - VS::get_singleton()->free(light2); - VS::get_singleton()->free(light_instance2); - VS::get_singleton()->free(camera); - VS::get_singleton()->free(scenario); + Vector<Ref<Texture> > textures = EditorInterface::get_singleton()->make_mesh_previews(meshes, EditorSettings::get_singleton()->get("editors/grid_map/preview_size")); + for (int i = 0; i < ids.size(); i++) { + p_library->set_item_preview(ids[i], textures[i]); + } } } diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp index 88158d4b20..d04184f055 100644 --- a/editor/plugins/polygon_2d_editor_plugin.cpp +++ b/editor/plugins/polygon_2d_editor_plugin.cpp @@ -402,6 +402,11 @@ bool Polygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) { cpoint = canvas_item_editor->snap_point(cpoint); edited_point_pos = node->get_global_transform().affine_inverse().xform(cpoint); + Vector<Vector2> poly = Variant(node->get_polygon()); + ERR_FAIL_INDEX_V(edited_point, poly.size(), false); + poly[edited_point] = edited_point_pos - node->get_offset(); + node->set_polygon(Variant(poly)); + canvas_item_editor->get_viewport_control()->update(); } } @@ -425,6 +430,23 @@ void Polygon2DEditor::_canvas_draw() { Transform2D xform = canvas_item_editor->get_canvas_transform() * node->get_global_transform(); Ref<Texture> handle = get_icon("EditorHandle", "EditorIcons"); + if (edited_point >= 0 && EDITOR_DEF("editors/poly_editor/show_previous_outline", true)) { + + const Color col = node->get_color().contrasted(); + const int n = pre_move_edit.size(); + for (int i = 0; i < n; i++) { + + Vector2 p, p2; + p = pre_move_edit[i] + node->get_offset(); + p2 = pre_move_edit[(i + 1) % n] + node->get_offset(); + + Vector2 point = xform.xform(p); + Vector2 next_point = xform.xform(p2); + + vpc->draw_line(point, next_point, col, 2); + } + } + for (int i = 0; i < poly.size(); i++) { Vector2 p, p2; diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 316c76e4b2..fc11f561c7 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -965,7 +965,33 @@ void ScriptEditor::_menu_option(int p_option) { current->reload(p_option == FILE_TOOL_RELOAD_SOFT); } break; + case FILE_RUN: { + Ref<Script> scr = current->get_edited_script(); + if (scr.is_null()) { + EditorNode::get_singleton()->show_warning("Can't obtain the script for running"); + break; + } + if (!scr->is_tool()) { + + EditorNode::get_singleton()->show_warning("Script is not in tool mode, will not be able to run"); + return; + } + + if (!ClassDB::is_parent_class(scr->get_instance_base_type(), "EditorScript")) { + + EditorNode::get_singleton()->show_warning("To run this script, it must inherit EditorScript and be set to tool mode"); + return; + } + + Ref<EditorScript> es = memnew(EditorScript); + es->set_script(scr.get_ref_ptr()); + es->set_editor(EditorNode::get_singleton()); + + es->_run(); + + EditorNode::get_undo_redo()->clear_history(); + } break; case FILE_CLOSE: { if (current->is_unsaved()) { _ask_close_current_unsaved_tab(current); @@ -2134,8 +2160,8 @@ void ScriptEditor::_bind_methods() { ClassDB::bind_method(D_METHOD("get_current_script"), &ScriptEditor::_get_current_script); ClassDB::bind_method(D_METHOD("get_open_scripts"), &ScriptEditor::_get_open_scripts); - ADD_SIGNAL(MethodInfo("editor_script_changed", PropertyInfo(Variant::OBJECT, "script:Script"))); - ADD_SIGNAL(MethodInfo("script_close", PropertyInfo(Variant::OBJECT, "script:Script"))); + ADD_SIGNAL(MethodInfo("editor_script_changed", PropertyInfo(Variant::OBJECT, "script", PROPERTY_HINT_RESOURCE_TYPE, "Script"))); + ADD_SIGNAL(MethodInfo("script_close", PropertyInfo(Variant::OBJECT, "script", PROPERTY_HINT_RESOURCE_TYPE, "Script"))); } ScriptEditor::ScriptEditor(EditorNode *p_editor) { @@ -2220,6 +2246,8 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/close_file", TTR("Close"), KEY_MASK_CMD | KEY_W), FILE_CLOSE); file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/close_all", TTR("Close All")), CLOSE_ALL); file_menu->get_popup()->add_separator(); + file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/run_file", TTR("Run"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_X), FILE_RUN); + file_menu->get_popup()->add_separator(); file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/toggle_scripts_panel", TTR("Toggle Scripts Panel"), KEY_MASK_CMD | KEY_BACKSLASH), TOGGLE_SCRIPTS_PANEL); file_menu->get_popup()->connect("id_pressed", this, "_menu_option"); diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h index 17209de681..d2677c6a4a 100644 --- a/editor/plugins/script_editor_plugin.h +++ b/editor/plugins/script_editor_plugin.h @@ -131,6 +131,7 @@ class ScriptEditor : public PanelContainer { FILE_RELOAD_THEME, FILE_SAVE_THEME, FILE_SAVE_THEME_AS, + FILE_RUN, FILE_CLOSE, CLOSE_DOCS, CLOSE_ALL, diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index 069a0c4292..f36c3ca8b2 100644 --- a/editor/plugins/shader_editor_plugin.cpp +++ b/editor/plugins/shader_editor_plugin.cpp @@ -93,9 +93,9 @@ void ShaderTextEditor::_load_theme_settings() { if (shader.is_valid()) { - for (const Map<StringName, Map<StringName, ShaderLanguage::DataType> >::Element *E = ShaderTypes::get_singleton()->get_functions(VisualServer::ShaderMode(shader->get_mode())).front(); E; E = E->next()) { + for (const Map<StringName, ShaderLanguage::FunctionInfo>::Element *E = ShaderTypes::get_singleton()->get_functions(VisualServer::ShaderMode(shader->get_mode())).front(); E; E = E->next()) { - for (const Map<StringName, ShaderLanguage::DataType>::Element *F = E->get().front(); F; F = F->next()) { + for (const Map<StringName, ShaderLanguage::DataType>::Element *F = E->get().built_ins.front(); F; F = F->next()) { keywords.push_back(F->key()); } } diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 01dd7a0031..d8f01c6b60 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -1608,8 +1608,10 @@ Point2i SpatialEditorViewport::_get_warped_mouse_motion(const Ref<InputEventMous void SpatialEditorViewport::_update_freelook(real_t delta) { - if (!is_freelook_active()) + if (!is_freelook_active()) { + freelook_velocity = Vector3(); return; + } Vector3 forward = camera->get_transform().basis.xform(Vector3(0, 0, -1)); Vector3 right = camera->get_transform().basis.xform(Vector3(1, 0, 0)); @@ -1623,53 +1625,61 @@ void SpatialEditorViewport::_update_freelook(real_t delta) { int key_down = Object::cast_to<InputEventKey>(ED_GET_SHORTCUT("spatial_editor/freelook_down")->get_shortcut().ptr())->get_scancode(); int key_speed_modifier = Object::cast_to<InputEventKey>(ED_GET_SHORTCUT("spatial_editor/freelook_speed_modifier")->get_shortcut().ptr())->get_scancode(); - Vector3 velocity; + Vector3 direction; bool pressed = false; bool speed_modifier = false; const Input &input = *Input::get_singleton(); if (input.is_key_pressed(key_left)) { - velocity -= right; + direction -= right; pressed = true; } if (input.is_key_pressed(key_right)) { - velocity += right; + direction += right; pressed = true; } if (input.is_key_pressed(key_forward)) { - velocity += forward; + direction += forward; pressed = true; } if (input.is_key_pressed(key_backwards)) { - velocity -= forward; + direction -= forward; pressed = true; } if (input.is_key_pressed(key_up)) { - velocity += up; + direction += up; pressed = true; } if (input.is_key_pressed(key_down)) { - velocity -= up; + direction -= up; pressed = true; } if (input.is_key_pressed(key_speed_modifier)) { speed_modifier = true; } - if (pressed) { - const EditorSettings &s = *EditorSettings::get_singleton(); - const real_t base_speed = s.get("editors/3d/freelook_base_speed"); - const real_t modifier_speed_factor = s.get("editors/3d/freelook_modifier_speed_factor"); + const EditorSettings &s = *EditorSettings::get_singleton(); + real_t inertia = s.get("editors/3d/freelook_inertia"); + if (inertia < 0) + inertia = 0; - real_t speed = base_speed * cursor.distance; - if (speed_modifier) - speed *= modifier_speed_factor; + const real_t base_speed = s.get("editors/3d/freelook_base_speed"); + const real_t modifier_speed_factor = s.get("editors/3d/freelook_modifier_speed_factor"); - velocity.normalize(); + real_t speed = base_speed * cursor.distance; + if (speed_modifier) + speed *= modifier_speed_factor; - cursor.pos += velocity * (speed * delta); - } + Vector3 instant_velocity = direction * speed; + + // Higher inertia should increase "lag" (lerp with factor between 0 and 1) + // Inertia of zero should produce instant movement (lerp with factor of 1) + // Takes reference of 60fps for units, so that inertia of 1 gives approximate lerp factor of 0.5 + real_t factor = 1.0 / (1.0 + inertia * delta * 60.f); + freelook_velocity = freelook_velocity.linear_interpolate(instant_velocity, CLAMP(factor, 0, 1)); + + cursor.pos += freelook_velocity * delta; } void SpatialEditorViewport::set_message(String p_message, float p_time) { diff --git a/editor/plugins/spatial_editor_plugin.h b/editor/plugins/spatial_editor_plugin.h index a2bfd9ec4b..b024a8bd93 100644 --- a/editor/plugins/spatial_editor_plugin.h +++ b/editor/plugins/spatial_editor_plugin.h @@ -122,6 +122,7 @@ private: float gizmo_scale; bool freelook_active; + Vector3 freelook_velocity; PanelContainer *info; Label *info_label; diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index 58ac5bc561..94fce45733 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -866,6 +866,12 @@ void ProjectSettingsEditor::_save() { message->popup_centered(Size2(300, 100) * EDSCALE); } +void ProjectSettingsEditor::_settings_prop_edited(const String &p_name) { + + // Method needed to discard the mandatory argument of the property_edited signal + _settings_changed(); +} + void ProjectSettingsEditor::_settings_changed() { timer->start(); @@ -1334,6 +1340,7 @@ void ProjectSettingsEditor::_bind_methods() { ClassDB::bind_method(D_METHOD("_add_item"), &ProjectSettingsEditor::_add_item, DEFVAL(Variant())); ClassDB::bind_method(D_METHOD("_device_input_add"), &ProjectSettingsEditor::_device_input_add); ClassDB::bind_method(D_METHOD("_press_a_key_confirm"), &ProjectSettingsEditor::_press_a_key_confirm); + ClassDB::bind_method(D_METHOD("_settings_prop_edited"), &ProjectSettingsEditor::_settings_prop_edited); ClassDB::bind_method(D_METHOD("_copy_to_platform"), &ProjectSettingsEditor::_copy_to_platform); ClassDB::bind_method(D_METHOD("_update_translations"), &ProjectSettingsEditor::_update_translations); ClassDB::bind_method(D_METHOD("_translation_delete"), &ProjectSettingsEditor::_translation_delete); @@ -1448,7 +1455,7 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { globals_editor->register_search_box(search_box); globals_editor->get_property_editor()->get_scene_tree()->connect("cell_selected", this, "_item_selected"); globals_editor->get_property_editor()->connect("property_toggled", this, "_item_checked", varray(), CONNECT_DEFERRED); - globals_editor->get_property_editor()->connect("property_edited", this, "_settings_changed"); + globals_editor->get_property_editor()->connect("property_edited", this, "_settings_prop_edited"); Button *del = memnew(Button); hbc->add_child(del); diff --git a/editor/project_settings_editor.h b/editor/project_settings_editor.h index c8c5e3265b..e4e2345692 100644 --- a/editor/project_settings_editor.h +++ b/editor/project_settings_editor.h @@ -121,6 +121,7 @@ class ProjectSettingsEditor : public AcceptDialog { void _press_a_key_confirm(); void _show_last_added(const Ref<InputEvent> &p_event, const String &p_name); + void _settings_prop_edited(const String &p_name); void _settings_changed(); void _copy_to_platform(int p_which); diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index 34a3ab71db..a42fb41ee2 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -866,7 +866,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: if (!RES(v).is_null()) { menu->add_icon_item(get_icon("Edit", "EditorIcons"), "Edit", OBJ_MENU_EDIT); - menu->add_icon_item(get_icon("Del", "EditorIcons"), "Clear", OBJ_MENU_CLEAR); + menu->add_icon_item(get_icon("Clear", "EditorIcons"), "Clear", OBJ_MENU_CLEAR); menu->add_icon_item(get_icon("Duplicate", "EditorIcons"), "Make Unique", OBJ_MENU_MAKE_UNIQUE); RES r = v; if (r.is_valid() && r->get_path().is_resource_file()) { diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index b87387ec6c..34fdd2ee05 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -1755,8 +1755,8 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) { menu->add_separator(); } - menu->add_icon_shortcut(get_icon("Up", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/move_up"), TOOL_MOVE_UP); - menu->add_icon_shortcut(get_icon("Down", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/move_down"), TOOL_MOVE_DOWN); + menu->add_icon_shortcut(get_icon("MoveUp", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/move_up"), TOOL_MOVE_UP); + menu->add_icon_shortcut(get_icon("MoveDown", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/move_down"), TOOL_MOVE_DOWN); menu->add_icon_shortcut(get_icon("Duplicate", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/duplicate"), TOOL_DUPLICATE); menu->add_icon_shortcut(get_icon("Reparent", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/reparent"), TOOL_REPARENT); diff --git a/editor/spatial_editor_gizmos.cpp b/editor/spatial_editor_gizmos.cpp index fb5143b486..d86b255f38 100644 --- a/editor/spatial_editor_gizmos.cpp +++ b/editor/spatial_editor_gizmos.cpp @@ -36,6 +36,7 @@ #include "scene/resources/capsule_shape.h" #include "scene/resources/convex_polygon_shape.h" #include "scene/resources/plane_shape.h" +#include "scene/resources/primitive_meshes.h" #include "scene/resources/ray_shape.h" #include "scene/resources/sphere_shape.h" #include "scene/resources/surface_tool.h" @@ -130,9 +131,9 @@ void EditorSpatialGizmo::add_lines(const Vector<Vector3> &p_lines, const Ref<Mat PoolVector<Color>::Write w = color.write(); for (int i = 0; i < p_lines.size(); i++) { if (is_selected()) - w[i] = Color(1, 1, 1, 0.6); + w[i] = Color(1, 1, 1, 0.8); else - w[i] = Color(1, 1, 1, 0.25); + w[i] = Color(1, 1, 1, 0.2); } } @@ -175,10 +176,10 @@ void EditorSpatialGizmo::add_unscaled_billboard(const Ref<Material> &p_material, vs.push_back(Vector3(p_scale, -p_scale, 0)); vs.push_back(Vector3(-p_scale, -p_scale, 0)); - uv.push_back(Vector2(1, 0)); uv.push_back(Vector2(0, 0)); - uv.push_back(Vector2(0, 1)); + uv.push_back(Vector2(1, 0)); uv.push_back(Vector2(1, 1)); + uv.push_back(Vector2(0, 1)); Ref<ArrayMesh> mesh = memnew(ArrayMesh); Array a; @@ -296,6 +297,15 @@ void EditorSpatialGizmo::add_handles(const Vector<Vector3> &p_handles, bool p_bi } } +void EditorSpatialGizmo::add_solid_box(Ref<Material> &p_material, Vector3 size) { + CubeMesh cubem; + cubem.set_size(size); + Ref<ArrayMesh> m = memnew(ArrayMesh); + m->add_surface_from_arrays(cubem.surface_get_primitive_type(0), cubem.surface_get_arrays(0)); + m->surface_set_material(0, p_material); + add_mesh(m); +} + void EditorSpatialGizmo::set_spatial_node(Spatial *p_node) { ERR_FAIL_NULL(p_node); @@ -540,8 +550,9 @@ Ref<SpatialMaterial> EditorSpatialGizmo::create_material(const String &p_name, c if (!is_editable()) { color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/instanced"); - } else if (!is_selected()) { - color.a *= 0.5; + } + if (!is_selected()) { + color.a *= 0.3; } Ref<SpatialMaterial> line_material; @@ -587,7 +598,7 @@ Ref<SpatialMaterial> EditorSpatialGizmo::create_icon_material(const String &p_na if (!is_editable()) { color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/instanced"); } else if (!is_selected()) { - color.a *= 0.5; + color.a *= 0.3; } Ref<SpatialMaterial> icon; @@ -623,9 +634,13 @@ void EditorSpatialGizmo::_bind_methods() { BIND_VMETHOD(MethodInfo("redraw")); BIND_VMETHOD(MethodInfo(Variant::STRING, "get_handle_name", PropertyInfo(Variant::INT, "index"))); - BIND_VMETHOD(MethodInfo("get_handle_value:Variant", PropertyInfo(Variant::INT, "index"))); - BIND_VMETHOD(MethodInfo("set_handle", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::OBJECT, "camera:Camera"), PropertyInfo(Variant::VECTOR2, "point"))); - MethodInfo cm = MethodInfo("commit_handle", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::NIL, "restore:Variant"), PropertyInfo(Variant::BOOL, "cancel")); + + MethodInfo hvget(Variant::NIL, "get_handle_value", PropertyInfo(Variant::INT, "index")); + hvget.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT; + BIND_VMETHOD(hvget); + + BIND_VMETHOD(MethodInfo("set_handle", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::OBJECT, "camera", PROPERTY_HINT_RESOURCE_TYPE, "Camera"), PropertyInfo(Variant::VECTOR2, "point"))); + MethodInfo cm = MethodInfo("commit_handle", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::NIL, "restore"), PropertyInfo(Variant::BOOL, "cancel")); cm.default_arguments.push_back(false); BIND_VMETHOD(cm); } @@ -770,34 +785,32 @@ void LightSpatialGizmo::redraw() { Ref<Material> material = create_material("light_directional_material", gizmo_color); Ref<Material> icon = create_icon_material("light_directional_icon", SpatialEditor::get_singleton()->get_icon("GizmoDirectionalLight", "EditorIcons")); - const int arrow_points = 5; + const int arrow_points = 7; + const float arrow_length = 1.5; + Vector3 arrow[arrow_points] = { - Vector3(0, 0, 2), - Vector3(1, 1, 2), - Vector3(1, 1, -1), - Vector3(2, 2, -1), - Vector3(0, 0, -3) + Vector3(0, 0, -1), + Vector3(0, 0.8, 0), + Vector3(0, 0.3, 0), + Vector3(0, 0.3, arrow_length), + Vector3(0, -0.3, arrow_length), + Vector3(0, -0.3, 0), + Vector3(0, -0.8, 0) }; - int arrow_sides = 4; + int arrow_sides = 2; Vector<Vector3> lines; for (int i = 0; i < arrow_sides; i++) { + for (int j = 0; j < arrow_points; j++) { + Basis ma(Vector3(0, 0, 1), Math_PI * i / arrow_sides); - Basis ma(Vector3(0, 0, 1), Math_PI * 2 * float(i) / arrow_sides); - Basis mb(Vector3(0, 0, 1), Math_PI * 2 * float(i + 1) / arrow_sides); - - for (int j = 1; j < arrow_points - 1; j++) { + Vector3 v1 = arrow[j] - Vector3(0, 0, arrow_length); + Vector3 v2 = arrow[(j + 1) % arrow_points] - Vector3(0, 0, arrow_length); - if (j != 2) { - lines.push_back(ma.xform(arrow[j])); - lines.push_back(ma.xform(arrow[j + 1])); - } - if (j < arrow_points - 1) { - lines.push_back(ma.xform(arrow[j])); - lines.push_back(mb.xform(arrow[j])); - } + lines.push_back(ma.xform(v1)); + lines.push_back(ma.xform(v2)); } } @@ -846,7 +859,7 @@ void LightSpatialGizmo::redraw() { if (Object::cast_to<SpotLight>(light)) { Ref<Material> material = create_material("light_spot_material", gizmo_color, true); - Ref<Material> icon = create_icon_material("light_spot_icon", SpatialEditor::get_singleton()->get_icon("GizmoLight", "EditorIcons")); + Ref<Material> icon = create_icon_material("light_spot_icon", SpatialEditor::get_singleton()->get_icon("GizmoSpotLight", "EditorIcons")); clear(); @@ -1136,6 +1149,7 @@ void CameraSpatialGizmo::redraw() { Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/camera"); Ref<Material> material = create_material("camera_material", gizmo_color); + Ref<Material> icon = create_icon_material("camera_icon", SpatialEditor::get_singleton()->get_icon("GizmoCamera", "EditorIcons")); switch (camera->get_projection()) { @@ -1206,6 +1220,7 @@ void CameraSpatialGizmo::redraw() { add_lines(lines, material); add_collision_segments(lines); + add_unscaled_billboard(icon, 0.05); add_handles(handles); } @@ -2331,10 +2346,20 @@ void ParticlesGizmo::redraw() { Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/particles"); Ref<Material> material = create_material("particles_material", gizmo_color); + Ref<Material> icon = create_icon_material("particles_icon", SpatialEditor::get_singleton()->get_icon("GizmoParticles", "EditorIcons")); add_lines(lines, material); add_collision_segments(lines); + + if (is_selected()) { + + gizmo_color.a = 0.1; + Ref<Material> solid_material = create_material("particles_solid_material", gizmo_color); + add_solid_box(solid_material, aabb.get_size()); + } + //add_unscaled_billboard(SpatialEditorGizmos::singleton->visi,0.05); + add_unscaled_billboard(icon, 0.05); add_handles(handles); } ParticlesGizmo::ParticlesGizmo(Particles *p_particles) { @@ -2480,6 +2505,7 @@ void ReflectionProbeGizmo::redraw() { Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/reflection_probe"); Ref<Material> material = create_material("reflection_probe_material", gizmo_color); + Ref<Material> icon = create_icon_material("reflection_probe_icon", SpatialEditor::get_singleton()->get_icon("GizmoReflectionProbe", "EditorIcons")); Color gizmo_color_internal = gizmo_color; gizmo_color_internal.a = 0.5; @@ -2487,7 +2513,16 @@ void ReflectionProbeGizmo::redraw() { add_lines(lines, material); add_lines(internal_lines, material_internal); + + if (is_selected()) { + + gizmo_color.a = 0.1; + Ref<Material> solid_material = create_material("reflection_probe_solid_material", gizmo_color); + add_solid_box(solid_material, probe->get_extents() * 2.0); + } + //add_unscaled_billboard(SpatialEditorGizmos::singleton->visi,0.05); + add_unscaled_billboard(icon, 0.05); add_collision_segments(lines); add_handles(handles); } @@ -2561,6 +2596,7 @@ void GIProbeGizmo::redraw() { Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/gi_probe"); Ref<Material> material = create_material("gi_probe_material", gizmo_color); + Ref<Material> icon = create_icon_material("gi_probe_icon", SpatialEditor::get_singleton()->get_icon("GizmoGIProbe", "EditorIcons")); Color gizmo_color_internal = gizmo_color; gizmo_color_internal.a = 0.1; Ref<Material> material_internal = create_material("gi_probe_internal_material", gizmo_color_internal); @@ -2639,6 +2675,14 @@ void GIProbeGizmo::redraw() { handles.push_back(ax); } + if (is_selected()) { + + gizmo_color.a = 0.1; + Ref<Material> solid_material = create_material("gi_probe_solid_material", gizmo_color); + add_solid_box(solid_material, aabb.get_size()); + } + + add_unscaled_billboard(icon, 0.05); add_handles(handles); } GIProbeGizmo::GIProbeGizmo(GIProbe *p_probe) { diff --git a/editor/spatial_editor_gizmos.h b/editor/spatial_editor_gizmos.h index a7c7497763..d63a804055 100644 --- a/editor/spatial_editor_gizmos.h +++ b/editor/spatial_editor_gizmos.h @@ -102,6 +102,7 @@ protected: void add_collision_triangles(const Ref<TriangleMesh> &p_tmesh); void add_unscaled_billboard(const Ref<Material> &p_material, float p_scale = 1); void add_handles(const Vector<Vector3> &p_handles, bool p_billboard = false, bool p_secondary = false); + void add_solid_box(Ref<Material> &p_material, Vector3 size); void set_spatial_node(Spatial *p_node); diff --git a/main/SCsub b/main/SCsub index 1675a6e6ab..1f97cd1be0 100644 --- a/main/SCsub +++ b/main/SCsub @@ -1,6 +1,7 @@ #!/usr/bin/env python Import('env') +from compat import byte_to_str def make_splash(target, source, env): @@ -8,17 +9,17 @@ def make_splash(target, source, env): src = source[0].srcnode().abspath dst = target[0].srcnode().abspath f = open(src, "rb") - g = open(dst, "wb") + g = open(dst, "w") buf = f.read() g.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n") g.write("#ifndef BOOT_SPLASH_H\n") g.write("#define BOOT_SPLASH_H\n") - g.write("static const Color boot_splash_bg_color = Color(1,1,1,1);\n"); + g.write("static const Color boot_splash_bg_color = Color(1,1,1,1);\n") g.write("static const unsigned char boot_splash_png[] = {\n") for i in range(len(buf)): - g.write(str(ord(buf[i])) + ",\n") + g.write(byte_to_str(buf[i]) + ",\n") g.write("};\n") g.write("#endif") @@ -28,7 +29,7 @@ def make_app_icon(target, source, env): src = source[0].srcnode().abspath dst = target[0].srcnode().abspath f = open(src, "rb") - g = open(dst, "wb") + g = open(dst, "w") buf = f.read() @@ -37,7 +38,7 @@ def make_app_icon(target, source, env): g.write("#define APP_ICON_H\n") g.write("static const unsigned char app_icon_png[] = {\n") for i in range(len(buf)): - g.write(str(ord(buf[i])) + ",\n") + g.write(byte_to_str(buf[i]) + ",\n") g.write("};\n") g.write("#endif") diff --git a/main/main.cpp b/main/main.cpp index 00cb43b0a8..532b5277b5 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -69,7 +69,6 @@ #include "core/io/file_access_zip.h" #include "core/io/stream_peer_ssl.h" #include "core/io/stream_peer_tcp.h" -#include "core/os/thread.h" #include "main/input_default.h" #include "performance.h" #include "translation.h" @@ -886,7 +885,11 @@ error: return ERR_INVALID_PARAMETER; } -Error Main::setup2() { +Error Main::setup2(Thread::ID p_main_tid_override) { + + if (p_main_tid_override) { + Thread::_main_thread_id = p_main_tid_override; + } OS::get_singleton()->initialize(video_mode, video_driver_idx, audio_driver_idx); if (init_use_custom_pos) { diff --git a/main/main.h b/main/main.h index f8db0225bf..2c1d42a163 100644 --- a/main/main.h +++ b/main/main.h @@ -34,6 +34,7 @@ @author Juan Linietsky <reduzio@gmail.com> */ +#include "core/os/thread.h" #include "error_list.h" #include "typedefs.h" @@ -49,7 +50,7 @@ class Main { public: static Error setup(const char *execpath, int argc, char *argv[], bool p_second_phase = true); - static Error setup2(); + static Error setup2(Thread::ID p_main_tid_override = 0); static bool start(); static bool iteration(); static void cleanup(); diff --git a/main/tests/test_shader_lang.cpp b/main/tests/test_shader_lang.cpp index a0539f4bdf..ddb2ed5e75 100644 --- a/main/tests/test_shader_lang.cpp +++ b/main/tests/test_shader_lang.cpp @@ -316,8 +316,9 @@ MainLoop *test() { SL sl; print_line("tokens:\n\n" + sl.token_debug(code)); - Map<StringName, Map<StringName, SL::DataType> > dt; - dt["fragment"]["ALBEDO"] = SL::TYPE_VEC3; + Map<StringName, SL::FunctionInfo> dt; + dt["fragment"].built_ins["ALBEDO"] = SL::TYPE_VEC3; + dt["fragment"].can_discard = true; Set<String> rm; rm.insert("popo"); diff --git a/methods.py b/methods.py index 27a4fb57f1..25093ac530 100644 --- a/methods.py +++ b/methods.py @@ -1,4 +1,5 @@ import os +from compat import iteritems def add_source_files(self, sources, filetype, lib_env=None, shared=False): @@ -21,7 +22,7 @@ def add_source_files(self, sources, filetype, lib_env=None, shared=False): def build_shader_header(target, source, env): for x in source: - print x + print(x) name = str(x) name = name[name.rfind("/") + 1:] @@ -704,11 +705,11 @@ def include_file_in_legacygl_header(filename, header_data, depth): if (not included_file in header_data.vertex_included_files and header_data.reading == "vertex"): header_data.vertex_included_files += [included_file] if(include_file_in_legacygl_header(included_file, header_data, depth + 1) == None): - print "Error in file '" + filename + "': #include " + includeline + "could not be found!" + print("Error in file '" + filename + "': #include " + includeline + "could not be found!") elif (not included_file in header_data.fragment_included_files and header_data.reading == "fragment"): header_data.fragment_included_files += [included_file] if(include_file_in_legacygl_header(included_file, header_data, depth + 1) == None): - print "Error in file '" + filename + "': #include " + includeline + "could not be found!" + print("Error in file '" + filename + "': #include " + includeline + "could not be found!") line = fs.readline() @@ -1160,7 +1161,7 @@ def update_version(): print("Using custom revision: " + rev) import version - f = open("core/version_generated.gen.h", "wb") + f = open("core/version_generated.gen.h", "w") f.write("#define VERSION_SHORT_NAME " + str(version.short_name) + "\n") f.write("#define VERSION_NAME " + str(version.name) + "\n") f.write("#define VERSION_MAJOR " + str(version.major) + "\n") @@ -1173,14 +1174,14 @@ def update_version(): f.write("#define VERSION_YEAR " + str(datetime.datetime.now().year) + "\n") f.close() - fhash = open("core/version_hash.gen.h", "wb") + fhash = open("core/version_hash.gen.h", "w") githash = "" if os.path.isfile(".git/HEAD"): - head = open(".git/HEAD", "rb").readline().strip() + head = open(".git/HEAD", "r").readline().strip() if head.startswith("ref: "): head = ".git/" + head[5:] if os.path.isfile(head): - githash = open(head, "rb").readline().strip() + githash = open(head, "r").readline().strip() else: githash = head fhash.write("#define VERSION_HASH \"" + githash + "\"") @@ -1308,7 +1309,7 @@ void unregister_module_types() { """ - f = open("modules/register_module_types.gen.cpp", "wb") + f = open("modules/register_module_types.gen.cpp", "w") f.write(modules_cpp) return module_list @@ -1328,9 +1329,9 @@ def win32_spawn(sh, escape, cmd, args, env): data, err = proc.communicate() rv = proc.wait() if rv: - print "=====" - print err - print "=====" + print("=====") + print(err) + print("=====") return rv """ @@ -1404,17 +1405,17 @@ def android_add_default_config(self, config): def android_add_to_manifest(self, file): base_path = self.Dir(".").abspath + "/modules/" + self.current_module + "/" + file - f = open(base_path, "rb") + f = open(base_path, "r") self.android_manifest_chunk += f.read() def android_add_to_permissions(self, file): base_path = self.Dir(".").abspath + "/modules/" + self.current_module + "/" + file - f = open(base_path, "rb") + f = open(base_path, "r") self.android_permission_chunk += f.read() def android_add_to_attributes(self, file): base_path = self.Dir(".").abspath + "/modules/" + self.current_module + "/" + file - f = open(base_path, "rb") + f = open(base_path, "r") self.android_appattributes_chunk += f.read() def disable_module(self): @@ -1449,9 +1450,9 @@ def use_windows_spawn_fix(self, platform=None): data, err = proc.communicate() rv = proc.wait() if rv: - print "=====" - print err - print "=====" + print("=====") + print(err) + print("=====") return rv def mySpawn(sh, escape, cmd, args, env): @@ -1460,7 +1461,7 @@ def use_windows_spawn_fix(self, platform=None): cmdline = cmd + " " + newargs rv = 0 - env = {str(key): str(value) for key, value in env.iteritems()} + env = {str(key): str(value) for key, value in iteritems(env)} if len(cmdline) > 32000 and cmd.endswith("ar"): cmdline = cmd + " " + args[1] + " " + args[2] + " " for i in range(3, len(args)): @@ -1540,7 +1541,7 @@ def save_active_platforms(apnames, ap): str += "};\n" wf = x + "/" + name + ".gen.h" - pngw = open(wf, "wb") + pngw = open(wf, "w") pngw.write(str) @@ -1608,7 +1609,7 @@ def detect_visual_c_compiler_version(tools_env): # Start with Pre VS 2017 checks which uses VCINSTALLDIR: if 'VCINSTALLDIR' in tools_env: - # print "Checking VCINSTALLDIR" + # print("Checking VCINSTALLDIR") # find() works with -1 so big ifs bellow are needed... the simplest solution, in fact # First test if amd64 and amd64_x86 compilers are present in the path @@ -1641,7 +1642,7 @@ def detect_visual_c_compiler_version(tools_env): # and for VS 2017 and newer we check VCTOOLSINSTALLDIR: if 'VCTOOLSINSTALLDIR' in tools_env: - # print "Checking VCTOOLSINSTALLDIR" + # print("Checking VCTOOLSINSTALLDIR") # Newer versions have a different path available vc_amd64_compiler_detection_index = tools_env["PATH"].upper().find(tools_env['VCTOOLSINSTALLDIR'].upper() + "BIN\\HOSTX64\\X64;") @@ -1671,11 +1672,11 @@ def detect_visual_c_compiler_version(tools_env): vc_chosen_compiler_str = "x86_amd64" # debug help - # print vc_amd64_compiler_detection_index - # print vc_amd64_x86_compiler_detection_index - # print vc_x86_compiler_detection_index - # print vc_x86_amd64_compiler_detection_index - # print "chosen "+str(vc_chosen_compiler_index)+ " | "+str(vc_chosen_compiler_str) + # print(vc_amd64_compiler_detection_index) + # print(vc_amd64_x86_compiler_detection_index) + # print(vc_x86_compiler_detection_index) + # print(vc_x86_amd64_compiler_detection_index) + # print("chosen "+str(vc_chosen_compiler_index)+ " | "+str(vc_chosen_compiler_str)) return vc_chosen_compiler_str diff --git a/modules/freetype/SCsub b/modules/freetype/SCsub index 6a89e8e087..f22df4407c 100644 --- a/modules/freetype/SCsub +++ b/modules/freetype/SCsub @@ -1,6 +1,7 @@ #!/usr/bin/env python Import('env') +from compat import isbasestring # Not building in a separate env as scene needs it @@ -74,7 +75,7 @@ if (env['builtin_freetype'] != 'no'): # and then plain strings for system library. We insert between the two. inserted = False for idx, linklib in enumerate(env["LIBS"]): - if isinstance(linklib, basestring): # first system lib such as "X11", otherwise SCons lib object + if isbasestring(linklib): # first system lib such as "X11", otherwise SCons lib object env["LIBS"].insert(idx, lib) inserted = True break diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp index b0a18b4b4b..70e7da5748 100644 --- a/modules/gdscript/gd_editor.cpp +++ b/modules/gdscript/gd_editor.cpp @@ -297,23 +297,25 @@ void GDScriptLanguage::get_public_functions(List<MethodInfo> *p_functions) const //not really "functions", but.. { MethodInfo mi; - mi.name = "preload:Resource"; + mi.name = "preload"; mi.arguments.push_back(PropertyInfo(Variant::STRING, "path")); mi.return_val = PropertyInfo(Variant::OBJECT, "", PROPERTY_HINT_RESOURCE_TYPE, "Resource"); p_functions->push_back(mi); } { MethodInfo mi; - mi.name = "yield:GDFunctionState"; + mi.name = "yield"; mi.arguments.push_back(PropertyInfo(Variant::OBJECT, "object")); mi.arguments.push_back(PropertyInfo(Variant::STRING, "signal")); mi.default_arguments.push_back(Variant::NIL); mi.default_arguments.push_back(Variant::STRING); + mi.return_val = PropertyInfo(Variant::OBJECT, "", PROPERTY_HINT_RESOURCE_TYPE, "GDFunctionState"); p_functions->push_back(mi); } { MethodInfo mi; mi.name = "assert"; + mi.return_val.type = Variant::NIL; mi.arguments.push_back(PropertyInfo(Variant::BOOL, "condition")); p_functions->push_back(mi); } @@ -365,7 +367,7 @@ struct GDCompletionIdentifier { Variant value; //im case there is a value, also return it }; -static GDCompletionIdentifier _get_type_from_variant(const Variant &p_variant) { +static GDCompletionIdentifier _get_type_from_variant(const Variant &p_variant, bool p_allow_gdnative_class = false) { GDCompletionIdentifier t; t.type = p_variant.get_type(); @@ -373,14 +375,14 @@ static GDCompletionIdentifier _get_type_from_variant(const Variant &p_variant) { if (p_variant.get_type() == Variant::OBJECT) { Object *obj = p_variant; if (obj) { - /* - if (Object::cast_to<GDNativeClass>(obj)) { - t.obj_type=Object::cast_to<GDNativeClass>(obj)->get_name(); - t.value=Variant(); + + if (p_allow_gdnative_class && Object::cast_to<GDNativeClass>(obj)) { + t.obj_type = Object::cast_to<GDNativeClass>(obj)->get_name(); + t.value = Variant(); } else { - */ - t.obj_type = obj->get_class(); - //} + + t.obj_type = obj->get_class(); + } } } return t; @@ -513,9 +515,9 @@ static GDCompletionIdentifier _get_native_class(GDCompletionContext &context) { return id; } -static bool _guess_identifier_type(GDCompletionContext &context, int p_line, const StringName &p_identifier, GDCompletionIdentifier &r_type); +static bool _guess_identifier_type(GDCompletionContext &context, int p_line, const StringName &p_identifier, GDCompletionIdentifier &r_type, bool p_for_indexing); -static bool _guess_expression_type(GDCompletionContext &context, const GDParser::Node *p_node, int p_line, GDCompletionIdentifier &r_type) { +static bool _guess_expression_type(GDCompletionContext &context, const GDParser::Node *p_node, int p_line, GDCompletionIdentifier &r_type, bool p_for_indexing = false) { if (p_node->type == GDParser::Node::TYPE_CONSTANT) { @@ -566,7 +568,7 @@ static bool _guess_expression_type(GDCompletionContext &context, const GDParser: return true; } else if (p_node->type == GDParser::Node::TYPE_IDENTIFIER) { - return _guess_identifier_type(context, p_line - 1, static_cast<const GDParser::IdentifierNode *>(p_node)->name, r_type); + return _guess_identifier_type(context, p_line - 1, static_cast<const GDParser::IdentifierNode *>(p_node)->name, r_type, p_for_indexing); } else if (p_node->type == GDParser::Node::TYPE_SELF) { //eeh... @@ -577,6 +579,7 @@ static bool _guess_expression_type(GDCompletionContext &context, const GDParser: const GDParser::OperatorNode *op = static_cast<const GDParser::OperatorNode *>(p_node); if (op->op == GDParser::OperatorNode::OP_CALL) { + if (op->arguments[0]->type == GDParser::Node::TYPE_TYPE) { const GDParser::TypeNode *tn = static_cast<const GDParser::TypeNode *>(op->arguments[0]); @@ -589,21 +592,45 @@ static bool _guess_expression_type(GDCompletionContext &context, const GDParser: } else if (op->arguments.size() > 1 && op->arguments[1]->type == GDParser::Node::TYPE_IDENTIFIER) { + StringName id = static_cast<const GDParser::IdentifierNode *>(op->arguments[1])->name; + + if (op->arguments[0]->type == GDParser::Node::TYPE_IDENTIFIER && String(id) == "new") { + + //shortcut + StringName identifier = static_cast<const GDParser::IdentifierNode *>(op->arguments[0])->name; + + if (ClassDB::class_exists(identifier)) { + r_type.type = Variant::OBJECT; + r_type.value = Variant(); + r_type.obj_type = identifier; + return true; + } + } + GDCompletionIdentifier base; if (!_guess_expression_type(context, op->arguments[0], p_line, base)) return false; - StringName id = static_cast<const GDParser::IdentifierNode *>(op->arguments[1])->name; - if (base.type == Variant::OBJECT) { if (id.operator String() == "new" && base.value.get_type() == Variant::OBJECT) { + Object *obj = base.value; - if (GDNativeClass *gdnc = Object::cast_to<GDNativeClass>(obj)) { + if (obj && Object::cast_to<GDNativeClass>(obj)) { + GDNativeClass *gdnc = Object::cast_to<GDNativeClass>(obj); r_type.type = Variant::OBJECT; r_type.value = Variant(); r_type.obj_type = gdnc->get_name(); return true; + } else { + + if (base.obj_type != StringName()) { + + r_type.type = Variant::OBJECT; + r_type.value = Variant(); + r_type.obj_type = base.obj_type; + return true; + } } } @@ -812,23 +839,38 @@ static bool _guess_expression_type(GDCompletionContext &context, const GDParser: if (p1.value.get_type() == Variant::OBJECT) { //?? + if (p1.obj_type != StringName() && p2.type == Variant::STRING) { + + StringName base_type = p1.obj_type; + + if (p1.obj_type == "GDNativeClass") { + //native enum + Ref<GDNativeClass> gdn = p1.value; + if (gdn.is_valid()) { + + base_type = gdn->get_name(); + } + } StringName index = p2.value; bool valid; - Variant::Type t = ClassDB::get_property_type(p1.obj_type, index, &valid); + Variant::Type t = ClassDB::get_property_type(base_type, index, &valid); if (t != Variant::NIL && valid) { r_type.type = t; - if (t == Variant::INT) { + if (t == Variant::INT || t == Variant::OBJECT) { //check for enum! #if defined(DEBUG_METHODS_ENABLED) && defined(TOOLS_ENABLED) - StringName getter = ClassDB::get_property_getter(p1.obj_type, index); + StringName getter = ClassDB::get_property_getter(base_type, index); if (getter != StringName()) { - MethodBind *mb = ClassDB::get_method(p1.obj_type, getter); + MethodBind *mb = ClassDB::get_method(base_type, getter); if (mb) { PropertyInfo rt = mb->get_return_info(); - if (rt.usage & PROPERTY_USAGE_CLASS_IS_ENUM) { + if (rt.usage & PROPERTY_USAGE_CLASS_IS_ENUM && t == Variant::INT) { r_type.enumeration = rt.class_name; + } else if (t == Variant::OBJECT) { + + r_type.obj_type = rt.class_name; } } } @@ -1056,7 +1098,7 @@ static bool _guess_identifier_from_assignment_in_function(GDCompletionContext &c return false; } -static bool _guess_identifier_type(GDCompletionContext &context, int p_line, const StringName &p_identifier, GDCompletionIdentifier &r_type) { +static bool _guess_identifier_type(GDCompletionContext &context, int p_line, const StringName &p_identifier, GDCompletionIdentifier &r_type, bool p_for_indexing) { //go to block first @@ -1210,7 +1252,7 @@ static bool _guess_identifier_type(GDCompletionContext &context, int p_line, con for (Map<StringName, int>::Element *E = GDScriptLanguage::get_singleton()->get_global_map().front(); E; E = E->next()) { if (E->key() == p_identifier) { - r_type = _get_type_from_variant(GDScriptLanguage::get_singleton()->get_global_array()[E->get()]); + r_type = _get_type_from_variant(GDScriptLanguage::get_singleton()->get_global_array()[E->get()], !p_for_indexing); return true; } } @@ -1861,11 +1903,11 @@ static void _find_call_arguments(GDCompletionContext &context, const GDParser::N arghint += ", "; else arghint += " "; - if (i == p_argidx) { + if (i == p_argidx || (mi.flags & METHOD_FLAG_VARARG && i > p_argidx)) { arghint += String::chr(0xFFFF); } arghint += _get_visual_datatype(mi.arguments[i]) + " " + mi.arguments[i].name; - if (i == p_argidx) { + if (i == p_argidx || (mi.flags & METHOD_FLAG_VARARG && i > p_argidx)) { arghint += String::chr(0xFFFF); } } @@ -2082,7 +2124,7 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_base break; GDCompletionIdentifier t; - if (_guess_expression_type(context, static_cast<const GDParser::OperatorNode *>(node)->arguments[0], p.get_completion_line(), t)) { + if (_guess_expression_type(context, static_cast<const GDParser::OperatorNode *>(node)->arguments[0], p.get_completion_line(), t, true)) { if (t.type == Variant::OBJECT && t.obj_type == "GDNativeClass") { //native enum diff --git a/modules/gdscript/gd_functions.cpp b/modules/gdscript/gd_functions.cpp index 3bd0ce3fab..f0cfdd6258 100644 --- a/modules/gdscript/gd_functions.cpp +++ b/modules/gdscript/gd_functions.cpp @@ -1572,43 +1572,49 @@ MethodInfo GDFunctions::get_info(Function p_func) { } break; case TEXT_STR: { - MethodInfo mi("str", PropertyInfo(Variant::NIL, "what"), PropertyInfo(Variant::NIL, "...")); + MethodInfo mi("str"); mi.return_val.type = Variant::STRING; + mi.flags |= METHOD_FLAG_VARARG; return mi; } break; case TEXT_PRINT: { - MethodInfo mi("print", PropertyInfo(Variant::NIL, "what"), PropertyInfo(Variant::NIL, "...")); + MethodInfo mi("print"); mi.return_val.type = Variant::NIL; + mi.flags |= METHOD_FLAG_VARARG; return mi; } break; case TEXT_PRINT_TABBED: { - MethodInfo mi("printt", PropertyInfo(Variant::NIL, "what"), PropertyInfo(Variant::NIL, "...")); + MethodInfo mi("printt"); mi.return_val.type = Variant::NIL; + mi.flags |= METHOD_FLAG_VARARG; return mi; } break; case TEXT_PRINT_SPACED: { - MethodInfo mi("prints", PropertyInfo(Variant::NIL, "what"), PropertyInfo(Variant::NIL, "...")); + MethodInfo mi("prints"); mi.return_val.type = Variant::NIL; + mi.flags |= METHOD_FLAG_VARARG; return mi; } break; case TEXT_PRINTERR: { - MethodInfo mi("printerr", PropertyInfo(Variant::NIL, "what"), PropertyInfo(Variant::NIL, "...")); + MethodInfo mi("printerr"); mi.return_val.type = Variant::NIL; + mi.flags |= METHOD_FLAG_VARARG; return mi; } break; case TEXT_PRINTRAW: { - MethodInfo mi("printraw", PropertyInfo(Variant::NIL, "what"), PropertyInfo(Variant::NIL, "...")); + MethodInfo mi("printraw"); mi.return_val.type = Variant::NIL; + mi.flags |= METHOD_FLAG_VARARG; return mi; } break; @@ -1620,8 +1626,9 @@ MethodInfo GDFunctions::get_info(Function p_func) { } break; case STR_TO_VAR: { - MethodInfo mi("str2var:Variant", PropertyInfo(Variant::STRING, "string")); + MethodInfo mi(Variant::NIL, "str2var", PropertyInfo(Variant::STRING, "string")); mi.return_val.type = Variant::NIL; + mi.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT; return mi; } break; case VAR_TO_BYTES: { @@ -1632,14 +1639,16 @@ MethodInfo GDFunctions::get_info(Function p_func) { } break; case BYTES_TO_VAR: { - MethodInfo mi("bytes2var:Variant", PropertyInfo(Variant::POOL_BYTE_ARRAY, "bytes")); + MethodInfo mi(Variant::NIL, "bytes2var", PropertyInfo(Variant::POOL_BYTE_ARRAY, "bytes")); mi.return_val.type = Variant::NIL; + mi.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT; return mi; } break; case GEN_RANGE: { - MethodInfo mi("range", PropertyInfo(Variant::NIL, "...")); + MethodInfo mi("range"); mi.return_val.type = Variant::ARRAY; + mi.flags |= METHOD_FLAG_VARARG; return mi; } break; case RESOURCE_LOAD: { @@ -1663,14 +1672,15 @@ MethodInfo GDFunctions::get_info(Function p_func) { } break; case VALIDATE_JSON: { - MethodInfo mi("validate_json:Variant", PropertyInfo(Variant::STRING, "json")); + MethodInfo mi("validate_json", PropertyInfo(Variant::STRING, "json")); mi.return_val.type = Variant::STRING; return mi; } break; case PARSE_JSON: { - MethodInfo mi("parse_json:Variant", PropertyInfo(Variant::STRING, "json")); + MethodInfo mi(Variant::NIL, "parse_json", PropertyInfo(Variant::STRING, "json")); mi.return_val.type = Variant::NIL; + mi.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT; return mi; } break; case TO_JSON: { diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp index 0de2cf80ea..1b932f040e 100644 --- a/modules/gridmap/grid_map.cpp +++ b/modules/gridmap/grid_map.cpp @@ -155,7 +155,7 @@ void GridMap::_get_property_list(List<PropertyInfo> *p_list) const { p_list->push_back(PropertyInfo(Variant::OBJECT, "theme", PROPERTY_HINT_RESOURCE_TYPE, "MeshLibrary")); p_list->push_back(PropertyInfo(Variant::NIL, "Cell", PROPERTY_HINT_NONE, "cell_", PROPERTY_USAGE_GROUP)); - p_list->push_back(PropertyInfo(Variant::REAL, "cell_size", PROPERTY_HINT_RANGE, "0.01,16384,0.01")); + p_list->push_back(PropertyInfo(Variant::VECTOR3, "cell_size")); p_list->push_back(PropertyInfo(Variant::INT, "cell_octant_size", PROPERTY_HINT_RANGE, "1,1024,1")); p_list->push_back(PropertyInfo(Variant::BOOL, "cell_center_x")); p_list->push_back(PropertyInfo(Variant::BOOL, "cell_center_y")); @@ -184,6 +184,7 @@ Ref<MeshLibrary> GridMap::get_theme() const { void GridMap::set_cell_size(const Vector3 &p_size) { + ERR_FAIL_COND(p_size.x < 0.001 || p_size.y < 0.001 || p_size.z < 0.001); cell_size = p_size; _recreate_octant_data(); } diff --git a/modules/svg/SCsub b/modules/svg/SCsub index 062c26cf10..5be9367808 100644 --- a/modules/svg/SCsub +++ b/modules/svg/SCsub @@ -1,6 +1,7 @@ #!/usr/bin/env python Import('env') +from compat import isbasestring # Thirdparty source files thirdparty_dir = "#thirdparty/nanosvg/" @@ -18,7 +19,7 @@ lib = env.Library("svg_builtin", thirdparty_sources) # and then plain strings for system library. We insert between the two. inserted = False for idx, linklib in enumerate(env["LIBS"]): - if isinstance(linklib, basestring): # first system lib such as "X11", otherwise SCons lib object + if isbasestring(linklib): # first system lib such as "X11", otherwise SCons lib object env["LIBS"].insert(idx, lib) inserted = True break diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp index af7b334e46..1decc004ab 100644 --- a/modules/visual_script/visual_script_nodes.cpp +++ b/modules/visual_script/visual_script_nodes.cpp @@ -2702,7 +2702,10 @@ void VisualScriptCustomNode::_bind_methods() { BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_category")); BIND_VMETHOD(MethodInfo(Variant::INT, "_get_working_memory_size")); - BIND_VMETHOD(MethodInfo(Variant::NIL, "_step:Variant", PropertyInfo(Variant::ARRAY, "inputs"), PropertyInfo(Variant::ARRAY, "outputs"), PropertyInfo(Variant::INT, "start_mode"), PropertyInfo(Variant::ARRAY, "working_mem"))); + + MethodInfo stepmi(Variant::NIL, "_step", PropertyInfo(Variant::ARRAY, "inputs"), PropertyInfo(Variant::ARRAY, "outputs"), PropertyInfo(Variant::INT, "start_mode"), PropertyInfo(Variant::ARRAY, "working_mem")); + stepmi.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT; + BIND_VMETHOD(stepmi); ClassDB::bind_method(D_METHOD("_script_changed"), &VisualScriptCustomNode::_script_changed); @@ -2839,7 +2842,9 @@ VisualScriptNodeInstance *VisualScriptSubCall::instance(VisualScriptInstance *p_ void VisualScriptSubCall::_bind_methods() { - BIND_VMETHOD(MethodInfo(Variant::NIL, "_subcall:Variant", PropertyInfo(Variant::NIL, "arguments:Variant"))); + MethodInfo scmi(Variant::NIL, "_subcall", PropertyInfo(Variant::NIL, "arguments")); + scmi.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT; + BIND_VMETHOD(scmi); } VisualScriptSubCall::VisualScriptSubCall() { diff --git a/platform/android/SCsub b/platform/android/SCsub index b124a1a5a8..87e7ee4747 100644 --- a/platform/android/SCsub +++ b/platform/android/SCsub @@ -1,6 +1,7 @@ #!/usr/bin/env python import shutil +from compat import open_utf8 Import('env') @@ -40,8 +41,8 @@ prog = None abspath = env.Dir(".").abspath -gradle_basein = open(abspath + "/build.gradle.template", "rb") -gradle_baseout = open(abspath + "/java/build.gradle", "wb") +gradle_basein = open_utf8(abspath + "/build.gradle.template", "r") +gradle_baseout = open_utf8(abspath + "/java/build.gradle", "w") gradle_text = gradle_basein.read() @@ -124,8 +125,8 @@ gradle_baseout.write(gradle_text) gradle_baseout.close() -pp_basein = open(abspath + "/AndroidManifest.xml.template", "rb") -pp_baseout = open(abspath + "/java/AndroidManifest.xml", "wb") +pp_basein = open_utf8(abspath + "/AndroidManifest.xml.template", "r") +pp_baseout = open_utf8(abspath + "/java/AndroidManifest.xml", "w") manifest = pp_basein.read() manifest = manifest.replace("$$ADD_APPLICATION_CHUNKS$$", env.android_manifest_chunk) manifest = manifest.replace("$$ADD_PERMISSION_CHUNKS$$", env.android_permission_chunk) @@ -146,7 +147,7 @@ elif env['android_arch'] == 'arm64v8': elif env['android_arch'] == 'x86': lib_arch_dir = 'x86' else: - print 'WARN: Architecture not suitable for embedding into APK; keeping .so at \\bin' + print('WARN: Architecture not suitable for embedding into APK; keeping .so at \\bin') if lib_arch_dir != '': if env['target'] == 'release': diff --git a/platform/android/detect.py b/platform/android/detect.py index ad5bfb4949..65442bf6f8 100644 --- a/platform/android/detect.py +++ b/platform/android/detect.py @@ -14,7 +14,7 @@ def get_name(): def can_build(): - return (os.environ.has_key("ANDROID_NDK_ROOT")) + return ("ANDROID_NDK_ROOT" in os.environ) def get_opts(): @@ -55,7 +55,7 @@ def configure(env): import subprocess def mySubProcess(cmdline, env): - # print "SPAWNED : " + cmdline + # print("SPAWNED : " + cmdline) startupinfo = subprocess.STARTUPINFO() startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW proc = subprocess.Popen(cmdline, stdin=subprocess.PIPE, stdout=subprocess.PIPE, @@ -63,9 +63,9 @@ def configure(env): data, err = proc.communicate() rv = proc.wait() if rv: - print "=====" - print err - print "=====" + print("=====") + print(err) + print("=====") return rv def mySpawn(sh, escape, cmd, args, env): @@ -183,8 +183,8 @@ def configure(env): ## Compile flags env.Append(CPPFLAGS=["-isystem", sysroot + "/usr/include"]) - env.Append(CPPFLAGS=string.split('-fpic -ffunction-sections -funwind-tables -fstack-protector-strong -fvisibility=hidden -fno-strict-aliasing')) - env.Append(CPPFLAGS=string.split('-DNO_STATVFS -DGLES2_ENABLED')) + env.Append(CPPFLAGS='-fpic -ffunction-sections -funwind-tables -fstack-protector-strong -fvisibility=hidden -fno-strict-aliasing'.split()) + env.Append(CPPFLAGS='-DNO_STATVFS -DGLES2_ENABLED'.split()) env['neon_enabled'] = False if env['android_arch'] == 'x86': @@ -194,11 +194,11 @@ def configure(env): elif env["android_arch"] == "armv6": target_opts = ['-target', 'armv6-none-linux-androideabi'] - env.Append(CPPFLAGS=string.split('-D__ARM_ARCH_6__ -march=armv6 -mfpu=vfp -mfloat-abi=softfp')) + env.Append(CPPFLAGS='-D__ARM_ARCH_6__ -march=armv6 -mfpu=vfp -mfloat-abi=softfp'.split()) elif env["android_arch"] == "armv7": target_opts = ['-target', 'armv7-none-linux-androideabi'] - env.Append(CPPFLAGS=string.split('-D__ARM_ARCH_7__ -D__ARM_ARCH_7A__ -march=armv7-a -mfloat-abi=softfp')) + env.Append(CPPFLAGS='-D__ARM_ARCH_7__ -D__ARM_ARCH_7A__ -march=armv7-a -mfloat-abi=softfp'.split()) if env['android_neon'] == 'yes': env['neon_enabled'] = True env.Append(CPPFLAGS=['-mfpu=neon', '-D__ARM_NEON__']) @@ -225,9 +225,9 @@ def configure(env): env['LINKFLAGS'] = ['-shared', '--sysroot=' + sysroot, '-Wl,--warn-shared-textrel'] if env["android_arch"] == "armv7": - env.Append(LINKFLAGS=string.split('-Wl,--fix-cortex-a8')) - env.Append(LINKFLAGS=string.split('-Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now')) - env.Append(LINKFLAGS=string.split('-Wl,-soname,libgodot_android.so -Wl,--gc-sections')) + env.Append(LINKFLAGS='-Wl,--fix-cortex-a8'.split()) + env.Append(LINKFLAGS='-Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now'.split()) + env.Append(LINKFLAGS='-Wl,-soname,libgodot_android.so -Wl,--gc-sections'.split()) if mt_link: env.Append(LINKFLAGS=['-Wl,--threads']) env.Append(LINKFLAGS=target_opts) diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index eff3a7178d..8b3a64bbe6 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -1073,11 +1073,7 @@ public: //export_temp ep.step("Exporting APK", 0); - bool use_adb_over_usb = bool(EDITOR_DEF("export/android/use_remote_debug_over_adb", true)); - - if (use_adb_over_usb) { - p_debug_flags |= DEBUG_FLAG_REMOTE_DEBUG_LOCALHOST; - } + p_debug_flags |= DEBUG_FLAG_REMOTE_DEBUG_LOCALHOST; String export_to = EditorSettings::get_singleton()->get_settings_path() + "/tmp/tmpexport.apk"; Error err = export_project(p_preset, true, export_to, p_debug_flags); @@ -1123,7 +1119,7 @@ public: return ERR_CANT_CREATE; } - if (use_adb_over_usb) { + if (p_debug_flags & DEBUG_FLAG_REMOTE_DEBUG) { args.clear(); args.push_back("-s"); @@ -1142,6 +1138,9 @@ public: OS::get_singleton()->execute(adb, args, true, NULL, NULL, &rv); print_line("Reverse result: " + itos(rv)); + } + + if (p_debug_flags & DEBUG_FLAG_DUMB_CLIENT) { int fs_port = EditorSettings::get_singleton()->get("filesystem/file_server/port"); @@ -1294,7 +1293,7 @@ public: bool export_arm = p_preset->get("architecture/arm"); bool export_arm64 = p_preset->get("architecture/arm64"); - bool use_32_fb = p_preset->get("screen/use_32_bits_view"); + bool use_32_fb = p_preset->get("graphics/32_bits_framebuffer"); bool immersive = p_preset->get("screen/immersive_mode"); bool _signed = p_preset->get("package/signed"); @@ -1724,7 +1723,6 @@ void register_android_exporter() { EDITOR_DEF("export/android/force_system_user", false); EDITOR_DEF("export/android/timestamping_authority_url", ""); - EDITOR_DEF("export/android/use_remote_debug_over_adb", false); EDITOR_DEF("export/android/shutdown_adb_on_exit", true); Ref<EditorExportAndroid> exporter = Ref<EditorExportAndroid>(memnew(EditorExportAndroid)); diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp index 9abaae0a75..06abe9d751 100644 --- a/platform/android/java_glue.cpp +++ b/platform/android/java_glue.cpp @@ -1002,7 +1002,9 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env, job ProjectSettings::get_singleton()->add_singleton(ProjectSettings::Singleton("JavaClassWrapper", java_class_wrapper)); _initialize_java_modules(); - Main::setup2(); + // Since Godot is initialized on the UI thread, _main_thread_id was set to that thread's id, + // but for Godot purposes, the main thread is the one running the game loop + Main::setup2(Thread::get_caller_id()); ++step; suspend_mutex->unlock(); input_mutex->unlock(); diff --git a/platform/android/thread_jandroid.cpp b/platform/android/thread_jandroid.cpp index 9e2e5452ca..79488197ea 100644 --- a/platform/android/thread_jandroid.cpp +++ b/platform/android/thread_jandroid.cpp @@ -29,9 +29,19 @@ /*************************************************************************/ #include "thread_jandroid.h" +#include "core/safe_refcount.h" #include "os/memory.h" #include "script_language.h" +static pthread_key_t _create_thread_id_key() { + pthread_key_t key; + pthread_key_create(&key, NULL); + return key; +} + +pthread_key_t ThreadAndroid::thread_id_key = _create_thread_id_key(); +Thread::ID ThreadAndroid::next_thread_id = 0; + Thread::ID ThreadAndroid::get_id() const { return id; @@ -47,7 +57,8 @@ void *ThreadAndroid::thread_callback(void *userdata) { ThreadAndroid *t = reinterpret_cast<ThreadAndroid *>(userdata); setup_thread(); ScriptServer::thread_enter(); //scripts may need to attach a stack - t->id = (ID)pthread_self(); + t->id = atomic_increment(&next_thread_id); + pthread_setspecific(thread_id_key, (void *)t->id); t->callback(t->user); ScriptServer::thread_exit(); return NULL; @@ -68,7 +79,7 @@ Thread *ThreadAndroid::create_func_jandroid(ThreadCreateCallback p_callback, voi Thread::ID ThreadAndroid::get_thread_id_func_jandroid() { - return (ID)pthread_self(); + return (ID)pthread_getspecific(thread_id_key); } void ThreadAndroid::wait_to_finish_func_jandroid(Thread *p_thread) { diff --git a/platform/android/thread_jandroid.h b/platform/android/thread_jandroid.h index bacc1ce435..b854a83e23 100644 --- a/platform/android/thread_jandroid.h +++ b/platform/android/thread_jandroid.h @@ -41,6 +41,9 @@ class ThreadAndroid : public Thread { + static pthread_key_t thread_id_key; + static ID next_thread_id; + pthread_t pthread; pthread_attr_t pthread_attr; ThreadCreateCallback callback; diff --git a/platform/iphone/detect.py b/platform/iphone/detect.py index 1d802ff288..0b81422fa3 100644 --- a/platform/iphone/detect.py +++ b/platform/iphone/detect.py @@ -13,7 +13,7 @@ def get_name(): def can_build(): - if sys.platform == 'darwin' or os.environ.has_key("OSXCROSS_IOS"): + if sys.platform == 'darwin' or ("OSXCROSS_IOS" in os.environ): return True return False @@ -83,11 +83,11 @@ def configure(env): if (env["arch"] == "x86"): env['IPHONEPLATFORM'] = 'iPhoneSimulator' env['ENV']['MACOSX_DEPLOYMENT_TARGET'] = '10.6' - env.Append(CCFLAGS=string.split('-arch i386 -fobjc-abi-version=2 -fobjc-legacy-dispatch -fmessage-length=0 -fpascal-strings -fblocks -fasm-blocks -D__IPHONE_OS_VERSION_MIN_REQUIRED=40100 -isysroot $IPHONESDK -mios-simulator-version-min=4.3 -DCUSTOM_MATRIX_TRANSFORM_H=\\\"build/iphone/matrix4_iphone.h\\\" -DCUSTOM_VECTOR3_TRANSFORM_H=\\\"build/iphone/vector3_iphone.h\\\"')) + env.Append(CCFLAGS='-arch i386 -fobjc-abi-version=2 -fobjc-legacy-dispatch -fmessage-length=0 -fpascal-strings -fblocks -fasm-blocks -D__IPHONE_OS_VERSION_MIN_REQUIRED=40100 -isysroot $IPHONESDK -mios-simulator-version-min=4.3 -DCUSTOM_MATRIX_TRANSFORM_H=\\\"build/iphone/matrix4_iphone.h\\\" -DCUSTOM_VECTOR3_TRANSFORM_H=\\\"build/iphone/vector3_iphone.h\\\"'.split()) elif (env["arch"] == "arm"): - env.Append(CCFLAGS=string.split('-fno-objc-arc -arch armv7 -fmessage-length=0 -fno-strict-aliasing -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -fpascal-strings -fblocks -isysroot $IPHONESDK -fvisibility=hidden -mthumb "-DIBOutlet=__attribute__((iboutlet))" "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))" "-DIBAction=void)__attribute__((ibaction)" -miphoneos-version-min=9.0 -MMD -MT dependencies')) + env.Append(CCFLAGS='-fno-objc-arc -arch armv7 -fmessage-length=0 -fno-strict-aliasing -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -fpascal-strings -fblocks -isysroot $IPHONESDK -fvisibility=hidden -mthumb "-DIBOutlet=__attribute__((iboutlet))" "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))" "-DIBAction=void)__attribute__((ibaction)" -miphoneos-version-min=9.0 -MMD -MT dependencies'.split()) elif (env["arch"] == "arm64"): - env.Append(CCFLAGS=string.split('-fno-objc-arc -arch arm64 -fmessage-length=0 -fno-strict-aliasing -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -fpascal-strings -fblocks -fvisibility=hidden -MMD -MT dependencies -miphoneos-version-min=9.0 -isysroot $IPHONESDK')) + env.Append(CCFLAGS='-fno-objc-arc -arch arm64 -fmessage-length=0 -fno-strict-aliasing -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -fpascal-strings -fblocks -fvisibility=hidden -MMD -MT dependencies -miphoneos-version-min=9.0 -isysroot $IPHONESDK'.split()) env.Append(CPPFLAGS=['-DNEED_LONG_INT']) env.Append(CPPFLAGS=['-DLIBYUV_DISABLE_NEON']) diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index 68c8d1eea5..5f066f1b15 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -13,7 +13,7 @@ def get_name(): def can_build(): - return (os.environ.has_key("EMSCRIPTEN_ROOT")) + return ("EMSCRIPTEN_ROOT" in os.environ) def get_opts(): diff --git a/platform/osx/detect.py b/platform/osx/detect.py index 661da6e7c1..d3ebdfe992 100644 --- a/platform/osx/detect.py +++ b/platform/osx/detect.py @@ -12,7 +12,7 @@ def get_name(): def can_build(): - if (sys.platform == "darwin" or os.environ.has_key("OSXCROSS_ROOT")): + if (sys.platform == "darwin" or ("OSXCROSS_ROOT" in os.environ)): return True return False diff --git a/platform/uwp/detect.py b/platform/uwp/detect.py index 64dac93f1f..23929dd804 100644 --- a/platform/uwp/detect.py +++ b/platform/uwp/detect.py @@ -145,8 +145,8 @@ def configure(env): env.Append(CPPFLAGS=['/AI', vc_base_path + 'lib/store/references']) env.Append(CPPFLAGS=['/AI', vc_base_path + 'lib/x86/store/references']) - env.Append(CCFLAGS=string.split('/FS /MP /GS /wd"4453" /wd"28204" /wd"4291" /Zc:wchar_t /Gm- /fp:precise /D "_UNICODE" /D "UNICODE" /D "WINAPI_FAMILY=WINAPI_FAMILY_APP" /errorReport:prompt /WX- /Zc:forScope /Gd /EHsc /nologo')) - env.Append(CXXFLAGS=string.split('/ZW /FS')) + env.Append(CCFLAGS='/FS /MP /GS /wd"4453" /wd"28204" /wd"4291" /Zc:wchar_t /Gm- /fp:precise /D "_UNICODE" /D "UNICODE" /D "WINAPI_FAMILY=WINAPI_FAMILY_APP" /errorReport:prompt /WX- /Zc:forScope /Gd /EHsc /nologo'.split()) + env.Append(CXXFLAGS='/ZW /FS'.split()) env.Append(CCFLAGS=['/AI', vc_base_path + '\\vcpackages', '/AI', os.environ['WINDOWSSDKDIR'] + '\\References\\CommonConfiguration\\Neutral']) ## Link flags diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 882e1a808e..d239ccf7d2 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -171,6 +171,7 @@ def configure(env): env.Append(CCFLAGS=['/DWINDOWS_ENABLED']) env.Append(CCFLAGS=['/DOPENGL_ENABLED']) env.Append(CCFLAGS=['/DRTAUDIO_ENABLED']) + env.Append(CCFLAGS=['/DWASAPI_ENABLED']) env.Append(CCFLAGS=['/DTYPED_METHOD_BIND']) env.Append(CCFLAGS=['/DWIN32']) env.Append(CCFLAGS=['/DWINVER=%s' % winver, '/D_WIN32_WINNT=%s' % winver]) @@ -252,8 +253,9 @@ def configure(env): env.Append(CCFLAGS=['-DWINDOWS_ENABLED', '-mwindows']) env.Append(CCFLAGS=['-DOPENGL_ENABLED']) env.Append(CCFLAGS=['-DRTAUDIO_ENABLED']) + env.Append(CCFLAGS=['-DWASAPI_ENABLED']) env.Append(CCFLAGS=['-DWINVER=%s' % winver, '-D_WIN32_WINNT=%s' % winver]) - env.Append(LIBS=['mingw32', 'opengl32', 'dsound', 'ole32', 'd3d9', 'winmm', 'gdi32', 'iphlpapi', 'shlwapi', 'wsock32', 'ws2_32', 'kernel32', 'oleaut32', 'dinput8', 'dxguid']) + env.Append(LIBS=['mingw32', 'opengl32', 'dsound', 'ole32', 'd3d9', 'winmm', 'gdi32', 'iphlpapi', 'shlwapi', 'wsock32', 'ws2_32', 'kernel32', 'oleaut32', 'dinput8', 'dxguid', 'ksuser']) env.Append(CPPFLAGS=['-DMINGW_ENABLED']) diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 7b12482383..deb9c25576 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -2359,6 +2359,9 @@ OS_Windows::OS_Windows(HINSTANCE _hInstance) { #endif user_proc = NULL; +#ifdef WASAPI_ENABLED + AudioDriverManager::add_driver(&driver_wasapi); +#endif #ifdef RTAUDIO_ENABLED AudioDriverManager::add_driver(&driver_rtaudio); #endif diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h index 01d904a4cc..0c5965bf51 100644 --- a/platform/windows/os_windows.h +++ b/platform/windows/os_windows.h @@ -32,6 +32,7 @@ #include "context_gl_win.h" #include "drivers/rtaudio/audio_driver_rtaudio.h" +#include "drivers/wasapi/audio_driver_wasapi.h" #include "os/input.h" #include "os/os.h" #include "power_windows.h" @@ -123,6 +124,9 @@ class OS_Windows : public OS { PowerWindows *power_manager; +#ifdef WASAPI_ENABLED + AudioDriverWASAPI driver_wasapi; +#endif #ifdef RTAUDIO_ENABLED AudioDriverRtAudio driver_rtaudio; #endif diff --git a/scene/2d/light_2d.cpp b/scene/2d/light_2d.cpp index 4abb51ef7c..ab8277ecf3 100644 --- a/scene/2d/light_2d.cpp +++ b/scene/2d/light_2d.cpp @@ -434,7 +434,7 @@ void Light2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "shadow_enabled"), "set_shadow_enabled", "is_shadow_enabled"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "shadow_color"), "set_shadow_color", "get_shadow_color"); ADD_PROPERTY(PropertyInfo(Variant::INT, "shadow_buffer_size", PROPERTY_HINT_RANGE, "32,16384,1"), "set_shadow_buffer_size", "get_shadow_buffer_size"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "shadow_gradient_length", PROPERTY_HINT_RANGE, "1,4096,0.1"), "set_shadow_gradient_length", "get_shadow_gradient_length"); + ADD_PROPERTY(PropertyInfo(Variant::REAL, "shadow_gradient_length", PROPERTY_HINT_RANGE, "0,4096,0.1"), "set_shadow_gradient_length", "get_shadow_gradient_length"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "shadow_filter", PROPERTY_HINT_ENUM, "None,PCF3,PCF5,PCF9,PCF13"), "set_shadow_filter", "get_shadow_filter"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "shadow_filter_smooth", PROPERTY_HINT_RANGE, "0,64,0.1"), "set_shadow_smooth", "get_shadow_smooth"); ADD_PROPERTY(PropertyInfo(Variant::INT, "shadow_item_cull_mask", PROPERTY_HINT_LAYERS_2D_RENDER), "set_item_shadow_cull_mask", "get_item_shadow_cull_mask"); diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp index 6ac946ea37..b1eb2ba267 100644 --- a/scene/2d/physics_body_2d.cpp +++ b/scene/2d/physics_body_2d.cpp @@ -883,7 +883,7 @@ void RigidBody2D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_colliding_bodies"), &RigidBody2D::get_colliding_bodies); - BIND_VMETHOD(MethodInfo("_integrate_forces", PropertyInfo(Variant::OBJECT, "state:Physics2DDirectBodyState"))); + BIND_VMETHOD(MethodInfo("_integrate_forces", PropertyInfo(Variant::OBJECT, "state", PROPERTY_HINT_RESOURCE_TYPE, "Physics2DDirectBodyState"))); ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Rigid,Static,Character,Kinematic"), "set_mode", "get_mode"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "mass", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_mass", "get_mass"); diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp index b149dcd2dc..a0a393e8ed 100644 --- a/scene/3d/physics_body.cpp +++ b/scene/3d/physics_body.cpp @@ -842,7 +842,7 @@ void RigidBody::_bind_methods() { ClassDB::bind_method(D_METHOD("get_colliding_bodies"), &RigidBody::get_colliding_bodies); - BIND_VMETHOD(MethodInfo("_integrate_forces", PropertyInfo(Variant::OBJECT, "state:PhysicsDirectBodyState"))); + BIND_VMETHOD(MethodInfo("_integrate_forces", PropertyInfo(Variant::OBJECT, "state", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsDirectBodyState"))); ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Rigid,Static,Character,Kinematic"), "set_mode", "get_mode"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "mass", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_mass", "get_mass"); diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index e2da5e4981..961fccc804 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -2703,7 +2703,7 @@ void Control::_bind_methods() { ADD_SIGNAL(MethodInfo("minimum_size_changed")); ADD_SIGNAL(MethodInfo("modal_closed")); - BIND_VMETHOD(MethodInfo("has_point:bool", PropertyInfo(Variant::VECTOR2, "point"))); + BIND_VMETHOD(MethodInfo(Variant::BOOL, "has_point", PropertyInfo(Variant::VECTOR2, "point"))); } Control::Control() { diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index e82044b133..7a9daea73e 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -3189,6 +3189,11 @@ void TextEdit::adjust_viewport_to_cursor() { if (cursor.line < cursor.line_ofs) cursor.line_ofs = cursor.line; + if (cursor.line_ofs + visible_rows > text.size() && !scroll_past_end_of_file_enabled) { + cursor.line_ofs = text.size() - visible_rows; + v_scroll->set_value(text.size() - visible_rows); + } + int cursor_x = get_column_x_offset(cursor.column, text[cursor.line]); if (cursor_x > (cursor.x_ofs + visible_width)) @@ -3661,10 +3666,10 @@ void TextEdit::cut() { String clipboard = _base_get_text(selection.from_line, selection.from_column, selection.to_line, selection.to_column); OS::get_singleton()->set_clipboard(clipboard); - cursor_set_line(selection.from_line); + _remove_text(selection.from_line, selection.from_column, selection.to_line, selection.to_column); + cursor_set_line(selection.from_line); // set afterwards else it causes the view to be offset cursor_set_column(selection.from_column); - _remove_text(selection.from_line, selection.from_column, selection.to_line, selection.to_column); selection.active = false; selection.selecting_mode = Selection::MODE_NONE; update(); diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp index 7de2c85633..14225d945d 100644 --- a/scene/resources/environment.cpp +++ b/scene/resources/environment.cpp @@ -994,10 +994,10 @@ void Environment::_bind_methods() { ADD_GROUP("SSAO", "ssao_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "ssao_enabled"), "set_ssao_enabled", "is_ssao_enabled"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_radius", PROPERTY_HINT_RANGE, "0.1,16,0.1"), "set_ssao_radius", "get_ssao_radius"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_intensity", PROPERTY_HINT_RANGE, "0.0,9,0.1"), "set_ssao_intensity", "get_ssao_intensity"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_radius2", PROPERTY_HINT_RANGE, "0.0,16,0.1"), "set_ssao_radius2", "get_ssao_radius2"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_intensity2", PROPERTY_HINT_RANGE, "0.0,9,0.1"), "set_ssao_intensity2", "get_ssao_intensity2"); + ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_radius", PROPERTY_HINT_RANGE, "0.1,128,0.1"), "set_ssao_radius", "get_ssao_radius"); + ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_intensity", PROPERTY_HINT_RANGE, "0.0,128,0.1"), "set_ssao_intensity", "get_ssao_intensity"); + ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_radius2", PROPERTY_HINT_RANGE, "0.0,128,0.1"), "set_ssao_radius2", "get_ssao_radius2"); + ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_intensity2", PROPERTY_HINT_RANGE, "0.0,128,0.1"), "set_ssao_intensity2", "get_ssao_intensity2"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_bias", PROPERTY_HINT_RANGE, "0.001,8,0.001"), "set_ssao_bias", "get_ssao_bias"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_light_affect", PROPERTY_HINT_RANGE, "0.00,1,0.01"), "set_ssao_direct_light_affect", "get_ssao_direct_light_affect"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "ssao_color", PROPERTY_HINT_COLOR_NO_ALPHA), "set_ssao_color", "get_ssao_color"); diff --git a/scene/resources/mesh_library.cpp b/scene/resources/mesh_library.cpp index 6abbcfb90b..4e1ffd2ab3 100644 --- a/scene/resources/mesh_library.cpp +++ b/scene/resources/mesh_library.cpp @@ -268,10 +268,12 @@ void MeshLibrary::_bind_methods() { ClassDB::bind_method(D_METHOD("set_item_mesh", "id", "mesh"), &MeshLibrary::set_item_mesh); ClassDB::bind_method(D_METHOD("set_item_navmesh", "id", "navmesh"), &MeshLibrary::set_item_navmesh); ClassDB::bind_method(D_METHOD("set_item_shapes", "id", "shapes"), &MeshLibrary::_set_item_shapes); + ClassDB::bind_method(D_METHOD("set_item_preview", "id", "texture"), &MeshLibrary::set_item_preview); ClassDB::bind_method(D_METHOD("get_item_name", "id"), &MeshLibrary::get_item_name); ClassDB::bind_method(D_METHOD("get_item_mesh", "id"), &MeshLibrary::get_item_mesh); ClassDB::bind_method(D_METHOD("get_item_navmesh", "id"), &MeshLibrary::get_item_navmesh); ClassDB::bind_method(D_METHOD("get_item_shapes", "id"), &MeshLibrary::_get_item_shapes); + ClassDB::bind_method(D_METHOD("get_item_preview", "id"), &MeshLibrary::get_item_preview); ClassDB::bind_method(D_METHOD("remove_item", "id"), &MeshLibrary::remove_item); ClassDB::bind_method(D_METHOD("clear"), &MeshLibrary::clear); ClassDB::bind_method(D_METHOD("get_item_list"), &MeshLibrary::get_item_list); diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp index 7342164841..bf89e704bc 100644 --- a/scene/resources/surface_tool.cpp +++ b/scene/resources/surface_tool.cpp @@ -691,6 +691,17 @@ void SurfaceTool::mikktGetTexCoord(const SMikkTSpaceContext *pContext, float fvT fvTexcOut[1] = v.y; //fvTexcOut[1]=1.0-v.y; } + +void SurfaceTool::mikktSetTSpaceDefault(const SMikkTSpaceContext *pContext, const float fvTangent[], const float fvBiTangent[], const float fMagS, const float fMagT, + const tbool bIsOrientationPreserving, const int iFace, const int iVert) { + + Vector<List<Vertex>::Element *> &varr = *((Vector<List<Vertex>::Element *> *)pContext->m_pUserData); + Vertex *vtx = &varr[iFace * 3 + iVert]->get(); + + vtx->tangent = Vector3(fvTangent[0], fvTangent[1], fvTangent[2]); + vtx->binormal = Vector3(fvBiTangent[0], fvBiTangent[1], fvBiTangent[2]); +} + void SurfaceTool::mikktSetTSpaceBasic(const SMikkTSpaceContext *pContext, const float fvTangent[], const float fSign, const int iFace, const int iVert) { Vector<List<Vertex>::Element *> &varr = *((Vector<List<Vertex>::Element *> *)pContext->m_pUserData); @@ -715,8 +726,8 @@ void SurfaceTool::generate_tangents() { mkif.m_getNumVerticesOfFace = mikktGetNumVerticesOfFace; mkif.m_getPosition = mikktGetPosition; mkif.m_getTexCoord = mikktGetTexCoord; - mkif.m_setTSpaceBasic = mikktSetTSpaceBasic; - mkif.m_setTSpace = NULL; + mkif.m_setTSpace = mikktSetTSpaceDefault; + mkif.m_setTSpaceBasic = NULL; SMikkTSpaceContext msc; msc.m_pInterface = &mkif; diff --git a/scene/resources/surface_tool.h b/scene/resources/surface_tool.h index 2a90c2743d..cdaac643de 100644 --- a/scene/resources/surface_tool.h +++ b/scene/resources/surface_tool.h @@ -90,6 +90,8 @@ private: static void mikktGetNormal(const SMikkTSpaceContext *pContext, float fvNormOut[], const int iFace, const int iVert); static void mikktGetTexCoord(const SMikkTSpaceContext *pContext, float fvTexcOut[], const int iFace, const int iVert); static void mikktSetTSpaceBasic(const SMikkTSpaceContext *pContext, const float fvTangent[], const float fSign, const int iFace, const int iVert); + static void mikktSetTSpaceDefault(const SMikkTSpaceContext *pContext, const float fvTangent[], const float fvBiTangent[], const float fMagS, const float fMagT, + const tbool bIsOrientationPreserving, const int iFace, const int iVert); protected: static void _bind_methods(); diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index 6e42143246..bc59acead5 100644 --- a/servers/visual/shader_language.cpp +++ b/servers/visual/shader_language.cpp @@ -165,6 +165,7 @@ const char *ShaderLanguage::token_names[TK_MAX] = { "CF_BREAK", "CF_CONTINUE", "CF_RETURN", + "CF_DISCARD", "BRACKET_OPEN", "BRACKET_CLOSE", "CURLY_BRACKET_OPEN", @@ -3297,6 +3298,34 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const Map<StringName, Dat } p_block->statements.push_back(flow); + } else if (tk.type == TK_CF_DISCARD) { + + //check return type + BlockNode *b = p_block; + while (b && !b->parent_function) { + b = b->parent_block; + } + if (!b) { + _set_error("Bug"); + return ERR_BUG; + } + + if (!b->parent_function->can_discard) { + _set_error("Use of 'discard' is not allowed here."); + return ERR_PARSE_ERROR; + } + + ControlFlowNode *flow = alloc_node<ControlFlowNode>(); + flow->flow_op = FLOW_OP_DISCARD; + + pos = _get_tkpos(); + tk = _get_token(); + if (tk.type != TK_SEMICOLON) { + //all is good + _set_error("Expected ';' after discard"); + } + + p_block->statements.push_back(flow); } else { @@ -3321,7 +3350,7 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const Map<StringName, Dat return OK; } -Error ShaderLanguage::_parse_shader(const Map<StringName, Map<StringName, DataType> > &p_functions, const Set<String> &p_render_modes, const Set<String> &p_shader_types) { +Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_functions, const Set<String> &p_render_modes, const Set<String> &p_shader_types) { Token tk = _get_token(); @@ -3658,7 +3687,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, Map<StringName, DataTy Map<StringName, DataType> builtin_types; if (p_functions.has(name)) { - builtin_types = p_functions[name]; + builtin_types = p_functions[name].built_ins; } ShaderNode::Function function; @@ -3822,7 +3851,7 @@ String ShaderLanguage::get_shader_type(const String &p_code) { return String(); } -Error ShaderLanguage::compile(const String &p_code, const Map<StringName, Map<StringName, DataType> > &p_functions, const Set<String> &p_render_modes, const Set<String> &p_shader_types) { +Error ShaderLanguage::compile(const String &p_code, const Map<StringName, FunctionInfo> &p_functions, const Set<String> &p_render_modes, const Set<String> &p_shader_types) { clear(); @@ -3839,7 +3868,7 @@ Error ShaderLanguage::compile(const String &p_code, const Map<StringName, Map<St return OK; } -Error ShaderLanguage::complete(const String &p_code, const Map<StringName, Map<StringName, DataType> > &p_functions, const Set<String> &p_render_modes, const Set<String> &p_shader_types, List<String> *r_options, String &r_call_hint) { +Error ShaderLanguage::complete(const String &p_code, const Map<StringName, FunctionInfo> &p_functions, const Set<String> &p_render_modes, const Set<String> &p_shader_types, List<String> *r_options, String &r_call_hint) { clear(); @@ -3866,7 +3895,7 @@ Error ShaderLanguage::complete(const String &p_code, const Map<StringName, Map<S } break; case COMPLETION_MAIN_FUNCTION: { - for (const Map<StringName, Map<StringName, DataType> >::Element *E = p_functions.front(); E; E = E->next()) { + for (const Map<StringName, FunctionInfo>::Element *E = p_functions.front(); E; E = E->next()) { r_options->push_back(E->key()); } @@ -3907,7 +3936,7 @@ Error ShaderLanguage::complete(const String &p_code, const Map<StringName, Map<S if (comp_ident && skip_function != StringName() && p_functions.has(skip_function)) { - for (Map<StringName, DataType>::Element *E = p_functions[skip_function].front(); E; E = E->next()) { + for (Map<StringName, DataType>::Element *E = p_functions[skip_function].built_ins.front(); E; E = E->next()) { matches.insert(E->key()); } } diff --git a/servers/visual/shader_language.h b/servers/visual/shader_language.h index f4be6fff39..f00b4c5a97 100644 --- a/servers/visual/shader_language.h +++ b/servers/visual/shader_language.h @@ -118,6 +118,7 @@ public: TK_CF_BREAK, TK_CF_CONTINUE, TK_CF_RETURN, + TK_CF_DISCARD, TK_BRACKET_OPEN, TK_BRACKET_CLOSE, TK_CURLY_BRACKET_OPEN, @@ -244,7 +245,8 @@ public: FLOW_OP_DO, FLOW_OP_BREAK, FLOW_OP_SWITCH, - FLOW_OP_CONTINUE + FLOW_OP_CONTINUE, + FLOW_OP_DISCARD }; @@ -387,10 +389,12 @@ public: DataPrecision return_precision; Vector<Argument> arguments; BlockNode *body; + bool can_discard; FunctionNode() { type = TYPE_FUNCTION; return_precision = PRECISION_DEFAULT; + can_discard = false; } }; @@ -499,6 +503,11 @@ public: static void get_keyword_list(List<String> *r_keywords); static void get_builtin_funcs(List<String> *r_keywords); + struct FunctionInfo { + Map<StringName, DataType> built_ins; + bool can_discard; + }; + private: struct KeyWord { TokenType token; @@ -591,7 +600,7 @@ private: Error _parse_block(BlockNode *p_block, const Map<StringName, DataType> &p_builtin_types, bool p_just_one = false, bool p_can_break = false, bool p_can_continue = false); - Error _parse_shader(const Map<StringName, Map<StringName, DataType> > &p_functions, const Set<String> &p_render_modes, const Set<String> &p_shader_types); + Error _parse_shader(const Map<StringName, FunctionInfo> &p_functions, const Set<String> &p_render_modes, const Set<String> &p_shader_types); public: //static void get_keyword_list(ShaderType p_type,List<String> *p_keywords); @@ -599,8 +608,8 @@ public: void clear(); static String get_shader_type(const String &p_code); - Error compile(const String &p_code, const Map<StringName, Map<StringName, DataType> > &p_functions, const Set<String> &p_render_modes, const Set<String> &p_shader_types); - Error complete(const String &p_code, const Map<StringName, Map<StringName, DataType> > &p_functions, const Set<String> &p_render_modes, const Set<String> &p_shader_types, List<String> *r_options, String &r_call_hint); + Error compile(const String &p_code, const Map<StringName, FunctionInfo> &p_functions, const Set<String> &p_render_modes, const Set<String> &p_shader_types); + Error complete(const String &p_code, const Map<StringName, FunctionInfo> &p_functions, const Set<String> &p_render_modes, const Set<String> &p_shader_types, List<String> *r_options, String &r_call_hint); String get_error_text(); int get_error_line(); diff --git a/servers/visual/shader_types.cpp b/servers/visual/shader_types.cpp index 340cbf5e7b..d8d1b1c1b1 100644 --- a/servers/visual/shader_types.cpp +++ b/servers/visual/shader_types.cpp @@ -29,7 +29,7 @@ /*************************************************************************/ #include "shader_types.h" -const Map<StringName, Map<StringName, ShaderLanguage::DataType> > &ShaderTypes::get_functions(VS::ShaderMode p_mode) { +const Map<StringName, ShaderLanguage::FunctionInfo> &ShaderTypes::get_functions(VS::ShaderMode p_mode) { return shader_modes[p_mode].functions; } @@ -50,72 +50,73 @@ ShaderTypes::ShaderTypes() { /*************** SPATIAL ***********************/ - shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["SRC_VERTEX"] = ShaderLanguage::TYPE_VEC3; - shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["SRC_NORMAL"] = ShaderLanguage::TYPE_VEC3; - shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["SRC_BONES"] = ShaderLanguage::TYPE_IVEC4; - shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["SRC_WEIGHTS"] = ShaderLanguage::TYPE_VEC4; - - shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["POSITION"] = ShaderLanguage::TYPE_VEC4; - shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["VERTEX"] = ShaderLanguage::TYPE_VEC3; - shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["NORMAL"] = ShaderLanguage::TYPE_VEC3; - shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["TANGENT"] = ShaderLanguage::TYPE_VEC3; - shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["BINORMAL"] = ShaderLanguage::TYPE_VEC3; - shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["UV"] = ShaderLanguage::TYPE_VEC2; - shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["UV2"] = ShaderLanguage::TYPE_VEC2; - shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["COLOR"] = ShaderLanguage::TYPE_VEC4; - shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["POINT_SIZE"] = ShaderLanguage::TYPE_FLOAT; - shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["INSTANCE_ID"] = ShaderLanguage::TYPE_INT; - shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["INSTANCE_CUSTOM"] = ShaderLanguage::TYPE_VEC4; - shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["ROUGHNESS"] = ShaderLanguage::TYPE_FLOAT; + shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["SRC_VERTEX"] = ShaderLanguage::TYPE_VEC3; + shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["SRC_NORMAL"] = ShaderLanguage::TYPE_VEC3; + shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["SRC_BONES"] = ShaderLanguage::TYPE_IVEC4; + shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["SRC_WEIGHTS"] = ShaderLanguage::TYPE_VEC4; + + shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["POSITION"] = ShaderLanguage::TYPE_VEC4; + shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["VERTEX"] = ShaderLanguage::TYPE_VEC3; + shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["NORMAL"] = ShaderLanguage::TYPE_VEC3; + shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["TANGENT"] = ShaderLanguage::TYPE_VEC3; + shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["BINORMAL"] = ShaderLanguage::TYPE_VEC3; + shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["UV"] = ShaderLanguage::TYPE_VEC2; + shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["UV2"] = ShaderLanguage::TYPE_VEC2; + shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["COLOR"] = ShaderLanguage::TYPE_VEC4; + shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["POINT_SIZE"] = ShaderLanguage::TYPE_FLOAT; + shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["INSTANCE_ID"] = ShaderLanguage::TYPE_INT; + shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["INSTANCE_CUSTOM"] = ShaderLanguage::TYPE_VEC4; + shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["ROUGHNESS"] = ShaderLanguage::TYPE_FLOAT; + shader_modes[VS::SHADER_SPATIAL].functions["vertex"].can_discard = false; //builtins - shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["WORLD_MATRIX"] = ShaderLanguage::TYPE_MAT4; - shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["INV_CAMERA_MATRIX"] = ShaderLanguage::TYPE_MAT4; - shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["CAMERA_MATRIX"] = ShaderLanguage::TYPE_MAT4; - shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["PROJECTION_MATRIX"] = ShaderLanguage::TYPE_MAT4; - shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["MODELVIEW_MATRIX"] = ShaderLanguage::TYPE_MAT4; - shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["TIME"] = ShaderLanguage::TYPE_FLOAT; - shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["VIEWPORT_SIZE"] = ShaderLanguage::TYPE_VEC2; - - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["VERTEX"] = ShaderLanguage::TYPE_VEC3; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["FRAGCOORD"] = ShaderLanguage::TYPE_VEC4; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["FRONT_FACING"] = ShaderLanguage::TYPE_BOOL; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["NORMAL"] = ShaderLanguage::TYPE_VEC3; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["TANGENT"] = ShaderLanguage::TYPE_VEC3; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["BINORMAL"] = ShaderLanguage::TYPE_VEC3; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["NORMALMAP"] = ShaderLanguage::TYPE_VEC3; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["NORMALMAP_DEPTH"] = ShaderLanguage::TYPE_FLOAT; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["UV"] = ShaderLanguage::TYPE_VEC2; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["UV2"] = ShaderLanguage::TYPE_VEC2; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["COLOR"] = ShaderLanguage::TYPE_VEC4; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["NORMAL"] = ShaderLanguage::TYPE_VEC3; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["ALBEDO"] = ShaderLanguage::TYPE_VEC3; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["ALPHA"] = ShaderLanguage::TYPE_FLOAT; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["METALLIC"] = ShaderLanguage::TYPE_FLOAT; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["SPECULAR"] = ShaderLanguage::TYPE_FLOAT; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["ROUGHNESS"] = ShaderLanguage::TYPE_FLOAT; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["RIM"] = ShaderLanguage::TYPE_FLOAT; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["RIM_TINT"] = ShaderLanguage::TYPE_FLOAT; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["CLEARCOAT"] = ShaderLanguage::TYPE_FLOAT; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["CLEARCOAT_GLOSS"] = ShaderLanguage::TYPE_FLOAT; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["ANISOTROPY"] = ShaderLanguage::TYPE_FLOAT; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["ANISOTROPY_FLOW"] = ShaderLanguage::TYPE_VEC2; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["SSS_STRENGTH"] = ShaderLanguage::TYPE_FLOAT; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["AO"] = ShaderLanguage::TYPE_FLOAT; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["EMISSION"] = ShaderLanguage::TYPE_VEC3; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["DISCARD"] = ShaderLanguage::TYPE_BOOL; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["SCREEN_TEXTURE"] = ShaderLanguage::TYPE_SAMPLER2D; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["DEPTH_TEXTURE"] = ShaderLanguage::TYPE_SAMPLER2D; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["SCREEN_UV"] = ShaderLanguage::TYPE_VEC2; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["POINT_COORD"] = ShaderLanguage::TYPE_VEC2; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["SIDE"] = ShaderLanguage::TYPE_FLOAT; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["ALPHA_SCISSOR"] = ShaderLanguage::TYPE_FLOAT; - - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["WORLD_MATRIX"] = ShaderLanguage::TYPE_MAT4; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["INV_CAMERA_MATRIX"] = ShaderLanguage::TYPE_MAT4; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["PROJECTION_MATRIX"] = ShaderLanguage::TYPE_MAT4; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["TIME"] = ShaderLanguage::TYPE_FLOAT; - shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["VIEWPORT_SIZE"] = ShaderLanguage::TYPE_VEC2; + shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["WORLD_MATRIX"] = ShaderLanguage::TYPE_MAT4; + shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["INV_CAMERA_MATRIX"] = ShaderLanguage::TYPE_MAT4; + shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["CAMERA_MATRIX"] = ShaderLanguage::TYPE_MAT4; + shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["PROJECTION_MATRIX"] = ShaderLanguage::TYPE_MAT4; + shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["MODELVIEW_MATRIX"] = ShaderLanguage::TYPE_MAT4; + shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["TIME"] = ShaderLanguage::TYPE_FLOAT; + shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["VIEWPORT_SIZE"] = ShaderLanguage::TYPE_VEC2; + + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["VERTEX"] = ShaderLanguage::TYPE_VEC3; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["FRAGCOORD"] = ShaderLanguage::TYPE_VEC4; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["FRONT_FACING"] = ShaderLanguage::TYPE_BOOL; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["NORMAL"] = ShaderLanguage::TYPE_VEC3; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["TANGENT"] = ShaderLanguage::TYPE_VEC3; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["BINORMAL"] = ShaderLanguage::TYPE_VEC3; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["NORMALMAP"] = ShaderLanguage::TYPE_VEC3; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["NORMALMAP_DEPTH"] = ShaderLanguage::TYPE_FLOAT; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["UV"] = ShaderLanguage::TYPE_VEC2; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["UV2"] = ShaderLanguage::TYPE_VEC2; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["COLOR"] = ShaderLanguage::TYPE_VEC4; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["NORMAL"] = ShaderLanguage::TYPE_VEC3; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["ALBEDO"] = ShaderLanguage::TYPE_VEC3; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["ALPHA"] = ShaderLanguage::TYPE_FLOAT; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["METALLIC"] = ShaderLanguage::TYPE_FLOAT; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["SPECULAR"] = ShaderLanguage::TYPE_FLOAT; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["ROUGHNESS"] = ShaderLanguage::TYPE_FLOAT; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["RIM"] = ShaderLanguage::TYPE_FLOAT; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["RIM_TINT"] = ShaderLanguage::TYPE_FLOAT; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["CLEARCOAT"] = ShaderLanguage::TYPE_FLOAT; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["CLEARCOAT_GLOSS"] = ShaderLanguage::TYPE_FLOAT; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["ANISOTROPY"] = ShaderLanguage::TYPE_FLOAT; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["ANISOTROPY_FLOW"] = ShaderLanguage::TYPE_VEC2; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["SSS_STRENGTH"] = ShaderLanguage::TYPE_FLOAT; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["AO"] = ShaderLanguage::TYPE_FLOAT; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["EMISSION"] = ShaderLanguage::TYPE_VEC3; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["SCREEN_TEXTURE"] = ShaderLanguage::TYPE_SAMPLER2D; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["DEPTH_TEXTURE"] = ShaderLanguage::TYPE_SAMPLER2D; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["SCREEN_UV"] = ShaderLanguage::TYPE_VEC2; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["POINT_COORD"] = ShaderLanguage::TYPE_VEC2; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["SIDE"] = ShaderLanguage::TYPE_FLOAT; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["ALPHA_SCISSOR"] = ShaderLanguage::TYPE_FLOAT; + + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["WORLD_MATRIX"] = ShaderLanguage::TYPE_MAT4; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["INV_CAMERA_MATRIX"] = ShaderLanguage::TYPE_MAT4; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["PROJECTION_MATRIX"] = ShaderLanguage::TYPE_MAT4; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["TIME"] = ShaderLanguage::TYPE_FLOAT; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["VIEWPORT_SIZE"] = ShaderLanguage::TYPE_VEC2; + shader_modes[VS::SHADER_SPATIAL].functions["fragment"].can_discard = true; shader_modes[VS::SHADER_SPATIAL].modes.insert("blend_mix"); shader_modes[VS::SHADER_SPATIAL].modes.insert("blend_add"); @@ -153,52 +154,55 @@ ShaderTypes::ShaderTypes() { /************ CANVAS ITEM **************************/ - shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"]["SRC_VERTEX"] = ShaderLanguage::TYPE_VEC2; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"]["VERTEX"] = ShaderLanguage::TYPE_VEC2; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"]["UV"] = ShaderLanguage::TYPE_VEC2; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"]["VERTEX_COLOR"] = ShaderLanguage::TYPE_VEC4; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"]["POINT_SIZE"] = ShaderLanguage::TYPE_FLOAT; - - shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"]["WORLD_MATRIX"] = ShaderLanguage::TYPE_MAT4; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"]["PROJECTION_MATRIX"] = ShaderLanguage::TYPE_MAT4; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"]["EXTRA_MATRIX"] = ShaderLanguage::TYPE_MAT4; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"]["TIME"] = ShaderLanguage::TYPE_FLOAT; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"]["PARTICLE_CUSTOM"] = ShaderLanguage::TYPE_VEC4; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"]["AT_LIGHT_PASS"] = ShaderLanguage::TYPE_BOOL; - - shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["SRC_COLOR"] = ShaderLanguage::TYPE_VEC4; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["FRAGCOORD"] = ShaderLanguage::TYPE_VEC4; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["NORMAL"] = ShaderLanguage::TYPE_VEC3; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["NORMALMAP"] = ShaderLanguage::TYPE_VEC3; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["NORMALMAP_DEPTH"] = ShaderLanguage::TYPE_FLOAT; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["UV"] = ShaderLanguage::TYPE_VEC2; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["COLOR"] = ShaderLanguage::TYPE_VEC4; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["TEXTURE"] = ShaderLanguage::TYPE_SAMPLER2D; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["TEXTURE_PIXEL_SIZE"] = ShaderLanguage::TYPE_VEC2; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["SCREEN_UV"] = ShaderLanguage::TYPE_VEC2; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["SCREEN_PIXEL_SIZE"] = ShaderLanguage::TYPE_VEC2; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["POINT_COORD"] = ShaderLanguage::TYPE_VEC2; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["TIME"] = ShaderLanguage::TYPE_FLOAT; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["AT_LIGHT_PASS"] = ShaderLanguage::TYPE_BOOL; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["SCREEN_TEXTURE"] = ShaderLanguage::TYPE_SAMPLER2D; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["SCREEN_UV"] = ShaderLanguage::TYPE_VEC2; - - shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["POSITION"] = ShaderLanguage::TYPE_VEC2; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["NORMAL"] = ShaderLanguage::TYPE_VEC3; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["UV"] = ShaderLanguage::TYPE_VEC2; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["COLOR"] = ShaderLanguage::TYPE_VEC4; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["TEXTURE"] = ShaderLanguage::TYPE_SAMPLER2D; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["TEXTURE_PIXEL_SIZE"] = ShaderLanguage::TYPE_VEC2; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["SCREEN_UV"] = ShaderLanguage::TYPE_VEC2; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["LIGHT_VEC"] = ShaderLanguage::TYPE_VEC2; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["LIGHT_HEIGHT"] = ShaderLanguage::TYPE_FLOAT; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["LIGHT_COLOR"] = ShaderLanguage::TYPE_VEC4; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["LIGHT_UV"] = ShaderLanguage::TYPE_VEC2; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["LIGHT_SHADOW"] = ShaderLanguage::TYPE_VEC4; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["LIGHT"] = ShaderLanguage::TYPE_VEC4; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["SHADOW"] = ShaderLanguage::TYPE_VEC4; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["POINT_COORD"] = ShaderLanguage::TYPE_VEC2; - shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["TIME"] = ShaderLanguage::TYPE_FLOAT; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"].built_ins["SRC_VERTEX"] = ShaderLanguage::TYPE_VEC2; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"].built_ins["VERTEX"] = ShaderLanguage::TYPE_VEC2; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"].built_ins["UV"] = ShaderLanguage::TYPE_VEC2; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"].built_ins["VERTEX_COLOR"] = ShaderLanguage::TYPE_VEC4; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"].built_ins["POINT_SIZE"] = ShaderLanguage::TYPE_FLOAT; + + shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"].built_ins["WORLD_MATRIX"] = ShaderLanguage::TYPE_MAT4; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"].built_ins["PROJECTION_MATRIX"] = ShaderLanguage::TYPE_MAT4; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"].built_ins["EXTRA_MATRIX"] = ShaderLanguage::TYPE_MAT4; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"].built_ins["TIME"] = ShaderLanguage::TYPE_FLOAT; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"].built_ins["PARTICLE_CUSTOM"] = ShaderLanguage::TYPE_VEC4; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"].built_ins["AT_LIGHT_PASS"] = ShaderLanguage::TYPE_BOOL; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"].can_discard = false; + + shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["SRC_COLOR"] = ShaderLanguage::TYPE_VEC4; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["FRAGCOORD"] = ShaderLanguage::TYPE_VEC4; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["NORMAL"] = ShaderLanguage::TYPE_VEC3; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["NORMALMAP"] = ShaderLanguage::TYPE_VEC3; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["NORMALMAP_DEPTH"] = ShaderLanguage::TYPE_FLOAT; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["UV"] = ShaderLanguage::TYPE_VEC2; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["COLOR"] = ShaderLanguage::TYPE_VEC4; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["TEXTURE"] = ShaderLanguage::TYPE_SAMPLER2D; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["TEXTURE_PIXEL_SIZE"] = ShaderLanguage::TYPE_VEC2; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["SCREEN_UV"] = ShaderLanguage::TYPE_VEC2; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["SCREEN_PIXEL_SIZE"] = ShaderLanguage::TYPE_VEC2; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["POINT_COORD"] = ShaderLanguage::TYPE_VEC2; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["TIME"] = ShaderLanguage::TYPE_FLOAT; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["AT_LIGHT_PASS"] = ShaderLanguage::TYPE_BOOL; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["SCREEN_TEXTURE"] = ShaderLanguage::TYPE_SAMPLER2D; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["SCREEN_UV"] = ShaderLanguage::TYPE_VEC2; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].can_discard = true; + + shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["POSITION"] = ShaderLanguage::TYPE_VEC2; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["NORMAL"] = ShaderLanguage::TYPE_VEC3; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["UV"] = ShaderLanguage::TYPE_VEC2; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["COLOR"] = ShaderLanguage::TYPE_VEC4; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["TEXTURE"] = ShaderLanguage::TYPE_SAMPLER2D; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["TEXTURE_PIXEL_SIZE"] = ShaderLanguage::TYPE_VEC2; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["SCREEN_UV"] = ShaderLanguage::TYPE_VEC2; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["LIGHT_VEC"] = ShaderLanguage::TYPE_VEC2; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["LIGHT_HEIGHT"] = ShaderLanguage::TYPE_FLOAT; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["LIGHT_COLOR"] = ShaderLanguage::TYPE_VEC4; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["LIGHT_UV"] = ShaderLanguage::TYPE_VEC2; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["LIGHT_SHADOW"] = ShaderLanguage::TYPE_VEC4; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["LIGHT"] = ShaderLanguage::TYPE_VEC4; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["SHADOW"] = ShaderLanguage::TYPE_VEC4; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["POINT_COORD"] = ShaderLanguage::TYPE_VEC2; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["TIME"] = ShaderLanguage::TYPE_FLOAT; + shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].can_discard = true; shader_modes[VS::SHADER_CANVAS_ITEM].modes.insert("skip_vertex_transform"); @@ -213,20 +217,21 @@ ShaderTypes::ShaderTypes() { /************ PARTICLES **************************/ - shader_modes[VS::SHADER_PARTICLES].functions["vertex"]["COLOR"] = ShaderLanguage::TYPE_VEC4; - shader_modes[VS::SHADER_PARTICLES].functions["vertex"]["VELOCITY"] = ShaderLanguage::TYPE_VEC3; - shader_modes[VS::SHADER_PARTICLES].functions["vertex"]["MASS"] = ShaderLanguage::TYPE_FLOAT; - shader_modes[VS::SHADER_PARTICLES].functions["vertex"]["ACTIVE"] = ShaderLanguage::TYPE_BOOL; - shader_modes[VS::SHADER_PARTICLES].functions["vertex"]["RESTART"] = ShaderLanguage::TYPE_BOOL; - shader_modes[VS::SHADER_PARTICLES].functions["vertex"]["CUSTOM"] = ShaderLanguage::TYPE_VEC4; - shader_modes[VS::SHADER_PARTICLES].functions["vertex"]["TRANSFORM"] = ShaderLanguage::TYPE_MAT4; - shader_modes[VS::SHADER_PARTICLES].functions["vertex"]["TIME"] = ShaderLanguage::TYPE_FLOAT; - shader_modes[VS::SHADER_PARTICLES].functions["vertex"]["LIFETIME"] = ShaderLanguage::TYPE_FLOAT; - shader_modes[VS::SHADER_PARTICLES].functions["vertex"]["DELTA"] = ShaderLanguage::TYPE_FLOAT; - shader_modes[VS::SHADER_PARTICLES].functions["vertex"]["NUMBER"] = ShaderLanguage::TYPE_UINT; - shader_modes[VS::SHADER_PARTICLES].functions["vertex"]["INDEX"] = ShaderLanguage::TYPE_INT; - shader_modes[VS::SHADER_PARTICLES].functions["vertex"]["EMISSION_TRANSFORM"] = ShaderLanguage::TYPE_MAT4; - shader_modes[VS::SHADER_PARTICLES].functions["vertex"]["RANDOM_SEED"] = ShaderLanguage::TYPE_UINT; + shader_modes[VS::SHADER_PARTICLES].functions["vertex"].built_ins["COLOR"] = ShaderLanguage::TYPE_VEC4; + shader_modes[VS::SHADER_PARTICLES].functions["vertex"].built_ins["VELOCITY"] = ShaderLanguage::TYPE_VEC3; + shader_modes[VS::SHADER_PARTICLES].functions["vertex"].built_ins["MASS"] = ShaderLanguage::TYPE_FLOAT; + shader_modes[VS::SHADER_PARTICLES].functions["vertex"].built_ins["ACTIVE"] = ShaderLanguage::TYPE_BOOL; + shader_modes[VS::SHADER_PARTICLES].functions["vertex"].built_ins["RESTART"] = ShaderLanguage::TYPE_BOOL; + shader_modes[VS::SHADER_PARTICLES].functions["vertex"].built_ins["CUSTOM"] = ShaderLanguage::TYPE_VEC4; + shader_modes[VS::SHADER_PARTICLES].functions["vertex"].built_ins["TRANSFORM"] = ShaderLanguage::TYPE_MAT4; + shader_modes[VS::SHADER_PARTICLES].functions["vertex"].built_ins["TIME"] = ShaderLanguage::TYPE_FLOAT; + shader_modes[VS::SHADER_PARTICLES].functions["vertex"].built_ins["LIFETIME"] = ShaderLanguage::TYPE_FLOAT; + shader_modes[VS::SHADER_PARTICLES].functions["vertex"].built_ins["DELTA"] = ShaderLanguage::TYPE_FLOAT; + shader_modes[VS::SHADER_PARTICLES].functions["vertex"].built_ins["NUMBER"] = ShaderLanguage::TYPE_UINT; + shader_modes[VS::SHADER_PARTICLES].functions["vertex"].built_ins["INDEX"] = ShaderLanguage::TYPE_INT; + shader_modes[VS::SHADER_PARTICLES].functions["vertex"].built_ins["EMISSION_TRANSFORM"] = ShaderLanguage::TYPE_MAT4; + shader_modes[VS::SHADER_PARTICLES].functions["vertex"].built_ins["RANDOM_SEED"] = ShaderLanguage::TYPE_UINT; + shader_modes[VS::SHADER_PARTICLES].functions["vertex"].can_discard = false; shader_modes[VS::SHADER_PARTICLES].modes.insert("billboard"); shader_modes[VS::SHADER_PARTICLES].modes.insert("disable_force"); diff --git a/servers/visual/shader_types.h b/servers/visual/shader_types.h index 4f4c7c5352..725217ba2e 100644 --- a/servers/visual/shader_types.h +++ b/servers/visual/shader_types.h @@ -36,7 +36,7 @@ class ShaderTypes { struct Type { - Map<StringName, Map<StringName, ShaderLanguage::DataType> > functions; + Map<StringName, ShaderLanguage::FunctionInfo> functions; Set<String> modes; }; @@ -49,7 +49,7 @@ class ShaderTypes { public: static ShaderTypes *get_singleton() { return singleton; } - const Map<StringName, Map<StringName, ShaderLanguage::DataType> > &get_functions(VS::ShaderMode p_mode); + const Map<StringName, ShaderLanguage::FunctionInfo> &get_functions(VS::ShaderMode p_mode); const Set<String> &get_modes(VS::ShaderMode p_mode); const Set<String> &get_types(); diff --git a/servers/visual/visual_server_canvas.cpp b/servers/visual/visual_server_canvas.cpp index ad6d0f6b2b..25724981eb 100644 --- a/servers/visual/visual_server_canvas.cpp +++ b/servers/visual/visual_server_canvas.cpp @@ -37,10 +37,8 @@ void VisualServerCanvas::_render_canvas_item_tree(Item *p_canvas_item, const Tra RasterizerCanvas::Item *z_list[z_range]; RasterizerCanvas::Item *z_last_list[z_range]; - for (int i = 0; i < z_range; i++) { - z_list[i] = NULL; - z_last_list[i] = NULL; - } + memset(z_list, 0, z_range * sizeof(RasterizerCanvas::Item *)); + memset(z_last_list, 0, z_range * sizeof(RasterizerCanvas::Item *)); _render_canvas_item(p_canvas_item, p_transform, p_clip_rect, Color(1, 1, 1, 1), 0, z_list, z_last_list, NULL, NULL); @@ -200,10 +198,9 @@ void VisualServerCanvas::render_canvas(Canvas *p_canvas, const Transform2D &p_tr RasterizerCanvas::Item *z_list[z_range]; RasterizerCanvas::Item *z_last_list[z_range]; - for (int i = 0; i < z_range; i++) { - z_list[i] = NULL; - z_last_list[i] = NULL; - } + memset(z_list, 0, z_range * sizeof(RasterizerCanvas::Item *)); + memset(z_last_list, 0, z_range * sizeof(RasterizerCanvas::Item *)); + for (int i = 0; i < l; i++) { _render_canvas_item(ci[i].item, p_transform, p_clip_rect, Color(1, 1, 1, 1), 0, z_list, z_last_list, NULL, NULL); } @@ -701,6 +698,7 @@ void VisualServerCanvas::canvas_item_add_triangle_array(RID p_item, const Vector polygon->colors = p_colors; polygon->indices = indices; polygon->count = count; + polygon->antialiased = false; canvas_item->rect_dirty = true; canvas_item->commands.push_back(polygon); diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp index 95ac876ec0..cd68c14de8 100644 --- a/servers/visual/visual_server_scene.cpp +++ b/servers/visual/visual_server_scene.cpp @@ -1473,9 +1473,10 @@ void VisualServerScene::_render_scene(const Transform p_cam_transform, const Cam //check shadow.. - if (light && p_shadow_atlas.is_valid() && VSG::storage->light_has_shadow(E->get()->base)) { - lights_with_shadow[directional_shadow_count++] = E->get(); - + if (light) { + if (p_shadow_atlas.is_valid() && VSG::storage->light_has_shadow(E->get()->base)) { + lights_with_shadow[directional_shadow_count++] = E->get(); + } //add to list directional_light_ptr[directional_light_count++] = light->instance; } |