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
@@ -1,4 +1,4 @@
1
- // Copyright 2013 Trimble Inc. All Rights Reserved.
1
+ // Copyright 2012-2024 Trimble Inc. All Rights Reserved.
2
2
 
3
3
  /**
4
4
  * @file
@@ -22,7 +22,6 @@ extern "C" {
22
22
  @brief References a material object.
23
23
  */
24
24
 
25
-
26
25
  /**
27
26
  @enum SUMaterialType
28
27
  @brief Indicates material type.
@@ -55,6 +54,26 @@ enum SUMaterialColorizeType {
55
54
  SUMaterialColorizeType_Tint, ///< Colorize the texture
56
55
  };
57
56
 
57
+ /**
58
+ @enum SUMaterialWorkflow
59
+ @brief Indicates the workflow being used to represent materials
60
+ @since SketchUp 2025.0, API 13.0
61
+ */
62
+ enum SUMaterialWorkflow {
63
+ SUMaterialWorkflow_Classic = 0, ///< Classic material workflow
64
+ SUMaterialWorkflow_PBRMetallicRoughness ///< PBR metallic/roughness material workflow
65
+ };
66
+
67
+ /**
68
+ @enum SUMaterialNormalMapStyle
69
+ @brief Indicates the normal mapping convention used by the material.
70
+ @since SketchUp 2025.0, API 13.0
71
+ */
72
+ enum SUMaterialNormalMapStyle {
73
+ SUMaterialNormalMapStyle_OpenGL = 0, ///< OpenGL style
74
+ SUMaterialNormalMapStyle_DirectX, ///< DirectX style
75
+ };
76
+
58
77
  /**
59
78
  @brief Converts from an \ref SUMaterialRef to an \ref SUEntityRef.
60
79
  This is essentially an upcast operation.
@@ -95,7 +114,7 @@ SU_RESULT SUMaterialCreate(SUMaterialRef* material);
95
114
  @brief Releases a material and its resources.
96
115
 
97
116
  The material must not be associated with a parent object such as a face.
98
- @param[in] material The material to be released.
117
+ @param[in,out] material The material to be released.
99
118
  @related SUMaterialRef
100
119
  @return
101
120
  - \ref SU_ERROR_NONE on success
@@ -112,9 +131,9 @@ SU_RESULT SUMaterialRelease(SUMaterialRef* material);
112
131
  managed by a model and the provided name was previously associated
113
132
  with a different material in the model.
114
133
 
115
- @param[in] material The material object.
116
- @param[in] name The name to set the material name. Assumed to be UTF-8
117
- encoded.
134
+ @param[in,out] material The material object.
135
+ @param[in] name The name to set the material name. Assumed to be UTF-8
136
+ encoded.
118
137
  @related SUMaterialRef
119
138
  @return
120
139
  - \ref SU_ERROR_NONE on success
@@ -168,8 +187,8 @@ SU_RESULT SUMaterialGetNameLegacyBehavior(SUMaterialRef material, SUStringRef* n
168
187
 
169
188
  /**
170
189
  @brief Sets the color of a material object.
171
- @param[in] material The material object.
172
- @param[in] color The color value to set the material color.
190
+ @param[in,out] material The material object.
191
+ @param[in] color The color value to set the material color.
173
192
  @related SUMaterialRef
174
193
  @return
175
194
  - \ref SU_ERROR_NONE on success
@@ -191,29 +210,29 @@ SU_RESULT SUMaterialSetColor(SUMaterialRef material, const SUColor* color);
191
210
  SU_RESULT SUMaterialGetColor(SUMaterialRef material, SUColor* color);
192
211
 
193
212
  /**
194
- @brief Sets the texture of a material object. Materials take ownership of their
195
- assigned textures, so textures should not be shared accross different
196
- materials.
197
- @param[in] material The material object.
198
- @param[in] texture The texture object to set the material texture.
213
+ @brief Sets the texture of a material object.
214
+ @note Materials take ownership of their assigned textures, so textures should not be shared
215
+ accross different materials.
216
+ @param[in,out] material The material object.
217
+ @param[in] texture The texture object to set the material texture.
199
218
  @related SUMaterialRef
200
219
  @return
201
220
  - \ref SU_ERROR_NONE on success
202
- - \ref SU_ERROR_INVALID_INPUT if material or texture is not a valid object
203
- - \ref SU_ERROR_GENERIC if texture contains invalid image data
221
+ - \ref SU_ERROR_INVALID_INPUT if \p material or \p texture is not a valid object
222
+ - \ref SU_ERROR_GENERIC if \p texture contains invalid image data
204
223
  */
205
224
  SU_RESULT SUMaterialSetTexture(SUMaterialRef material, SUTextureRef texture);
206
225
 
207
226
  /**
208
227
  @brief Retrieves the texture of a material object.
209
228
  @param[in] material The material object.
210
- @param[out] texture The texture object retrieved.
229
+ @param[out] texture The texture object retrieved. This texture should not be released
230
+ via SUTextureRelease() since it is owned by the material.
211
231
  @related SUMaterialRef
212
232
  @return
213
233
  - \ref SU_ERROR_NONE on success
214
234
  - \ref SU_ERROR_INVALID_INPUT if material is not a valid object
215
235
  - \ref SU_ERROR_NULL_POINTER_OUTPUT if texture is NULL
216
- - \ref SU_ERROR_INVALID_OUTPUT if texture is not a valid object
217
236
  - \ref SU_ERROR_NO_DATA if the material object does not have a texture
218
237
  */
219
238
  SU_RESULT SUMaterialGetTexture(SUMaterialRef material, SUTextureRef* texture);
@@ -232,8 +251,8 @@ SU_RESULT SUMaterialGetOpacity(SUMaterialRef material, double* alpha);
232
251
 
233
252
  /**
234
253
  @brief Sets the alpha value of a material object.
235
- @param[in] material The material object.
236
- @param[in] alpha The alpha value to set. Must be within range [0.0, 1.0].
254
+ @param[in,out] material The material object.
255
+ @param[in] alpha The alpha value to set. Must be within range [0.0, 1.0].
237
256
  @related SUMaterialRef
238
257
  @return
239
258
  - \ref SU_ERROR_NONE on success
@@ -258,8 +277,8 @@ SU_RESULT SUMaterialGetUseOpacity(SUMaterialRef material, bool* use_opacity);
258
277
  /**
259
278
  @brief Sets the flag indicating whether alpha values are used on a material
260
279
  object.
261
- @param[in] material The material object.
262
- @param[in] use_opacity The flag boolean value to set.
280
+ @param[in,out] material The material object.
281
+ @param[in] use_opacity The flag boolean value to set.
263
282
  @related SUMaterialRef
264
283
  @return
265
284
  - \ref SU_ERROR_NONE on success
@@ -269,8 +288,8 @@ SU_RESULT SUMaterialSetUseOpacity(SUMaterialRef material, bool use_opacity);
269
288
 
270
289
  /**
271
290
  @brief Sets the type of a material object.
272
- @param[in] material The material object.
273
- @param[in] type The type to set.
291
+ @param[in,out] material The material object.
292
+ @param[in] type The type to set.
274
293
  @related SUMaterialRef
275
294
  @return
276
295
  - \ref SU_ERROR_NONE on success
@@ -326,8 +345,8 @@ SU_RESULT SUMaterialGetOwnerType(SUMaterialRef material, enum SUMaterialOwnerTyp
326
345
  material's color is set to a custom value. Call this function after
327
346
  calling SUMaterialSetColor as otherwise the colorize type will be reset.
328
347
  @since SketchUp 2019.2, API 7.1
329
- @param[in] material The material object.
330
- @param[in] type The type to set.
348
+ @param[in,out] material The material object.
349
+ @param[in] type The type to set.
331
350
  @related SUMaterialRef
332
351
  @return
333
352
  - \ref SU_ERROR_NONE on success
@@ -366,6 +385,7 @@ SU_RESULT SUMaterialGetColorizeType(SUMaterialRef material, enum SUMaterialColor
366
385
  */
367
386
  SU_RESULT SUMaterialGetColorizeDeltas(
368
387
  SUMaterialRef material, double* hue, double* saturation, double* lightness);
388
+
369
389
  /**
370
390
  @brief Writes a material to a SKM file.
371
391
  @since SketchUp 2021.1, API 9.1
@@ -382,6 +402,393 @@ SU_RESULT SUMaterialGetColorizeDeltas(
382
402
  */
383
403
  SU_RESULT SUMaterialWriteToFile(SUMaterialRef material, const char* file_path);
384
404
 
405
+ /** @name PBR Metallic Roughness Workflow
406
+ */
407
+ ///@{
408
+ /**
409
+ @brief Queries the workflow type of a material.
410
+ @since SketchUp 2025.0, API 13.0
411
+ @param[in] material The material object.
412
+ @param[out] workflow The returned workflow type.
413
+ @related SUMaterialRef
414
+ @return
415
+ - \ref SU_ERROR_NONE on success
416
+ - \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
417
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p workflow is NULL
418
+ */
419
+ SU_RESULT SUMaterialGetWorkflow(SUMaterialRef material, enum SUMaterialWorkflow* workflow);
420
+
421
+ /**
422
+ @brief Enables metalness properties for the material.
423
+ @note After this is enabled, a metallic texture and/or a metallic factor can be set.
424
+ @since SketchUp 2025.0, API 13.0
425
+ @param[in,out] material The material object.
426
+ @param[in] enable Whether to enable or disable.
427
+ @related SUMaterialRef
428
+ @return
429
+ - \ref SU_ERROR_NONE on success
430
+ - \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
431
+ */
432
+ SU_RESULT SUMaterialSetMetalnessEnabled(SUMaterialRef material, bool enable);
433
+
434
+ /**
435
+ @brief Queries whether metalness properties are enabled for the material.
436
+ @since SketchUp 2025.0, API 13.0
437
+ @param[in] material The material object.
438
+ @param[out] enabled Whether metalness is enabled or not.
439
+ @related SUMaterialRef
440
+ @return
441
+ - \ref SU_ERROR_NONE on success
442
+ - \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
443
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p enabled is NULL
444
+ */
445
+ SU_RESULT SUMaterialIsMetalnessEnabled(SUMaterialRef material, bool* enabled);
446
+
447
+ /**
448
+ @brief Sets the metallic texture of a PBR material.
449
+ @note Materials take ownership of their assigned textures, so textures should not be shared
450
+ accross different materials.
451
+ @since SketchUp 2025.0, API 13.0
452
+ @param[in,out] material The material object.
453
+ @param[in] texture The texture containing the metalness information. Should be an 8 bit per
454
+ pixel (single channel) image. If an invalid texture reference is given (i.e.
455
+ \ref SU_INVALID), then any existing metallic texture will be removed from
456
+ the material.
457
+ @related SUMaterialRef
458
+ @return
459
+ - \ref SU_ERROR_NONE on success
460
+ - \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
461
+ - \ref SU_ERROR_INVALID_ARGUMENT if \p texture contains invalid metalness data
462
+ */
463
+ SU_RESULT SUMaterialSetMetallicTexture(SUMaterialRef material, SUTextureRef texture);
464
+
465
+ /**
466
+ @brief Retrieves the metallic texture of a material.
467
+ @since SketchUp 2025.0, API 13.0
468
+ @param[in] material The material object.
469
+ @param[out] texture The texture containing the metalness information, if one exists. This texture
470
+ should not be released via SUTextureRelease() since it is owned by the
471
+ material.
472
+ @related SUMaterialRef
473
+ @return
474
+ - \ref SU_ERROR_NONE on success
475
+ - \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
476
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p texture is NULL
477
+ - \ref SU_ERROR_NO_DATA if \p material does not have a metalness texture
478
+ */
479
+ SU_RESULT SUMaterialGetMetallicTexture(SUMaterialRef material, SUTextureRef* texture);
480
+
481
+ /**
482
+ @brief Sets the metallic factor of a material.
483
+ @since SketchUp 2025.0, API 13.0
484
+ @param[in,out] material The material object.
485
+ @param[in] factor Metallic factor to set. The valid range is [0.0, 1.0].
486
+ @related SUMaterialRef
487
+ @return
488
+ - \ref SU_ERROR_NONE on success
489
+ - \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
490
+ - \ref SU_ERROR_INVALID_ARGUMENT if \p factor is not within the valid range
491
+ */
492
+ SU_RESULT SUMaterialSetMetallicFactor(SUMaterialRef material, double factor);
493
+
494
+ /**
495
+ @brief Retrieves the metallic factor of a material.
496
+ @since SketchUp 2025.0, API 13.0
497
+ @param[in] material The material object.
498
+ @param[out] factor The factor returned.
499
+ @related SUMaterialRef
500
+ @return
501
+ - \ref SU_ERROR_NONE on success
502
+ - \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
503
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p factor is NULL
504
+ */
505
+ SU_RESULT SUMaterialGetMetallicFactor(SUMaterialRef material, double* factor);
506
+
507
+ /**
508
+ @brief Enables roughness properties for the material.
509
+ @note After this is enabled, a roughness texture and/or a roughness factor can be set.
510
+ @since SketchUp 2025.0, API 13.0
511
+ @param[in,out] material The material object.
512
+ @param[in] enable Whether to enable or disable.
513
+ @related SUMaterialRef
514
+ @return
515
+ - \ref SU_ERROR_NONE on success
516
+ - \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
517
+ */
518
+ SU_RESULT SUMaterialSetRoughnessEnabled(SUMaterialRef material, bool enable);
519
+
520
+ /**
521
+ @brief Queries whether roughness properties are enabled for the material.
522
+ @since SketchUp 2025.0, API 13.0
523
+ @param[in] material The material object.
524
+ @param[out] enabled Whether roughness is enabled or not.
525
+ @related SUMaterialRef
526
+ @return
527
+ - \ref SU_ERROR_NONE on success
528
+ - \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
529
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p enabled is NULL
530
+ */
531
+ SU_RESULT SUMaterialIsRoughnessEnabled(SUMaterialRef material, bool* enabled);
532
+
533
+ /**
534
+ @brief Sets the roughness texture of a PBR material.
535
+ @note Materials take ownership of their assigned textures, so textures should not be shared
536
+ accross different materials.
537
+ @since SketchUp 2025.0, API 13.0
538
+ @param[in,out] material The material object.
539
+ @param[in] texture The texture containing the roughness information. Should be an 8 bit per
540
+ pixel (single channel) image. If an invalid texture reference is given (i.e.
541
+ \ref SU_INVALID), then any existing metallic texture will be removed from
542
+ the material.
543
+ @related SUMaterialRef
544
+ @return
545
+ - \ref SU_ERROR_NONE on success
546
+ - \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
547
+ - \ref SU_ERROR_INVALID_ARGUMENT if \p texture contains invalid roughness data
548
+ */
549
+ SU_RESULT SUMaterialSetRoughnessTexture(SUMaterialRef material, SUTextureRef texture);
550
+
551
+ /**
552
+ @brief Retrieves the roughness texture of a material.
553
+ @since SketchUp 2025.0, API 13.0
554
+ @param[in] material The material object.
555
+ @param[out] texture The texture containing the roughness information, if one exists. This texture
556
+ should not be released via SUTextureRelease() since it is owned by the
557
+ material.
558
+ @related SUMaterialRef
559
+ @return
560
+ - \ref SU_ERROR_NONE on success
561
+ - \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
562
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p texture is NULL
563
+ - \ref SU_ERROR_NO_DATA if \p material does not have a roughness texture
564
+ */
565
+ SU_RESULT SUMaterialGetRoughnessTexture(SUMaterialRef material, SUTextureRef* texture);
566
+
567
+ /**
568
+ @brief Sets the roughness factor of a material.
569
+ @since SketchUp 2025.0, API 13.0
570
+ @param[in,out] material The material object.
571
+ @param[in] factor Roughness factor to set. The valid range is [0.0, 1.0].
572
+ @related SUMaterialRef
573
+ @return
574
+ - \ref SU_ERROR_NONE on success
575
+ - \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
576
+ - \ref SU_ERROR_INVALID_ARGUMENT if \p factor is not within the valid range
577
+ */
578
+ SU_RESULT SUMaterialSetRoughnessFactor(SUMaterialRef material, double factor);
579
+
580
+ /**
581
+ @brief Retrieves the roughness factor of a material.
582
+ @since SketchUp 2025.0, API 13.0
583
+ @param[in] material The material object.
584
+ @param[out] factor The factor returned.
585
+ @related SUMaterialRef
586
+ @return
587
+ - \ref SU_ERROR_NONE on success
588
+ - \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
589
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p factor is NULL
590
+ */
591
+ SU_RESULT SUMaterialGetRoughnessFactor(SUMaterialRef material, double* factor);
592
+
593
+ /**
594
+ @brief Enables normal map for the material.
595
+ @note A normal map texture must be set before enabling it.
596
+ @since SketchUp 2025.0.2, API 13.1
597
+ @param[in,out] material The material object.
598
+ @param[in] enable Whether to enable or disable.
599
+ @related SUMaterialRef
600
+ @return
601
+ - \ref SU_ERROR_NONE on success
602
+ - \ref SU_ERROR_INVALID_ARGUMENT if a normal map texture was not set before enabling.
603
+ */
604
+ SU_RESULT SUMaterialSetNormalEnabled(SUMaterialRef material, bool enable);
605
+
606
+ /**
607
+ @brief Queries whether normal mapping is enabled for the material.
608
+ @since SketchUp 2025.0, API 13.0
609
+ @param[in] material The material object.
610
+ @param[out] enabled Whether normal mapping is enabled or not.
611
+ @related SUMaterialRef
612
+ @return
613
+ - \ref SU_ERROR_NONE on success
614
+ - \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
615
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p enabled is NULL
616
+ */
617
+ SU_RESULT SUMaterialIsNormalEnabled(SUMaterialRef material, bool* enabled);
618
+
619
+ /**
620
+ @brief Sets the normal texture of a PBR material.
621
+ @note Materials take ownership of their assigned textures, so textures should not be shared
622
+ accross different materials.
623
+ @since SketchUp 2025.0, API 13.0
624
+ @param[in,out] material The material object.
625
+ @param[in] texture The texture containing the normal information. Should be an 24 bit per pixel
626
+ (3 channel) image. If an invalid texture reference is given (i.e. \ref
627
+ SU_INVALID), then any existing normal texture will be removed from the
628
+ material, which will effectively disable normal mapping.
629
+ @related SUMaterialRef
630
+ @return
631
+ - \ref SU_ERROR_NONE on success
632
+ - \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
633
+ - \ref SU_ERROR_INVALID_ARGUMENT if \p texture contains invalid normal data
634
+ */
635
+ SU_RESULT SUMaterialSetNormalTexture(SUMaterialRef material, SUTextureRef texture);
636
+
637
+ /**
638
+ @brief Retrieves the normal texture of a material.
639
+ @since SketchUp 2025.0, API 13.0
640
+ @param[in] material The material object.
641
+ @param[out] texture The texture containing the normal information, if one exists. This texture
642
+ should not be released via SUTextureRelease() since it is owned by the
643
+ material.
644
+ @related SUMaterialRef
645
+ @return
646
+ - \ref SU_ERROR_NONE on success
647
+ - \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
648
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p texture is NULL
649
+ - \ref SU_ERROR_NO_DATA if \p material does not have a normal texture
650
+ */
651
+ SU_RESULT SUMaterialGetNormalTexture(SUMaterialRef material, SUTextureRef* texture);
652
+
653
+ /**
654
+ @brief Sets the normal scale of a material.
655
+ @since SketchUp 2025.0, API 13.0
656
+ @param[in] material The material object.
657
+ @param[in] scale Normal scale to set. Should be >= 0.0
658
+ @related SUMaterialRef
659
+ @return
660
+ - \ref SU_ERROR_NONE on success
661
+ - \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
662
+ - \ref SU_ERROR_INVALID_ARGUMENT if \p scale is not valid
663
+ */
664
+ SU_RESULT SUMaterialSetNormalScale(SUMaterialRef material, double scale);
665
+
666
+ /**
667
+ @brief Retrieves the normal scale of a material.
668
+ @since SketchUp 2025.0, API 13.0
669
+ @param[in] material The material object.
670
+ @param[out] scale Normal scale returned.
671
+ @related SUMaterialRef
672
+ @return
673
+ - \ref SU_ERROR_NONE on success
674
+ - \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
675
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p scale is NULL
676
+ */
677
+ SU_RESULT SUMaterialGetNormalScale(SUMaterialRef material, double* scale);
678
+
679
+ /**
680
+ @brief Sets the normal mapping style of a material.
681
+ @since SketchUp 2025.0, API 13.0
682
+ @param[in] material The material object.
683
+ @param[in] style Normal style to set.
684
+ @related SUMaterialRef
685
+ @return
686
+ - \ref SU_ERROR_NONE on success
687
+ - \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
688
+ */
689
+ SU_RESULT SUMaterialSetNormalStyle(SUMaterialRef material, enum SUMaterialNormalMapStyle style);
690
+
691
+ /**
692
+ @brief Retrieves the normal mapping style of a material.
693
+ @since SketchUp 2025.0, API 13.0
694
+ @param[in] material The material object.
695
+ @param[out] style Normal style returned.
696
+ @related SUMaterialRef
697
+ @return
698
+ - \ref SU_ERROR_NONE on success
699
+ - \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
700
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p style is NULL
701
+ */
702
+ SU_RESULT SUMaterialGetNormalStyle(SUMaterialRef material, enum SUMaterialNormalMapStyle* style);
703
+
704
+ /**
705
+ @brief Enables ambient occlusion map for the material.
706
+ @note An ambient occlusion map texture must be set before enabling it.
707
+ @since SketchUp 2025.0.2, API 13.1
708
+ @param[in,out] material The material object.
709
+ @param[in] enable Whether to enable or disable.
710
+ @related SUMaterialRef
711
+ @return
712
+ - \ref SU_ERROR_NONE on success
713
+ - \ref SU_ERROR_INVALID_ARGUMENT if an ambient occlusion map texture was not set before enabling.
714
+ */
715
+ SU_RESULT SUMaterialSetAOEnabled(SUMaterialRef material, bool enable);
716
+
717
+ /**
718
+ @brief Queries whether ambient occlusion mapping is enabled for the material.
719
+ @since SketchUp 2025.0, API 13.0
720
+ @param[in] material The material object.
721
+ @param[out] enabled Whether occlusion mapping is enabled or not.
722
+ @related SUMaterialRef
723
+ @return
724
+ - \ref SU_ERROR_NONE on success
725
+ - \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
726
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p enabled is NULL
727
+ */
728
+ SU_RESULT SUMaterialIsAOEnabled(SUMaterialRef material, bool* enabled);
729
+
730
+ /**
731
+ @brief Sets the ambient occlusion texture of a PBR material.
732
+ @note Materials take ownership of their assigned textures, so textures should not be shared
733
+ accross different materials.
734
+ @since SketchUp 2025.0, API 13.0
735
+ @param[in] material The material object.
736
+ @param[in] texture The texture containing the occlusion information. Should be an 8 bit per pixel
737
+ (single channel) image. If an invalid texture reference is given (i.e. \ref
738
+ SU_INVALID), then any existing AO texture will be removed from the material,
739
+ which will effectively disable AO mapping.
740
+ @related SUMaterialRef
741
+ @return
742
+ - \ref SU_ERROR_NONE on success
743
+ - \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
744
+ - \ref SU_ERROR_INVALID_ARGUMENT if \p texture contains invalid occlusion data
745
+ */
746
+ SU_RESULT SUMaterialSetAOTexture(SUMaterialRef material, SUTextureRef texture);
747
+
748
+ /**
749
+ @brief Retrieves the ambient occlusion texture of a material.
750
+ @since SketchUp 2025.0, API 13.0
751
+ @param[in] material The material object.
752
+ @param[out] texture The texture containing the occlusion information, if one exists. This texture
753
+ should not be released via SUTextureRelease() since it is owned by the
754
+ material.
755
+ @related SUMaterialRef
756
+ @return
757
+ - \ref SU_ERROR_NONE on success
758
+ - \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
759
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p texture is NULL
760
+ - \ref SU_ERROR_NO_DATA if \p material does not have an AO texture
761
+ */
762
+ SU_RESULT SUMaterialGetAOTexture(SUMaterialRef material, SUTextureRef* texture);
763
+
764
+ /**
765
+ @brief Sets the ambient occlusion strength of a material.
766
+ @since SketchUp 2025.0, API 13.0
767
+ @param[in] material The material object.
768
+ @param[in] strength Strength to set. The valid range is [0.0, 1.0].
769
+ @related SUMaterialRef
770
+ @return
771
+ - \ref SU_ERROR_NONE on success
772
+ - \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
773
+ - \ref SU_ERROR_INVALID_ARGUMENT if \p strength is not within the valid range
774
+ */
775
+ SU_RESULT SUMaterialSetAOStrength(SUMaterialRef material, double strength);
776
+
777
+ /**
778
+ @brief Retrieves the ambient occlusion strength of a material.
779
+ @since SketchUp 2025.0, API 13.0
780
+ @param[in] material The material object.
781
+ @param[out] strength Occlusion strength returned.
782
+ @related SUMaterialRef
783
+ @return
784
+ - \ref SU_ERROR_NONE on success
785
+ - \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
786
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if \p strength is NULL
787
+ */
788
+ SU_RESULT SUMaterialGetAOStrength(SUMaterialRef material, double* strength);
789
+
790
+ // End of PBR grouping:
791
+ ///@}
385
792
 
386
793
  #ifdef __cplusplus
387
794
  } // extern "C"