-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgodot_kra_importer.h
59 lines (42 loc) · 1.27 KB
/
godot_kra_importer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef KRA_IMPORTER_H
#define KRA_IMPORTER_H
#include <godot_cpp/variant/utility_functions.hpp>
#include <godot_cpp/classes/project_settings.hpp>
#include <godot_cpp/classes/image.hpp>
#include <codecvt>
#include <locale>
#include <memory>
#include "libkra/libkra/kra_document.h"
namespace godot
{
class KraImporter : public RefCounted
{
GDCLASS(KraImporter, RefCounted)
private:
std::unique_ptr<kra::Document> document;
Dictionary _get_layer_data(const std::unique_ptr<kra::ExportedLayer> &exported_layer);
protected:
static void _bind_methods();
public:
// Constants.
enum VerbosityLevel {
QUIET = 0,
NORMAL = 1,
VERBOSE = 2,
VERY_VERBOSE = 3
};
KraImporter();
~KraImporter();
// Functions.
void load(String p_path);
Dictionary get_layer_data_at(int p_layer_index);
Dictionary get_layer_data_with_uuid(String p_uuid);
// Properties.
void set_layer_count(int p_layer_count);
int get_layer_count();
void set_verbosity_level(int p_verbosity_level);
int get_verbosity_level();
};
} //namespace godot
VARIANT_ENUM_CAST(KraImporter::VerbosityLevel);
#endif // KRA_IMPORTER_H