rotate immediately when editing models::rotation

This commit is contained in:
Zeno Rogue 2023-08-14 17:42:15 +02:00
parent 757579fb18
commit dff8db44b0
2 changed files with 4 additions and 0 deletions

View File

@ -1157,6 +1157,7 @@ EX namespace dialog {
ne.reaction = [re, this] { *edit_matrix = spin(angle * degree); if(re) re(); }; ne.reaction = [re, this] { *edit_matrix = spin(angle * degree); if(re) re(); };
ne.reaction_final = reaction; ne.reaction_final = reaction;
ne.animatable = false; ne.animatable = false;
ne.dialogflags |= dialogflags;
}); });
} }
if(dim == 3) { if(dim == 3) {
@ -1172,6 +1173,7 @@ EX namespace dialog {
ne.reaction = [re, i, j, this, cur] { *edit_matrix = cspin(i, j, angle * degree) * cur; if(re) re(); }; ne.reaction = [re, i, j, this, cur] { *edit_matrix = cspin(i, j, angle * degree) * cur; if(re) re(); };
ne.reaction_final = reaction; ne.reaction_final = reaction;
ne.animatable = false; ne.animatable = false;
ne.dialogflags |= dialogflags;
}); });
}; };
rot_but(0, 1, "rotate in XY", 'z'); rot_but(0, 1, "rotate in XY", 'z');
@ -1204,6 +1206,7 @@ EX namespace dialog {
} }
catch(hr_parse_exception&) { } catch(hr_parse_exception&) { }
}; };
dialog::get_di().dialogflags |= dialogflags;
}); });
if(extra_options) extra_options(); if(extra_options) extra_options();
addBack(); addBack();

View File

@ -933,6 +933,7 @@ EX namespace models {
} }
auto setrot = [] { auto setrot = [] {
dialog::get_di().dialogflags |= sm::CENTER;
dialog::addBreak(100); dialog::addBreak(100);
dialog::addBoolItem_choice("line animation only", models::do_rotate, 0, 'N'); dialog::addBoolItem_choice("line animation only", models::do_rotate, 0, 'N');
dialog::addBoolItem_choice("gravity lands", models::do_rotate, 1, 'G'); dialog::addBoolItem_choice("gravity lands", models::do_rotate, 1, 'G');