RenderingOptionsObserver "type" numbers
-
I couldn't find this online, maybe I just missed it, but here it is.
The RenderingOptionsObserver class has a single method
.onRenderingOptionsChanged(renderoptions, type)
. The renderoptions argument is a standard renderoption object. The API only has this to say about the "type" argument:@unknownuser said:
type = A number indicating the option that was changed.
Well, that's less than useful. So here is a table that shows what each # corresponds to. I'm showing the constant it refers to, since that is what I needed for comparison purposes. Its fairly easy to infer which RenderingOptions key the constant matches up with.
SketchUp 8.0
0 = Sketchup::RenderingOptions::ROPAssign
1 = Sketchup::RenderingOptions::ROPSetRenderMode
2 = Sketchup::RenderingOptions::ROPSetTransparencyObsolete
3 = Sketchup::RenderingOptions::ROPSetTexture
4 = Sketchup::RenderingOptions::ROPSetEdgeDisplayMode
5 = Sketchup::RenderingOptions::ROPSetEdgeColorMode
6 = Sketchup::RenderingOptions::ROPSetJitterEdges
7 = Sketchup::RenderingOptions::ROPSetExtendEdges
8 = Sketchup::RenderingOptions::ROPSetProfileEdges
9 = Sketchup::RenderingOptions::ROPSetProfileWidth
10 = Sketchup::RenderingOptions::ROPSetFaceColorMode
11 = Sketchup::RenderingOptions::ROPSetDisplayInstanceAxes
12 = Sketchup::RenderingOptions::ROPSetBackgroundColor
13 = Sketchup::RenderingOptions::ROPSetForegroundColor
14 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetHighlightColor[/ruby:2c73k5c6]
15 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetConstructionColor[/ruby:2c73k5c6]
16 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetDisplayColorByLayer[/ruby:2c73k5c6]
17 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetExtendLines[/ruby:2c73k5c6]
18 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetLineExtension[/ruby:2c73k5c6]
19 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetDisplayFog[/ruby:2c73k5c6]
22 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetFogColor[/ruby:2c73k5c6]
23 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetFogDist[/ruby:2c73k5c6]
24 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetFogHint[/ruby:2c73k5c6]
25 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetSectionDisplayMode[/ruby:2c73k5c6]
26 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPDrawHidden[/ruby:2c73k5c6]
27 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPEditComponent[/ruby:2c73k5c6]
28 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPTransparencySortMethod[/ruby:2c73k5c6]
29 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetDepthQueEdges[/ruby:2c73k5c6]
30 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetLineEndEdges[/ruby:2c73k5c6]
31 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetDepthQueWidth[/ruby:2c73k5c6]
32 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetLineEndWidth[/ruby:2c73k5c6]
33 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetProfilesOnlyEdges[/ruby:2c73k5c6]
34 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetLockedColor[/ruby:2c73k5c6]
35 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetDisplaySketchAxes[/ruby:2c73k5c6]
36 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetFaceColor[/ruby:2c73k5c6]
37 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetEdgeType[/ruby:2c73k5c6]
38 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetModelTransparency[/ruby:2c73k5c6]
39 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetMaterialTransparency[/ruby:2c73k5c6]
40 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetSectionActiveColor[/ruby:2c73k5c6]
41 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetSectionInactiveColor[/ruby:2c73k5c6]
42 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetSectionDefaultCutColor[/ruby:2c73k5c6]
43 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetSectionCutWidth[/ruby:2c73k5c6]
44 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetHideConstructionGeometry[/ruby:2c73k5c6]
45 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetSkyColor[/ruby:2c73k5c6]
46 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetGroundColor[/ruby:2c73k5c6]
47 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetDrawHorizon[/ruby:2c73k5c6]
48 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetDrawGround[/ruby:2c73k5c6]
49 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetDrawUnderground[/ruby:2c73k5c6]
50 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetGroundTransparency[/ruby:2c73k5c6]
51 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetDisplayText[/ruby:2c73k5c6]
52 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetDisplayDims[/ruby:2c73k5c6]
53 = Sketchup::RenderingOptions::[ruby:2c73k5c6]ROPSetFogUseBkColor[/ruby:2c73k5c6] -
Yea, the docs really should mention these constants, as the number used to refer to various options differ from version to version.
Advertisement