scriptup 0.0.0

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 (241) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +11 -0
  3. data/README.md +5 -0
  4. data/ext/attribute_dictionaries.c +45 -0
  5. data/ext/attribute_dictionaries.h +3 -0
  6. data/ext/attribute_dictionary.c +156 -0
  7. data/ext/attribute_dictionary.h +3 -0
  8. data/ext/behavior.c +10 -0
  9. data/ext/behavior.h +3 -0
  10. data/ext/color.c +211 -0
  11. data/ext/color.h +3 -0
  12. data/ext/component_definition.c +188 -0
  13. data/ext/component_definition.h +3 -0
  14. data/ext/component_instance.c +10 -0
  15. data/ext/component_instance.h +3 -0
  16. data/ext/definition_list.c +145 -0
  17. data/ext/definition_list.h +3 -0
  18. data/ext/drawing_element.c +10 -0
  19. data/ext/drawing_element.h +3 -0
  20. data/ext/entities.c +11 -0
  21. data/ext/entities.h +3 -0
  22. data/ext/entity.c +253 -0
  23. data/ext/entity.h +3 -0
  24. data/ext/extconf.rb +38 -0
  25. data/ext/material.c +242 -0
  26. data/ext/material.h +3 -0
  27. data/ext/materials.c +80 -0
  28. data/ext/materials.h +3 -0
  29. data/ext/model.c +42 -0
  30. data/ext/model.h +3 -0
  31. data/ext/sketchup.c +89 -0
  32. data/ext/sketchup.h +4 -0
  33. data/ext/texture.c +9 -0
  34. data/ext/texture.h +3 -0
  35. data/ext/typed_value.c +84 -0
  36. data/ext/typed_value.h +5 -0
  37. data/ext/utils.h +80 -0
  38. data/lib/sketchup.rb +12 -0
  39. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/application.h +36 -0
  40. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/model.h +59 -0
  41. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/overlay.h +248 -0
  42. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/ruby_api.h +118 -0
  43. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/color.h +107 -0
  44. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/common.h +178 -0
  45. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/defs.h +19 -0
  46. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/extension_license.h +62 -0
  47. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/bounding_box.h +34 -0
  48. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/plane3d.h +153 -0
  49. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/point2d.h +96 -0
  50. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/point3d.h +98 -0
  51. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/ray3d.h +64 -0
  52. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/transformation.h +321 -0
  53. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/transformation2d.h +163 -0
  54. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/vector2d.h +235 -0
  55. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/vector3d.h +285 -0
  56. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry.h +152 -0
  57. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/modelexporterplugin.h +165 -0
  58. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/modelimporterplugin.h +183 -0
  59. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/pluginprogresscallback.h +84 -0
  60. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/initialize.h +43 -0
  61. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/length_formatter.h +424 -0
  62. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/arccurve.h +244 -0
  63. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/arrow_type.h +17 -0
  64. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/attribute_dictionary.h +161 -0
  65. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/axes.h +242 -0
  66. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/camera.h +398 -0
  67. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/classification_attribute.h +89 -0
  68. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/classification_info.h +125 -0
  69. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/classifications.h +86 -0
  70. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/component_definition.h +588 -0
  71. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/component_instance.h +344 -0
  72. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/curve.h +143 -0
  73. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/defs.h +142 -0
  74. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension.h +222 -0
  75. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension_linear.h +421 -0
  76. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension_radial.h +194 -0
  77. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension_style.h +253 -0
  78. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/drawing_element.h +198 -0
  79. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dynamic_component_attribute.h +92 -0
  80. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dynamic_component_info.h +70 -0
  81. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/edge.h +271 -0
  82. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/edge_use.h +214 -0
  83. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entities.h +834 -0
  84. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entity.h +186 -0
  85. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entity_list.h +80 -0
  86. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entity_list_iterator.h +90 -0
  87. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/face.h +686 -0
  88. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/font.h +138 -0
  89. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/geometry.h +20 -0
  90. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/geometry_input.h +685 -0
  91. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/group.h +244 -0
  92. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/guide_line.h +155 -0
  93. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/guide_point.h +153 -0
  94. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/image.h +288 -0
  95. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/image_rep.h +275 -0
  96. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/instancepath.h +266 -0
  97. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/layer.h +265 -0
  98. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/layer_folder.h +301 -0
  99. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/line_style.h +211 -0
  100. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/line_styles.h +81 -0
  101. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/location.h +65 -0
  102. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/loop.h +182 -0
  103. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/material.h +390 -0
  104. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/mesh_helper.h +187 -0
  105. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/model.h +1663 -0
  106. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/model_version.h +49 -0
  107. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/opening.h +72 -0
  108. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/options_manager.h +79 -0
  109. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/options_provider.h +166 -0
  110. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/polyline3d.h +140 -0
  111. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/rendering_options.h +179 -0
  112. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/scene.h +836 -0
  113. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/schema.h +56 -0
  114. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/schema_type.h +26 -0
  115. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/section_plane.h +212 -0
  116. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/selection.h +156 -0
  117. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/shadow_info.h +147 -0
  118. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/skp.h +45 -0
  119. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/style.h +303 -0
  120. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/styles.h +190 -0
  121. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/text.h +384 -0
  122. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/texture.h +358 -0
  123. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/texture_writer.h +280 -0
  124. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/typed_value.h +390 -0
  125. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/uv_helper.h +79 -0
  126. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/vertex.h +154 -0
  127. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/sketchup.h +122 -0
  128. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/sketchup_info.h +65 -0
  129. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/slapi.h +16 -0
  130. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/transformation.h +16 -0
  131. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/unicodestring.h +239 -0
  132. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/utils/math_helpers.h +124 -0
  133. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonGeometry.dylib +0 -0
  134. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonGeoutils.dylib +0 -0
  135. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonImage.dylib +0 -0
  136. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonPreferences.dylib +0 -0
  137. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonUnits.dylib +0 -0
  138. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonUtils.dylib +0 -0
  139. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonZip.dylib +0 -0
  140. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Resources/Info.plist +50 -0
  141. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/SketchUpAPI +0 -0
  142. data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/_CodeSignature/CodeResources +835 -0
  143. data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpAPI.dll +0 -0
  144. data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpAPI.lib +0 -0
  145. data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpCommonPreferences.dll +0 -0
  146. data/sketchup-sdk-win/binaries/sketchup/x64/sketchup.lib +0 -0
  147. data/sketchup-sdk-win/headers/SketchUpAPI/application/application.h +36 -0
  148. data/sketchup-sdk-win/headers/SketchUpAPI/application/model.h +59 -0
  149. data/sketchup-sdk-win/headers/SketchUpAPI/application/overlay.h +248 -0
  150. data/sketchup-sdk-win/headers/SketchUpAPI/application/ruby_api.h +118 -0
  151. data/sketchup-sdk-win/headers/SketchUpAPI/color.h +107 -0
  152. data/sketchup-sdk-win/headers/SketchUpAPI/common.h +178 -0
  153. data/sketchup-sdk-win/headers/SketchUpAPI/defs.h +19 -0
  154. data/sketchup-sdk-win/headers/SketchUpAPI/extension_license.h +62 -0
  155. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/bounding_box.h +34 -0
  156. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/plane3d.h +153 -0
  157. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/point2d.h +96 -0
  158. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/point3d.h +98 -0
  159. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/ray3d.h +64 -0
  160. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/transformation.h +321 -0
  161. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/transformation2d.h +163 -0
  162. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/vector2d.h +235 -0
  163. data/sketchup-sdk-win/headers/SketchUpAPI/geometry/vector3d.h +285 -0
  164. data/sketchup-sdk-win/headers/SketchUpAPI/geometry.h +152 -0
  165. data/sketchup-sdk-win/headers/SketchUpAPI/import_export/modelexporterplugin.h +165 -0
  166. data/sketchup-sdk-win/headers/SketchUpAPI/import_export/modelimporterplugin.h +183 -0
  167. data/sketchup-sdk-win/headers/SketchUpAPI/import_export/pluginprogresscallback.h +84 -0
  168. data/sketchup-sdk-win/headers/SketchUpAPI/initialize.h +43 -0
  169. data/sketchup-sdk-win/headers/SketchUpAPI/length_formatter.h +424 -0
  170. data/sketchup-sdk-win/headers/SketchUpAPI/model/arccurve.h +244 -0
  171. data/sketchup-sdk-win/headers/SketchUpAPI/model/arrow_type.h +17 -0
  172. data/sketchup-sdk-win/headers/SketchUpAPI/model/attribute_dictionary.h +161 -0
  173. data/sketchup-sdk-win/headers/SketchUpAPI/model/axes.h +242 -0
  174. data/sketchup-sdk-win/headers/SketchUpAPI/model/camera.h +398 -0
  175. data/sketchup-sdk-win/headers/SketchUpAPI/model/classification_attribute.h +89 -0
  176. data/sketchup-sdk-win/headers/SketchUpAPI/model/classification_info.h +125 -0
  177. data/sketchup-sdk-win/headers/SketchUpAPI/model/classifications.h +86 -0
  178. data/sketchup-sdk-win/headers/SketchUpAPI/model/component_definition.h +588 -0
  179. data/sketchup-sdk-win/headers/SketchUpAPI/model/component_instance.h +344 -0
  180. data/sketchup-sdk-win/headers/SketchUpAPI/model/curve.h +143 -0
  181. data/sketchup-sdk-win/headers/SketchUpAPI/model/defs.h +142 -0
  182. data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension.h +222 -0
  183. data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension_linear.h +421 -0
  184. data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension_radial.h +194 -0
  185. data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension_style.h +253 -0
  186. data/sketchup-sdk-win/headers/SketchUpAPI/model/drawing_element.h +198 -0
  187. data/sketchup-sdk-win/headers/SketchUpAPI/model/dynamic_component_attribute.h +92 -0
  188. data/sketchup-sdk-win/headers/SketchUpAPI/model/dynamic_component_info.h +70 -0
  189. data/sketchup-sdk-win/headers/SketchUpAPI/model/edge.h +271 -0
  190. data/sketchup-sdk-win/headers/SketchUpAPI/model/edge_use.h +214 -0
  191. data/sketchup-sdk-win/headers/SketchUpAPI/model/entities.h +834 -0
  192. data/sketchup-sdk-win/headers/SketchUpAPI/model/entity.h +186 -0
  193. data/sketchup-sdk-win/headers/SketchUpAPI/model/entity_list.h +80 -0
  194. data/sketchup-sdk-win/headers/SketchUpAPI/model/entity_list_iterator.h +90 -0
  195. data/sketchup-sdk-win/headers/SketchUpAPI/model/face.h +686 -0
  196. data/sketchup-sdk-win/headers/SketchUpAPI/model/font.h +138 -0
  197. data/sketchup-sdk-win/headers/SketchUpAPI/model/geometry.h +20 -0
  198. data/sketchup-sdk-win/headers/SketchUpAPI/model/geometry_input.h +685 -0
  199. data/sketchup-sdk-win/headers/SketchUpAPI/model/group.h +244 -0
  200. data/sketchup-sdk-win/headers/SketchUpAPI/model/guide_line.h +155 -0
  201. data/sketchup-sdk-win/headers/SketchUpAPI/model/guide_point.h +153 -0
  202. data/sketchup-sdk-win/headers/SketchUpAPI/model/image.h +288 -0
  203. data/sketchup-sdk-win/headers/SketchUpAPI/model/image_rep.h +275 -0
  204. data/sketchup-sdk-win/headers/SketchUpAPI/model/instancepath.h +266 -0
  205. data/sketchup-sdk-win/headers/SketchUpAPI/model/layer.h +265 -0
  206. data/sketchup-sdk-win/headers/SketchUpAPI/model/layer_folder.h +301 -0
  207. data/sketchup-sdk-win/headers/SketchUpAPI/model/line_style.h +211 -0
  208. data/sketchup-sdk-win/headers/SketchUpAPI/model/line_styles.h +81 -0
  209. data/sketchup-sdk-win/headers/SketchUpAPI/model/location.h +65 -0
  210. data/sketchup-sdk-win/headers/SketchUpAPI/model/loop.h +182 -0
  211. data/sketchup-sdk-win/headers/SketchUpAPI/model/material.h +390 -0
  212. data/sketchup-sdk-win/headers/SketchUpAPI/model/mesh_helper.h +187 -0
  213. data/sketchup-sdk-win/headers/SketchUpAPI/model/model.h +1663 -0
  214. data/sketchup-sdk-win/headers/SketchUpAPI/model/model_version.h +49 -0
  215. data/sketchup-sdk-win/headers/SketchUpAPI/model/opening.h +72 -0
  216. data/sketchup-sdk-win/headers/SketchUpAPI/model/options_manager.h +79 -0
  217. data/sketchup-sdk-win/headers/SketchUpAPI/model/options_provider.h +166 -0
  218. data/sketchup-sdk-win/headers/SketchUpAPI/model/polyline3d.h +140 -0
  219. data/sketchup-sdk-win/headers/SketchUpAPI/model/rendering_options.h +179 -0
  220. data/sketchup-sdk-win/headers/SketchUpAPI/model/scene.h +836 -0
  221. data/sketchup-sdk-win/headers/SketchUpAPI/model/schema.h +56 -0
  222. data/sketchup-sdk-win/headers/SketchUpAPI/model/schema_type.h +26 -0
  223. data/sketchup-sdk-win/headers/SketchUpAPI/model/section_plane.h +212 -0
  224. data/sketchup-sdk-win/headers/SketchUpAPI/model/selection.h +156 -0
  225. data/sketchup-sdk-win/headers/SketchUpAPI/model/shadow_info.h +147 -0
  226. data/sketchup-sdk-win/headers/SketchUpAPI/model/skp.h +45 -0
  227. data/sketchup-sdk-win/headers/SketchUpAPI/model/style.h +303 -0
  228. data/sketchup-sdk-win/headers/SketchUpAPI/model/styles.h +190 -0
  229. data/sketchup-sdk-win/headers/SketchUpAPI/model/text.h +384 -0
  230. data/sketchup-sdk-win/headers/SketchUpAPI/model/texture.h +358 -0
  231. data/sketchup-sdk-win/headers/SketchUpAPI/model/texture_writer.h +280 -0
  232. data/sketchup-sdk-win/headers/SketchUpAPI/model/typed_value.h +390 -0
  233. data/sketchup-sdk-win/headers/SketchUpAPI/model/uv_helper.h +79 -0
  234. data/sketchup-sdk-win/headers/SketchUpAPI/model/vertex.h +154 -0
  235. data/sketchup-sdk-win/headers/SketchUpAPI/sketchup.h +122 -0
  236. data/sketchup-sdk-win/headers/SketchUpAPI/sketchup_info.h +65 -0
  237. data/sketchup-sdk-win/headers/SketchUpAPI/slapi.h +16 -0
  238. data/sketchup-sdk-win/headers/SketchUpAPI/transformation.h +16 -0
  239. data/sketchup-sdk-win/headers/SketchUpAPI/unicodestring.h +239 -0
  240. data/sketchup-sdk-win/headers/SketchUpAPI/utils/math_helpers.h +124 -0
  241. metadata +313 -0
@@ -0,0 +1,182 @@
1
+ // Copyright 2013 Trimble Inc. All Rights Reserved.
2
+
3
+ /**
4
+ * @file
5
+ * @brief Interfaces for SULoopRef.
6
+ */
7
+ #ifndef SKETCHUP_MODEL_LOOP_H_
8
+ #define SKETCHUP_MODEL_LOOP_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 SULoopRef
19
+ @extends SUEntityRef
20
+ @brief References a loop object, which can be either the outer loop or an inner
21
+ loop (hole) of a face.
22
+ */
23
+
24
+ /**
25
+ @enum SULoopWinding
26
+ @brief Indicates loop orientation.
27
+ */
28
+ enum SULoopWinding { SULoopWinding_CCW, SULoopWinding_CW };
29
+
30
+ /**
31
+ @brief Converts from an \ref SULoopRef to an \ref SUEntityRef.
32
+ This is essentially an upcast operation.
33
+ @param[in] loop The given loop reference.
34
+ @related SULoopRef
35
+ @return
36
+ - The converted \ref SUEntityRef if loop is a valid object
37
+ - If not, the returned reference will be invalid
38
+ */
39
+ SU_EXPORT SUEntityRef SULoopToEntity(SULoopRef loop);
40
+
41
+ /**
42
+ @brief Converts from an \ref SUEntityRef to an \ref SULoopRef.
43
+ This is essentially a downcast operation so the given SUEntityRef must be
44
+ convertible to an \ref SULoopRef.
45
+ @param[in] entity The given entity reference.
46
+ @related SULoopRef
47
+ @return
48
+ - The converted \ref SULoopRef if the downcast operation succeeds
49
+ - If not, the returned reference will be invalid
50
+ */
51
+ SU_EXPORT SULoopRef SULoopFromEntity(SUEntityRef entity);
52
+
53
+ /**
54
+ @brief Retrieves the number of vertices of a face loop.
55
+ @param[in] loop The loop object.
56
+ @param[out] count The number of vertices.
57
+ @related SULoopRef
58
+ @return
59
+ - \ref SU_ERROR_NONE on success
60
+ - \ref SU_ERROR_INVALID_INPUT if loop is not a valid object
61
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if count is NULL
62
+ */
63
+ SU_RESULT SULoopGetNumVertices(SULoopRef loop, size_t* count);
64
+
65
+ /**
66
+ @brief Retrieves the vertices of a face loop object.
67
+ @param[in] loop The loop object.
68
+ @param[in] len The number of vertices to retrieve.
69
+ @param[out] vertices The vertices retrieved.
70
+ @param[out] count The number of vertices retrieved.
71
+ @related SULoopRef
72
+ @return
73
+ - \ref SU_ERROR_NONE on success
74
+ - \ref SU_ERROR_INVALID_INPUT if loop is not a valid object
75
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if vertices or count is NULL
76
+ */
77
+ SU_RESULT SULoopGetVertices(SULoopRef loop, size_t len, SUVertexRef vertices[], size_t* count);
78
+
79
+ /**
80
+ @brief Retrieves the edges of a loop object.
81
+ @param[in] loop The loop object.
82
+ @param[in] len The number of edges to retrieve.
83
+ @param[out] edges The edges retrieved.
84
+ @param[out] count The number of edges retrieved.
85
+ @related SULoopRef
86
+ @return
87
+ - \ref SU_ERROR_NONE on success
88
+ - \ref SU_ERROR_INVALID_INPUT if loop is not a valid object
89
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if edges or count is NULL
90
+ */
91
+ SU_RESULT SULoopGetEdges(SULoopRef loop, size_t len, SUEdgeRef edges[], size_t* count);
92
+
93
+ /**
94
+ @brief Retrieves the winding of a loop object with respect to a vector.
95
+ @param[in] loop The loop object.
96
+ @param[in] vector3d The 3D vector.
97
+ @param[out] orientation The orientation retrieved.
98
+ @related SULoopRef
99
+ @return
100
+ - \ref SU_ERROR_NONE on success
101
+ - \ref SU_ERROR_INVALID_INPUT if loop is not a valid object
102
+ - \ref SU_ERROR_NULL_POINTER_INPUT if vector3d is NULL
103
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if orientation is NULL
104
+ */
105
+ SU_RESULT SULoopGetWinding(
106
+ SULoopRef loop, const struct SUVector3D* vector3d, enum SULoopWinding* orientation);
107
+
108
+ /**
109
+ @brief Retrieves a flag indicating the orientation of the given edge relative to
110
+ a loop object.
111
+ @param[in] loop The loop object.
112
+ @param[in] edge The edge object.
113
+ @param[out] reversed The flag retrieved. A return value of true indicates that
114
+ the given edge is oriented opposite of the loop object.
115
+ @related SULoopRef
116
+ @return
117
+ - \ref SU_ERROR_NONE on success
118
+ - \ref SU_ERROR_INVALID_INPUT if loop or edge is not a valid object
119
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if reversed is NULL
120
+ - \ref SU_ERROR_GENERIC if edge is not a part of loop
121
+ */
122
+ SU_RESULT SULoopIsEdgeReversed(SULoopRef loop, SUEdgeRef edge, bool* reversed);
123
+
124
+ /**
125
+ @brief Retrieves the parent face of a loop object.
126
+ @param[in] loop The loop object.
127
+ @param[out] face The face retrieved.
128
+ @related SULoopRef
129
+ @return
130
+ - \ref SU_ERROR_NONE on success
131
+ - \ref SU_ERROR_INVALID_INPUT if loop is not a valid object
132
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if face is NULL
133
+ - \ref SU_ERROR_OVERWRITE_VALID if face references a valid face object
134
+ */
135
+ SU_RESULT SULoopGetFace(SULoopRef loop, SUFaceRef* face);
136
+
137
+ /**
138
+ @brief Retrieves a flag indicating the whether the loop is convex.
139
+ @param[in] loop The loop object.
140
+ @param[out] convex The flag retrieved. A return value of true indicates the
141
+ loop is convex.
142
+ @related SULoopRef
143
+ @return
144
+ - \ref SU_ERROR_NONE on success
145
+ - \ref SU_ERROR_INVALID_INPUT if loop is not a valid object
146
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if convex is NULL
147
+ */
148
+ SU_RESULT SULoopIsConvex(SULoopRef loop, bool* convex);
149
+
150
+ /**
151
+ @brief Retrieves a flag indicating the whether the loop is the outer loop on its
152
+ associated face.
153
+ @param[in] loop The loop object.
154
+ @param[out] outer_loop The flag retrieved. A return value of true indicates the
155
+ loop is the outer loop.
156
+ @related SULoopRef
157
+ @return
158
+ - \ref SU_ERROR_NONE on success
159
+ - \ref SU_ERROR_INVALID_INPUT if loop is not a valid object
160
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if outer_loop is NULL
161
+ */
162
+ SU_RESULT SULoopIsOuterLoop(SULoopRef loop, bool* outer_loop);
163
+
164
+ /**
165
+ @brief Retrieves the edge use objects of a loop.
166
+ @param[in] loop The loop object.
167
+ @param[in] len The number of edge uses to retrieve.
168
+ @param[out] edge_uses The edge uses retrieved.
169
+ @param[out] count The number of edge uses retrieved.
170
+ @related SULoopRef
171
+ @return
172
+ - \ref SU_ERROR_NONE on success
173
+ - \ref SU_ERROR_INVALID_INPUT if loop is not a valid object
174
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if edge_uses or count is NULL
175
+ */
176
+ SU_RESULT SULoopGetEdgeUses(SULoopRef loop, size_t len, SUEdgeUseRef edge_uses[], size_t* count);
177
+
178
+ #ifdef __cplusplus
179
+ } // extern "C" {
180
+ #endif
181
+
182
+ #endif // SKETCHUP_MODEL_LOOP_H_
@@ -0,0 +1,390 @@
1
+ // Copyright 2013 Trimble Inc. All Rights Reserved.
2
+
3
+ /**
4
+ * @file
5
+ * @brief Interfaces for SUMaterialRef.
6
+ */
7
+ #ifndef SKETCHUP_MODEL_MATERIAL_H_
8
+ #define SKETCHUP_MODEL_MATERIAL_H_
9
+
10
+ #include <SketchUpAPI/color.h>
11
+ #include <SketchUpAPI/common.h>
12
+ #include <SketchUpAPI/unicodestring.h>
13
+ #include <SketchUpAPI/model/defs.h>
14
+
15
+ #ifdef __cplusplus
16
+ extern "C" {
17
+ #endif
18
+
19
+ /**
20
+ @struct SUMaterialRef
21
+ @extends SUEntityRef
22
+ @brief References a material object.
23
+ */
24
+
25
+
26
+ /**
27
+ @enum SUMaterialType
28
+ @brief Indicates material type.
29
+ */
30
+ enum SUMaterialType {
31
+ SUMaterialType_Colored = 0, ///< Colored material
32
+ SUMaterialType_Textured, ///< Textured material
33
+ SUMaterialType_ColorizedTexture ///< Colored and textured material
34
+ };
35
+
36
+ /**
37
+ @enum SUMaterialOwnerType
38
+ @brief Indicates material owner type.
39
+ @since SketchUp 2019.2, API 7.1
40
+ */
41
+ enum SUMaterialOwnerType {
42
+ SUMaterialOwnerType_None = 0, ///< Not owned
43
+ SUMaterialOwnerType_DrawingElement, ///< Can be applied to SUDrawingElements
44
+ SUMaterialOwnerType_Image, ///< Owned exclusively by an Image
45
+ SUMaterialOwnerType_Layer ///< Owned exclusively by a Layer
46
+ };
47
+
48
+ /**
49
+ @enum SUMaterialColorizeType
50
+ @brief Indicates material type.
51
+ @since SketchUp 2019.2, API 7.1
52
+ */
53
+ enum SUMaterialColorizeType {
54
+ SUMaterialColorizeType_Shift = 0, ///< Shifts the texture's Hue
55
+ SUMaterialColorizeType_Tint, ///< Colorize the texture
56
+ };
57
+
58
+ /**
59
+ @brief Converts from an \ref SUMaterialRef to an \ref SUEntityRef.
60
+ This is essentially an upcast operation.
61
+ @param[in] material The given material reference.
62
+ @related SUMaterialRef
63
+ @return
64
+ - The converted \ref SUEntityRef if material is a valid object
65
+ - If not, the returned reference will be invalid
66
+ */
67
+ SU_EXPORT SUEntityRef SUMaterialToEntity(SUMaterialRef material);
68
+
69
+ /**
70
+ @brief Converts from an \ref SUEntityRef to an \ref SUMaterialRef.
71
+ This is essentially a downcast operation so the given SUEntityRef must be
72
+ convertible to an \ref SUMaterialRef.
73
+ @param[in] entity The given entity reference.
74
+ @related SUMaterialRef
75
+ @return
76
+ - The converted \ref SUMaterialRef if the downcast operation succeeds
77
+ - If not, the returned reference will be invalid
78
+ */
79
+ SU_EXPORT SUMaterialRef SUMaterialFromEntity(SUEntityRef entity);
80
+
81
+ /**
82
+ @brief Creates a material.
83
+
84
+ If the material is not associated with any face, it must be deallocated with
85
+ \ref SUMaterialRelease().
86
+ @param[out] material The material created.
87
+ @related SUMaterialRef
88
+ @return
89
+ - \ref SU_ERROR_NONE on success
90
+ - \ref SU_ERROR_INVALID_OUTPUT if the input parameter is NULL
91
+ */
92
+ SU_RESULT SUMaterialCreate(SUMaterialRef* material);
93
+
94
+ /**
95
+ @brief Releases a material and its resources.
96
+
97
+ The material must not be associated with a parent object such as a face.
98
+ @param[in] material The material to be released.
99
+ @related SUMaterialRef
100
+ @return
101
+ - \ref SU_ERROR_NONE on success
102
+ - \ref SU_ERROR_INVALID_INPUT material is not a valid object
103
+ - \ref SU_ERROR_NULL_POINTER_INPUT if material is NULL
104
+ */
105
+ SU_RESULT SUMaterialRelease(SUMaterialRef* material);
106
+
107
+ /**
108
+ @brief Sets the name of a material object.
109
+
110
+ @warning Breaking Change: A new failure mode was added in SketchUp 2018,
111
+ API 6.0. Returns \ref SU_ERROR_INVALID_ARGUMENT if the material is
112
+ managed by a model and the provided name was previously associated
113
+ with a different material in the model.
114
+
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.
118
+ @related SUMaterialRef
119
+ @return
120
+ - \ref SU_ERROR_NONE on success
121
+ - \ref SU_ERROR_INVALID_INPUT if material is not a valid object
122
+ - \ref SU_ERROR_NULL_POINTER_INPUT if name is NULL
123
+ - \ref SU_ERROR_INVALID_ARGUMENT if material is managed and name is not unique
124
+ */
125
+ SU_RESULT SUMaterialSetName(SUMaterialRef material, const char* name);
126
+
127
+ /**
128
+ @brief Retrieves the internal name of a material object. The internal name is
129
+ the unprocessed identifier string stored with the material.
130
+
131
+ @warning Breaking Change: The behavior of this method was changed in
132
+ SketchUp 2017, API 5.0. In previous releases this method retrieved the
133
+ material's non-localized display name but it was changed to retrieve
134
+ the internal name. If the old functionality is required, use \ref
135
+ SUMaterialGetNameLegacyBehavior.
136
+
137
+ @param[in] material The material object.
138
+ @param[out] name The name retrieved.
139
+ @related SUMaterialRef
140
+ @return
141
+ - \ref SU_ERROR_NONE on success
142
+ - \ref SU_ERROR_INVALID_INPUT if material is not a valid object
143
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if name is NULL
144
+ - \ref SU_ERROR_INVALID_OUTPUT if name does not point to a valid \ref
145
+ SUStringRef object
146
+ */
147
+ SU_RESULT SUMaterialGetName(SUMaterialRef material, SUStringRef* name);
148
+
149
+ /**
150
+ @brief Retrieves the name of a material object. This method was added for users
151
+ who require the functionality of \ref SUMaterialGetName() prior to
152
+ SketchUp 2017, API 5.0. If the internal name is encased in square
153
+ brackets, [], this method will return the name without brackets,
154
+ otherwise the name will match the name retrieved by \ref
155
+ SUMaterialGetName.
156
+ @since SketchUp 2017, API 5.0
157
+ @param[in] material The material object.
158
+ @param[out] name The name retrieved.
159
+ @related SUMaterialRef
160
+ @return
161
+ - \ref SU_ERROR_NONE on success
162
+ - \ref SU_ERROR_INVALID_INPUT if material is not a valid object
163
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if name is NULL
164
+ - \ref SU_ERROR_INVALID_OUTPUT if name does not point to a valid \ref
165
+ SUStringRef object
166
+ */
167
+ SU_RESULT SUMaterialGetNameLegacyBehavior(SUMaterialRef material, SUStringRef* name);
168
+
169
+ /**
170
+ @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.
173
+ @related SUMaterialRef
174
+ @return
175
+ - \ref SU_ERROR_NONE on success
176
+ - \ref SU_ERROR_INVALID_INPUT if material is not a valid object
177
+ - \ref SU_ERROR_NULL_POINTER_INPUT if color is NULL
178
+ */
179
+ SU_RESULT SUMaterialSetColor(SUMaterialRef material, const SUColor* color);
180
+
181
+ /**
182
+ @brief Retrieves the color value of a material object.
183
+ @param[in] material The material object.
184
+ @param[out] color The color value retrieved.
185
+ @related SUMaterialRef
186
+ @return
187
+ - \ref SU_ERROR_NONE on success
188
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if color is NULL
189
+ - \ref SU_ERROR_NO_DATA if the material object does not have a color value
190
+ */
191
+ SU_RESULT SUMaterialGetColor(SUMaterialRef material, SUColor* color);
192
+
193
+ /**
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.
199
+ @related SUMaterialRef
200
+ @return
201
+ - \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
204
+ */
205
+ SU_RESULT SUMaterialSetTexture(SUMaterialRef material, SUTextureRef texture);
206
+
207
+ /**
208
+ @brief Retrieves the texture of a material object.
209
+ @param[in] material The material object.
210
+ @param[out] texture The texture object retrieved.
211
+ @related SUMaterialRef
212
+ @return
213
+ - \ref SU_ERROR_NONE on success
214
+ - \ref SU_ERROR_INVALID_INPUT if material is not a valid object
215
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if texture is NULL
216
+ - \ref SU_ERROR_INVALID_OUTPUT if texture is not a valid object
217
+ - \ref SU_ERROR_NO_DATA if the material object does not have a texture
218
+ */
219
+ SU_RESULT SUMaterialGetTexture(SUMaterialRef material, SUTextureRef* texture);
220
+
221
+ /**
222
+ @brief Retrieves the alpha value (0.0 - 1.0) of a material object.
223
+ @param[in] material The material object.
224
+ @param[out] alpha The alpha value retrieved.
225
+ @related SUMaterialRef
226
+ @return
227
+ - \ref SU_ERROR_NONE on success
228
+ - \ref SU_ERROR_INVALID_INPUT if material is not a valid object
229
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if alpha is NULL
230
+ */
231
+ SU_RESULT SUMaterialGetOpacity(SUMaterialRef material, double* alpha);
232
+
233
+ /**
234
+ @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].
237
+ @related SUMaterialRef
238
+ @return
239
+ - \ref SU_ERROR_NONE on success
240
+ - \ref SU_ERROR_INVALID_INPUT if material is not a valid object
241
+ - \ref SU_ERROR_OUT_OF_RANGE if alpha is not within the acceptable range
242
+ */
243
+ SU_RESULT SUMaterialSetOpacity(SUMaterialRef material, double alpha);
244
+
245
+ /**
246
+ @brief Retrieves the flag indicating whether alpha values are used from a
247
+ material object.
248
+ @param[in] material The material object.
249
+ @param[out] use_opacity The flag retrieved.
250
+ @related SUMaterialRef
251
+ @return
252
+ - \ref SU_ERROR_NONE on success
253
+ - \ref SU_ERROR_INVALID_INPUT if material is not a valid object
254
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if use_opacity is NULL
255
+ */
256
+ SU_RESULT SUMaterialGetUseOpacity(SUMaterialRef material, bool* use_opacity);
257
+
258
+ /**
259
+ @brief Sets the flag indicating whether alpha values are used on a material
260
+ object.
261
+ @param[in] material The material object.
262
+ @param[in] use_opacity The flag boolean value to set.
263
+ @related SUMaterialRef
264
+ @return
265
+ - \ref SU_ERROR_NONE on success
266
+ - \ref SU_ERROR_INVALID_INPUT if material is not a valid object
267
+ */
268
+ SU_RESULT SUMaterialSetUseOpacity(SUMaterialRef material, bool use_opacity);
269
+
270
+ /**
271
+ @brief Sets the type of a material object.
272
+ @param[in] material The material object.
273
+ @param[in] type The type to set.
274
+ @related SUMaterialRef
275
+ @return
276
+ - \ref SU_ERROR_NONE on success
277
+ - \ref SU_ERROR_INVALID_INPUT if material is not a valid object
278
+ */
279
+ SU_RESULT SUMaterialSetType(SUMaterialRef material, enum SUMaterialType type);
280
+
281
+ /**
282
+ @brief Retrieves the type of a material object.
283
+ @param[in] material The material object.
284
+ @param[out] type The type retrieved.
285
+ @related SUMaterialRef
286
+ @return
287
+ - \ref SU_ERROR_NONE on success
288
+ - \ref SU_ERROR_INVALID_INPUT if material is not a valid object
289
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if type is NULL
290
+ */
291
+ SU_RESULT SUMaterialGetType(SUMaterialRef material, enum SUMaterialType* type);
292
+
293
+ /**
294
+ @brief Retrieves the flag indicating whether the material is drawn with
295
+ transparency.
296
+ @since SketchUp 2018, API 6.0
297
+ @param[in] material The material object.
298
+ @param[out] transparency The flag retrieved.
299
+ @related SUMaterialRef
300
+ @return
301
+ - \ref SU_ERROR_NONE on success
302
+ - \ref SU_ERROR_INVALID_INPUT if material is not a valid object
303
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if is_drawn_transparent is NULL
304
+ */
305
+ SU_RESULT SUMaterialIsDrawnTransparent(SUMaterialRef material, bool* transparency);
306
+
307
+ /**
308
+ @brief Retrieves the owner type of a material object.
309
+
310
+ @warning Materials owned by SUImageRef and SULayerRef may not be applied
311
+ to any other entity in the model.
312
+
313
+ @since SketchUp 2019.2, API 7.1
314
+ @param[in] material The material object.
315
+ @param[out] type The type retrieved.
316
+ @related SUMaterialRef
317
+ @return
318
+ - \ref SU_ERROR_NONE on success
319
+ - \ref SU_ERROR_INVALID_INPUT if material is not a valid object
320
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if type is NULL
321
+ */
322
+ SU_RESULT SUMaterialGetOwnerType(SUMaterialRef material, enum SUMaterialOwnerType* type);
323
+
324
+ /**
325
+ @brief Sets the colorization type of a material object. This is used when the
326
+ material's color is set to a custom value. Call this function after
327
+ calling SUMaterialSetColor as otherwise the colorize type will be reset.
328
+ @since SketchUp 2019.2, API 7.1
329
+ @param[in] material The material object.
330
+ @param[in] type The type to set.
331
+ @related SUMaterialRef
332
+ @return
333
+ - \ref SU_ERROR_NONE on success
334
+ - \ref SU_ERROR_INVALID_INPUT if material is not a valid object
335
+ - \ref SU_ERROR_INVALID_ARGUMENT if type is not a valid value
336
+ */
337
+ SU_RESULT SUMaterialSetColorizeType(SUMaterialRef material, enum SUMaterialColorizeType type);
338
+
339
+ /**
340
+ @brief Retrieves the colorization type of a material object.
341
+ @since SketchUp 2019.2, API 7.1
342
+ @param[in] material The material object.
343
+ @param[out] type The type retrieved.
344
+ @related SUMaterialRef
345
+ @return
346
+ - \ref SU_ERROR_NONE on success
347
+ - \ref SU_ERROR_INVALID_INPUT if material is not a valid object
348
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if type is NULL
349
+ */
350
+ SU_RESULT SUMaterialGetColorizeType(SUMaterialRef material, enum SUMaterialColorizeType* type);
351
+
352
+ /**
353
+ @brief The colorize_deltas method retrieves the HLS deltas for colorized
354
+ materials.
355
+ @since SketchUp 2019.2, API 7.1
356
+ @param[in] material The material object.
357
+ @param[out] hue The Hue delta.
358
+ @param[out] saturation The Saturation delta.
359
+ @param[out] lightness The Lightness delta.
360
+ @related SUMaterialRef
361
+ @return
362
+ - \ref SU_ERROR_NONE on success
363
+ - \ref SU_ERROR_INVALID_INPUT if material is not a valid object
364
+ - \ref SU_ERROR_NULL_POINTER_OUTPUT if either hue, saturation or lightness
365
+ is NULL
366
+ */
367
+ SU_RESULT SUMaterialGetColorizeDeltas(
368
+ SUMaterialRef material, double* hue, double* saturation, double* lightness);
369
+ /**
370
+ @brief Writes a material to a SKM file.
371
+ @since SketchUp 2021.1, API 9.1
372
+ @param[in] material The material object.
373
+ @param[in] file_path The location to save the material to. Assumed to be
374
+ UTF-8 encoded.
375
+ @related SUMaterialRef
376
+ @return
377
+ - \ref SU_ERROR_NONE on success
378
+ - \ref SU_ERROR_INVALID_INPUT if \p material is not a valid object
379
+ - \ref SU_ERROR_INVALID_INPUT if \p material is not attached to a model
380
+ - \ref SU_ERROR_NULL_POINTER_INPUT if \p file_path is NULL
381
+ - \ref SU_ERROR_SERIALIZATION if the serialization operation itself fails
382
+ */
383
+ SU_RESULT SUMaterialWriteToFile(SUMaterialRef material, const char* file_path);
384
+
385
+
386
+ #ifdef __cplusplus
387
+ } // extern "C"
388
+ #endif
389
+
390
+ #endif // SKETCHUP_MODEL_MATERIAL_H_