paint: add stages

This commit is contained in:
luboslenco
2026-06-08 21:53:31 +02:00
parent facadc840d
commit c25e30c69a
14 changed files with 243 additions and 96 deletions
+14
View File
@@ -271,11 +271,25 @@ project_t *import_arm_from_map_to_arm(any_map_t *old) {
}
}
any_array_t *stages = any_map_get(old, "stages");
if (stages != NULL) {
project->stages = any_array_create_from_raw((void *[]){}, 0);
for (i32 i = 0; i < stages->length; ++i) {
any_map_t *old = stages->buffer[i];
stage_t *d = GC_ALLOC_INIT(stage_t, {0});
d->name = any_map_get(old, "name");
d->objects = any_map_get(old, "objects");
d->layers = any_map_get(old, "layers");
any_array_push(project->stages, d);
}
}
return project;
}
project_t *import_arm_from_version_8(any_map_t *old) {
any_map_set(old, "script_names", NULL);
any_map_set(old, "stages", NULL);
return import_arm_from_map_to_arm(old);
}
+2
View File
@@ -213,6 +213,8 @@ void import_mesh_make_mesh(raw_mesh_t *mesh) {
history_reset();
}
g_project->stages = NULL;
// Wait for add_mesh calls to finish
sys_notify_on_next_frame(&import_mesh_finish_import, NULL);
}