Toggle Construction geometry?
-
I'm not finding anything that toggles the display of Construction geometry - missing or am I just blind?
-
Sketchup.active_model.rendering_options['HideConstructionGeometry']
( dont like the Hide* prefixed type of settings )
-
What's more awkward about 'Hide*' any more than 'Show*' or 'Display*' ?
ros=Sketchup.active_model.rendering_options if ros['HideConstructionGeometry'] ros['HideConstructionGeometry']=false else ros['HideConstructionGeometry']=true end
Or use one of your one-line tests "? ||" or "=!"...
-
I prefer to negate logic using the ! operator. The API is inconsistent and makes reading the code logic random.
-
Sketchup.active_model.rendering_options['HideConstructionGeometry'] =! Sketchup.active_model.rendering_options['HideConstructionGeometry']
would work logically too ? Doesn't it just reverse the current setting ? -
I mean in the way you read code.
This article explains:
http://truelogic.org/wordpress/2009/02/27/how-not-to-name-a-boolean-variable/ -
I note there are 7 other settings that are positive, and begin with the prefix "Display".. and one positive that begins with the prefix "Show"...
The lack of convention is annoying.
Advertisement