scriptup 2026.0.0 → 2026.0.1

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.
Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/ext/entity.c +3 -0
  3. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Frameworks/libCommonGeometry.dylib +0 -0
  4. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/{Libraries → Frameworks}/libCommonGeoutils.dylib +0 -0
  5. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/{Libraries → Frameworks}/libCommonImage.dylib +0 -0
  6. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Frameworks/libCommonPreferences.dylib +0 -0
  7. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Frameworks/libCommonUnits.dylib +0 -0
  8. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Frameworks/libCommonUtils.dylib +0 -0
  9. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Frameworks/libCommonZip.dylib +0 -0
  10. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/model.h +4 -4
  11. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/overlay.h +20 -6
  12. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/common.h +9 -9
  13. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/extension_license.h +9 -1
  14. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/point2d.h +2 -2
  15. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/point3d.h +2 -2
  16. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/transformation2d.h +3 -3
  17. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/vector2d.h +5 -5
  18. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/vector3d.h +4 -4
  19. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry.h +9 -7
  20. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/modelimporterplugin.h +8 -4
  21. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/attribute_dictionary.h +4 -4
  22. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/component_definition.h +74 -33
  23. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/component_definition_snap_to_behavior_private.h +46 -0
  24. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/component_instance.h +11 -11
  25. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/curve.h +4 -4
  26. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/defs.h +7 -2
  27. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension.h +2 -0
  28. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/drawing_element.h +11 -11
  29. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/edge.h +7 -7
  30. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entities.h +106 -61
  31. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entity.h +7 -4
  32. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/environment.h +382 -0
  33. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/environments.h +133 -0
  34. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/face.h +43 -27
  35. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/geometry_input.h +126 -116
  36. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/group.h +9 -8
  37. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/image.h +6 -5
  38. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/layer.h +3 -3
  39. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/material.h +432 -25
  40. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/model.h +263 -100
  41. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/model_entity_type_private.h +44 -0
  42. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/rendering_options.h +82 -81
  43. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/scene.h +222 -42
  44. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/snap.h +183 -0
  45. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/space.h +26 -0
  46. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/styles.h +29 -27
  47. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/text.h +14 -6
  48. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/texture.h +23 -1
  49. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/typed_value.h +26 -26
  50. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/vertex.h +2 -2
  51. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/sketchup.h +4 -1
  52. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/unicodestring.h +7 -7
  53. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Resources/Info.plist +8 -8
  54. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/SketchUpAPI +0 -0
  55. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/_CodeSignature/CodeResources +144 -88
  56. data/sketchup-sdk-win/binaries/layout/x64/LayOutAPI.dll +0 -0
  57. data/sketchup-sdk-win/binaries/layout/x64/LayOutAPI.lib +0 -0
  58. data/sketchup-sdk-win/binaries/layout/x64/LayOutControllers.dll +0 -0
  59. data/sketchup-sdk-win/binaries/layout/x64/LayOutModel.dll +0 -0
  60. data/sketchup-sdk-win/binaries/layout/x64/LayOutRTF.dll +0 -0
  61. data/sketchup-sdk-win/binaries/layout/x64/LayOutUtils.dll +0 -0
  62. data/sketchup-sdk-win/binaries/layout/x64/LayOutView.dll +0 -0
  63. data/sketchup-sdk-win/binaries/layout/x64/SketchUpCommonPreferences.dll +0 -0
  64. data/sketchup-sdk-win/binaries/layout/x64/SketchUpViewerAPI.dll +0 -0
  65. data/sketchup-sdk-win/binaries/layout/x64/SketchUpViewerAPI.lib +0 -0
  66. data/sketchup-sdk-win/binaries/layout/x64/pdflib.dll +0 -0
  67. data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpAPI.dll +0 -0
  68. data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpAPI.lib +0 -0
  69. data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpCommonPreferences.dll +0 -0
  70. data/sketchup-sdk-win/binaries/sketchup/x64/sketchup.lib +0 -0
  71. data/sketchup-sdk-win/headers/LayOutAPI/application/application.h +14 -14
  72. data/sketchup-sdk-win/headers/LayOutAPI/layout.h +1 -1
  73. data/sketchup-sdk-win/headers/LayOutAPI/model/dictionary.h +1 -1
  74. data/sketchup-sdk-win/headers/LayOutAPI/model/document.h +73 -0
  75. data/sketchup-sdk-win/headers/LayOutAPI/model/documentexportoptions.h +21 -2
  76. data/sketchup-sdk-win/headers/LayOutAPI/model/entity.h +72 -0
  77. data/sketchup-sdk-win/headers/LayOutAPI/model/group.h +2 -1
  78. data/sketchup-sdk-win/headers/LayOutAPI/model/lineardimension.h +54 -2
  79. data/sketchup-sdk-win/headers/LayOutAPI/model/page.h +70 -0
  80. data/sketchup-sdk-win/headers/LayOutAPI/model/sketchupmodel.h +58 -1
  81. data/sketchup-sdk-win/headers/LayOutAPI/model/style.h +39 -3
  82. data/sketchup-sdk-win/headers/LayOutAPI/model/table.h +2 -0
  83. data/sketchup-sdk-win/headers/LayOutAPI/model/typed_value.h +25 -1
  84. data/sketchup-sdk-win/headers/SketchUpAPI/application/model.h +4 -4
  85. data/sketchup-sdk-win/headers/SketchUpAPI/application/overlay.h +20 -6
  86. data/sketchup-sdk-win/headers/SketchUpAPI/common.h +9 -9
  87. data/sketchup-sdk-win/headers/SketchUpAPI/extension_license.h +9 -1
  88. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/point2d.h +2 -2
  89. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/point3d.h +2 -2
  90. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/transformation2d.h +3 -3
  91. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/vector2d.h +5 -5
  92. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/vector3d.h +4 -4
  93. data/sketchup-sdk-win/headers/SketchUpAPI/geometry.h +9 -7
  94. data/sketchup-sdk-win/headers/SketchUpAPI/import_export/modelimporterplugin.h +8 -4
  95. data/sketchup-sdk-win/headers/SketchUpAPI/model/attribute_dictionary.h +4 -4
  96. data/sketchup-sdk-win/headers/SketchUpAPI/model/component_definition.h +74 -33
  97. data/sketchup-sdk-win/headers/SketchUpAPI/model/component_definition_snap_to_behavior_private.h +46 -0
  98. data/sketchup-sdk-win/headers/SketchUpAPI/model/component_instance.h +11 -11
  99. data/sketchup-sdk-win/headers/SketchUpAPI/model/curve.h +4 -4
  100. data/sketchup-sdk-win/headers/SketchUpAPI/model/defs.h +7 -2
  101. data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension.h +2 -0
  102. data/sketchup-sdk-win/headers/SketchUpAPI/model/drawing_element.h +11 -11
  103. data/sketchup-sdk-win/headers/SketchUpAPI/model/edge.h +7 -7
  104. data/sketchup-sdk-win/headers/SketchUpAPI/model/entities.h +106 -61
  105. data/sketchup-sdk-win/headers/SketchUpAPI/model/entity.h +7 -4
  106. data/sketchup-sdk-win/headers/SketchUpAPI/model/environment.h +382 -0
  107. data/sketchup-sdk-win/headers/SketchUpAPI/model/environments.h +133 -0
  108. data/sketchup-sdk-win/headers/SketchUpAPI/model/face.h +43 -27
  109. data/sketchup-sdk-win/headers/SketchUpAPI/model/geometry_input.h +126 -116
  110. data/sketchup-sdk-win/headers/SketchUpAPI/model/group.h +9 -8
  111. data/sketchup-sdk-win/headers/SketchUpAPI/model/image.h +6 -5
  112. data/sketchup-sdk-win/headers/SketchUpAPI/model/layer.h +3 -3
  113. data/sketchup-sdk-win/headers/SketchUpAPI/model/material.h +432 -25
  114. data/sketchup-sdk-win/headers/SketchUpAPI/model/model.h +263 -100
  115. data/sketchup-sdk-win/headers/SketchUpAPI/model/model_entity_type_private.h +44 -0
  116. data/sketchup-sdk-win/headers/SketchUpAPI/model/rendering_options.h +82 -81
  117. data/sketchup-sdk-win/headers/SketchUpAPI/model/scene.h +222 -42
  118. data/sketchup-sdk-win/headers/SketchUpAPI/model/snap.h +183 -0
  119. data/sketchup-sdk-win/headers/SketchUpAPI/model/space.h +26 -0
  120. data/sketchup-sdk-win/headers/SketchUpAPI/model/styles.h +29 -27
  121. data/sketchup-sdk-win/headers/SketchUpAPI/model/text.h +14 -6
  122. data/sketchup-sdk-win/headers/SketchUpAPI/model/texture.h +23 -1
  123. data/sketchup-sdk-win/headers/SketchUpAPI/model/typed_value.h +26 -26
  124. data/sketchup-sdk-win/headers/SketchUpAPI/model/vertex.h +2 -2
  125. data/sketchup-sdk-win/headers/SketchUpAPI/sketchup.h +4 -1
  126. data/sketchup-sdk-win/headers/SketchUpAPI/unicodestring.h +7 -7
  127. metadata +22 -10
  128. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonGeometry.dylib +0 -0
  129. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonPreferences.dylib +0 -0
  130. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonUnits.dylib +0 -0
  131. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonUtils.dylib +0 -0
  132. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonZip.dylib +0 -0
  133. data/sketchup-sdk-win/headers/LayOutAPI/model/skpfilereference.h +0 -94
@@ -0,0 +1,382 @@
1
+ // Copyright 2024-2025 Trimble Inc. All Rights Reserved.
2
+
3
+ /**
4
+ * @file
5
+ * @brief Interfaces for SUEnvironmentRef.
6
+ */
7
+ #ifndef SKETCHUP_MODEL_ENVIRONMENT_H_
8
+ #define SKETCHUP_MODEL_ENVIRONMENT_H_
9
+
10
+ #include <SketchUpAPI/common.h>
11
+ #include <SketchUpAPI/model/defs.h>
12
+
13
+ #ifdef __cplusplus
14
+ extern "C" {
15
+ #endif
16
+
17
+ /**
18
+ @struct SUEnvironmentRef
19
+ @brief References an environment, which enables sky boxes and image-based lighting.
20
+ @since SketchUp 2025.0, API 13.0
21
+ */
22
+
23
+ /**
24
+ @brief Converts from an \ref SUEnvironmentRef to an \ref SUEntityRef.
25
+ This is essentially an upcast operation.
26
+ @since SketchUp 2025.0, API 13.0
27
+ @param[in] environment The given environment reference.
28
+ @related SUEnvironmentRef
29
+ @return
30
+ - The converted \ref SUEntityRef if \p environment is a valid object
31
+ - If not, the returned reference will be invalid
32
+ */
33
+ SU_EXPORT SUEntityRef SUEnvironmentToEntity(SUEnvironmentRef environment);
34
+
35
+ /**
36
+ @brief Converts from an \ref SUEntityRef to an SUEnvironmentRef.
37
+ This is essentially a downcast operation so the given \ref SUEntityRef
38
+ must be convertible to an \ref SUEnvironmentRef.
39
+ @since SketchUp 2025.0, API 13.0
40
+ @param[in] entity The given entity reference.
41
+ @related SUEnvironmentRef
42
+ @return
43
+ - The converted \ref SUEnvironmentRef if the downcast operation succeeds
44
+ - If not, the returned reference will be invalid
45
+ */
46
+ SU_EXPORT SUEnvironmentRef SUEnvironmentFromEntity(SUEntityRef entity);
47
+
48
+ /**
49
+ * @brief Creates an environment object from an SKE, HDR, or EXR file.
50
+ * The image or SKE file will be loaded into the environment's skydome as a cubemap.
51
+ * @since SketchUp 2025.0, API 13.0
52
+ * @param[out] environment The created environment object.
53
+ * @param[in] file_path The path to the SKE, HDR, or EXR file.
54
+ * @param[in] name The name of the environment. If empty, the name will default to the name
55
+ * stored in the SKE file (if available), or to the file name.
56
+ * @related SUEnvironmentRef
57
+ * @return
58
+ * - \ref SU_ERROR_NONE on success
59
+ * - \ref SU_ERROR_OVERWRITE_VALID if \p environment already references a valid object
60
+ * - \ref SU_ERROR_NULL_POINTER_INPUT if \p file_path , \p name , or \p environment is `NULL`
61
+ * - \ref SU_ERROR_INVALID_ARGUMENT if \p file_path is an empty string
62
+ * - \ref SU_ERROR_SERIALIZATION if the \p environment could not be created from the file at \p
63
+ * file_path
64
+ *
65
+ */
66
+ SU_RESULT SUEnvironmentCreateFromFile(
67
+ SUEnvironmentRef* environment, const char* file_path, const char* name);
68
+
69
+ /**
70
+ * @brief Writes an environment to an SKE file.
71
+ * @since SketchUp 2025.0, API 13.0
72
+ * @param[in] environment The environment object to write to file.
73
+ * @param[in] file_path The location to save the environment to. Assumed to be UTF-8 encoded.
74
+ * @related SUEnvironmentRef
75
+ * @return
76
+ * - \ref SU_ERROR_NONE on success
77
+ * - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
78
+ * - \ref SU_ERROR_NULL_POINTER_INPUT if \p file_path , \p name , or \p environment is `NULL`
79
+ * - \ref SU_ERROR_INVALID_ARGUMENT if \p file_path or \p name is an empty string
80
+ * - \ref SU_ERROR_SERIALIZATION if the \p environment could not be written to \p file_path
81
+ *
82
+ */
83
+ SU_RESULT SUEnvironmentWriteToFile(SUEnvironmentRef environment, const char* file_path);
84
+
85
+ /**
86
+ @brief Releases an environment object and its associated objects.
87
+ @note An environment object retrieved through \p SUEnvironmentsRef methods should not be released as
88
+ it is owned by the model.
89
+ @since SketchUp 2025.0, API 13.0
90
+ @param[in,out] environment The environment object.
91
+ @related SUEnvironmentRef
92
+ @return
93
+ - \ref SU_ERROR_NONE on success
94
+ - \ref SU_ERROR_NULL_POINTER_INPUT if \p environment is `NULL`
95
+ - \ref SU_ERROR_INVALID_INPUT if \p environment does not reference a valid object
96
+ */
97
+ SU_RESULT SUEnvironmentRelease(SUEnvironmentRef* environment);
98
+
99
+ /**
100
+ @brief Sets the name of a environment object.
101
+ @since SketchUp 2025.0, API 13.0
102
+ @param[in] environment The environment object.
103
+ @param[in] name The name string to set the environment object.
104
+ Assumed to be UTF-8 encoded.
105
+ @related SUEnvironmentRef
106
+ @return
107
+ - \ref SU_ERROR_NONE on success
108
+ - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
109
+ - \ref SU_ERROR_NULL_POINTER_INPUT if \p name is `NULL`
110
+ - \ref SU_ERROR_INVALID_ARGUMENT if \p name is an empty string or if no manager is associated with
111
+ the environment
112
+ - \ref SU_ERROR_DUPLICATE if \p name is a duplicate of another environment
113
+ */
114
+ SU_RESULT SUEnvironmentSetName(SUEnvironmentRef environment, const char* name);
115
+
116
+ /**
117
+ @brief Retrieves the name of a environment object.
118
+ @since SketchUp 2025.0, API 13.0
119
+ @param[in] environment The environment object.
120
+ @param[out] name The name retrieved.
121
+ @related SUEnvironmentRef
122
+ @return
123
+ - \ref SU_ERROR_NONE on success
124
+ - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
125
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p name is `NULL`
126
+ - \ref SU_ERROR_INVALID_OUTPUT if \p name does not point to a valid \ref
127
+ SUStringRef object
128
+ */
129
+ SU_RESULT SUEnvironmentGetName(SUEnvironmentRef environment, SUStringRef* name);
130
+
131
+ /**
132
+ @brief Sets the description of a environment object.
133
+ @since SketchUp 2025, API 13.0
134
+ @param[in] environment The environment object.
135
+ @param[in] desc The description to be set.
136
+ Assumed to be UTF-8 encoded.
137
+ @related SUEnvironmentRef
138
+ @return
139
+ - \ref SU_ERROR_NONE on success
140
+ - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
141
+ - \ref SU_ERROR_NULL_POINTER_INPUT if \p desc is `NULL`
142
+ */
143
+ SU_RESULT SUEnvironmentSetDescription(SUEnvironmentRef environment, const char* desc);
144
+
145
+ /**
146
+ @brief Retrieves the description of a environment object.
147
+ @since SketchUp 2025.0, API 13.0
148
+ @param[in] environment The environment object.
149
+ @param[out] desc The description retrieved.
150
+ @related SUEnvironmentRef
151
+ @return
152
+ - \ref SU_ERROR_NONE on success
153
+ - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
154
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p desc is `NULL`
155
+ - \ref SU_ERROR_INVALID_OUTPUT if \p desc does not point to a valid \ref SUStringRef object
156
+ */
157
+ SU_RESULT SUEnvironmentGetDescription(SUEnvironmentRef environment, SUStringRef* desc);
158
+
159
+ /**
160
+ * @brief Sets the the environment to be used as a skydome.
161
+ * @since SketchUp 2025.0, API 13.0
162
+ * @param[in] environment The environment object.
163
+ * @param[in] skydome The flag to set on the environment object.
164
+ * @related SUEnvironmentRef
165
+ * @return
166
+ * - \ref SU_ERROR_NONE on success
167
+ * - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
168
+ */
169
+ SU_RESULT SUEnvironmentSetUseAsSkydome(SUEnvironmentRef environment, bool skydome);
170
+
171
+ /**
172
+ * @brief Retrieves whether the environment is used as a skydome.
173
+ * @since SketchUp 2025.0, API 13.0
174
+ * @param[in] environment The environment object.
175
+ * @param[out] skydome The flag retrieved.
176
+ * @related SUEnvironmentRef
177
+ * @return
178
+ * - \ref SU_ERROR_NONE on success
179
+ * - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
180
+ * - \ref SU_ERROR_NULL_POINTER_OUTPUT if skydome is `NULL`
181
+ */
182
+ SU_RESULT SUEnvironmentGetUseAsSkydome(SUEnvironmentRef environment, bool* skydome);
183
+
184
+ /**
185
+ * @brief Sets the the environment to be used for reflections.
186
+ * @since SketchUp 2025.0, API 13.0
187
+ * @param[in] environment The environment object.
188
+ * @param[in] reflections The flag to set the environment object.
189
+ * @related SUEnvironmentRef
190
+ * @return
191
+ * - \ref SU_ERROR_NONE on success
192
+ * - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
193
+ */
194
+ SU_RESULT SUEnvironmentSetUseForReflections(SUEnvironmentRef environment, bool reflections);
195
+
196
+ /**
197
+ * @brief Retrieves whether the environment is used for reflections.
198
+ * @since SketchUp 2025.0, API 13.0
199
+ * @param[in] environment The environment object.
200
+ * @param[out] reflections The flag retrieved.
201
+ * @related SUEnvironmentRef
202
+ * @return
203
+ * - \ref SU_ERROR_NONE on success
204
+ * - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
205
+ * - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p reflections is `NULL`
206
+ */
207
+ SU_RESULT SUEnvironmentGetUseForReflections(SUEnvironmentRef environment, bool* reflections);
208
+
209
+ /**
210
+ * @brief Sets the the environment image vertical rotation angle in degrees.
211
+ * @since SketchUp 2025.0, API 13.0
212
+ * @param[in] environment The environment object.
213
+ * @param[in] angle The angle to set the environment object, within the range `[0.0, 360.0)`
214
+ * @related SUEnvironmentRef
215
+ * @return
216
+ * - \ref SU_ERROR_NONE on success
217
+ * - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
218
+ * - \ref SU_ERROR_OUT_OF_RANGE if \p angle is not within the range `[0.0, 360.0)`
219
+ */
220
+ SU_RESULT SUEnvironmentSetRotation(SUEnvironmentRef environment, double angle);
221
+
222
+ /**
223
+ * @brief Retrieves the environment image rotation in degrees.
224
+ * @since SketchUp 2025.0, API 13.0
225
+ * @param[in] environment The environment object.
226
+ * @param[out] angle The angle retrieved.
227
+ * @related SUEnvironmentRef
228
+ * @return
229
+ * - \ref SU_ERROR_NONE on success
230
+ * - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
231
+ * - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p angle is `NULL`
232
+ */
233
+ SU_RESULT SUEnvironmentGetRotation(SUEnvironmentRef environment, double* angle);
234
+
235
+ /**
236
+ * @brief Sets the skydome exposure to compensate for variations in HDR image exposure.
237
+ * The unaltered exposure level is `1.0`.
238
+ * @since SketchUp 2025.0, API 13.0
239
+ * @param[in] environment The environment object.
240
+ * @param[in] exposure The exposure to set the environment object, within the range [0.0, 20.0].
241
+ * @related SUEnvironmentRef
242
+ * @return
243
+ * - \ref SU_ERROR_NONE on success
244
+ * - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
245
+ * - \ref SU_ERROR_OUT_OF_RANGE if \p exposure is not within the range [0.0, 20.0]
246
+ */
247
+ SU_RESULT SUEnvironmentSetSkydomeExposure(SUEnvironmentRef environment, double exposure);
248
+
249
+ /**
250
+ * @brief Retrieves the skydome exposure of the environment.
251
+ * @since SketchUp 2025.0, API 13.0
252
+ * @param[in] environment The environment object.
253
+ * @param[out] exposure The exposure retrieved.
254
+ * @related SUEnvironmentRef
255
+ * @return
256
+ * - \ref SU_ERROR_NONE on success
257
+ * - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
258
+ * - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p exposure is `NULL`
259
+ */
260
+ SU_RESULT SUEnvironmentGetSkydomeExposure(SUEnvironmentRef environment, double* exposure);
261
+
262
+ /**
263
+ * @brief Sets the reflection exposure of the environment.
264
+ * @since SketchUp 2025.0, API 13.0
265
+ * @param[in] environment The environment object.
266
+ * @param[in] exposure The exposure to set the environment object, within the range [0.0, 10.0].
267
+ * @related SUEnvironmentRef
268
+ * @return
269
+ * - \ref SU_ERROR_NONE on success
270
+ * - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
271
+ * - \ref SU_ERROR_OUT_OF_RANGE if \p exposure is not within the range [0.0, 10.0]
272
+ */
273
+ SU_RESULT SUEnvironmentSetReflectionExposure(SUEnvironmentRef environment, double exposure);
274
+
275
+ /**
276
+ * @brief Retrieves the reflection exposure of the environment.
277
+ * @since SketchUp 2025.0, API 13.0
278
+ * @param[in] environment The environment object.
279
+ * @param[out] exposure The exposure retrieved.
280
+ * @related SUEnvironmentRef
281
+ * @return
282
+ * - \ref SU_ERROR_NONE on success
283
+ * - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
284
+ * - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p exposure is `NULL`
285
+ */
286
+ SU_RESULT SUEnvironmentGetReflectionExposure(SUEnvironmentRef environment, double* exposure);
287
+
288
+ /**
289
+ * @brief Sets the linked sun flag of the environment, enabling the shadow-casting light.
290
+ * Corresponding to "Set Sun Location" in the SketchUp UI.
291
+ * @since SketchUp 2025.0, API 13.0
292
+ * @param[in] environment The environment object.
293
+ * @param[in] linked_sun The flag to set the environment object.
294
+ * @related SUEnvironmentRef
295
+ * @return
296
+ * - \ref SU_ERROR_NONE on success
297
+ * - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
298
+ */
299
+ SU_RESULT SUEnvironmentSetLinkedSun(SUEnvironmentRef environment, bool linked_sun);
300
+
301
+ /**
302
+ * @brief Retrieves whether the environment is linked sun is enabled.
303
+ * @since SketchUp 2025.0, API 13.0
304
+ * @param[in] environment The environment object.
305
+ * @param[out] linked_sun The flag retrieved.
306
+ * @related SUEnvironmentRef
307
+ * @return
308
+ * - \ref SU_ERROR_NONE on success
309
+ * - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
310
+ * - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p linked_sun is `NULL`
311
+ */
312
+ SU_RESULT SUEnvironmentGetLinkedSun(SUEnvironmentRef environment, bool* linked_sun);
313
+
314
+ /**
315
+ * @brief Sets the linked sun position in the environment.
316
+ * @since SketchUp 2025.0, API 13.0
317
+ * @param[in] environment The environment object.
318
+ * @param[in] position The position to set the environment object.
319
+ * `x` corresponds to longitude with the range `[0.0, 1.0]`,
320
+ * `y` corresponds to latitude with the range `[-1.0, 1.0]`.
321
+ * @related SUEnvironmentRef
322
+ * @return
323
+ * - \ref SU_ERROR_NONE on success
324
+ * - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
325
+ * - \ref SU_ERROR_NULL_POINTER_INPUT if \p position is `NULL`
326
+ * - \ref SU_ERROR_OUT_OF_RANGE if \p position has invalid x or y values
327
+ */
328
+ SU_RESULT SUEnvironmentSetLinkedSunPosition(
329
+ SUEnvironmentRef environment, const struct SUPoint2D* position);
330
+
331
+ /**
332
+ * @brief Retrieves the linked sun position in the environment.
333
+ * @since SketchUp 2025.0, API 13.0
334
+ * @param[in] environment The environment object.
335
+ * @param[out] position The position retrieved.
336
+ * @related SUEnvironmentRef
337
+ * @return
338
+ * - \ref SU_ERROR_NONE on success
339
+ * - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
340
+ * - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p position is `NULL`
341
+ */
342
+ SU_RESULT SUEnvironmentGetLinkedSunPosition(
343
+ SUEnvironmentRef environment, struct SUPoint2D* position);
344
+
345
+ /**
346
+ * @brief Retrieves the thumbnail preview image for the given environment.
347
+ * @since SketchUp 2025.0, API 13.0
348
+ * @param[in] environment The environment object.
349
+ * @param[out] image The thumbnail to be retrieved.
350
+ * @related SUEnvironmentRef
351
+ * @return
352
+ * - \ref SU_ERROR_NONE on success
353
+ * - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
354
+ * - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p image is NULL
355
+ * - \ref SU_ERROR_INVALID_OUTPUT if \p image does not point to a valid \ref
356
+ SUImageRepRef object
357
+ * - \ref SU_ERROR_NO_DATA if the thumbnail can not be retrieved
358
+ */
359
+ SU_RESULT SUEnvironmentGetThumbnail(SUEnvironmentRef environment, SUImageRepRef* image);
360
+
361
+ /**
362
+ * @brief Writes the HDR image of the environment to a file in its original file type.
363
+ * @since SketchUp 2025.0, API 13.0
364
+ * @param[in] environment The environment object.
365
+ * @param[in] dir_path The directory path to save the HDR image to.
366
+ * @param[out] full_path_written The full path of the written file.
367
+ * @related SUEnvironmentRef
368
+ * @return
369
+ * - \ref SU_ERROR_NONE on success
370
+ * - \ref SU_ERROR_INVALID_INPUT if \p environment is not a valid object
371
+ * - \ref SU_ERROR_NULL_POINTER_INPUT if \p dir_path or \p full_path_written is `NULL`
372
+ * - \ref SU_ERROR_INVALID_ARGUMENT if \p dir_path is an empty string
373
+ * - \ref SU_ERROR_SERIALIZATION if the HDR image could not be written to \p dir_path
374
+ */
375
+ SU_RESULT SUEnvironmentWriteHDRImageToFile(
376
+ SUEnvironmentRef environment, const char* dir_path, SUStringRef* full_path_written);
377
+
378
+ #ifdef __cplusplus
379
+ } // extern "C"
380
+ #endif
381
+
382
+ #endif // SKETCHUP_MODEL_ENVIRONMENT_H_
@@ -0,0 +1,133 @@
1
+ // Copyright 2024-2025 Trimble Inc. All Rights Reserved.
2
+
3
+ /**
4
+ * @file
5
+ * @brief Interfaces for SUEnvironmentsRef.
6
+ */
7
+ #ifndef SKETCHUP_MODEL_ENVIRONMENTS_H_
8
+ #define SKETCHUP_MODEL_ENVIRONMENTS_H_
9
+
10
+ #include <SketchUpAPI/common.h>
11
+ #include <SketchUpAPI/model/defs.h>
12
+
13
+ #ifdef __cplusplus
14
+ extern "C" {
15
+ #endif
16
+
17
+ /**
18
+ @struct SUEnvironmentsRef
19
+ @brief References a container object for all environments in a model.
20
+ @since SketchUp 2025.0, API 13.0
21
+ */
22
+
23
+ /**
24
+ * @brief Retrieves the number of environment objects in an environments object.
25
+ * @since SketchUp 2025.0, API 13.0
26
+ * @param[in] environments The environments object.
27
+ * @param[out] count The number of environments.
28
+ * @related SUEnvironmentsRef
29
+ * @return
30
+ * - \ref SU_ERROR_NONE on success
31
+ * - \ref SU_ERROR_INVALID_INPUT if \p environments is not a valid object
32
+ * - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p count is `NULL`
33
+ */
34
+ SU_RESULT SUEnvironmentsGetCount(SUEnvironmentsRef environments, size_t* count);
35
+
36
+ /**
37
+ * @brief Retrieves every environment associated with an environments object.
38
+ * @since SketchUp 2025.0, API 13.0
39
+ * @param[in] environments The environments object.
40
+ * @param[in] len The number of environments to retrieve.
41
+ * @param[out] items The environments retrieved.
42
+ * @param[out] count The number of environments retrieved.
43
+ * @related SUEnvironmentsRef
44
+ * @return
45
+ * - \ref SU_ERROR_NONE on success
46
+ * - \ref SU_ERROR_INVALID_INPUT if \p environments is not a valid object
47
+ * - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p items or \p count is `NULL`
48
+ */
49
+ SU_RESULT SUEnvironmentsGetAll(
50
+ SUEnvironmentsRef environments, size_t len, SUEnvironmentRef items[], size_t* count);
51
+
52
+ /**
53
+ * @brief Retrieves the currently selected environment.
54
+ * @since SketchUp 2025.0, API 13.0
55
+ * @param[in] environments The environments object.
56
+ * @param[out] environment The selected environment object.
57
+ * @related SUEnvironmentsRef
58
+ * @return
59
+ * - \ref SU_ERROR_NONE on success
60
+ * - \ref SU_ERROR_INVALID_INPUT if \p environments is not a valid object
61
+ * - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p environment is `NULL`
62
+ * - \ref SU_ERROR_NO_DATA if no environment is currently selected
63
+ */
64
+ SU_RESULT SUEnvironmentsGetSelectedEnvironment(
65
+ SUEnvironmentsRef environments, SUEnvironmentRef* environment);
66
+
67
+ /**
68
+ * @brief Retrieves an environment by persistent ID.
69
+ * @since SketchUp 2025.0, API 13.0
70
+ * @param[in] environments The environments object.
71
+ * @param[in] pid The PID of the environment object to retrieve.
72
+ * @param[out] environment The environment object with the given PID.
73
+ * @related SUEnvironmentsRef
74
+ * @return
75
+ * - \ref SU_ERROR_NONE on success
76
+ * - \ref SU_ERROR_INVALID_INPUT if \p environments is not a valid object
77
+ * - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p environment is `NULL`
78
+ * - \ref SU_ERROR_NO_DATA if no environment can be found with the given PID
79
+ */
80
+ SU_RESULT SUEnvironmentsGetEnvironmentByPersistentID(
81
+ SUEnvironmentsRef environments, uint64_t pid, SUEnvironmentRef* environment);
82
+
83
+ /**
84
+ * @brief Retrieves an environment by name.
85
+ * @since SketchUp 2025.0, API 13.0
86
+ * @param[in] environments The environments object.
87
+ * @param[in] name The name of the environment object to retrieve.
88
+ * @param[out] environment The environment object with the given name.
89
+ * @related SUEnvironmentsRef
90
+ * @return
91
+ * - \ref SU_ERROR_NONE on success
92
+ * - \ref SU_ERROR_INVALID_INPUT if \p environments is not a valid object
93
+ * - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p environment is `NULL`
94
+ * - \ref SU_ERROR_NO_DATA if no environment can be found with the given name
95
+ */
96
+ SU_RESULT SUEnvironmentsGetEnvironmentByName(
97
+ SUEnvironmentsRef environments, const char* name, SUEnvironmentRef* environment);
98
+
99
+ /**
100
+ * @brief Adds an environment to an environments object.
101
+ * @note This method transfers ownership of the \p environment to the model. Do not call
102
+ * \p SUEnvironmentRelease on \p environment after calling this method.
103
+ * @since SketchUp 2025.0, API 13.0
104
+ * @param[in] environments The environments object.
105
+ * @param[in] environment The environment object to add.
106
+ * @related SUEnvironmentsRef
107
+ * @return
108
+ * - \ref SU_ERROR_NONE on success
109
+ * - \ref SU_ERROR_INVALID_INPUT if \p environment or \p environments is not a valid object
110
+ * - \ref SU_ERROR_DUPLICATE if the \p environment is already part of the environments
111
+ * object
112
+ * - \ref SU_ERROR_INVALID_ARGUMENT if the environment name is already in use
113
+ */
114
+ SU_RESULT SUEnvironmentsAdd(SUEnvironmentsRef environments, SUEnvironmentRef environment);
115
+
116
+ /**
117
+ * @brief Removes an environment from an environments object.
118
+ * @since SketchUp 2025.0, API 13.0
119
+ * @param[in] environments The environments object.
120
+ * @param[in] environment The environment object to remove.
121
+ * @related SUEnvironmentsRef
122
+ * @return
123
+ * - \ref SU_ERROR_NONE on success
124
+ * - \ref SU_ERROR_INVALID_INPUT if \p environment or \p environments is not a valid object
125
+ * - \ref SU_ERROR_INVALID_OPERATION if \p environment is not part of the \p environments object
126
+ */
127
+ SU_RESULT SUEnvironmentsRemove(SUEnvironmentsRef environments, SUEnvironmentRef environment);
128
+
129
+ #ifdef __cplusplus
130
+ } // extern "C"
131
+ #endif
132
+
133
+ #endif // SKETCHUP_SLAPI_PUBLIC_MODEL_ENVIRONMENTS_H_
@@ -78,12 +78,12 @@ SU_EXPORT SUFaceRef SUFaceFromDrawingElement(SUDrawingElementRef drawing_elem);
78
78
  produces SketchUp models with unexpected state. Avoid using these functions
79
79
  and instead use SUGeometryInputRef along with SUEntitiesFill().
80
80
 
81
- @param[out] face The face object created.
82
- @param[in] vertices3d The array of vertices that make the face.
83
- @param[in] outer_loop The loop input that describes the outer loop of the face.
84
- If the function is successful, the new face will take
85
- ownership of the loop and this reference will be
86
- invalidated.
81
+ @param[out] face The face object created.
82
+ @param[in] vertices3d The array of vertices that make the face.
83
+ @param[in,out] outer_loop The loop input that describes the outer loop of the face.
84
+ If the function is successful, the new face will take
85
+ ownership of the loop and this reference will be
86
+ invalidated.
87
87
  @related SUFaceRef
88
88
  @return
89
89
  - \ref SU_ERROR_NONE on success
@@ -132,7 +132,7 @@ SU_RESULT SUFaceGetNormal(SUFaceRef face, struct SUVector3D* normal);
132
132
 
133
133
  /**
134
134
  @brief Releases a face object and its associated resources.
135
- @param[in] face The face object.
135
+ @param[in,out] face The face object.
136
136
  @related SUFaceRef
137
137
  @return
138
138
  - \ref SU_ERROR_NONE on success
@@ -275,12 +275,12 @@ SU_RESULT SUFaceGetInnerLoops(SUFaceRef face, size_t len, SULoopRef loops[], siz
275
275
  /**
276
276
  @brief Adds a hole to the face. The face object must be associated with a parent
277
277
  component.
278
- @param[in] face The face object.
279
- @param[in] vertices3d The array of vertices references by the added loop.
280
- @param[in] loop The loop input that describes the inner loop.
281
- If the function is successful, the new face will take
282
- ownership of the loop and this reference will be
283
- invalidated.
278
+ @param[in,out] face The face object.
279
+ @param[in] vertices3d The array of vertices references by the added loop.
280
+ @param[in,out] loop The loop input that describes the inner loop.
281
+ If the function is successful, the new face will take
282
+ ownership of the loop and this reference will be
283
+ invalidated.
284
284
  @related SUFaceRef
285
285
  @return
286
286
  - \ref SU_ERROR_NONE on success
@@ -334,9 +334,9 @@ SU_RESULT SUFaceGetFrontMaterial(SUFaceRef face, SUMaterialRef* material);
334
334
 
335
335
  /**
336
336
  @brief Sets the front material of a face object.
337
- @param[in] face The face object.
338
- @param[in] material The material object to set. If invalid, this will set the
339
- material to the default material.
337
+ @param[in,out] face The face object.
338
+ @param[in] material The material object to set. If invalid, this will set the
339
+ material to the default material.
340
340
  @related SUFaceRef
341
341
  @return
342
342
  - \ref SU_ERROR_NONE on success
@@ -360,9 +360,9 @@ SU_RESULT SUFaceGetBackMaterial(SUFaceRef face, SUMaterialRef* material);
360
360
 
361
361
  /**
362
362
  @brief Sets the back material of a face object.
363
- @param[in] face The face object.
364
- @param[in] material The material object to set. If invalid, this will set the
365
- material to the default material.
363
+ @param[in,out] face The face object.
364
+ @param[in] material The material object to set. If invalid, this will set the
365
+ material to the default material.
366
366
  @related SUFaceRef
367
367
  @return
368
368
  - \ref SU_ERROR_NONE on success
@@ -519,7 +519,7 @@ SU_RESULT SUFaceGetAttachedDrawingElements(
519
519
  /**
520
520
  @brief Reverses a face object.
521
521
  @since SketchUp 2016, API 4.0
522
- @param[in] face The face object.
522
+ @param[in,out] face The face object.
523
523
  @related SUFaceRef
524
524
  @return
525
525
  - \ref SU_ERROR_NONE on success
@@ -590,8 +590,8 @@ This is similar to reseting the texture position from the SketchUp UI face conte
590
590
 
591
591
  @since SketchUp 2022.0, API 10.0
592
592
 
593
- @param[in] face
594
- @param[in] front Flag indicating whether to clear the front or back side of the face.
593
+ @param[in,out] face
594
+ @param[in] front Flag indicating whether to clear the front or back side of the face.
595
595
  @related SUFaceRef
596
596
  @return
597
597
  - \ref SU_ERROR_NONE on success.
@@ -646,8 +646,8 @@ This is similar to toggling off Projection from the Position Texture tool in the
646
646
 
647
647
  @since SketchUp 2021.1, API 9.1
648
648
 
649
- @param[in] face
650
- @param[in] front Flag indicating whether to clear the front or back side of the face.
649
+ @param[in,out] face
650
+ @param[in] front Flag indicating whether to clear the front or back side of the face.
651
651
  @related SUFaceRef
652
652
  @return
653
653
  - \ref SU_ERROR_NONE on success.
@@ -664,9 +664,9 @@ textures are positioned in the UI using the Position Texture tool.
664
664
 
665
665
  @since SketchUp 2021.1, API 9.1
666
666
 
667
- @param[in] face
668
- @param[in] front Flag indicating whether to use the front or back side of the face.
669
- @param[in] mapping
667
+ @param[in,out] face
668
+ @param[in] front Flag indicating whether to use the front or back side of the face.
669
+ @param[in] mapping
670
670
  @related SUFaceRef
671
671
  @return
672
672
  - \ref SU_ERROR_NONE on success
@@ -679,6 +679,22 @@ textures are positioned in the UI using the Position Texture tool.
679
679
  SU_RESULT SUFacePositionMaterial(
680
680
  SUFaceRef face, bool front, struct SUMaterialPositionInput* mapping);
681
681
 
682
+ /**
683
+ @brief Retrieves a flag indicating whether \p face is coplanar with \p other_face.
684
+
685
+ @since SketchUp 2025.0, API 13.0
686
+
687
+ @param[in] face The \p face object.
688
+ @param[in] other_face The \p other_face object.
689
+ @param[out] is_coplanar The flag retrieved.
690
+ @related SUFaceRef
691
+ @return
692
+ - \ref SU_ERROR_NONE on success
693
+ - \ref SU_ERROR_INVALID_INPUT if \p face or \p other_face is not a valid face object
694
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p is_coplanar is NULL
695
+ */
696
+ SU_RESULT SUFaceCoplanarWith(SUFaceRef face, SUFaceRef other_face, bool* is_coplanar);
697
+
682
698
  #ifdef __cplusplus
683
699
  } // extern "C" {
684
700
  #endif