From 5f974b598b215ed388d2c4e3a5dfd49ae949e515 Mon Sep 17 00:00:00 2001 From: luboslenco Date: Tue, 14 Apr 2026 19:42:57 +0200 Subject: [PATCH] paint: add test01.c --- paint/assets/plugins/dev/test01.c | 18 ++++++++++++++++++ paint/sources/export_texture.c | 7 +++++++ 2 files changed, 25 insertions(+) create mode 100644 paint/assets/plugins/dev/test01.c diff --git a/paint/assets/plugins/dev/test01.c b/paint/assets/plugins/dev/test01.c new file mode 100644 index 00000000..bc829b8f --- /dev/null +++ b/paint/assets/plugins/dev/test01.c @@ -0,0 +1,18 @@ +#include "global.h" + +void next_frame() { + + for (int i = 0; i < 14; ++i) { + context_select_tool(i); + } + + export_texture_run("/tmp", false); + project_filepath_set("/tmp/untitled.arm"); + project_save(true); + + console_info("PASS"); +} + +void main() { + script_notify_on_next_frame(next_frame); +} diff --git a/paint/sources/export_texture.c b/paint/sources/export_texture.c index 33d6624c..b87381bf 100644 --- a/paint/sources/export_texture.c +++ b/paint/sources/export_texture.c @@ -449,6 +449,13 @@ void export_texture_run_bake_material(char *path) { void export_texture_run(char *path, bool bake_material) { + //// + if (box_export_files == NULL) { + box_export_fetch_presets(); + box_export_parse_preset(); + } + //// + if (bake_material) { export_texture_run_bake_material(path); }