Hi,
How can i disable profiles , depth cue and extension using ruby api ?
I tried some of the rendering options but it didn’t work.
options = Sketchup.active_model.rendering_options
options["DrawDepthCue"] = false
Hi,
How can i disable profiles , depth cue and extension using ruby api ?
I tried some of the rendering options but it didn’t work.
options = Sketchup.active_model.rendering_options
options["DrawDepthCue"] = false
DrawDepthCue appears to be broken. I’ve used the same method myself though to toggle profiles.
This code prints out all of the rendering_options:
Sketchup.active_model.rendering_options.each_pair{|k,v|puts "#{k} = #{v.to_s} [#{v.class}]"}
with their key, value and class.
There are NO “…Cue…” keys at all.
DepthQueWidth
has the class of Integer 1 > 20: it sets the amount of depth-cuing.
DrawDepthQue
is a toggle true/false - so you use that to switch depth-cuing on/off.
So note the “Que” versus “Cue” in the keys’ naming !
Bad English by the programmers, that’s all ! They used ‘cue’ correctly in the settings dialog !!
It’s poorly documented…
PS: I also noted the title of the post - asking how to disable ‘profiles’ which is different again…
This is the option “DrawSilhouettes
” set true/false.
And “SilhouetteWidth
” is the integer setting the profile’s width.
To set ‘edge’ display etc look at the available “Edge…” keys…
add a simple pattern-match into my above code to reduce the list…
...{|k,v|next unless k=~/^Edge/;puts "...
Then your possible candidates are integers set to 0 or 1
i.e. “EdgeDisplayMode
” & “EdgeType
”