Skip to content

Commit

Permalink
Add animation binding data to Import Session Data button (#462)
Browse files Browse the repository at this point in the history
  • Loading branch information
grillo-delmal authored Dec 3, 2024
1 parent 457c5ab commit 08930a3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions source/creator/widgets/mainmenu.d
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,19 @@ void incMainMenu() {

if (string path = incShowImportDialog(filters, _("Import..."))) {
Puppet p = inLoadPuppet!ExPuppet(path);
bool imported = false;

if ("com.inochi2d.inochi-session.bindings" in p.extData) {
incActivePuppet().extData["com.inochi2d.inochi-session.bindings"] = p.extData["com.inochi2d.inochi-session.bindings"].dup;
imported = true;
}

if ("com.inochi2d.inochi-session.animations" in p.extData) {
incActivePuppet().extData["com.inochi2d.inochi-session.animations"] = p.extData["com.inochi2d.inochi-session.animations"].dup;
imported = true;
}

if(imported){
incSetStatus(_("Successfully overwrote Inochi Session tracking data..."));
} else {
incDialog(__("Error"), _("There was no Inochi Session data to import!"));
Expand Down

0 comments on commit 08930a3

Please sign in to comment.