Page MenuHome

Select option for reveal operators

Authored by Campbell Barton (campbellbarton) on Sep 11 2015, 8:49 PM.



This patch adds a select option to the reveal / unhide operators for the following editors:
Armature, Pose, Curve, Mask, Mesh, Object, Paint, Particles, Graph, UVEdit

These changes actively select or unselect the objects being unhidden.

Most of the hide operators actively deselect when hiding objects. However, there are some exceptions:

Hidden metaballs can still be selected / unselected and manipulated in the same way as unhidden ones.
Muting strips in the video sequence editor works the same way.
Hiding tracking markers in the movie clip editor prevents manipulation, but does not change selection.
It might be worth adding the select option to these editors, but with an additional setting ("no change" (?) - do not change the current selection) as the default. If this sounds like a good idea, is this something that should be added here?

Sculpt mode hide / show doesn't have anything to do with selection, so I haven't touched it.

Other issues:

The paint reveal operator had an unused "unselected" variable. This has been replaced with the select option.
The paint reveal operator was also unsetting the hidden flag incorrectly (using -= FOO instead of &= ~FOO). This has been changed in this patch.
Although the select unhidden feature works correctly in vertex paint and weight paint mode, it doesn't work in texture paint mode. It seems that changing the option in the redo panel doesn't properly redo the action (the same can be seen with the hide operator). I'm inclined to report this as a bug (if it's not known already).
When a mask operator is called in Mask mode in the uv/image edit window, the operator is shown in the redo panel in the 3dview window's toolbar. However none of the additional settings are presented (e.g. new mask should have a name property, hide / unhide should have unselected / select options etc.). These options can still be accessed with F6, they just aren't shown in the redo panel. This also seems like a bug. The same issue exists in the graph editor (at least with hiding / unhiding).
Redo also doesn't work properly in particle edit mode (try select random, then H key to hide, then pick the unselected option in the redo panel -> everything gets hidden instead of just the unselected items). Select less / select more don't seem to work at all. I guess this is another bug?
Please let me know if anything needs changing or if you have any other comments.


Diff Detail

rB Blender

Event Timeline

Matthew Abigail (mba105) retitled this revision from to Select option for reveal operators.Sep 11 2015, 8:49 PM
Matthew Abigail (mba105) updated this object.
Matthew Abigail (mba105) set the repository for this revision to rB Blender.
Matthew Abigail (mba105) updated this revision to Diff 5056.
Julian Eisel (Severin) requested changes to this revision.

Good job, thanks for the patch :) So far I'm mostly okay with the implementation and the decisions you made to avoid conflicts, just requesting some minor changes.
The glitch in texture paint mode is indeed weird and might be a bug that's unrelated to you changes. Had a quick look but didn't find anything.

These operators should also get the select option: GPENCIL_OT_reveal (executed in GPencil edit mode only), MBALL_OT_reveal_metaelems (executed in edit mode only),


Would use 'revealed' instead of 'unhidden' (everywhere).


Better use SET_INT_IN_POINTER to pass select as (void *) and GET_INT_FROM_POINTER in show_pose_bone_cb.

This revision now requires changes to proceed.Nov 26 2015, 9:20 PM
Julian Eisel (Severin) edited edge metadata.

Copied comment from T45230 into task description.

Any updates on this patch? Looks like its close to being finished.

Sorry, I've been busy with Stuff for a while (new job and such). I've been looking at this again recently though, and got Blender building on my desktop again, so I'll try to update it this weekend.

Matthew Abigail (mba105) updated this revision to Diff 6152.

I've updated with the requested changes:

  • "unhidden" -> "revealed"
  • Added option to gpencil and metaballs.

For the grease pencil and metaballs, I've added a selection enum with the options "unchanged", "select" and "deselect", since these modes don't deselect when hiding (and you can still select hidden metaballs).

For the grease pencil, I've copied the behaviour of gpencil_select_all_exec:

  • deselect affects strokes on all frames for the revealed layer.
  • select affects only the active frame for the revealed layer.

Let me know if something else is needed instead.

Matthew Abigail (mba105) marked 2 inline comments as done.Feb 21 2016, 1:08 PM
This revision now requires changes to proceed.Nov 19 2017, 4:21 PM