2020-01-31 19:43:20 +01:00
|
|
|
/*
|
2022-01-12 22:22:04 +01:00
|
|
|
Copyright (c) 2019-2022 Péter Magyar
|
2020-01-31 19:43:20 +01:00
|
|
|
|
|
|
|
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.
|
|
|
|
*/
|
|
|
|
|
2019-10-22 04:22:32 +02:00
|
|
|
#include "editor_plugin_packer_image_resource.h"
|
|
|
|
|
2022-02-08 11:53:26 +01:00
|
|
|
#include "core/version.h"
|
|
|
|
|
2019-10-22 04:22:32 +02:00
|
|
|
void EditorPluginPackerImageResource::_notification(int p_what) {
|
|
|
|
switch (p_what) {
|
|
|
|
case NOTIFICATION_ENTER_TREE:
|
2023-01-09 01:17:15 +01:00
|
|
|
_importer.instantiate();
|
2019-10-22 04:22:32 +02:00
|
|
|
add_import_plugin(_importer);
|
|
|
|
|
|
|
|
break;
|
|
|
|
case NOTIFICATION_EXIT_TREE:
|
|
|
|
remove_import_plugin(_importer);
|
|
|
|
|
|
|
|
_importer.unref();
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-27 22:08:19 +02:00
|
|
|
EditorPluginPackerImageResource::EditorPluginPackerImageResource() {
|
2019-10-22 04:22:32 +02:00
|
|
|
}
|