From 81a9e44ee04a0a8848d2dd58eac987d27233220d Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 23 Feb 2021 10:25:11 +0100 Subject: [PATCH] Added a patch for voxelman to make the spatial editor plugin work again, if the skeleton editor plugin patch is applied, as it changes forward_spatitial_gui_input. It gets applied automatically after the skeleton editor plugin patch. --- SConstruct | 21 +++++++++++++--- ...itor-after-the-skeleton-editor-patch.patch | 25 +++++++++++++++++++ 2 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 patches/fix-voxel-editor-after-the-skeleton-editor-patch.patch diff --git a/SConstruct b/SConstruct index 1458c0c1..9ea3cc5e 100644 --- a/SConstruct +++ b/SConstruct @@ -453,7 +453,7 @@ if len(sys.argv) > 1: full_path = cwd + '/engine/' if not os.path.isdir(full_path): - print('engine directory doesnt exists.') + print('engine directory does not exists.') exit() os.chdir(full_path) @@ -463,8 +463,23 @@ if len(sys.argv) > 1: if 's' in arg: subprocess.call('git apply --index ../patches/custom_skeleton_3d_editor_plugin.patch', shell=True) - #unstage all files - subprocess.call('git reset', shell=True) + #unstage all files + subprocess.call('git reset', shell=True) + + vman_full_path = cwd + '/engine/modules/voxelman/' + + #also patch voxelman as the plugin changes forward_spatial_gui_input's definition + if os.path.isdir(vman_full_path): + os.chdir(vman_full_path) + + subprocess.call('git apply --index ../../../patches/fix-voxel-editor-after-the-skeleton-editor-patch.patch', shell=True) + + #unstage all files + subprocess.call('git reset', shell=True) + else: + print('Voxelman directory does not exists, skipping patch.') + + exit() diff --git a/patches/fix-voxel-editor-after-the-skeleton-editor-patch.patch b/patches/fix-voxel-editor-after-the-skeleton-editor-patch.patch new file mode 100644 index 00000000..5ab8de68 --- /dev/null +++ b/patches/fix-voxel-editor-after-the-skeleton-editor-patch.patch @@ -0,0 +1,25 @@ +From e99fc279858d939b833bdda85fd664ef4c335b09 Mon Sep 17 00:00:00 2001 +From: Relintai +Date: Tue, 23 Feb 2021 10:14:50 +0100 +Subject: [PATCH] Fix voxel editor after the skeleton editor patch. + +--- + world/voxel_world_editor.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/world/voxel_world_editor.h b/world/voxel_world_editor.h +index 7195940..9ae9717 100644 +--- a/world/voxel_world_editor.h ++++ b/world/voxel_world_editor.h +@@ -91,7 +91,7 @@ protected: + void _notification(int p_what); + + public: +- virtual bool forward_spatial_gui_input(Camera *p_camera, const Ref &p_event) { return voxel_world_editor->forward_spatial_input_event(p_camera, p_event); } ++ virtual bool forward_spatial_gui_input(int p_index, Camera *p_camera, const Ref &p_event) { return voxel_world_editor->forward_spatial_input_event(p_camera, p_event); } + virtual String get_name() const { return "VoxelWorldEditor"; } + bool has_main_screen() const { return false; } + virtual void edit(Object *p_object); +-- +2.30.1 +