scriptup 2024.0.7 → 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.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/ext/attribute_dictionaries.h +6 -1
- data/ext/attribute_dictionary.c +1 -0
- data/ext/attribute_dictionary.h +6 -1
- data/ext/behavior.h +6 -1
- data/ext/color.h +6 -1
- data/ext/component_definition.h +6 -1
- data/ext/component_instance.h +6 -1
- data/ext/definition_list.h +6 -1
- data/ext/drawing_element.c +135 -0
- data/ext/drawing_element.h +6 -1
- data/ext/entities.c +13 -0
- data/ext/entities.h +6 -1
- data/ext/entity.c +3 -0
- data/ext/entity.h +6 -1
- data/ext/material.h +6 -1
- data/ext/materials.h +6 -1
- data/ext/model.h +6 -1
- data/ext/not_implemented.c +88 -0
- data/ext/not_implemented.h +20 -0
- data/ext/sketchup.c +15 -0
- data/ext/sketchup.h +6 -1
- data/ext/texture.c +99 -0
- data/ext/texture.h +6 -1
- data/ext/typed_value.h +6 -0
- data/ext/utils.h +34 -3
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Frameworks/libCommonGeometry.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/{Libraries → Frameworks}/libCommonGeoutils.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/{Libraries → Frameworks}/libCommonImage.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Frameworks/libCommonPreferences.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Frameworks/libCommonUnits.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Frameworks/libCommonUtils.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Frameworks/libCommonZip.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/model.h +4 -4
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/application/overlay.h +20 -6
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/common.h +9 -9
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/extension_license.h +9 -1
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/point2d.h +2 -2
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/point3d.h +2 -2
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/transformation2d.h +3 -3
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/vector2d.h +5 -5
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry/vector3d.h +4 -4
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/geometry.h +9 -7
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/modelimporterplugin.h +8 -4
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/attribute_dictionary.h +4 -4
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/component_definition.h +74 -33
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/component_definition_snap_to_behavior_private.h +46 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/component_instance.h +11 -11
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/curve.h +4 -4
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/defs.h +7 -2
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/dimension.h +2 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/drawing_element.h +11 -11
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/edge.h +7 -7
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entities.h +106 -61
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/entity.h +7 -4
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/environment.h +382 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/environments.h +133 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/face.h +43 -27
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/geometry_input.h +126 -116
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/group.h +9 -8
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/image.h +6 -5
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/layer.h +3 -3
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/material.h +432 -25
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/model.h +263 -100
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/model_entity_type_private.h +44 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/rendering_options.h +82 -81
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/scene.h +222 -42
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/snap.h +183 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/space.h +26 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/styles.h +29 -27
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/text.h +14 -6
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/texture.h +23 -1
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/typed_value.h +26 -26
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/model/vertex.h +2 -2
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/sketchup.h +4 -1
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/unicodestring.h +7 -7
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Resources/Info.plist +8 -8
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/SketchUpAPI +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/_CodeSignature/CodeResources +144 -88
- data/sketchup-sdk-win/binaries/layout/x64/LayOutAPI.dll +0 -0
- data/sketchup-sdk-win/binaries/layout/x64/LayOutAPI.lib +0 -0
- data/sketchup-sdk-win/binaries/layout/x64/LayOutControllers.dll +0 -0
- data/sketchup-sdk-win/binaries/layout/x64/LayOutModel.dll +0 -0
- data/sketchup-sdk-win/binaries/layout/x64/LayOutRTF.dll +0 -0
- data/sketchup-sdk-win/binaries/layout/x64/LayOutUtils.dll +0 -0
- data/sketchup-sdk-win/binaries/layout/x64/LayOutView.dll +0 -0
- data/sketchup-sdk-win/binaries/layout/x64/SketchUpCommonPreferences.dll +0 -0
- data/sketchup-sdk-win/binaries/layout/x64/SketchUpViewerAPI.dll +0 -0
- data/sketchup-sdk-win/binaries/layout/x64/SketchUpViewerAPI.lib +0 -0
- data/sketchup-sdk-win/binaries/layout/x64/pdflib.dll +0 -0
- data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpAPI.dll +0 -0
- data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpAPI.lib +0 -0
- data/sketchup-sdk-win/binaries/sketchup/x64/SketchUpCommonPreferences.dll +0 -0
- data/sketchup-sdk-win/binaries/sketchup/x64/sketchup.lib +0 -0
- data/sketchup-sdk-win/headers/LayOutAPI/application/application.h +14 -14
- data/sketchup-sdk-win/headers/LayOutAPI/layout.h +1 -1
- data/sketchup-sdk-win/headers/LayOutAPI/model/dictionary.h +1 -1
- data/sketchup-sdk-win/headers/LayOutAPI/model/document.h +73 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/documentexportoptions.h +21 -2
- data/sketchup-sdk-win/headers/LayOutAPI/model/entity.h +72 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/group.h +2 -1
- data/sketchup-sdk-win/headers/LayOutAPI/model/lineardimension.h +54 -2
- data/sketchup-sdk-win/headers/LayOutAPI/model/page.h +70 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/sketchupmodel.h +58 -1
- data/sketchup-sdk-win/headers/LayOutAPI/model/style.h +39 -3
- data/sketchup-sdk-win/headers/LayOutAPI/model/table.h +2 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/typed_value.h +25 -1
- data/sketchup-sdk-win/headers/SketchUpAPI/application/model.h +4 -4
- data/sketchup-sdk-win/headers/SketchUpAPI/application/overlay.h +20 -6
- data/sketchup-sdk-win/headers/SketchUpAPI/common.h +9 -9
- data/sketchup-sdk-win/headers/SketchUpAPI/extension_license.h +9 -1
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/point2d.h +2 -2
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/point3d.h +2 -2
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/transformation2d.h +3 -3
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/vector2d.h +5 -5
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry/vector3d.h +4 -4
- data/sketchup-sdk-win/headers/SketchUpAPI/geometry.h +9 -7
- data/sketchup-sdk-win/headers/SketchUpAPI/import_export/modelimporterplugin.h +8 -4
- data/sketchup-sdk-win/headers/SketchUpAPI/model/attribute_dictionary.h +4 -4
- data/sketchup-sdk-win/headers/SketchUpAPI/model/component_definition.h +74 -33
- data/sketchup-sdk-win/headers/SketchUpAPI/model/component_definition_snap_to_behavior_private.h +46 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/component_instance.h +11 -11
- data/sketchup-sdk-win/headers/SketchUpAPI/model/curve.h +4 -4
- data/sketchup-sdk-win/headers/SketchUpAPI/model/defs.h +7 -2
- data/sketchup-sdk-win/headers/SketchUpAPI/model/dimension.h +2 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/drawing_element.h +11 -11
- data/sketchup-sdk-win/headers/SketchUpAPI/model/edge.h +7 -7
- data/sketchup-sdk-win/headers/SketchUpAPI/model/entities.h +106 -61
- data/sketchup-sdk-win/headers/SketchUpAPI/model/entity.h +7 -4
- data/sketchup-sdk-win/headers/SketchUpAPI/model/environment.h +382 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/environments.h +133 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/face.h +43 -27
- data/sketchup-sdk-win/headers/SketchUpAPI/model/geometry_input.h +126 -116
- data/sketchup-sdk-win/headers/SketchUpAPI/model/group.h +9 -8
- data/sketchup-sdk-win/headers/SketchUpAPI/model/image.h +6 -5
- data/sketchup-sdk-win/headers/SketchUpAPI/model/layer.h +3 -3
- data/sketchup-sdk-win/headers/SketchUpAPI/model/material.h +432 -25
- data/sketchup-sdk-win/headers/SketchUpAPI/model/model.h +263 -100
- data/sketchup-sdk-win/headers/SketchUpAPI/model/model_entity_type_private.h +44 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/rendering_options.h +82 -81
- data/sketchup-sdk-win/headers/SketchUpAPI/model/scene.h +222 -42
- data/sketchup-sdk-win/headers/SketchUpAPI/model/snap.h +183 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/space.h +26 -0
- data/sketchup-sdk-win/headers/SketchUpAPI/model/styles.h +29 -27
- data/sketchup-sdk-win/headers/SketchUpAPI/model/text.h +14 -6
- data/sketchup-sdk-win/headers/SketchUpAPI/model/texture.h +23 -1
- data/sketchup-sdk-win/headers/SketchUpAPI/model/typed_value.h +26 -26
- data/sketchup-sdk-win/headers/SketchUpAPI/model/vertex.h +2 -2
- data/sketchup-sdk-win/headers/SketchUpAPI/sketchup.h +4 -1
- data/sketchup-sdk-win/headers/SketchUpAPI/unicodestring.h +7 -7
- metadata +27 -13
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonGeometry.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonPreferences.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonUnits.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonUtils.dylib +0 -0
- data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Libraries/libCommonZip.dylib +0 -0
- data/sketchup-sdk-win/headers/LayOutAPI/model/skpfilereference.h +0 -94
data/ext/utils.h
CHANGED
@@ -1,7 +1,13 @@
|
|
1
|
+
#ifndef SCRIPTUP_UTILS_H
|
2
|
+
#define SCRIPTUP_UTILS_H
|
3
|
+
|
1
4
|
#include <ruby.h>
|
2
5
|
|
3
|
-
#
|
6
|
+
#ifdef TEXT
|
7
|
+
#undef TEXT
|
8
|
+
#endif //TEXT
|
4
9
|
#define SKETCHUP "Sketchup"
|
10
|
+
#define GEOM "Geom"
|
5
11
|
#define MODEL "Model"
|
6
12
|
#define MATERIAL "Material"
|
7
13
|
#define MATERIALS "Materials"
|
@@ -16,6 +22,18 @@
|
|
16
22
|
#define ATTRIBUTEDICTIONARIES "AttributeDictionaries"
|
17
23
|
#define DRAWINGELEMENT "DrawingElement"
|
18
24
|
#define BEHAVIOR "Behavior"
|
25
|
+
#define BOUNDINGBOX "BoundingBox"
|
26
|
+
#define FACE "Face"
|
27
|
+
#define LAYER "Layer"
|
28
|
+
#define CONSTRUCTIONLINE "ConstructionLine"
|
29
|
+
#define CONSTRUCTIONPOINT "ConstructionPoint"
|
30
|
+
#define DIMENSION "Dimension"
|
31
|
+
#define EDGE "Edge"
|
32
|
+
#define IMAGE "Image"
|
33
|
+
#define SECTIONPLANE "SectionPlane"
|
34
|
+
#define GROUP "Group"
|
35
|
+
#define TEXT "Text"
|
36
|
+
#define IMAGEREP "ImageRep"
|
19
37
|
#define SKETCHUP_MATERIAL SKETCHUP "::" MATERIAL
|
20
38
|
#define SKETCHUP_MATERIALS SKETCHUP "::" MATERIALS
|
21
39
|
#define SKETCHUP_TEXTURE SKETCHUP "::" TEXTURE
|
@@ -28,6 +46,18 @@
|
|
28
46
|
#define SKETCHUP_ATTRIBUTEDICTIONARIES SKETCHUP "::" ATTRIBUTEDICTIONARIES
|
29
47
|
#define SKETCHUP_DEFINITIONLIST SKETCHUP "::" DEFINITIONLIST
|
30
48
|
#define SKETCHUP_BEHAVIOR SKETCHUP "::" BEHAVIOR
|
49
|
+
#define GEOM_BOUNDINGBOX GEOM "::" BOUNDINGBOX
|
50
|
+
#define SKETCHUP_FACE SKETCHUP "::" FACE
|
51
|
+
#define SKETCHUP_LAYER SKETCHUP "::" LAYER
|
52
|
+
#define SKETCHUP_CONSTRUCTIONLINE SKETCHUP "::" CONSTRUCTIONLINE
|
53
|
+
#define SKETCHUP_CONSTRUCTIONPOINT SKETCHUP "::" CONSTRUCTIONPOINT
|
54
|
+
#define SKETCHUP_DIMENSION SKETCHUP "::" DIMENSION
|
55
|
+
#define SKETCHUP_EDGER SKETCHUP "::" EDGE
|
56
|
+
#define SKETCHUP_IMAGE SKETCHUP "::" IMAGE
|
57
|
+
#define SKETCHUP_SECTIONPLANE SKETCHUP "::" SECTIONPLANE
|
58
|
+
#define SKETCHUP_GROUP SKETCHUP "::" GROUP
|
59
|
+
#define SKETCHUP_TEXT SKETCHUP "::" TEXT
|
60
|
+
#define SKETCHUP_IMAGEREP SKETCHUP "::" IMAGEREP
|
31
61
|
|
32
62
|
#pragma clang diagnostic push
|
33
63
|
#pragma clang diagnostic ignored "-Wbackslash-newline-escape"
|
@@ -75,6 +105,7 @@
|
|
75
105
|
GETUTF8FROMSTRING(name, output); \
|
76
106
|
SUStringRelease(&name); \
|
77
107
|
}
|
78
|
-
#endif // UTILS_H
|
79
108
|
|
80
|
-
#pragma clang diagnostic pop
|
109
|
+
#pragma clang diagnostic pop
|
110
|
+
|
111
|
+
#endif // SCRIPTUP_UTILS_H
|
Binary file
|
Binary file
|
data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/{Libraries → Frameworks}/libCommonImage.dylib
RENAMED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -29,8 +29,8 @@ extern "C" {
|
|
29
29
|
- \ref SU_ERROR_NULL_POINTER_OUTPUT if \p overlay is NULL
|
30
30
|
- \ref SU_ERROR_OVERWRITE_VALID if \p overlay is already a valid object
|
31
31
|
- \ref SU_ERROR_DUPLICATE if the given SUOverlayCreateInfo::id already exists in the model
|
32
|
-
@
|
33
|
-
@
|
32
|
+
@related SUModelRef
|
33
|
+
@see SUOverlayRef
|
34
34
|
*/
|
35
35
|
SU_RESULT SUModelCreateOverlay(
|
36
36
|
SUModelRef model, const struct SUOverlayCreateInfo* info, SUOverlayRef* overlay);
|
@@ -45,8 +45,8 @@ SU_RESULT SUModelCreateOverlay(
|
|
45
45
|
- \ref SU_ERROR_INVALID_INPUT if \p model or \p overlay is an invalid object
|
46
46
|
- \ref SU_ERROR_NULL_POINTER_INPUT if \p overlay is NULL
|
47
47
|
- \ref SU_ERROR_NO_DATA if \p overlay could be found in the model
|
48
|
-
@
|
49
|
-
@
|
48
|
+
@related SUModelRef
|
49
|
+
@see SUOverlayRef
|
50
50
|
*/
|
51
51
|
SU_RESULT SUModelReleaseOverlay(SUModelRef model, SUOverlayRef* overlay);
|
52
52
|
|
@@ -58,18 +58,25 @@ struct SUBeginFrameInfo {
|
|
58
58
|
double aspect_ratio; ///< Aspect ratio of the view port
|
59
59
|
double near_clipping_distance; ///< Distance to near clipping plane from the camera
|
60
60
|
double far_clipping_distance; ///< Distance to far clipping plane from the camera
|
61
|
-
double projection_matrix[16]; ///< Projection Matrix.
|
62
|
-
double view_matrix[16]; ///< View Matrix
|
61
|
+
double projection_matrix[16]; ///< Projection Matrix, stored in row major order.
|
62
|
+
double view_matrix[16]; ///< View Matrix, stored in row major order.
|
63
63
|
double viewport_width; ///< Viewport width
|
64
64
|
double viewport_height; ///< Viewport height
|
65
65
|
|
66
|
-
|
67
|
-
|
66
|
+
/**
|
67
|
+
* Field of view of the perspective camera (in degrees). Valid only when
|
68
|
+
* is_perspective is true.
|
69
|
+
*/
|
70
|
+
double fov;
|
71
|
+
|
68
72
|
double height; ///< Parallel projection frustum height. Valid only when is_perspective is false.
|
69
73
|
bool is_perspective; ///< Whether the camera is perspective or orthographic.
|
70
74
|
|
71
|
-
|
72
|
-
|
75
|
+
/**
|
76
|
+
* Reserved for internal use. This will be set to NULL by SketchUp and should
|
77
|
+
* not be modified.
|
78
|
+
*/
|
79
|
+
void* reserved;
|
73
80
|
};
|
74
81
|
|
75
82
|
/**
|
@@ -126,6 +133,7 @@ enum SUOverlayImageOrientation : uint8_t {
|
|
126
133
|
@struct SUOverlayDrawFrameInfo
|
127
134
|
@brief Data that SketchUp will use the to blend the given color/depth buffer onto SketchUp
|
128
135
|
rendering.
|
136
|
+
@attention color and depth buffers must be valid until the end_frame callback is called.
|
129
137
|
@related SUOverlayRef
|
130
138
|
*/
|
131
139
|
struct SUOverlayDrawFrameInfo {
|
@@ -137,9 +145,11 @@ struct SUOverlayDrawFrameInfo {
|
|
137
145
|
double blending_factor;
|
138
146
|
|
139
147
|
/// Color buffer info. ptr points to a uint8_t buffer with 4 channels.
|
148
|
+
/// The buffer pointed to by color must be valid until the end_frame callback is called.
|
140
149
|
struct SUDrawFrameMemoryBuffer color;
|
141
150
|
|
142
151
|
/// Depth buffer info. ptr points to a float buffer.
|
152
|
+
/// The buffer pointed to by color must be valid until the end_frame callback is called.
|
143
153
|
struct SUDrawFrameMemoryBuffer depth;
|
144
154
|
|
145
155
|
/// Reserved for internal use. This will be set to NULL by SketchUp and should not be modified.
|
@@ -154,6 +164,8 @@ typedef void (*SUOverlayDrawFrameFuncT)(SUOverlayRef, struct SUOverlayDrawFrameI
|
|
154
164
|
|
155
165
|
/**
|
156
166
|
@brief Signature for SUOverlayCreateInfo::end_frame callback
|
167
|
+
@attention SUOverlayDrawFrameInfo::color and SUOverlayDrawFrameInfo::depth buffers must be valid
|
168
|
+
until the end_frame callback is called.
|
157
169
|
@related SUOverlayRef
|
158
170
|
*/
|
159
171
|
typedef void (*SUOverlayEndFrameFuncT)(SUOverlayRef, void*);
|
@@ -224,6 +236,8 @@ struct SUOverlayCreateInfo {
|
|
224
236
|
SUOverlayDrawFrameFuncT draw_frame;
|
225
237
|
/// Function that SketchUp will call to signal the resources passed in draw_frame are no longer
|
226
238
|
/// needed.
|
239
|
+
/// SUOverlayDrawFrameInfo::color and SUOverlayDrawFrameInfo::depth buffers must be valid until
|
240
|
+
/// the end_frame callback is called.
|
227
241
|
SUOverlayEndFrameFuncT end_frame;
|
228
242
|
};
|
229
243
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
// Copyright 2015 Trimble Inc
|
1
|
+
// Copyright 2015-2024 Trimble Inc. All rights reserved.
|
2
2
|
// This file is intended for public distribution.
|
3
3
|
|
4
4
|
/**
|
@@ -90,13 +90,9 @@ typedef wchar_t unichar; ///< A platform-independent UTF16 type.
|
|
90
90
|
#endif // GSLAPI_API_EXPORTS
|
91
91
|
#endif // WINDOWS
|
92
92
|
|
93
|
-
#if defined __APPLE__
|
93
|
+
#if defined __APPLE__ && !defined GSLAPI_NO_EXPORTS
|
94
94
|
#undef SU_EXPORT
|
95
|
-
#
|
96
|
-
#define SU_EXPORT __attribute__((visibility("default")))
|
97
|
-
#else
|
98
|
-
#define SU_EXPORT __attribute__((visibility("hidden")))
|
99
|
-
#endif
|
95
|
+
#define SU_EXPORT __attribute__((visibility("default")))
|
100
96
|
#endif // #if defined __APPLE__
|
101
97
|
|
102
98
|
#define DEFINE_SU_TYPE(TYPENAME) \
|
@@ -104,8 +100,6 @@ typedef wchar_t unichar; ///< A platform-independent UTF16 type.
|
|
104
100
|
void* ptr; \
|
105
101
|
} TYPENAME;
|
106
102
|
|
107
|
-
// #define SU_RESULT SU_EXPORT enum SUResult
|
108
|
-
|
109
103
|
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
110
104
|
|
111
105
|
/**
|
@@ -158,6 +152,12 @@ typedef unsigned __int32 uint32_t;
|
|
158
152
|
#include <stdint.h>
|
159
153
|
#endif // #if !defined(__STDC_HOSTED__) || (__STDC_HOSTED__ == 0)
|
160
154
|
|
155
|
+
#ifndef __cplusplus
|
156
|
+
// C compilers need this header for the bool type.
|
157
|
+
// This header maps bool to C99's _Bool type.
|
158
|
+
#include <stdbool.h>
|
159
|
+
#endif
|
160
|
+
|
161
161
|
/**
|
162
162
|
@brief This macro is used to indicate if functions are intended to be
|
163
163
|
deprecated. If you would like to hide the deprecation warnings simply
|
@@ -42,7 +42,15 @@ struct SUExtensionLicense {
|
|
42
42
|
};
|
43
43
|
|
44
44
|
/**
|
45
|
-
@brief
|
45
|
+
@brief Gets a license for a given extension.
|
46
|
+
|
47
|
+
Starting in SketchUp 2025.0 (API 13.0), this function automatically tries to fetch a license from
|
48
|
+
Extension Warehouse if the extension doesn't have a license on the current device. This only works
|
49
|
+
if the user is signed in. In earlier SketchUp versions, the user has to go to Extension Manager,
|
50
|
+
expand the extension in question and press Update License if the license is missing. (For
|
51
|
+
performance reasons this automatic fetching is skipped during SketchUp startup. Make sure to do a
|
52
|
+
license check when the user interacts with the extension).
|
53
|
+
|
46
54
|
@param[in] extension_id The Extension Warehouse UUID for the extension.
|
47
55
|
@param[out] out_license the licensing retrieved.
|
48
56
|
@related SUExtensionLicense
|
@@ -62,11 +62,11 @@ SU_RESULT SUPoint2DOffset(
|
|
62
62
|
const struct SUPoint2D* point1, const struct SUVector2D* vector, struct SUPoint2D* point2);
|
63
63
|
|
64
64
|
/**
|
65
|
-
@brief Gets the distance between two point objects.
|
65
|
+
@brief Gets the distance between two point objects, in inches.
|
66
66
|
@since SketchUp 2017, API 5.0
|
67
67
|
@param[in] point1 The first point object.
|
68
68
|
@param[in] point2 The second point object.
|
69
|
-
@param[out] distance The distance between the two points.
|
69
|
+
@param[out] distance The distance between the two points, in inches.
|
70
70
|
@related SUPoint2D
|
71
71
|
@return
|
72
72
|
- \ref SU_ERROR_NONE on success
|
@@ -63,11 +63,11 @@ SU_RESULT SUPoint3DOffset(
|
|
63
63
|
const struct SUPoint3D* point1, const struct SUVector3D* vector, struct SUPoint3D* point2);
|
64
64
|
|
65
65
|
/**
|
66
|
-
@brief Gets the distance between two point objects.
|
66
|
+
@brief Gets the distance between two point objects, in inches.
|
67
67
|
@since SketchUp 2018 M0, API 6.0
|
68
68
|
@param[in] point1 The first point object.
|
69
69
|
@param[in] point2 The second point object.
|
70
|
-
@param[out] distance The distance between the two points.
|
70
|
+
@param[out] distance The distance between the two points, in inches.
|
71
71
|
@related SUPoint3D
|
72
72
|
@return
|
73
73
|
- \ref SU_ERROR_NONE on success
|
@@ -62,7 +62,7 @@ SU_RESULT SUTransformation2DNonUniformScale(
|
|
62
62
|
@since SketchUp 2019, API 7.0
|
63
63
|
@param[out] transform The transformation to be set.
|
64
64
|
@param[in] point The point specifying the translation component of the
|
65
|
-
transformation.
|
65
|
+
transformation. The coordinates of the point are in inches.
|
66
66
|
@param[in] scale The scale value for the transformation.
|
67
67
|
@related SUTransformation2D
|
68
68
|
@return
|
@@ -78,7 +78,7 @@ SU_RESULT SUTransformation2DScaleAboutPoint(
|
|
78
78
|
@since SketchUp 2019, API 7.0
|
79
79
|
@param[out] transform The transformation to be set.
|
80
80
|
@param[in] point The point specifying the translation component of the
|
81
|
-
transformation.
|
81
|
+
transformation. The coordinates of the point should be expressed in inches.
|
82
82
|
@param[in] x_scale The x-axis scale value for the transformation.
|
83
83
|
@param[in] y_scale The y-axis scale value for the transformation.
|
84
84
|
@related SUTransformation2D
|
@@ -96,7 +96,7 @@ SU_RESULT SUTransformation2DNonUniformScaleAboutPoint(
|
|
96
96
|
@since SketchUp 2019, API 7.0
|
97
97
|
@param[out] transform The calculated transformation.
|
98
98
|
@param[in] point The point specifying the translation component of the
|
99
|
-
transformation.
|
99
|
+
transformation. The coordinates of the point should be expressed in inches.
|
100
100
|
@param[in] angle The rotation in radians for the transformation.
|
101
101
|
@related SUTransformation2D
|
102
102
|
@return
|
@@ -121,7 +121,7 @@ SU_RESULT SUVector2DNormalize(struct SUVector2D* vector);
|
|
121
121
|
/**
|
122
122
|
@brief Reverses a vector.
|
123
123
|
@since SketchUp 2017, API 5.0
|
124
|
-
@param[in] vector The vector object.
|
124
|
+
@param[in,out] vector The vector object.
|
125
125
|
@related SUVector2D
|
126
126
|
@return
|
127
127
|
- \ref SU_ERROR_NONE on success
|
@@ -173,10 +173,10 @@ SU_RESULT SUVector2DCross(
|
|
173
173
|
SU_RESULT SUVector2DIsUnitVector(const struct SUVector2D* vector, bool* is_unit_vector);
|
174
174
|
|
175
175
|
/**
|
176
|
-
@brief Gets the length of a vector.
|
176
|
+
@brief Gets the length of a vector, in inches.
|
177
177
|
@since SketchUp 2017, API 5.0
|
178
178
|
@param[in] vector The vector object.
|
179
|
-
@param[out] length The length of the vector.
|
179
|
+
@param[out] length The length of the vector, in inches.
|
180
180
|
@related SUVector2D
|
181
181
|
@return
|
182
182
|
- \ref SU_ERROR_NONE on success
|
@@ -186,10 +186,10 @@ SU_RESULT SUVector2DIsUnitVector(const struct SUVector2D* vector, bool* is_unit_
|
|
186
186
|
SU_RESULT SUVector2DGetLength(const struct SUVector2D* vector, double* length);
|
187
187
|
|
188
188
|
/**
|
189
|
-
@brief Sets the length of a vector.
|
189
|
+
@brief Sets the length of a vector, in inches.
|
190
190
|
@since SketchUp 2017, API 5.0
|
191
191
|
@param[in,out] vector The vector object.
|
192
|
-
@param[in] length The new length the vector should be.
|
192
|
+
@param[in] length The new length the vector should be, in inches.
|
193
193
|
@related SUVector2D
|
194
194
|
@return
|
195
195
|
- \ref SU_ERROR_NONE on success
|
@@ -187,10 +187,10 @@ SU_RESULT SUVector3DCross(
|
|
187
187
|
SU_RESULT SUVector3DIsUnitVector(const struct SUVector3D* vector, bool* is_unit_vector);
|
188
188
|
|
189
189
|
/**
|
190
|
-
@brief Gets the length of a vector.
|
190
|
+
@brief Gets the length of a vector, in inches.
|
191
191
|
@since SketchUp 2018, API 6.0
|
192
192
|
@param[in] vector The vector object.
|
193
|
-
@param[out] length The length of the vector.
|
193
|
+
@param[out] length The length of the vector, in inches.
|
194
194
|
@related SUVector3D
|
195
195
|
@return
|
196
196
|
- \ref SU_ERROR_NONE on success
|
@@ -200,10 +200,10 @@ SU_RESULT SUVector3DIsUnitVector(const struct SUVector3D* vector, bool* is_unit_
|
|
200
200
|
SU_RESULT SUVector3DGetLength(const struct SUVector3D* vector, double* length);
|
201
201
|
|
202
202
|
/**
|
203
|
-
@brief Sets the length of a vector.
|
203
|
+
@brief Sets the length of a vector, in inches.
|
204
204
|
@since SketchUp 2018, API 6.0
|
205
205
|
@param[in,out] vector The vector object.
|
206
|
-
@param[in] length The new length the vector should be.
|
206
|
+
@param[in] length The new length the vector should be, in inches.
|
207
207
|
@related SUVector3D
|
208
208
|
@return
|
209
209
|
- \ref SU_ERROR_NONE on success
|
@@ -18,7 +18,7 @@ extern "C" {
|
|
18
18
|
|
19
19
|
/**
|
20
20
|
@struct SUPoint2D
|
21
|
-
@brief Represents a point in 2-dimensional space.
|
21
|
+
@brief Represents a point in 2-dimensional space. The coordinates are represented in inches.
|
22
22
|
*/
|
23
23
|
struct SUPoint2D {
|
24
24
|
double x; ///< X coordinate
|
@@ -27,7 +27,7 @@ struct SUPoint2D {
|
|
27
27
|
|
28
28
|
/**
|
29
29
|
@struct SUVector2D
|
30
|
-
@brief Represents a vector in 2-dimensional space.
|
30
|
+
@brief Represents a vector in 2-dimensional space. The magnitudes are represented in inches.
|
31
31
|
*/
|
32
32
|
struct SUVector2D {
|
33
33
|
double x; ///< X magnitude
|
@@ -36,7 +36,7 @@ struct SUVector2D {
|
|
36
36
|
|
37
37
|
/**
|
38
38
|
@struct SUPoint3D
|
39
|
-
@brief Represents a point in 3-dimensional space.
|
39
|
+
@brief Represents a point in 3-dimensional space. The coordinates are represented in inches.
|
40
40
|
*/
|
41
41
|
struct SUPoint3D {
|
42
42
|
double x; ///< X coordinate
|
@@ -46,7 +46,7 @@ struct SUPoint3D {
|
|
46
46
|
|
47
47
|
/**
|
48
48
|
@struct SUVector3D
|
49
|
-
@brief Represents a vector in 3-dimensional space.
|
49
|
+
@brief Represents a vector in 3-dimensional space. The magnitudes are represented in inches.
|
50
50
|
*/
|
51
51
|
struct SUVector3D {
|
52
52
|
double x; ///< X magnitude
|
@@ -70,7 +70,8 @@ struct SUPlane3D {
|
|
70
70
|
/**
|
71
71
|
@struct SUBoundingBox3D
|
72
72
|
@brief Represents a 3D axis-aligned bounding box represented by the extreme
|
73
|
-
diagonal corner points with minimum and maximum x,y,z coordinates.
|
73
|
+
diagonal corner points with minimum and maximum x,y,z coordinates. The coordinates of the
|
74
|
+
points are in inches.
|
74
75
|
*/
|
75
76
|
struct SUBoundingBox3D {
|
76
77
|
struct SUPoint3D min_point; ///< A 3D point where x, y and z are minimum
|
@@ -82,7 +83,7 @@ struct SUBoundingBox3D {
|
|
82
83
|
/**
|
83
84
|
@struct SUAxisAlignedRect2D
|
84
85
|
@brief Represents a 2D rectangle that is aligned with the X and Y axis of the
|
85
|
-
coordinate system.
|
86
|
+
coordinate system. The coordinates of the points of the rectangle are in inches.
|
86
87
|
*/
|
87
88
|
struct SUAxisAlignedRect2D {
|
88
89
|
struct SUPoint2D upper_left; ///< Upper left corner of the bounding box.
|
@@ -91,7 +92,8 @@ struct SUAxisAlignedRect2D {
|
|
91
92
|
|
92
93
|
/**
|
93
94
|
@struct SURay3D
|
94
|
-
@brief Represents a 3D ray defined by a point and normal vector.
|
95
|
+
@brief Represents a 3D ray defined by a point and normal vector. The coordinates of the point are
|
96
|
+
represented in inches.
|
95
97
|
@since SketchUp 2018, API 6.0
|
96
98
|
*/
|
97
99
|
struct SURay3D {
|
data/sketchup-sdk-mac/SketchUpAPI.framework/Versions/A/Headers/import_export/modelimporterplugin.h
CHANGED
@@ -18,7 +18,7 @@ enum SketchUpOptionsDialogResponse {
|
|
18
18
|
IMPORTER_OPTIONS_ACCEPTED = 2 ///< Importer options accepted.
|
19
19
|
};
|
20
20
|
|
21
|
-
/** Return type of GetImporterBehavior(). */
|
21
|
+
/** @brief Return type of GetImporterBehavior(). */
|
22
22
|
enum SketchUpModelImporterBehavior {
|
23
23
|
IMPORT_MODEL_AT_ORIGIN = 0, ///< Preserves coordinates of the imported
|
24
24
|
///< geometry.
|
@@ -123,7 +123,7 @@ class SketchUpModelImporterInterface {
|
|
123
123
|
@brief This performs the conversion from the selected input file to the
|
124
124
|
given temporary output file using options set during the
|
125
125
|
ShowOptionsDialog method. The output file is then inserted into
|
126
|
-
the current model using rules defined by the GetImporterBehavior
|
126
|
+
the current model using rules defined by the GetImporterBehavior()
|
127
127
|
method.
|
128
128
|
@param[in] input The user selected input file. The file
|
129
129
|
name is specified in UTF-8 and may
|
@@ -143,15 +143,19 @@ class SketchUpModelImporterInterface {
|
|
143
143
|
virtual bool ConvertToSkp(
|
144
144
|
const std::string& input, const std::string& output_skp,
|
145
145
|
SketchUpPluginProgressCallback* progress, void* reserved) = 0;
|
146
|
+
|
146
147
|
/**
|
147
148
|
@brief Displays a modal dialog showing an optional summary of the import
|
148
|
-
process.
|
149
|
-
|
149
|
+
process.
|
150
|
+
|
151
|
+
The default does nothing.
|
150
152
|
*/
|
151
153
|
virtual void ShowSummaryDialog() {
|
152
154
|
}
|
155
|
+
|
153
156
|
/**
|
154
157
|
@brief Defines the method SketchUp uses when placing the imported model.
|
158
|
+
@return The import behavior SketchUp should use when importing the model.
|
155
159
|
*/
|
156
160
|
virtual SketchUpModelImporterBehavior GetImporterBehavior() const {
|
157
161
|
return IMPORT_MODEL_PRESERVE_ORIGIN;
|
@@ -92,10 +92,10 @@ SU_RESULT SUAttributeDictionaryGetName(SUAttributeDictionaryRef dictionary, SUSt
|
|
92
92
|
|
93
93
|
/**
|
94
94
|
@brief Inserts a key-value pair into an attribute dictionary object.
|
95
|
-
@param[in] dictionary The attribute dictionary object.
|
96
|
-
@param[in]
|
97
|
-
|
98
|
-
@param[in]
|
95
|
+
@param[in,out] dictionary The attribute dictionary object.
|
96
|
+
@param[in] key The key of the key-value pair. Assumed to be UTF-8
|
97
|
+
encoded.
|
98
|
+
@param[in] value_in The value of the key-value pair.
|
99
99
|
@related SUAttributeDictionaryRef
|
100
100
|
@return
|
101
101
|
- \ref SU_ERROR_NONE on success
|