9
$\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$
  • $\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 '15 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 '15 at 14:37
7
$\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$
  • 2
    $\begingroup$ very nice work around. UVed $\endgroup$ – David Jun 9 '15 at 15:11
2
$\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$
  • $\begingroup$ Tested, works great. Thanks for sharing. Could it be possible to provide a link to th 2.79 version? $\endgroup$ – Leander Jul 24 '19 at 19:47
  • $\begingroup$ Try this for pre-2.80: pastebin.com/ycPwcWs4 $\endgroup$ – Zyl Jul 24 '19 at 20:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.