class RenderingOptions |
Parent: Object |
|
Methods:each_key, keys, [], []=, each, each_key, each_pair, keys |
|
Sample Code:renderingoptionstests.rb |
|
Key |
Location in SketchUp UI |
Comments |
BackgroundColor |
|
|
BandColor |
|
|
ConstructionColor |
|
|
DisplayColorbyLayer |
|
|
DisplayFog |
|
|
DisplayFogEdges |
|
|
DisplayInstanceAxes |
|
|
DrawGround |
|
|
DrawHidden |
|
|
DrawHorizon |
|
|
DrawSilhouettes |
|
|
EdgeColorMode |
|
|
EdgeDisplayMode |
|
|
ExtendLines |
|
|
FaceBackColor |
Model Info > Colors |
|
FaceColorMode |
|
|
FaceFrontColor |
Model Info > Colors |
|
FogColor |
|
|
FogDensity |
|
|
FogEnd |
|
|
FogStart |
|
|
FogType |
|
|
FogUseBkColor |
|
|
ForegroundColor |
|
|
GroundColor |
Model Info > Colors |
|
GroundTransparency |
Model Info > Colors |
|
HighlightColor |
|
|
HorizonColor |
|
|
InactiveHidden |
|
|
InstanceHidden |
|
|
JitterEdges |
Model Info > Display |
|
LineExtension |
Model Info > Display |
|
MaterialTransparency |
Materials Browser |
|
ModelTransparency |
|
|
RenderMode |
|
|
SectionActiveColor |
Model Info > Sections |
|
SectionCutWidth |
Model Info > Sections |
|
SectionDefaultCutColor |
Model Info > Sections |
|
SectionInactiveColor |
Model Info > Sections |
|
SilhouetteWidth |
|
|
SkyColor |
Model Info > Colors |
|
Texture |
Materials Browser |
|
TransparencySort |
|
|
|
|
|
Class Methods |
each_key |
The each_key method is a class method that iterates through all of the rendering options keys. |
Syntax: |
Sketchup::RenderingOptions.each_key { | key | … } |
Arguments: |
key – variable to hold each key as they are found |
Return Value: |
|
Comments: |
|
Example: |
# Iterate through each key, displaying each in a message box Sketchup:RenderingOptions.each_key { | key | UI.messagebox key } |
keys |
The keys method is a class method that returns an array with all of the attribute keys |
Syntax: |
keys = Sketchup::RenderingOptions.keys |
Arguments: |
|
Return Value: |
keys – an array of keys |
Comments: |
|
Example: |
# Retrieve the first key |
Instance Methods |
[] |
The [] method retrieves a value from the array of rendering options. |
Syntax: |
value = renderingoptions[x] |
Arguments: |
x – the number of the rendering option value to retrieve. |
Return Value: |
value – the value that is retrieved. |
Comments: |
|
Example: |
model = Sketchup.active_model begin UI.messagebox value |
[]= |
|
Syntax: |
|
Arguments: |
|
Return Value: |
|
Comments: |
|
Example: |
|
each |
The each method iterates through all of the rendering options key/value pairs. |
Syntax: |
renderingoptions.each { | key, value | … } |
Arguments: |
key, value – variables that will hold each key and value as they are found. |
Return Value: |
|
Comments: |
|
Example: |
model = Sketchup.active_modelrenderingoptions
= model.rendering_options |
each_key |
The each_key method iterates through all of the rendering options keys. |
Syntax: |
renderingoptions.each_key { | key | … } |
Arguments: |
key – variable to hold each key as they are found |
Return Value: |
|
Comments: |
|
Example: |
model = Sketchup.active_model |
each_pair |
An alias for each. See RenderingOptions.each |
Syntax: |
|
Arguments: |
|
Return Value: |
|
Comments: |
|
Example: |
|
keys |
The keys method returns an array with all of the attribute keys |
Syntax: |
keys = renderingoptions.keys |
Arguments: |
|
Return Value: |
keys – an array of keys |
Comments: |
|
Example: |
model = Sketchup.active_model |