rework and improve tool bar pop menus
This commit is contained in:
parent
9a02408e7b
commit
3a97903017
9 changed files with 179 additions and 129 deletions
|
|
@ -24,12 +24,18 @@ function for_groups(fn) {
|
|||
function for_widgets(fn, noauto) {
|
||||
let m = selectedMeshes;
|
||||
let w = api.widgets.all();
|
||||
if (m.length === 0 && w.length === 1) {
|
||||
m = noauto ? [] : [ w[0].mesh ];
|
||||
if (m.length === 0 && w.length) {
|
||||
m = noauto ? [] : w.map(w => w.mesh);
|
||||
}
|
||||
m.slice().forEach(mesh => { fn(mesh.widget) });
|
||||
}
|
||||
|
||||
function for_status(fn) {
|
||||
api.widgets.all().forEach(w => {
|
||||
fn(w, selectedMeshes.contains(w.mesh));
|
||||
});
|
||||
}
|
||||
|
||||
function for_meshes(fn) {
|
||||
selectedMeshes.slice().forEach(mesh => { fn(mesh) });
|
||||
}
|
||||
|
|
@ -276,6 +282,7 @@ const selection = api.selection = {
|
|||
duplicate,
|
||||
for_groups,
|
||||
for_meshes,
|
||||
for_status,
|
||||
for_widgets,
|
||||
update_bounds,
|
||||
update_info,
|
||||
|
|
|
|||
Loading…
Reference in a new issue