sketchup-api-stubs 0.7.9 → 0.7.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/sketchup-api-stubs/sketchup.rb +157 -151
- data/lib/sketchup-api-stubs/stubs/Array.rb +741 -741
- data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +322 -322
- data/lib/sketchup-api-stubs/stubs/Geom/Bounds2d.rb +182 -172
- data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +111 -126
- data/lib/sketchup-api-stubs/stubs/Geom/OrientedBounds2d.rb +102 -102
- data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +423 -400
- data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +693 -661
- data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +535 -509
- data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +500 -476
- data/lib/sketchup-api-stubs/stubs/Geom/Transformation2d.rb +267 -263
- data/lib/sketchup-api-stubs/stubs/Geom/UTM.rb +133 -141
- data/lib/sketchup-api-stubs/stubs/Geom/Vector2d.rb +547 -522
- data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +678 -693
- data/lib/sketchup-api-stubs/stubs/Geom.rb +351 -351
- data/lib/sketchup-api-stubs/stubs/LanguageHandler.rb +93 -93
- data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +595 -595
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +751 -747
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +183 -183
- data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +70 -70
- data/lib/sketchup-api-stubs/stubs/Layout/Dictionary.rb +234 -0
- data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +683 -517
- data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +29 -29
- data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +148 -148
- data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +464 -353
- data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +354 -354
- data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +311 -311
- data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +261 -261
- data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +91 -91
- data/lib/sketchup-api-stubs/stubs/Layout/Label.rb +370 -370
- data/lib/sketchup-api-stubs/stubs/Layout/Layer.rb +218 -218
- data/lib/sketchup-api-stubs/stubs/Layout/LayerInstance.rb +128 -128
- data/lib/sketchup-api-stubs/stubs/Layout/Layers.rb +225 -225
- data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +614 -567
- data/lib/sketchup-api-stubs/stubs/Layout/LockedEntityError.rb +10 -10
- data/lib/sketchup-api-stubs/stubs/Layout/LockedLayerError.rb +11 -11
- data/lib/sketchup-api-stubs/stubs/Layout/Page.rb +282 -183
- data/lib/sketchup-api-stubs/stubs/Layout/PageInfo.rb +458 -387
- data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +209 -209
- data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +346 -344
- data/lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb +174 -174
- data/lib/sketchup-api-stubs/stubs/Layout/ReferenceEntity.rb +82 -82
- data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +714 -692
- data/lib/sketchup-api-stubs/stubs/Layout/Style.rb +1565 -1519
- data/lib/sketchup-api-stubs/stubs/Layout/Table.rb +290 -290
- data/lib/sketchup-api-stubs/stubs/Layout/TableCell.rb +149 -149
- data/lib/sketchup-api-stubs/stubs/Layout/TableColumn.rb +139 -139
- data/lib/sketchup-api-stubs/stubs/Layout/TableRow.rb +135 -135
- data/lib/sketchup-api-stubs/stubs/Layout.rb +25 -25
- data/lib/sketchup-api-stubs/stubs/Length.rb +286 -278
- data/lib/sketchup-api-stubs/stubs/Numeric.rb +249 -249
- data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +196 -144
- data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +169 -169
- data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +226 -209
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +145 -150
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +294 -281
- data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +149 -149
- data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +296 -302
- data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +473 -478
- data/lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb +63 -63
- data/lib/sketchup-api-stubs/stubs/Sketchup/Classifications.rb +121 -121
- data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +294 -294
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +673 -659
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +600 -593
- data/lib/sketchup-api-stubs/stubs/Sketchup/Console.rb +76 -76
- data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionLine.rb +252 -257
- data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionPoint.rb +32 -32
- data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +201 -201
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +443 -449
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +74 -74
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +104 -104
- data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +167 -165
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +306 -306
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +42 -42
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +87 -87
- data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +403 -406
- data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +397 -397
- data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +211 -211
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +1282 -1239
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesBuilder.rb +261 -261
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +127 -127
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +519 -545
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +60 -60
- data/lib/sketchup-api-stubs/stubs/Sketchup/Environment.rb +406 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/Environments.rb +185 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/EnvironmentsObserver.rb +113 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +122 -125
- data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +1006 -937
- data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +102 -102
- data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +740 -750
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +289 -282
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +64 -62
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +27 -27
- data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +405 -468
- data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +266 -266
- data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +189 -189
- data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +432 -406
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +84 -84
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +307 -306
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +332 -326
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb +380 -422
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +409 -427
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +241 -249
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb +86 -86
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing.rb +55 -48
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb +24 -24
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +114 -114
- data/lib/sketchup-api-stubs/stubs/Sketchup/LoadHandler.rb +70 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +137 -137
- data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +1115 -414
- data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +330 -317
- data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +142 -142
- data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +93 -93
- data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +1714 -1652
- data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +372 -357
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +133 -130
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +271 -271
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +58 -58
- data/lib/sketchup-api-stubs/stubs/Sketchup/Overlay.rb +463 -490
- data/lib/sketchup-api-stubs/stubs/Sketchup/OverlaysManager.rb +104 -116
- data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +939 -797
- data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +388 -361
- data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +77 -77
- data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +501 -478
- data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +43 -43
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +385 -361
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +45 -45
- data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +150 -150
- data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +451 -458
- data/lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb +115 -115
- data/lib/sketchup-api-stubs/stubs/Sketchup/Set.rb +211 -212
- data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +259 -255
- data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb +59 -59
- data/lib/sketchup-api-stubs/stubs/Sketchup/Skp.rb +40 -40
- data/lib/sketchup-api-stubs/stubs/Sketchup/Snap.rb +125 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +88 -69
- data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +263 -217
- data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +283 -262
- data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +199 -217
- data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +237 -237
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +924 -834
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +132 -132
- data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +156 -156
- data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +75 -75
- data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +143 -142
- data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +1566 -1311
- data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +71 -45
- data/lib/sketchup-api-stubs/stubs/Sketchup.rb +1429 -1377
- data/lib/sketchup-api-stubs/stubs/SketchupExtension.rb +353 -353
- data/lib/sketchup-api-stubs/stubs/String.rb +24 -24
- data/lib/sketchup-api-stubs/stubs/UI/Command.rb +399 -389
- data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +580 -494
- data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +280 -269
- data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +258 -241
- data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +636 -635
- data/lib/sketchup-api-stubs/stubs/UI.rb +791 -683
- data/lib/sketchup-api-stubs/stubs/_top_level.rb +303 -303
- data/lib/sketchup-api-stubs.rb +1 -1
- metadata +10 -24
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
# Copyright:: Copyright
|
|
2
|
-
# License:: The MIT License (MIT)
|
|
3
|
-
|
|
4
|
-
# This observer interface is implemented to react to entity events.
|
|
5
|
-
#
|
|
6
|
-
# @abstract To implement this observer, create a Ruby class of this type, override the
|
|
7
|
-
# desired methods, and add an instance of the observer to the entity of
|
|
8
|
-
# interests.
|
|
9
|
-
#
|
|
10
|
-
# @example
|
|
11
|
-
# class MyEntityObserver < Sketchup::EntityObserver
|
|
12
|
-
# def onEraseEntity(entity)
|
|
13
|
-
# puts "onEraseEntity: #{entity}"
|
|
14
|
-
# end
|
|
15
|
-
# end
|
|
16
|
-
#
|
|
17
|
-
# # Attach the observer. (Assumes there is an entity in the model.)
|
|
18
|
-
# Sketchup.active_model.entities[0].add_observer(MyEntityObserver.new)
|
|
19
|
-
#
|
|
20
|
-
# @note The methods of this observer fire in such a way that making changes
|
|
21
|
-
# to the model while inside of them is dangerous. If you experience sudden
|
|
22
|
-
# crashes, it could be because of this observer. A potential workaround is to
|
|
23
|
-
# use a {Sketchup::ToolsObserver} to watch what the user is doing instead.
|
|
24
|
-
#
|
|
25
|
-
# @version SketchUp 6.0
|
|
26
|
-
class Sketchup::EntityObserver
|
|
27
|
-
|
|
28
|
-
# Instance Methods
|
|
29
|
-
|
|
30
|
-
# The {#onChangeEntity} method is invoked when your entity is modified.
|
|
31
|
-
#
|
|
32
|
-
# @example
|
|
33
|
-
# def onChangeEntity(entity)
|
|
34
|
-
# puts "onChangeEntity: #{entity}"
|
|
35
|
-
# end
|
|
36
|
-
#
|
|
37
|
-
# @param [Sketchup::Entity] entity
|
|
38
|
-
#
|
|
39
|
-
# @return [nil]
|
|
40
|
-
#
|
|
41
|
-
# @version SketchUp 6.0
|
|
42
|
-
def onChangeEntity(entity)
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
# The {#onEraseEntity} method is invoked when your entity is erased.
|
|
46
|
-
#
|
|
47
|
-
# @example
|
|
48
|
-
# def onEraseEntity(entity)
|
|
49
|
-
# puts "onEraseEntity: #{entity}"
|
|
50
|
-
# end
|
|
51
|
-
#
|
|
52
|
-
# @param [Sketchup::Entity] entity
|
|
53
|
-
#
|
|
54
|
-
# @return [nil]
|
|
55
|
-
#
|
|
56
|
-
# @version SketchUp 6.0
|
|
57
|
-
def onEraseEntity(entity)
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
end
|
|
1
|
+
# Copyright:: Copyright 2026 Trimble Inc.
|
|
2
|
+
# License:: The MIT License (MIT)
|
|
3
|
+
|
|
4
|
+
# This observer interface is implemented to react to entity events.
|
|
5
|
+
#
|
|
6
|
+
# @abstract To implement this observer, create a Ruby class of this type, override the
|
|
7
|
+
# desired methods, and add an instance of the observer to the entity of
|
|
8
|
+
# interests.
|
|
9
|
+
#
|
|
10
|
+
# @example
|
|
11
|
+
# class MyEntityObserver < Sketchup::EntityObserver
|
|
12
|
+
# def onEraseEntity(entity)
|
|
13
|
+
# puts "onEraseEntity: #{entity}"
|
|
14
|
+
# end
|
|
15
|
+
# end
|
|
16
|
+
#
|
|
17
|
+
# # Attach the observer. (Assumes there is an entity in the model.)
|
|
18
|
+
# Sketchup.active_model.entities[0].add_observer(MyEntityObserver.new)
|
|
19
|
+
#
|
|
20
|
+
# @note The methods of this observer fire in such a way that making changes
|
|
21
|
+
# to the model while inside of them is dangerous. If you experience sudden
|
|
22
|
+
# crashes, it could be because of this observer. A potential workaround is to
|
|
23
|
+
# use a {Sketchup::ToolsObserver} to watch what the user is doing instead.
|
|
24
|
+
#
|
|
25
|
+
# @version SketchUp 6.0
|
|
26
|
+
class Sketchup::EntityObserver
|
|
27
|
+
|
|
28
|
+
# Instance Methods
|
|
29
|
+
|
|
30
|
+
# The {#onChangeEntity} method is invoked when your entity is modified.
|
|
31
|
+
#
|
|
32
|
+
# @example
|
|
33
|
+
# def onChangeEntity(entity)
|
|
34
|
+
# puts "onChangeEntity: #{entity}"
|
|
35
|
+
# end
|
|
36
|
+
#
|
|
37
|
+
# @param [Sketchup::Entity] entity
|
|
38
|
+
#
|
|
39
|
+
# @return [nil]
|
|
40
|
+
#
|
|
41
|
+
# @version SketchUp 6.0
|
|
42
|
+
def onChangeEntity(entity)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# The {#onEraseEntity} method is invoked when your entity is erased.
|
|
46
|
+
#
|
|
47
|
+
# @example
|
|
48
|
+
# def onEraseEntity(entity)
|
|
49
|
+
# puts "onEraseEntity: #{entity}"
|
|
50
|
+
# end
|
|
51
|
+
#
|
|
52
|
+
# @param [Sketchup::Entity] entity
|
|
53
|
+
#
|
|
54
|
+
# @return [nil]
|
|
55
|
+
#
|
|
56
|
+
# @version SketchUp 6.0
|
|
57
|
+
def onEraseEntity(entity)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
end
|
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
# Copyright:: Copyright 2026 Trimble Inc.
|
|
2
|
+
# License:: The MIT License (MIT)
|
|
3
|
+
|
|
4
|
+
# An {Sketchup::Environment} object represents an environment in the model. Environments are used
|
|
5
|
+
# to control the background and lighting of the model. Environments can be used as skydomes, for
|
|
6
|
+
# reflections, and to link the sun to the environment.
|
|
7
|
+
#
|
|
8
|
+
# @version SketchUp 2025.0
|
|
9
|
+
class Sketchup::Environment < Sketchup::Entity
|
|
10
|
+
|
|
11
|
+
# Instance Methods
|
|
12
|
+
|
|
13
|
+
# The {#description} method gets the description for an {Sketchup::Environment}.
|
|
14
|
+
#
|
|
15
|
+
# @example
|
|
16
|
+
# model = Sketchup.active_model
|
|
17
|
+
# environments = model.environments
|
|
18
|
+
# path = 'path/to/environment.hdr'
|
|
19
|
+
# environment = environments.add('Example', path)
|
|
20
|
+
# puts environment.description # Outputs ""
|
|
21
|
+
#
|
|
22
|
+
# @return [String] description
|
|
23
|
+
#
|
|
24
|
+
# @version SketchUp 2025.0
|
|
25
|
+
def description
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# The {#description=} method sets the description for an {Sketchup::Environment}.
|
|
29
|
+
#
|
|
30
|
+
# @example
|
|
31
|
+
# model = Sketchup.active_model
|
|
32
|
+
# environments = model.environments
|
|
33
|
+
# path = 'path/to/environment.hdr'
|
|
34
|
+
# environment = environments.add('Example', path)
|
|
35
|
+
# environment.description = 'This is an example of description'
|
|
36
|
+
# puts environment.description # Outputs "This is an example of description"
|
|
37
|
+
#
|
|
38
|
+
# @param [String] description
|
|
39
|
+
# the new description for the environment
|
|
40
|
+
#
|
|
41
|
+
# @version SketchUp 2025.0
|
|
42
|
+
def description=(description)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# The {#linked_sun=} method is used to set if the {Sketchup::Environment} is linked to the sun.
|
|
46
|
+
# Shadow lighting is used to create realistic shadows in the scene, enhancing the visual quality.
|
|
47
|
+
#
|
|
48
|
+
# @example
|
|
49
|
+
# model = Sketchup.active_model
|
|
50
|
+
# environments = model.environments
|
|
51
|
+
# path = 'path/to/environment.hdr'
|
|
52
|
+
# environment = environments.add('Example', path)
|
|
53
|
+
# environment.linked_sun = true
|
|
54
|
+
# puts environment.linked_sun? # Outputs true
|
|
55
|
+
#
|
|
56
|
+
# @param [Boolean] linked_sun
|
|
57
|
+
# true if the environment should be linked to the sun, false otherwise
|
|
58
|
+
#
|
|
59
|
+
# @version SketchUp 2025.0
|
|
60
|
+
def linked_sun=(linked_sun)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# The {#linked_sun?} method is used to determine if the {Sketchup::Environment} is linked to the
|
|
64
|
+
# sun. This function returns a boolean value indicating whether the shadow light
|
|
65
|
+
# feature is currently enabled in the environment. Shadow lighting is used
|
|
66
|
+
# to create realistic shadows in the scene, enhancing the visual quality.
|
|
67
|
+
#
|
|
68
|
+
# @example
|
|
69
|
+
# model = Sketchup.active_model
|
|
70
|
+
# environments = model.environments
|
|
71
|
+
# path = 'path/to/environment.hdr'
|
|
72
|
+
# environment = environments.add('Example', path)
|
|
73
|
+
# puts environment.linked_sun? # Outputs false
|
|
74
|
+
#
|
|
75
|
+
# @return [Boolean] true if the environment is linked to the sun, false otherwise
|
|
76
|
+
#
|
|
77
|
+
# @version SketchUp 2025.0
|
|
78
|
+
def linked_sun?
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# The {#linked_sun_position} method is used to get the position of the sun linked to the
|
|
82
|
+
# {Sketchup::Environment}. The position is a {Geom::Point3d} where the x must be in range
|
|
83
|
+
# +[0.0, 1.0]+ and y must be in range +[-1.0, 1.0]+.
|
|
84
|
+
#
|
|
85
|
+
# @example
|
|
86
|
+
# model = Sketchup.active_model
|
|
87
|
+
# environments = model.environments
|
|
88
|
+
# path = 'path/to/environment.hdr'
|
|
89
|
+
# environment = environments.add('Example', path)
|
|
90
|
+
# puts environment.linked_sun_position # Outputs Geom::Point3d(0, 0, 0)
|
|
91
|
+
#
|
|
92
|
+
# @return [Geom::Point3d] the position of the sun linked to the environment
|
|
93
|
+
#
|
|
94
|
+
# @version SketchUp 2025.0
|
|
95
|
+
def linked_sun_position
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# The {#linked_sun_position=} method is used to set the position of the sun linked to the
|
|
99
|
+
# {Sketchup::Environment}. The position is a {Geom::Point3d} where the x must be in range
|
|
100
|
+
# +[0.0, 1.0]+ and y must be in range +[-1.0, 1.0]+.
|
|
101
|
+
#
|
|
102
|
+
# @example
|
|
103
|
+
# model = Sketchup.active_model
|
|
104
|
+
# environments = model.environments
|
|
105
|
+
# path = 'path/to/environment.hdr'
|
|
106
|
+
# environment = environments.add('Example', path)
|
|
107
|
+
# environment.linked_sun_position = Geom::Point3d.new(0, 1)
|
|
108
|
+
# puts environment.linked_sun_position # Outputs Geom::Point3d(0, 1, 0)
|
|
109
|
+
#
|
|
110
|
+
# @param [Geom::Point3d] sun_position
|
|
111
|
+
# the new position of the sun linked to the environment
|
|
112
|
+
#
|
|
113
|
+
# @return [Geom::Point3d] the new position of the sun linked to the environment
|
|
114
|
+
#
|
|
115
|
+
# @version SketchUp 2025.0
|
|
116
|
+
def linked_sun_position=(sun_position)
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# The {#name} method retrieves the name of the {Sketchup::Environment}. This is the
|
|
120
|
+
# unique internal name of the object which should be used for retrieving
|
|
121
|
+
# the {Sketchup::Environment} from the model's {Sketchup::Environments}.
|
|
122
|
+
#
|
|
123
|
+
# @example
|
|
124
|
+
# model = Sketchup.active_model
|
|
125
|
+
# environments = model.environments
|
|
126
|
+
# path = 'path/to/environment.hdr'
|
|
127
|
+
# environment = environments.add('Example', path)
|
|
128
|
+
# puts environment.name # Outputs "Example"
|
|
129
|
+
#
|
|
130
|
+
# @return [String] the name of the environment
|
|
131
|
+
#
|
|
132
|
+
# @version SketchUp 2025.0
|
|
133
|
+
def name
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# The {#name=} method sets the name for an {Sketchup::Environment}.
|
|
137
|
+
#
|
|
138
|
+
# @example
|
|
139
|
+
# model = Sketchup.active_model
|
|
140
|
+
# environments = model.environments
|
|
141
|
+
# path = 'path/to/environment.hdr'
|
|
142
|
+
# environment = environments.add('Example', path)
|
|
143
|
+
# environment.name = 'New Name'
|
|
144
|
+
# puts environment.name # Outputs "New Name"
|
|
145
|
+
#
|
|
146
|
+
# @param [String] name
|
|
147
|
+
# the new name for the environment
|
|
148
|
+
#
|
|
149
|
+
# @return [String] the new name of the environment
|
|
150
|
+
#
|
|
151
|
+
# @version SketchUp 2025.0
|
|
152
|
+
def name=(name)
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# The {#path} method is used to get the file name of the image or SKE file used for the
|
|
156
|
+
# {Sketchup::Environment}.
|
|
157
|
+
#
|
|
158
|
+
# @example
|
|
159
|
+
# model = Sketchup.active_model
|
|
160
|
+
# environments = model.environments
|
|
161
|
+
# path = 'path/to/environment.hdr'
|
|
162
|
+
# environment = environments.add('Example', path)
|
|
163
|
+
# puts environment.path # Outputs 'environment.hdr'
|
|
164
|
+
#
|
|
165
|
+
# @return [String] the file name of the image or SKE file used for the environment
|
|
166
|
+
#
|
|
167
|
+
# @version SketchUp 2025.0
|
|
168
|
+
def path
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# The {#reflection_exposure} method is used to get the exposure of the {Sketchup::Environment} for
|
|
172
|
+
# reflections.
|
|
173
|
+
#
|
|
174
|
+
# @example
|
|
175
|
+
# model = Sketchup.active_model
|
|
176
|
+
# environments = model.environments
|
|
177
|
+
# path = 'path/to/environment.hdr'
|
|
178
|
+
# environment = environments.add('Example', path)
|
|
179
|
+
# puts environment.reflection_exposure # Outputs 1
|
|
180
|
+
# environment.reflection_exposure = 0.5
|
|
181
|
+
# puts environment.reflection_exposure # Outputs 0.5
|
|
182
|
+
#
|
|
183
|
+
# @note Reflection exposure is a value between +0.0+ and +10.0+, where +0.0+ is no exposure and
|
|
184
|
+
# +10.0+ is full exposure.
|
|
185
|
+
#
|
|
186
|
+
# @return [Float] the exposure of the environment for reflections
|
|
187
|
+
#
|
|
188
|
+
# @version SketchUp 2025.0
|
|
189
|
+
def reflection_exposure
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# The {#reflection_exposure=} method is used to set the exposure of the {Sketchup::Environment} for
|
|
193
|
+
# reflections.
|
|
194
|
+
#
|
|
195
|
+
# @example
|
|
196
|
+
# model = Sketchup.active_model
|
|
197
|
+
# environments = model.environments
|
|
198
|
+
# path = 'path/to/environment.hdr'
|
|
199
|
+
# environment = environments.add('Example', path)
|
|
200
|
+
# puts environment.reflection_exposure # Outputs 1
|
|
201
|
+
# environment.reflection_exposure = 0.5
|
|
202
|
+
# puts environment.reflection_exposure # Outputs 0.5
|
|
203
|
+
#
|
|
204
|
+
# @note Reflection exposure is a value between +0.0+ and +10.0+, where +0.0+ is no exposure and
|
|
205
|
+
# +10.0+ is full exposure.
|
|
206
|
+
#
|
|
207
|
+
# @param [Float] reflection_exposure
|
|
208
|
+
# the new exposure of the environment for reflections
|
|
209
|
+
#
|
|
210
|
+
# @return [Float] the new exposure of the environment for reflections
|
|
211
|
+
#
|
|
212
|
+
# @version SketchUp 2025.0
|
|
213
|
+
def reflection_exposure=(reflection_exposure)
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# The {#rotation} method is used to get the vertical rotation angle in degrees to apply to the
|
|
217
|
+
# {Sketchup::Environment}.
|
|
218
|
+
#
|
|
219
|
+
# @example
|
|
220
|
+
# model = Sketchup.active_model
|
|
221
|
+
# environments = model.environments
|
|
222
|
+
# path = 'path/to/environment.hdr'
|
|
223
|
+
# environment = environments.add('Example', path)
|
|
224
|
+
# puts environment.rotation # Outputs 0.0 degrees
|
|
225
|
+
# environment.rotation = 90.0
|
|
226
|
+
# puts environment.rotation # Outputs 90.0 degrees
|
|
227
|
+
#
|
|
228
|
+
# @return [Float] rotation in degrees
|
|
229
|
+
def rotation
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# The {#rotation=} method is used to set the the vertical rotation angle in degrees to apply to the
|
|
233
|
+
# {Sketchup::Environment}.
|
|
234
|
+
#
|
|
235
|
+
# @example
|
|
236
|
+
# model = Sketchup.active_model
|
|
237
|
+
# environments = model.environments
|
|
238
|
+
# path = 'path/to/environment.hdr'
|
|
239
|
+
# environment = environments.add('Example', path)
|
|
240
|
+
# puts environment.rotation # Outputs 0.0 degrees
|
|
241
|
+
# environment.rotation = 90.0
|
|
242
|
+
# puts environment.rotation # Outputs 90.0 degrees
|
|
243
|
+
#
|
|
244
|
+
# @note Rotation is a value between +0.0+ and +360.0+ degrees.
|
|
245
|
+
#
|
|
246
|
+
# @param [Float] rotation
|
|
247
|
+
#
|
|
248
|
+
# @return [Float]
|
|
249
|
+
#
|
|
250
|
+
# @version SketchUp 2025.0
|
|
251
|
+
def rotation=(rotation)
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
# The {#skydome_exposure} method is used to get the exposure of the {Sketchup::Environment}.
|
|
255
|
+
#
|
|
256
|
+
# @example
|
|
257
|
+
# model = Sketchup.active_model
|
|
258
|
+
# environments = model.environments
|
|
259
|
+
# path = 'path/to/environment.hdr'
|
|
260
|
+
# environment = environments.add('Example', path)
|
|
261
|
+
# puts environment.skydome_exposure # Outputs 1
|
|
262
|
+
# environment.skydome_exposure = 0.5
|
|
263
|
+
# puts environment.skydome_exposure # Outputs 0.5
|
|
264
|
+
#
|
|
265
|
+
# @note Skydome exposure is a value between +0.0+ and +20.0+, where +0.0+ is no exposure and +20.0+
|
|
266
|
+
# is full exposure.
|
|
267
|
+
#
|
|
268
|
+
# @return [Float] the exposure of the environment
|
|
269
|
+
#
|
|
270
|
+
# @version SketchUp 2025.0
|
|
271
|
+
def skydome_exposure
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
# The {#skydome_exposure=} method is used to set the exposure of the {Sketchup::Environment}.
|
|
275
|
+
#
|
|
276
|
+
# @example
|
|
277
|
+
# model = Sketchup.active_model
|
|
278
|
+
# environments = model.environments
|
|
279
|
+
# path = 'path/to/environment.hdr'
|
|
280
|
+
# environment = environments.add('Example', path)
|
|
281
|
+
# puts environment.skydome_exposure # Outputs 1
|
|
282
|
+
# environment.skydome_exposure = 0.5
|
|
283
|
+
# puts environment.skydome_exposure # Outputs 0.5
|
|
284
|
+
#
|
|
285
|
+
# @note Skydome exposure is a value between +0.0+ and +20.0+, where +0.0+ is no exposure and +20.0+
|
|
286
|
+
# is full exposure.
|
|
287
|
+
#
|
|
288
|
+
# @param [Float] skydome_exposure
|
|
289
|
+
# the new exposure of the environment
|
|
290
|
+
#
|
|
291
|
+
# @return [Float] the new exposure of the environment
|
|
292
|
+
#
|
|
293
|
+
# @version SketchUp 2025.0
|
|
294
|
+
def skydome_exposure=(skydome_exposure)
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
# The {#thumbnail} method is used to get the thumbnail image of the {Sketchup::Environment}.
|
|
298
|
+
#
|
|
299
|
+
# @example
|
|
300
|
+
# model = Sketchup.active_model
|
|
301
|
+
# environments = model.environments
|
|
302
|
+
# path = 'path/to/environment.hdr'
|
|
303
|
+
# environment = environments.add('Example', path)
|
|
304
|
+
# thumbnail = environment.thumbnail
|
|
305
|
+
#
|
|
306
|
+
# @return [Sketchup::ImageRep]
|
|
307
|
+
#
|
|
308
|
+
# @version SketchUp 2025.0
|
|
309
|
+
def thumbnail
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
# The {#use_as_skydome=} method is used to set if the {Sketchup::Environment} is used as a skydome.
|
|
313
|
+
#
|
|
314
|
+
# @example
|
|
315
|
+
# model = Sketchup.active_model
|
|
316
|
+
# environments = model.environments
|
|
317
|
+
# path = 'path/to/environment.hdr'
|
|
318
|
+
# environment = environments.add('Example', path)
|
|
319
|
+
# environment.use_as_skydome = true
|
|
320
|
+
# puts environment.use_as_skydome? # Outputs true
|
|
321
|
+
#
|
|
322
|
+
# @param [Boolean] use_as_skydome
|
|
323
|
+
# true if the environment should be used as a skydome, false
|
|
324
|
+
# otherwise
|
|
325
|
+
#
|
|
326
|
+
# @version SketchUp 2025.0
|
|
327
|
+
def use_as_skydome=(use_as_skydome)
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
# The {#use_as_skydome?} method is used to determine if the {Sketchup::Environment}
|
|
331
|
+
# is used as a skydome.
|
|
332
|
+
#
|
|
333
|
+
# @example
|
|
334
|
+
# model = Sketchup.active_model
|
|
335
|
+
# environments = model.environments
|
|
336
|
+
# path = 'path/to/environment.hdr'
|
|
337
|
+
# environment = environments.add('Example', path)
|
|
338
|
+
# puts environment.use_as_skydome? # Outputs false
|
|
339
|
+
#
|
|
340
|
+
# @return [Boolean] true
|
|
341
|
+
#
|
|
342
|
+
# @version SketchUp 2025.0
|
|
343
|
+
def use_as_skydome?
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
# The {#use_for_reflections=} method is used to set if the {Sketchup::Environment} is used for
|
|
347
|
+
# reflections.
|
|
348
|
+
#
|
|
349
|
+
# @example
|
|
350
|
+
# model = Sketchup.active_model
|
|
351
|
+
# environments = model.environments
|
|
352
|
+
# path = 'path/to/environment.hdr'
|
|
353
|
+
# environment = environments.add('Example', path)
|
|
354
|
+
# environment.use_for_reflections = true
|
|
355
|
+
# puts environment.use_for_reflections? # Outputs true
|
|
356
|
+
#
|
|
357
|
+
# @param [Boolean] use_for_reflection
|
|
358
|
+
# true if the environment should be used for reflections, false
|
|
359
|
+
# otherwise
|
|
360
|
+
#
|
|
361
|
+
# @version SketchUp 2025.0
|
|
362
|
+
def use_for_reflections=(use_for_reflection)
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
# The {#use_for_reflections?} method is used to determine if the {Sketchup::Environment}
|
|
366
|
+
# is used for reflections.
|
|
367
|
+
#
|
|
368
|
+
# @example
|
|
369
|
+
# model = Sketchup.active_model
|
|
370
|
+
# environments = model.environments
|
|
371
|
+
# path = 'path/to/environment.hdr'
|
|
372
|
+
# environment = environments.add('Example', path)
|
|
373
|
+
# puts environment.use_for_reflections? # Outputs false
|
|
374
|
+
#
|
|
375
|
+
# @return [Boolean] true if the environment is used for reflections, false otherwise
|
|
376
|
+
#
|
|
377
|
+
# @version SketchUp 2025.0
|
|
378
|
+
def use_for_reflections?
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
# The {#write_hdr} method writes the HDR, EXR or SKE image of the environment to a file in its
|
|
382
|
+
# original file type.
|
|
383
|
+
#
|
|
384
|
+
# @example
|
|
385
|
+
# model = Sketchup.active_model
|
|
386
|
+
# environments = model.environments
|
|
387
|
+
# path = 'path/to/environment.hdr'
|
|
388
|
+
# environment = environments.add('Example', path)
|
|
389
|
+
# environment.write_hdr('path/to/directory')
|
|
390
|
+
#
|
|
391
|
+
# @param [String] path
|
|
392
|
+
# the directory where the image should be written
|
|
393
|
+
#
|
|
394
|
+
# @raise [ArgumentError] if the image is invalid.
|
|
395
|
+
#
|
|
396
|
+
# @raise [ArgumentError] if the file name is empty.
|
|
397
|
+
#
|
|
398
|
+
# @raise [RuntimeError] if the file cannot be written.
|
|
399
|
+
#
|
|
400
|
+
# @return [String] the full path of the written file
|
|
401
|
+
#
|
|
402
|
+
# @version SketchUp 2025.0
|
|
403
|
+
def write_hdr(path)
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
end
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# Copyright:: Copyright 2026 Trimble Inc.
|
|
2
|
+
# License:: The MIT License (MIT)
|
|
3
|
+
|
|
4
|
+
# An {Sketchup::Environments} object is a collection of {Sketchup::Environment} objects.
|
|
5
|
+
# It is used to manage the environments in a model.
|
|
6
|
+
#
|
|
7
|
+
# An {Sketchup::Environment} object represents an environment in the model. Environments are
|
|
8
|
+
# used to control the background and lighting of the model. Environments can be used as skyboxes,
|
|
9
|
+
# for reflections, and to link the sun to the environment.
|
|
10
|
+
#
|
|
11
|
+
# @version SketchUp 2025.0
|
|
12
|
+
class Sketchup::Environments < Sketchup::Entity
|
|
13
|
+
|
|
14
|
+
# Includes
|
|
15
|
+
|
|
16
|
+
include Enumerable
|
|
17
|
+
|
|
18
|
+
# Instance Methods
|
|
19
|
+
|
|
20
|
+
# The {#[]} method is used to retrieve an {Sketchup::Environment} by name.
|
|
21
|
+
#
|
|
22
|
+
# @example
|
|
23
|
+
# environments = Sketchup.active_model.environments
|
|
24
|
+
# path = 'path/to/environment.hdr'
|
|
25
|
+
# environment = environments.add('My Environment', path)
|
|
26
|
+
# result = environments['My Environment']
|
|
27
|
+
#
|
|
28
|
+
# @param [String] name
|
|
29
|
+
# The name of the {Sketchup::Environment}.
|
|
30
|
+
#
|
|
31
|
+
# @return [Sketchup::Environment, nil]
|
|
32
|
+
#
|
|
33
|
+
# @version SketchUp 2025.0
|
|
34
|
+
def [](name)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# The {#add} method adds an {Sketchup::Environment} to the {Sketchup::Environments}.
|
|
38
|
+
#
|
|
39
|
+
# @note The supported file formats are HDR, EXR and SKE.
|
|
40
|
+
#
|
|
41
|
+
# @overload add(name, path)
|
|
42
|
+
#
|
|
43
|
+
# @param [String] name the name of the environment.
|
|
44
|
+
# @param [String] path the path to the image or SKE file used for the environment
|
|
45
|
+
# @example
|
|
46
|
+
# environments = Sketchup.active_model.environments
|
|
47
|
+
# path = 'path/to/environment.hdr'
|
|
48
|
+
# environment = environments.add('My Environment', path)
|
|
49
|
+
#
|
|
50
|
+
# @overload add(path)
|
|
51
|
+
#
|
|
52
|
+
# @since SketchUp 2026.0
|
|
53
|
+
# @param [String] path the path to the image or SKE file used for the environment
|
|
54
|
+
# @example
|
|
55
|
+
# environments = Sketchup.active_model.environments
|
|
56
|
+
# path = 'path/to/environment.hdr'
|
|
57
|
+
# environment = environments.add(path)
|
|
58
|
+
#
|
|
59
|
+
# @raise ArgumentError if the file could not be loaded.
|
|
60
|
+
#
|
|
61
|
+
# @return [Sketchup::Environment] the newly created environment
|
|
62
|
+
#
|
|
63
|
+
# @version SketchUp 2025.0
|
|
64
|
+
def add(*args)
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# The {#add_observer} method is used to add an observer to the environments
|
|
68
|
+
# collection.
|
|
69
|
+
#
|
|
70
|
+
# @example
|
|
71
|
+
# environments = Sketchup.active_model.environments
|
|
72
|
+
# status = environments.add_observer(observer)
|
|
73
|
+
#
|
|
74
|
+
# @return [Boolean] true if successful, false if unsuccessful.
|
|
75
|
+
#
|
|
76
|
+
# @version SketchUp 2025.0
|
|
77
|
+
def add_observer(arg)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# The {#current} method is used to get the current environment in the
|
|
81
|
+
# {Sketchup::Environments}.
|
|
82
|
+
#
|
|
83
|
+
# @example
|
|
84
|
+
# environments = Sketchup.active_model.environments
|
|
85
|
+
# current = environments.current
|
|
86
|
+
#
|
|
87
|
+
# @return [Sketchup::Environment, nil] the current environment
|
|
88
|
+
#
|
|
89
|
+
# @version SketchUp 2025.0
|
|
90
|
+
def current
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# The {#current=} method is used to set the current environment in the
|
|
94
|
+
# {Sketchup::Environments}.
|
|
95
|
+
#
|
|
96
|
+
# @example
|
|
97
|
+
# environments = Sketchup.active_model.environments
|
|
98
|
+
# path = 'path/to/environment.hdr'
|
|
99
|
+
# environment = environments.add('My Environment', path)
|
|
100
|
+
# environments.current = environment
|
|
101
|
+
#
|
|
102
|
+
# @param [Sketchup::Environment, nil] environment
|
|
103
|
+
# the new current environment
|
|
104
|
+
#
|
|
105
|
+
# @return [Sketchup::Environment, nil] the new current environment
|
|
106
|
+
#
|
|
107
|
+
# @version SketchUp 2025.0
|
|
108
|
+
def current=(environment)
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# The {#each} method is used to iterate over all the environments in the
|
|
112
|
+
# {Sketchup::Environments}.
|
|
113
|
+
#
|
|
114
|
+
# @example
|
|
115
|
+
# environments = Sketchup.active_model.environments
|
|
116
|
+
# environments.each { |environment| puts environment.name }
|
|
117
|
+
#
|
|
118
|
+
# @return [Sketchup::Environments]
|
|
119
|
+
#
|
|
120
|
+
# @version SketchUp 2025.0
|
|
121
|
+
#
|
|
122
|
+
# @yield [environment]
|
|
123
|
+
#
|
|
124
|
+
# @yieldparam [Sketchup::Environment] environment
|
|
125
|
+
# the environment
|
|
126
|
+
def each
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# The {#purge_unused} method is used to remove unused environments.
|
|
130
|
+
#
|
|
131
|
+
# @example
|
|
132
|
+
# environments = Sketchup.active_model.environments
|
|
133
|
+
# environments.purge_unused
|
|
134
|
+
#
|
|
135
|
+
# @return [Sketchup::Environments]
|
|
136
|
+
#
|
|
137
|
+
# @version SketchUp 2025.0
|
|
138
|
+
def purge_unused
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# The {#remove} method removes an {Sketchup::Environment} from the {Sketchup::Environments}.
|
|
142
|
+
#
|
|
143
|
+
# @example
|
|
144
|
+
# environments = Sketchup.active_model.environments
|
|
145
|
+
# path = 'path/to/environment.hdr'
|
|
146
|
+
# environment = environments.add('My Environment', path)
|
|
147
|
+
# environments.remove(environment)
|
|
148
|
+
#
|
|
149
|
+
# @param [Sketchup::Environment] environment
|
|
150
|
+
# the environment to remove
|
|
151
|
+
#
|
|
152
|
+
# @return [Boolean] true if the environment was removed, false if it was not found
|
|
153
|
+
#
|
|
154
|
+
# @version SketchUp 2025.0
|
|
155
|
+
def remove(environment)
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# The {#remove_observer} method is used to remove an observer from the current
|
|
159
|
+
# object.
|
|
160
|
+
#
|
|
161
|
+
# @example
|
|
162
|
+
# environments = Sketchup.active_model.environments
|
|
163
|
+
# status = environments.remove_observer(observer)
|
|
164
|
+
#
|
|
165
|
+
# @return [Boolean] true if successful, false if unsuccessful.
|
|
166
|
+
#
|
|
167
|
+
# @version SketchUp 2025.0
|
|
168
|
+
def remove_observer(arg)
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# The {#size} method retrieves the number of environments in the
|
|
172
|
+
# {Sketchup::Environments}.
|
|
173
|
+
#
|
|
174
|
+
# @example
|
|
175
|
+
# environments = Sketchup.active_model.environments
|
|
176
|
+
# number = environments.size
|
|
177
|
+
#
|
|
178
|
+
# @return [Integer] the number of environments
|
|
179
|
+
#
|
|
180
|
+
# @version SketchUp 2025.0
|
|
181
|
+
def size
|
|
182
|
+
end
|
|
183
|
+
alias_method :length, :size
|
|
184
|
+
|
|
185
|
+
end
|