paint: fix skinning timeline playback

This commit is contained in:
luboslenco
2026-07-17 15:06:13 +02:00
parent ddb52925b9
commit ee0cc3b7cc
2 changed files with 14 additions and 8 deletions
+8 -5
View File
@@ -1,10 +1,11 @@
#include "../global.h"
bool import_mesh_clear_layers = true;
bool import_mesh_needs_unwrap = false;
bool import_mesh_no_reset = false;
bool import_mesh_no_scale = false;
bool import_mesh_clear_layers = true;
bool import_mesh_needs_unwrap = false;
bool import_mesh_no_reset = false;
bool import_mesh_no_scale = false;
bool import_mesh_keep_timeline = false;
void import_mesh_run(char *path, bool _clear_layers, bool replace_existing, bool keep_camera) {
if (!path_is_mesh(path)) {
@@ -193,7 +194,9 @@ void import_mesh_make_mesh(raw_mesh_t *mesh) {
md->_->handle = string_copy(raw->name);
any_map_set(data_cached_meshes, md->_->handle, md);
tab_timeline_reset();
if (!import_mesh_keep_timeline) {
tab_timeline_reset();
}
g_context->ddirty = 4;
+6 -3
View File
@@ -378,12 +378,15 @@ void project_reimport_mesh() {
void project_reimport_mesh_skinned(int frame) {
extern bool import_mesh_no_scale;
extern bool import_mesh_keep_timeline;
extern int plugins_skinning_frame;
if (g_project->mesh_assets != NULL && g_project->mesh_assets->length > 0 && iron_file_exists(g_project->mesh_assets->buffer[0])) {
plugins_skinning_frame = frame;
import_mesh_no_scale = true;
plugins_skinning_frame = frame;
import_mesh_no_scale = true;
import_mesh_keep_timeline = true;
import_mesh_run(g_project->mesh_assets->buffer[0], false, true, true);
plugins_skinning_frame = -1;
import_mesh_keep_timeline = false;
plugins_skinning_frame = -1;
}
}