diff --git a/js/copy_paste.js b/js/copy_paste.js index de2bc600..cf642983 100644 --- a/js/copy_paste.js +++ b/js/copy_paste.js @@ -253,6 +253,8 @@ const Clipbench = { new_mesh = new Mesh({name: 'pasted', vertices: []}); elements.push(new_mesh); } + let selection_mode_before = BarItems.selection_mode.value; + BarItems.selection_mode.change('vertex'); elements.forEach(mesh => { let old_vertices = Object.keys(this.vertices); let vertices_positions = old_vertices.map(vkey => this.vertices[vkey]); @@ -276,6 +278,9 @@ const Clipbench = { if (new_mesh) { new_mesh.init().select(); } + // Update vertex selection to appropriate selection mode + BarItems.selection_mode.change(selection_mode_before); + Undo.finishEdit('Paste mesh selection'); Canvas.updateView({elements: Mesh.selected, selection: true}) }, diff --git a/js/modeling/mesh_editing.js b/js/modeling/mesh_editing.js index c286c57f..c115180e 100644 --- a/js/modeling/mesh_editing.js +++ b/js/modeling/mesh_editing.js @@ -438,7 +438,7 @@ BARS.defineActions(function() { } }) } - if (value == 'face' && ['edge', 'vertex'].includes(previous_selection_mode)) { + if ((value == 'face' || value == 'cluster') && ['edge', 'vertex'].includes(previous_selection_mode)) { Mesh.selected.forEach(mesh => { let vertices = mesh.getSelectedVertices(); let faces = mesh.getSelectedFaces(true); diff --git a/js/texturing/uv.js b/js/texturing/uv.js index ab8b3f07..49026833 100644 --- a/js/texturing/uv.js +++ b/js/texturing/uv.js @@ -3252,7 +3252,7 @@ Interface.definePanels(function() { </div> - <div id="uv_face_properties" v-if="mode === 'face_properties' && mappable_elements[0] && mappable_elements[0].type == 'cube'"> + <div id="uv_face_properties" v-if="mode === 'face_properties'"> <div class="bar" id="face_properties_header_bar"> <li></li> <li @click="mode = 'uv'" class="tool face_properties_toggle"> @@ -3287,7 +3287,7 @@ Interface.definePanels(function() { </div> - <ul> + <ul v-if="mappable_elements[0] && mappable_elements[0].type == 'cube'"> <li v-for="(face, key) in mappable_elements[0].faces" :face="key" class="uv_face_properties_line" :class="{selected: selected_faces.includes(key), disabled: mappable_elements[0].faces[key].texture === null}"