11
$\begingroup$

Is it possible to unselect only the parts that were hidden, after the unhide command (AltH)? I want to keep the previous selection.

enter image description here

sdf

$\endgroup$
2
  • $\begingroup$ While it's not python solution, you can use vertex group for that. Create one, assign selected vertices to it, unhide and deselect everythiing. Then, select vertices assigned to the group. $\endgroup$
    – Mr Zak
    Jun 9, 2015 at 14:32
  • 2
    $\begingroup$ I did python solution which unhides all verts/faces and leave selection as it was before. pastebin.com/H4gzFYEr But i don't know how to add it to shortcut and to the addon. $\endgroup$
    – mifth
    Jun 9, 2015 at 14:37

3 Answers 3

10
$\begingroup$

There may be a more elegant solution, but i believe this process gives you the result you are seeking.

Select the mesh vertices you are interested in.
Invert your selection (Ctrl + I).
Unhide the hidden mesh components (Alt + H).
Invert your selection with Ctrl I again.

$\endgroup$
1
  • 2
    $\begingroup$ very nice work around. UVed $\endgroup$
    – David
    Jun 9, 2015 at 15:11
4
$\begingroup$

Here is an addon I made a couple years ago which makes this functionality appear in the toolbox as Reveal Hidden, deselected, updated for Blender 2.80:

bl_info = {
    "name": "Reveal Hidden, deselected",
    "description": "Unhide/Reveal hidden geometry without it getting added to selection.",
    "author": "Zyl",
    "version": (1, 1),
    "blender": (2, 80, 0),
    "location": "Toolbox > Reveal Hidden, deselected",
    "category": "Mesh"
}

import bpy
import bmesh

class RevealHiddenDeselected(bpy.types.Operator):
    """Unhide/Reveal hidden geometry without it getting added to selection."""
    bl_idname = "mesh.reveal_hidden_deselected"
    bl_label = "Reveal Hidden, deselected"
    bl_options = { 'REGISTER', 'UNDO' }

    def execute(self, context):
        me = context.active_object.data
        if me is None:
            return { 'FINISHED' }
        bm = None
        inedit = me.is_editmode
        if not inedit:
            print("Must be in edit mode to unhide w/o selecting.")
            return { 'FINISHED' }
        else:
            bm = bmesh.from_edit_mesh(me)
        if bm is None:
            return { 'FINISHED' }
        for v in bm.verts:
            v.hide_set(False)
        for e in bm.edges:
            e.hide_set(False)
        for f in bm.faces:
            f.hide_set(False)
        bmesh.update_edit_mesh(me, False, False)
        return { 'FINISHED' }

def register():
    bpy.utils.register_class(RevealHiddenDeselected)

def unregister():
    bpy.utils.unregister_class(RevealHiddenDeselected)
$\endgroup$
2
  • $\begingroup$ Tested, works great. Thanks for sharing. Could it be possible to provide a link to th 2.79 version? $\endgroup$
    – Leander
    Jul 24, 2019 at 19:47
  • $\begingroup$ Try this for pre-2.80: pastebin.com/ycPwcWs4 $\endgroup$
    – Zyl
    Jul 24, 2019 at 20:02
1
$\begingroup$

enter image description here

Uncheck Select in your Keymap preferences. It'll work for Object Mode, Edit Mode and much more.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .