class Sketchup::RenderingOptions
The RenderingOptions
class contains method to extract the rendering information for a model. The majority of the rendering information returned exists in the Styles dialog. The following rendering information keys are maintained in SketchUp:
-
BackgroundColor
-
BandColor
-
ConstructionColor
-
DepthQueWidth
-
DisplayColorByLayer
-
DisplayFog
-
DisplayInstanceAxes
-
DisplayWatermarks
-
DrawDepthQue
-
DrawGround
-
DrawHidden
-
DrawHorizon
-
DrawLineEnds
-
DrawProfilesOnly
-
DrawSilhouettes
-
DrawUnderground
-
EdgeColorMode
-
EdgeDisplayMode
-
EdgeType
-
ExtendLines
-
FaceBackColor
-
FaceFrontColor
-
FogColor
-
FogEndDist
-
FogStartDist
-
FogUseBkColor
-
ForegroundColor
-
GroundColor
-
GroundTransparency
-
HideConstructionGeometry
-
HighlightColor
-
HorizonColor
-
InactiveHidden
-
InstanceHidden
-
JitterEdges
-
LineEndWidth
-
LineExtension
-
LockedColor
-
MaterialTransparency
-
ModelTransparency
-
RenderMode
-
SectionActiveColor
-
SectionCutWidth
-
SectionDefaultCutColor
-
SectionInactiveColor
-
ShowViewName
-
SilhouetteWidth
-
SkyColor
-
Texture
-
TransparencySort
SketchUp 2017 treats Medium transparency as Faster.
Added in SketchUp 7:
-
DisplayDims
-
DisplaySketchAxes
-
DisplayText
Added in SketchUp 8:
-
InactiveFade
-
InstanceFade
Added in SketchUp 2014:
-
DisplaySectionPlanes
Added in SketchUp 2015:
-
DisplaySectionCuts
-
DrawBackEdges
-
SectionCutDrawEdges
Added in SketchUp 2018:
-
SectionCutFilled
-
SectionDefaultFillColor
Removed in SketchUp 2019.1
-
FaceColorMode
This option was previously included but it was ineffective.
Added in SketchUp 2020.0:
-
ROPDrawHiddenGeometry
-
ROPDrawHiddenObjects
@version SketchUp 6.0
Constants
- ROPAssign
Constants
- ROPDrawHidden
- ROPDrawHiddenGeometry
- ROPDrawHiddenObjects
- ROPEditComponent
- ROPSectionDisplayTurnedOff
- ROPSetBackgroundColor
- ROPSetConstructionColor
- ROPSetDepthQueEdges
- ROPSetDepthQueWidth
- ROPSetDisplayColorByLayer
- ROPSetDisplayDims
- ROPSetDisplayFog
- ROPSetDisplayInstanceAxes
- ROPSetDisplaySketchAxes
- ROPSetDisplayText
- ROPSetDisplayWatermarks
- ROPSetDrawBackEdges
- ROPSetDrawGround
- ROPSetDrawHorizon
- ROPSetDrawUnderground
- ROPSetEdgeColorMode
- ROPSetEdgeDisplayMode
- ROPSetEdgeType
- ROPSetExtendEdges
- ROPSetExtendLines
- ROPSetFaceColor
- ROPSetFaceColorMode
- ROPSetFogColor
- ROPSetFogDist
- ROPSetFogHint
- ROPSetFogUseBkColor
- ROPSetForegroundColor
- ROPSetGroundColor
- ROPSetGroundTransparency
- ROPSetHideConstructionGeometry
- ROPSetHighlightColor
- ROPSetJitterEdges
- ROPSetLineEndEdges
- ROPSetLineEndWidth
- ROPSetLineExtension
- ROPSetLineStyleEdges
- ROPSetLockedColor
- ROPSetMaterialTransparency
- ROPSetModelTransparency
- ROPSetPhotomatchBackgroundOpacity
- ROPSetPhotomatchDrawBackground
- ROPSetPhotomatchDrawOverlay
- ROPSetPhotomatchOverlayOpacity
- ROPSetProfileEdges
- ROPSetProfileWidth
- ROPSetProfilesOnlyEdges
- ROPSetRenderMode
- ROPSetSectionActiveColor
- ROPSetSectionCutFilled
- ROPSetSectionCutWidth
- ROPSetSectionDefaultCutColor
- ROPSetSectionDefaultFillColor
- ROPSetSectionDisplayMode
- ROPSetSectionInactiveColor
- ROPSetSkyColor
- ROPSetTexture
- ROPSetTransparencyObsolete
- ROPSetXRayOpacity
- ROPTransparencySortMethod
Public Class Methods
The each_key
method iterates through all of the rendering options keys.
@example
Sketchup.active_model.rendering_options.each_key { |key| puts key }
@return [nil]
@version SketchUp 6.0
@yield [key] Variable to hold each key as they are found.
# File lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb, line 177 def self.each_key end
The keys method returns an array with all of the attribute keys.
@example
keys = Sketchup.active_model.rendering_options.keys
@return [Array<String>] an array of keys
@version SketchUp 6.0
# File lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb, line 188 def self.keys end
Public Instance Methods
The {#[]} method is used to get the value of a rendering option.
@example
result = Sketchup.active_model.rendering_options["DisplayInstanceAxes"]
@param [String] key
The key of the rendering option value to get.
@return [Object, nil]
@version SketchUp 6.0
# File lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb, line 204 def [](key) end
The set value []= method is used to set the value in the array of rendering options.
@example
Sketchup.active_model.rendering_options["DisplayInstanceAxes"] = false
@param [String] key
The key of the rendering option value to set.
@param [Object] value
The value to be set.
@return [Object] the value that was set
@version SketchUp 6.0
# File lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb, line 222 def []=(key, value) end
The add_observer
method is used to add an observer to the current object.
@example
observer = Sketchup::RenderingOptionsObserver.new # Dummy observer. result = Sketchup.active_model.rendering_options.add_observer(observer)
@param [Object] observer
An observer.
@return [Boolean] true if successful, false if unsuccessful.
@version SketchUp 6.0
# File lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb, line 237 def add_observer(observer) end
The {#count} method is inherited from the Enumerable
mix-in module.
@example
options = Sketchup.active_model.rendering_options number = options.count
@return [Integer]
@version SketchUp 2014
# File lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb, line 249 def count end
The {#each} method iterates through all of the rendering options key/value pairs.
@example
Sketchup.active_model.rendering_options.each { |key, value| puts "#{key} : #{value}" }
@return [nil]
@see each_pair
@version SketchUp 6.0
@yield [key, value]
@yieldparam [String] key
The key of each pair found.
@yieldparam [Object] value
The value of each pair found.
# File lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb, line 273 def each end
The each_key
method iterates through all of the rendering options keys.
@example
Sketchup.active_model.rendering_options.each_key { |key| puts key }
@return [nil]
@version SketchUp 6.0
@yield [key] Variable to hold each key as they are found.
# File lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb, line 288 def each_key end
The {#each_pair} method is an alias for {#each}.
@example
Sketchup.active_model.rendering_options.each_pair { |key, value| puts "#{key} : #{value}" }
@return [nil]
@see each
@version SketchUp 6.0
# File lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb, line 303 def each_pair end
The keys method returns an array with all of the attribute keys.
@example
keys = Sketchup.active_model.rendering_options.keys
@return [Array<String>] an array of keys
@version SketchUp 6.0
# File lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb, line 314 def keys end
The {#length} method returns the number of options in the rendering options collection.
@example
options = Sketchup.active_model.rendering_options number = options.length
@return [Integer]
@see size
@version SketchUp 2014
# File lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb, line 329 def length end
The remove_observer
method is used to remove an observer from the current object.
@example
observer = Sketchup::RenderingOptionsObserver.new # Dummy observer. options = Sketchup.active_model.rendering_options options.add_observer(observer) result = options.remove_observer(observer)
@param [Object] observer
An observer.
@return [Boolean] true if successful, false if unsuccessful.
@version SketchUp 6.0
# File lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb, line 347 def remove_observer(observer) end
The {#size} method is an alias for {#length}.
@example
options = Sketchup.active_model.rendering_options number = options.size
@return [Integer]
@see length
@version SketchUp 2014
# File lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb, line 361 def size end