/****************************************************************************** * Spine Runtimes License Agreement * Last updated January 1, 2020. Replaces all prior versions. * * Copyright (c) 2013-2020, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and * conditions of Section 2 of the Spine Editor License Agreement: * http://esotericsoftware.com/spine-editor-license * * Otherwise, it is permitted to integrate the Spine Runtimes into software * or otherwise create derivative works of the Spine Runtimes (collectively, * "Products"), provided that each user of the Products must obtain their own * Spine Editor license and redistribution of the Products in any form must * include this license and copyright notice. * * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ #ifndef GODOT_SPINEEDITORPLUGIN_H #define GODOT_SPINEEDITORPLUGIN_H #ifdef TOOLS_ENABLED #include "editor/editor_node.h" class SpineAtlasResourceImportPlugin : public EditorImportPlugin { GDCLASS(SpineAtlasResourceImportPlugin, EditorImportPlugin) public: String get_importer_name() const override { return "spine.atlas"; } String get_visible_name() const override { return "Spine Runtime Atlas"; } void get_recognized_extensions(List *extensions) const override { extensions->push_back("atlas"); } String get_preset_name(int idx) const override { return idx == 0 ? "Default" : "Unknown"; } int get_preset_count() const override { return 1; } String get_save_extension() const override { return "spatlas"; } String get_resource_type() const override { return "SpineAtlasResource"; } void get_import_options(List *options, int preset) const override; bool get_option_visibility(const String &option, const Map &options) const override { return true; } Error import(const String &source_file, const String &save_path, const Map &options, List *platform_variants, List *gen_files, Variant *metadata) override; }; class SpineJsonResourceImportPlugin : public EditorImportPlugin { GDCLASS(SpineJsonResourceImportPlugin, EditorImportPlugin) public: String get_importer_name() const override { return "spine.json"; } String get_visible_name() const override { return "Spine Skeleton Json"; } void get_recognized_extensions(List *extensions) const override { extensions->push_back("json"); } String get_preset_name(int idx) const override { return idx == 0 ? "Default" : "Unknown"; } int get_preset_count() const override { return 1; } String get_save_extension() const override { return "spjson"; } String get_resource_type() const override { return "SpineSkeletonFileResource"; } void get_import_options(List *options, int preset) const override {} bool get_option_visibility(const String &option, const Map &options) const override { return true; } Error import(const String &source_file, const String &save_path, const Map &options, List *platform_variants, List *gen_files, Variant *metadata) override; }; class SpineBinaryResourceImportPlugin : public EditorImportPlugin { GDCLASS(SpineBinaryResourceImportPlugin, EditorImportPlugin); public: String get_importer_name() const override { return "spine.skel"; } String get_visible_name() const override { return "Spine Skeleton Binary"; } void get_recognized_extensions(List *extensions) const override { extensions->push_back("skel"); } String get_preset_name(int idx) const override { return idx == 0 ? "Default" : "Unknown"; } int get_preset_count() const override { return 1; } String get_save_extension() const override { return "spskel"; } String get_resource_type() const override { return "SpineSkeletonFileResource"; } void get_import_options(List *options, int preset) const override {} bool get_option_visibility(const String &option, const Map &options) const override { return true; } Error import(const String &source_file, const String &save_path, const Map &options, List *platform_variants, List *gen_files, Variant *metadata) override; }; class SpineEditorPlugin : public EditorPlugin { GDCLASS(SpineEditorPlugin, EditorPlugin) public: SpineEditorPlugin(EditorNode *node); ~SpineEditorPlugin(); String get_name() const override { return "SpineEditorPlugin"; } bool has_main_screen() const { return false; } bool handles(Object *object) const override; }; #endif #endif//GODOT_SPINEEDITORPLUGIN_H