Page MenuHome

Toggle visibility/renderability for object an all child-objects
Closed, ArchivedPublic


This patch is a proposal for a different behavior of the outliner toggle visibility/renderability buttons (and corresponding keyboard functions): toggle visibility/renderablilty for the object an all child-objects. I tested this different functionality on my own build Blender 2.5 now for awhile and I find this new behavior more intuitiv and useful.

What the the patch changes:

When you have multiple objects which are linked via the parent relation to some main-object (many times this is an "Empty"-object) and you click on the toggle buttons for visibility and renderability for the main-object the visibility and renderability of that object only is changed, not the visibility/renderability of the child-objects. This is IMHO a little confusing and annoying, because to changed the visibility/renderability of the whole multi-part object you have to click on each child-object (please correct me if this functionality is already there and I did not find it). With the patch the visibility/renderability of all child-objects is toggled, too, except those which are not selectable. Thus making the whole multi-object visible/renderable resp. not visble/renderable. The not-selectable-exception is IMHO useful if some object should e. g. never be shown or rendered, like helping objects for making holes in some other object etc.

The patch contain:

  • new function propagate_restrict_flag() which propagate a given restriction flag to the settings of the supplied object
  • when the visibility/renderability of an object is changed, call function propagate_restrict_flag() to propagate the new state down to all child-objects (except those who have OB_RESTRICT_SELECT set)

Note: this task is a copy of T24042 where I do not have access anymore.



Event Timeline

Torsten Rupp (rupp) raised the priority of this task from to Needs Triage by Developer.
Torsten Rupp (rupp) updated the task description. (Show Details)
Torsten Rupp (rupp) set Type to Patch.

rupp you can actually Ctrl+click to do recursive toggle... not the same behavior though
it's in tooltip -btw tooltips should get some love to make them appealing to read-

Bastien Montagne (mont29) lowered the priority of this task from Needs Triage by Developer to Normal.Mar 19 2014, 8:18 PM

Ctrl-click for outliner, and shift-G -> children, then H in 3DView… I would not want this behavior by default anyway. Maybe we could add a "recursive" option to the "Set Restrict View" op, though?

I use this patch in my own built blender binary to toggle the visibilty of objects which belong to an emtpy. Without the patch clicking "visibility" on an empty does simply nothing. This is not what IMHO someone may expect.

The differenct of the patch to Ctrl-Click is that the patch respect the select-flag. Sub-objects which have this flag set, e. g. objects which should never be visible, are not toggled. Thus is is very easy to make a complete set of objects which are children of an empty invisible and visible again respecting special cases of helper objects which should never be visible.

This seems to be in trunk, but I can't find in which commit

Sergey Sharybin (sergey) triaged this task as Needs Information from User priority.Feb 25 2015, 12:22 PM

@Torsten Rupp (rupp), please review a status of this patch (if it's still needed etc), and make sure latest relevant patch is attached here.

I'm sorry for the late reply.

Yes, the patch is already commited (from the git log it seems it was at 2015-02-14 by Julian Eisel, revision 24976dd29d16ffc176ad0f87246fa98a1da31ccc). Thank you!

Bastien Montagne (mont29) closed this task as Archived.Apr 3 2015, 2:22 PM
Bastien Montagne (mont29) claimed this task.

Thanks for the headup, time to close then. :)