Page MenuHome

Boolean Modifier: operand display operators and render/visibility settings
AbandonedPublic

Authored by Zachary (AFWS) on Sep 18 2020, 4:56 PM.
Tokens
"Burninate" token, awarded by AnityEx."Like" token, awarded by ugosantana."Like" token, awarded by franMarz."Like" token, awarded by duarteframos.

Details

Summary

This adds three operators to change the display type and render/visibility settings.

Operators

  • Wire - Users might want this to view shape
  • Bounding Box - Best option to see boolean results
  • Solid - If user wants it back to solid

Settings

  • Hide Viewport - Same setting as outliner
  • Hide Render - Same setting as outliner

Issues

Hide Viewport doesn't have the "shift" and "ctrl" of outliner ,so any objects in a collection that was hidden from the outliner will not be revealed when toggled from the modifier.

Hide Viewport will also hide the modifier object, if it's in the same collection that's selected.

Diff Detail

Event Timeline

Zachary (AFWS) requested review of this revision.Sep 18 2020, 4:56 PM
Zachary (AFWS) created this revision.

On one hand I think this is a really handy operator that could speed up this workflow a lot. However, I wonder if this is solving the problem in a way that's too specific to this situation.

It also doesn't solve a few similar problems with this workflow: setting the render or viewport visibility.

Here is a more general way this could be done:

  1. Add this in the right click menu for collections in the outliner.
  2. Add a shortcut on these ID selector buttons to take you to its location in the outliner.

And another would be adding this to the existing right click menu for ID selector buttons, which already contains "Jump to Target".

I don't necessarily think these ideas are better, just that more similar solutions should be considered.

source/blender/editors/object/object_modifier.c
3084

Use a smaller scope for variable declarations where possible-- so declare this here, and same in the collection loop below.

3101

Use LISTBASE_FOREACH here.

3140–3145

I would be more explicit about the fact that this operator is just setting the display once, that it's not acting as an override or something:
"Set the operand objects' viewport display to {wireframe/bounding box}"

3150

Similar suggestion here: "Set Operand Display"

I would also suggest adding "set" to the operator's idname

3151

"See the boolean results" is a bit vague here, I think because it presupposes a situation that the user might not actually be in.

Hans Goudey (HooglyBoogly) requested changes to this revision.Sep 18 2020, 6:29 PM
This revision now requires changes to proceed.Sep 18 2020, 6:29 PM

Made requested changes.

Zachary (AFWS) added a comment.EditedSep 18 2020, 9:49 PM

On one hand I think this is a really handy operator that could speed up this workflow a lot. However, I wonder if this is solving the problem in a way that's too specific to this situation.

It also doesn't solve a few similar problems with this workflow: setting the render or viewport visibility.

Here is a more general way this could be done:

  1. Add this in the right click menu for collections in the outliner.
  2. Add a shortcut on these ID selector buttons to take you to its location in the outliner.

And another would be adding this to the existing right click menu for ID selector buttons, which already contains "Jump to Target".

I don't necessarily think these ideas are better, just that more similar solutions should be considered.

Not sure what would be the best. Seems easier from the modifier though. I'm assuming Use a smaller scope for variable declarations where possible meant the length of operand_ob?

Edit:
Would something like this work for disabling viewport/render? It's linked with outliner ,so they would disable/enable together.

Not sure what would be the best. Seems easier from the modifier though. I'm assuming Use a smaller scope for variable declarations where possible meant the length of operand_ob?

Oh no, I didn't mean the variable name length, I should have been more specific. This describes what I mean:
https://stackoverflow.com/questions/3773396/declare-variables-at-top-of-function-or-in-separate-scopes#3773458

Zachary (AFWS) retitled this revision from Boolean Modifier: operand display operator to Boolean Modifier: operand display operators and render/visibility settings .Sep 22 2020, 12:25 PM
Zachary (AFWS) edited the summary of this revision. (Show Details)

Made UI changes and added render/visibility settings.

These are interesting features, but in the end I think they're too specific to the modifier. They don't quite fit with the design in the rest of the property editor. I hope that geometry nodes and related features will it clear how to address this sort of thing in a more generic way.