From 62996d349917de3d694a8154a33270a90e275126 Mon Sep 17 00:00:00 2001 From: ueshita Date: Sun, 21 Jan 2024 03:08:47 +0900 Subject: [PATCH] Support for 4.2 #4 --- Demo/export_presets.cfg | 15 +- Demo/project.godot | 2 +- Dev/Cpp/EffekseerGodot4.vcxproj | 50 +++- Dev/Cpp/EffekseerGodot4.vcxproj.filters | 314 +++++++++++++-------- Dev/Cpp/godot-cpp | 2 +- Dev/Cpp/src/Utils/EffekseerGodot.Utils.cpp | 11 +- Dev/Godot/addons/effekseer/plugin.gd | 8 +- 7 files changed, 235 insertions(+), 167 deletions(-) diff --git a/Demo/export_presets.cfg b/Demo/export_presets.cfg index b7a3fb6..faa8cc0 100644 --- a/Demo/export_presets.cfg +++ b/Demo/export_presets.cfg @@ -13,13 +13,12 @@ encryption_include_filters="" encryption_exclude_filters="" encrypt_pck=false encrypt_directory=false -script_encryption_key="" [preset.0.options] custom_template/debug="" custom_template/release="" -debug/export_console_script=1 +debug/export_console_wrapper=1 binary_format/embed_pck=false texture_format/bptc=false texture_format/s3tc=true @@ -27,9 +26,6 @@ texture_format/etc=false texture_format/etc2=false binary_format/architecture="x86_64" codesign/enable=false -codesign/identity_type=0 -codesign/identity="" -codesign/password="" codesign/timestamp=true codesign/timestamp_server_url="" codesign/digest_algorithm=1 @@ -63,6 +59,7 @@ Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorActi ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue Remove-Item -Recurse -Force '{temp_dir}'" +debug/export_console_script=1 [preset.1] @@ -79,7 +76,6 @@ encryption_include_filters="" encryption_exclude_filters="" encrypt_pck=false encrypt_directory=false -script_encryption_key="" [preset.1.options] @@ -93,12 +89,6 @@ architectures/armeabi-v7a=true architectures/arm64-v8a=true architectures/x86=true architectures/x86_64=true -keystore/debug="D:/home/work/Effekseer/EffekseerForGodot4/Dev/build/debug.keystore" -keystore/debug_user="androiddebugkey" -keystore/debug_password="android" -keystore/release="" -keystore/release_user="" -keystore/release_password="" version/code=1 version/name="1.0" package/unique_name="org.godotengine.$genname" @@ -288,7 +278,6 @@ encryption_include_filters="" encryption_exclude_filters="" encrypt_pck=false encrypt_directory=false -script_encryption_key="" [preset.2.options] diff --git a/Demo/project.godot b/Demo/project.godot index 18c6352..e52b09b 100644 --- a/Demo/project.godot +++ b/Demo/project.godot @@ -12,7 +12,7 @@ config_version=5 config/name="EffekseerForGodot4" run/main_scene="res://scenes/Scene3D.tscn" -config/features=PackedStringArray("4.1") +config/features=PackedStringArray("4.2") config/icon="res://addons/effekseer/icon64.png" [debug] diff --git a/Dev/Cpp/EffekseerGodot4.vcxproj b/Dev/Cpp/EffekseerGodot4.vcxproj index 8792892..5cae8e7 100644 --- a/Dev/Cpp/EffekseerGodot4.vcxproj +++ b/Dev/Cpp/EffekseerGodot4.vcxproj @@ -44,6 +44,7 @@ + @@ -162,6 +163,7 @@ + @@ -282,12 +284,9 @@ - - - @@ -299,8 +298,6 @@ - - @@ -312,8 +309,6 @@ - - @@ -329,6 +324,7 @@ + @@ -376,7 +372,6 @@ - @@ -423,8 +418,6 @@ - - @@ -441,6 +434,7 @@ + @@ -469,12 +463,15 @@ + + + @@ -589,11 +586,29 @@ + + + + - + + + + + + + + + + + + + + + @@ -687,10 +702,16 @@ + + + + + + @@ -727,7 +748,6 @@ - @@ -803,7 +823,9 @@ + + @@ -850,6 +872,7 @@ + @@ -888,7 +911,6 @@ - @@ -907,7 +929,7 @@ - + diff --git a/Dev/Cpp/EffekseerGodot4.vcxproj.filters b/Dev/Cpp/EffekseerGodot4.vcxproj.filters index 871fbdf..5682077 100644 --- a/Dev/Cpp/EffekseerGodot4.vcxproj.filters +++ b/Dev/Cpp/EffekseerGodot4.vcxproj.filters @@ -228,62 +228,71 @@ EffekseerGodot\RendererGodot\Shaders - - godot-cpp\gen + + godot-cpp\src\classes - - godot-cpp\gen\variant + + godot-cpp\src\classes - - godot-cpp\gen\variant + + godot-cpp\src\core - - godot-cpp\gen\variant + + godot-cpp\src\core - - godot-cpp\gen\variant + + godot-cpp\src\core - - godot-cpp\gen\variant + + godot-cpp\src\core - - godot-cpp\gen\variant + + godot-cpp\src\core - - godot-cpp\gen\variant + + godot-cpp\gen\classes - - godot-cpp\gen\variant + + godot-cpp\gen\classes - - godot-cpp\gen\variant + + godot-cpp\gen\classes - - godot-cpp\gen\variant + + godot-cpp\gen\classes - - godot-cpp\gen\variant + + godot-cpp\gen\classes - - godot-cpp\gen\variant + + godot-cpp\gen\classes - - godot-cpp\gen\variant + + godot-cpp\gen\classes - - godot-cpp\gen\variant + + godot-cpp\gen\classes - - godot-cpp\gen\variant + + godot-cpp\gen\classes - - godot-cpp\gen\variant + + godot-cpp\gen\classes - - godot-cpp\gen\variant + + godot-cpp\gen\classes - - godot-cpp\gen\variant + + godot-cpp\gen\classes + + + godot-cpp\gen\classes + + + godot-cpp\gen\classes + + + godot-cpp\gen\classes godot-cpp\gen\classes @@ -309,6 +318,9 @@ godot-cpp\gen\classes + + godot-cpp\gen\classes + godot-cpp\gen\classes @@ -654,6 +666,9 @@ godot-cpp\gen\classes + + godot-cpp\gen\classes + godot-cpp\gen\classes @@ -1014,9 +1029,6 @@ godot-cpp\gen\classes - - godot-cpp\gen\classes - godot-cpp\gen\classes @@ -1026,12 +1038,6 @@ godot-cpp\gen\classes - - godot-cpp\gen\classes - - - godot-cpp\gen\classes - godot-cpp\gen\classes @@ -1065,12 +1071,6 @@ godot-cpp\gen\classes - - godot-cpp\gen\classes - - - godot-cpp\gen\classes - godot-cpp\gen\classes @@ -1104,12 +1104,6 @@ godot-cpp\gen\classes - - godot-cpp\gen\classes - - - godot-cpp\gen\classes - godot-cpp\gen\classes @@ -1155,6 +1149,9 @@ godot-cpp\gen\classes + + godot-cpp\gen\classes + godot-cpp\gen\classes @@ -1296,9 +1293,6 @@ godot-cpp\gen\classes - - godot-cpp\gen\classes - godot-cpp\gen\classes @@ -1437,12 +1431,6 @@ godot-cpp\gen\classes - - godot-cpp\gen\classes - - - godot-cpp\gen\classes - godot-cpp\gen\classes @@ -1491,6 +1479,9 @@ godot-cpp\gen\classes + + godot-cpp\gen\classes + godot-cpp\gen\classes @@ -1584,15 +1575,24 @@ godot-cpp\gen\classes + + godot-cpp\gen\classes + godot-cpp\gen\classes godot-cpp\gen\classes + + godot-cpp\gen\classes + godot-cpp\gen\classes + + godot-cpp\gen\classes + godot-cpp\gen\classes @@ -1929,6 +1929,18 @@ godot-cpp\gen\classes + + godot-cpp\gen\classes + + + godot-cpp\gen\classes + + + godot-cpp\gen\classes + + + godot-cpp\gen\classes + godot-cpp\gen\classes @@ -1938,9 +1950,6 @@ godot-cpp\gen\classes - - godot-cpp\gen\classes - godot-cpp\gen\classes @@ -1950,6 +1959,51 @@ godot-cpp\gen\classes + + godot-cpp\gen\classes + + + godot-cpp\gen\classes + + + godot-cpp\gen\classes + + + godot-cpp\gen\classes + + + godot-cpp\gen\classes + + + godot-cpp\gen\classes + + + godot-cpp\gen\classes + + + godot-cpp\gen\classes + + + godot-cpp\gen\classes + + + godot-cpp\gen\classes + + + godot-cpp\gen\classes + + + godot-cpp\gen\classes + + + godot-cpp\gen\classes + + + godot-cpp\gen\classes + + + godot-cpp\gen\classes + godot-cpp\gen\classes @@ -2256,9 +2310,18 @@ godot-cpp\gen\classes + + godot-cpp\gen\classes + + + godot-cpp\gen\classes + godot-cpp\gen\classes + + godot-cpp\gen\classes + godot-cpp\gen\classes @@ -2271,9 +2334,18 @@ godot-cpp\gen\classes + + godot-cpp\gen\classes + + + godot-cpp\gen\classes + godot-cpp\gen\classes + + godot-cpp\gen\classes + godot-cpp\gen\classes @@ -2349,9 +2421,6 @@ godot-cpp\gen\classes - - godot-cpp\gen\classes - godot-cpp\gen\classes @@ -2595,9 +2664,15 @@ godot-cpp\gen\classes + + godot-cpp\gen\classes + godot-cpp\gen\classes + + godot-cpp\gen\classes + godot-cpp\gen\classes @@ -2736,6 +2811,9 @@ godot-cpp\gen\classes + + godot-cpp\gen\classes + godot-cpp\gen\classes @@ -2799,74 +2877,62 @@ godot-cpp\gen\classes - - godot-cpp\gen\classes - - - godot-cpp\gen\classes - - - godot-cpp\gen\classes - - - godot-cpp\gen\classes - - - godot-cpp\gen\classes + + godot-cpp\gen\variant - - godot-cpp\gen\classes + + godot-cpp\gen\variant - - godot-cpp\gen\classes + + godot-cpp\gen\variant - - godot-cpp\gen\classes + + godot-cpp\gen\variant - - godot-cpp\gen\classes + + godot-cpp\gen\variant - - godot-cpp\gen\classes + + godot-cpp\gen\variant - - godot-cpp\gen\classes + + godot-cpp\gen\variant - - godot-cpp\gen\classes + + godot-cpp\gen\variant - - godot-cpp\gen\classes + + godot-cpp\gen\variant - - godot-cpp\gen\classes + + godot-cpp\gen\variant - - godot-cpp\gen\classes + + godot-cpp\gen\variant - - godot-cpp\src\classes + + godot-cpp\gen\variant - - godot-cpp\src\classes + + godot-cpp\gen\variant - - godot-cpp\src\classes + + godot-cpp\gen\variant - - godot-cpp\src\core + + godot-cpp\gen\variant - - godot-cpp\src\core + + godot-cpp\gen\variant - - godot-cpp\src\core + + godot-cpp\gen\variant - - godot-cpp\src\core + + godot-cpp\gen\variant - - godot-cpp\src\core + + godot-cpp\src\classes diff --git a/Dev/Cpp/godot-cpp b/Dev/Cpp/godot-cpp index d627942..78ffea5 160000 --- a/Dev/Cpp/godot-cpp +++ b/Dev/Cpp/godot-cpp @@ -1 +1 @@ -Subproject commit d627942b647105aff600225a59dffa65de206247 +Subproject commit 78ffea5b136f3178c31cddb28f6b963ceaa89420 diff --git a/Dev/Cpp/src/Utils/EffekseerGodot.Utils.cpp b/Dev/Cpp/src/Utils/EffekseerGodot.Utils.cpp index 02e8681..88fc1db 100644 --- a/Dev/Cpp/src/Utils/EffekseerGodot.Utils.cpp +++ b/Dev/Cpp/src/Utils/EffekseerGodot.Utils.cpp @@ -1,7 +1,6 @@ #include #include #include -#include #include #include "EffekseerGodot.Utils.h" #include "EffekseerRenderer.CommonUtils.h" @@ -55,15 +54,7 @@ godot::Variant ScriptNew(godot::Ref script) { using namespace godot; - auto className = script->get_class(); - if (className == "GDScript") { - return Ref(script)->new_(); - } else if (className == "NativeScript") { - return Ref(script)->new_(); - } else if (className == "VisualScript") { - return Variant(); - } - return Variant(); + return Ref(script)->new_(); } uint32_t ToGdNormal(const Effekseer::Vector3D& v) diff --git a/Dev/Godot/addons/effekseer/plugin.gd b/Dev/Godot/addons/effekseer/plugin.gd index 1764bd2..b8dd6ff 100644 --- a/Dev/Godot/addons/effekseer/plugin.gd +++ b/Dev/Godot/addons/effekseer/plugin.gd @@ -19,7 +19,7 @@ func _enter_tree(): add_editor_setting("effekseer/preview_mode", "", TYPE_INT, PROPERTY_HINT_ENUM, "3D,2D") var icon = load(plugin_path + "/icon16.png") as Texture2D - var theme = get_editor_interface().get_base_control().get_theme() + var theme = EditorInterface.get_editor_theme() theme.set_icon("EffekseerEmitter3D", "EditorIcons", icon) theme.set_icon("EffekseerEmitter2D", "EditorIcons", icon) theme.set_icon("EffekseerEffect", "EditorIcons", icon) @@ -30,7 +30,7 @@ func _enter_tree(): add_import_plugin(resource_import_plugin) if Engine.is_editor_hint(): - effect_inspector_plugin = load(plugin_source_path + "/EffekseerEffectInspectorPlugin.gd").new(get_editor_interface()) + effect_inspector_plugin = load(plugin_source_path + "/EffekseerEffectInspectorPlugin.gd").new(EditorInterface) add_inspector_plugin(effect_inspector_plugin) emitter3d_gizmo_plugin = load(plugin_source_path + "/EffekseerEmitter3DGizmoPlugin.gd").new() add_node_3d_gizmo_plugin(emitter3d_gizmo_plugin) @@ -77,7 +77,7 @@ func remove_project_setting(name: String): func add_editor_setting(name: String, initial_value, type: int, hint: int, hint_string: String) -> void: - var editor_settings := get_editor_interface().get_editor_settings() + var editor_settings := EditorInterface.get_editor_settings() if not editor_settings.has_setting(name): editor_settings.set_setting(name, initial_value) @@ -92,7 +92,7 @@ func add_editor_setting(name: String, initial_value, type: int, hint: int, hint_ func remove_editor_setting(name: String): - var editor_settings := get_editor_interface().get_editor_settings() + var editor_settings := EditorInterface.get_editor_settings() editor_settings.erase(name)