Class: Sketchup::RenderingOptions

Inherits:
Entity
  • Object
show all
Includes:
Enumerable

Overview

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

  • FaceColorMode

  • 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

Version:

  • SketchUp 6.0

Constant Summary #

Sketchup::RenderingOptions::ROPAssign
Sketchup::RenderingOptions::ROPDrawHidden
Sketchup::RenderingOptions::ROPEditComponent
Sketchup::RenderingOptions::ROPSetBackgroundColor
Sketchup::RenderingOptions::ROPSetConstructionColor
Sketchup::RenderingOptions::ROPSetDepthQueEdges
Sketchup::RenderingOptions::ROPSetDepthQueWidth
Sketchup::RenderingOptions::ROPSetDisplayColorByLayer
Sketchup::RenderingOptions::ROPSetDisplayDims
Sketchup::RenderingOptions::ROPSetDisplayFog
Sketchup::RenderingOptions::ROPSetDisplayInstanceAxes
Sketchup::RenderingOptions::ROPSetDisplaySketchAxes
Sketchup::RenderingOptions::ROPSetDisplayText
Sketchup::RenderingOptions::ROPSetDisplayWatermarks
Sketchup::RenderingOptions::ROPSetDrawBackEdges
Sketchup::RenderingOptions::ROPSetDrawGround
Sketchup::RenderingOptions::ROPSetDrawHorizon
Sketchup::RenderingOptions::ROPSetDrawUnderground
Sketchup::RenderingOptions::ROPSetEdgeColorMode
Sketchup::RenderingOptions::ROPSetEdgeDisplayMode
Sketchup::RenderingOptions::ROPSetEdgeType
Sketchup::RenderingOptions::ROPSetExtendEdges
Sketchup::RenderingOptions::ROPSetExtendLines
Sketchup::RenderingOptions::ROPSetFaceColor
Sketchup::RenderingOptions::ROPSetFaceColorMode
Sketchup::RenderingOptions::ROPSetFogColor
Sketchup::RenderingOptions::ROPSetFogDist
Sketchup::RenderingOptions::ROPSetFogHint
Sketchup::RenderingOptions::ROPSetFogUseBkColor
Sketchup::RenderingOptions::ROPSetForegroundColor
Sketchup::RenderingOptions::ROPSetGroundColor
Sketchup::RenderingOptions::ROPSetGroundTransparency
Sketchup::RenderingOptions::ROPSetHideConstructionGeometry
Sketchup::RenderingOptions::ROPSetHighlightColor
Sketchup::RenderingOptions::ROPSetJitterEdges
Sketchup::RenderingOptions::ROPSetLineEndEdges
Sketchup::RenderingOptions::ROPSetLineEndWidth
Sketchup::RenderingOptions::ROPSetLineExtension
Sketchup::RenderingOptions::ROPSetLockedColor
Sketchup::RenderingOptions::ROPSetMaterialTransparency
Sketchup::RenderingOptions::ROPSetModelTransparency
Sketchup::RenderingOptions::ROPSetPhotomatchBackgroundOpacity
Sketchup::RenderingOptions::ROPSetPhotomatchDrawBackground
Sketchup::RenderingOptions::ROPSetPhotomatchDrawOverlay
Sketchup::RenderingOptions::ROPSetPhotomatchOverlayOpacity
Sketchup::RenderingOptions::ROPSetProfileEdges
Sketchup::RenderingOptions::ROPSetProfilesOnlyEdges
Sketchup::RenderingOptions::ROPSetProfileWidth
Sketchup::RenderingOptions::ROPSetRenderMode
Sketchup::RenderingOptions::ROPSetSectionActiveColor
Sketchup::RenderingOptions::ROPSetSectionCutWidth
Sketchup::RenderingOptions::ROPSetSectionDefaultCutColor
Sketchup::RenderingOptions::ROPSetSectionDisplayMode
Sketchup::RenderingOptions::ROPSetSectionInactiveColor
Sketchup::RenderingOptions::ROPSetSkyColor
Sketchup::RenderingOptions::ROPSetTexture
Sketchup::RenderingOptions::ROPSetTransparencyObsolete
Sketchup::RenderingOptions::ROPSetXRayOpacity
Sketchup::RenderingOptions::ROPTransparencySortMethod

Class Method Summary # collapse

Instance Method Summary # collapse

Methods inherited from Entity

#attribute_dictionaries, #attribute_dictionary, #delete_attribute, #deleted?, #entityID, #get_attribute, #inspect, #model, #parent, #persistent_id, #set_attribute, #to_s, #typename, #valid?

Class Method Details

.each_key {|key| ... } ⇒ Object

The each_key method iterates through all of the rendering options keys.

Examples:

Sketchup.active_model.rendering_options.each_key { |key|
  puts key
}

Yields:

  • (key)

    Variable to hold each key as they are found.

Returns:

  • nil

Version:

  • SketchUp 6.0

.keysObject

The keys method returns an array with all of the attribute keys.

Examples:

keys = Sketchup.active_model.rendering_options.keys

Returns:

  • keys - an array of keys

Version:

  • SketchUp 6.0

Instance Method Details

#[](key) ⇒ Object

The set value [] method is used to get the value in the array of rendering options.

Examples:

result = Sketchup.active_model.rendering_options["DisplayInstanceAxes"]

Returns value - the value that was found.

Parameters:

  • key

    The key of the rendering option value to set.

Returns:

  • value - the value that was found.

Version:

  • SketchUp 6.0

#[]=(key, value) ⇒ Object

The set value []= method is used to set the value in the array of rendering options.

Examples:

Sketchup.active_model.rendering_options["DisplayInstanceAxes"] = false

Returns value - the value that was set

Parameters:

  • key

    The key of the rendering option value to set.

  • value

    The value to be set.

Returns:

  • value - the value that was set

Version:

  • SketchUp 6.0

#add_observer(observer) ⇒ Object

The add_observer method is used to add an observer to the current object.

Examples:

observer = Sketchup::RenderingOptionsObserver.new # Dummy observer.
result = Sketchup.active_model.rendering_options.add_observer(observer)

Returns true if successful, false if unsuccessful.

Parameters:

  • observer

    An observer.

Returns:

  • true if successful, false if unsuccessful.

Version:

  • SketchUp 6.0

#countInteger

The #count method is inherited from the Enumerable mix-in module.

Examples:

options = Sketchup.active_model.rendering_options
number = options.count

Returns:

  • (Integer)

Version:

  • SketchUp 2014

#each {|key, value| ... } ⇒ nil

The #each method iterates through all of the rendering options key/value pairs.

Examples:

Sketchup.active_model.rendering_options.each { |key, value|
  puts "#{key} : #{value}"
}

Yields:

  • (key, value)

Yield Parameters:

  • key (String)

    The key of each pair found.

  • value (Object)

    The value of each pair found.

Returns:

  • (nil)

See Also:

Version:

  • SketchUp 6.0

#each_key {|key| ... } ⇒ Object

The each_key method iterates through all of the rendering options keys.

Examples:

Sketchup.active_model.rendering_options.each_key { |key|
  puts key
}

Yields:

  • (key)

    Variable to hold each key as they are found.

Returns:

  • nil

Version:

  • SketchUp 6.0

#each_pairnil

The #each_pair method is an alias for #each.

Examples:

Sketchup.active_model.rendering_options.each_pair { |key, value|
  puts "#{key} : #{value}"
}

Returns:

  • (nil)

See Also:

Version:

  • SketchUp 6.0

#keysObject

The keys method returns an array with all of the attribute keys.

Examples:

keys = Sketchup.active_model.rendering_options.keys

Returns:

  • keys - an array of keys

Version:

  • SketchUp 6.0

#lengthInteger

The #length method returns the number of options in the rendering options collection.

Examples:

options = Sketchup.active_model.rendering_options
number = options.length

Returns:

  • (Integer)

See Also:

Version:

  • SketchUp 2014

#remove_observer(observer) ⇒ Object

The remove_observer method is used to remove an observer from the current object.

Examples:

observer = Sketchup::RenderingOptionsObserver.new # Dummy observer.
options = Sketchup.active_model.rendering_options
options.add_observer(observer)
result = options.remove_observer(observer)

Returns true if successful, false if unsuccessful.

Parameters:

  • observer

    An observer.

Returns:

  • true if successful, false if unsuccessful.

Version:

  • SketchUp 6.0

#sizeInteger

The #size method is an alias for #length.

Examples:

options = Sketchup.active_model.rendering_options
number = options.size

Returns:

  • (Integer)

See Also:

Version:

  • SketchUp 2014