Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
BlenderEndpoints.c
Go to the documentation of this file.
1
class
RestAPIHelper<
JsonApiStruct
T
> {
2
3
static
T
Get
(
BlenderRestAPI
connection,
string
endpoint) {
4
string
response;
5
bool
status = connection.Get(endpoint, response);
6
7
if
(status)
8
{
9
auto
struct
= new
T
();
10
struct
.RegAll();
11
struct
.ExpandFromRAW(response);
12
return
struct
;
13
}
14
15
return
null;
16
}
17
}
18
19
//--------------------------------------------------------------
20
21
class
GetObjectsResult :
JsonApiStruct
22
{
23
ref array<string>
content
= {};
24
}
25
26
array<string>
GetObjects
(notnull
const
BlenderRestAPI
connection)
27
{
28
auto
result = RestAPIHelper<GetObjectsResult>.Get(connection,
"/get_objects"
);
29
30
if
(result)
31
{
32
return
result.content;
33
}
34
35
return
null;
36
}
37
38
//--------------------------------------------------------------
39
40
class
GetTransformResult
:
JsonApiStruct
41
{
42
vector
location;
43
vector
rotation;
44
vector
scale;
45
}
46
47
GetTransformResult
GetTransform
(notnull
const
BlenderRestAPI
connection,
string
object_name)
48
{
49
string
endpoint =
string
.Format(
"/get_transform?name=%1"
, object_name);
50
auto
result = RestAPIHelper<GetTransformResult>.Get(connection, endpoint);
51
52
if
(result)
53
{
54
return
result;
55
}
56
57
return
null;
58
}
59
60
//--------------------------------------------------------------
61
62
bool
OpenBlendFile
(notnull
const
BlenderRestAPI
connection,
string
blend_file)
63
{
64
string
endpoint =
string
.Format(
"/open_blend_file?path=%1"
, blend_file);
65
return
connection.Get(endpoint);
66
}
67
68
//--------------------------------------------------------------
GetTransform
GetTransformResult JsonApiStruct GetTransform(notnull const BlenderRestAPI connection, string object_name)
Definition
BlenderEndpoints.c:47
GetObjects
array< string > GetObjects(notnull const BlenderRestAPI connection)
Definition
BlenderEndpoints.c:26
content
class RestAPIHelper< JsonApiStruct T > content
OpenBlendFile
bool OpenBlendFile(notnull const BlenderRestAPI connection, string blend_file)
Definition
BlenderEndpoints.c:62
T
class SCR_MapHelperT< Class T, Class U > T
BlenderRestAPI
Definition
BlenderRestAPI.c:42
GetTransformResult
Definition
BlenderEndpoints.c:41
JsonApiStruct
base classes for filtering in server browser
Definition
SCR_FeedbackDialogUI.c:3
vector
Definition
vector.c:13
Get
proto T Get(int n)
scripts
WorkbenchGameCommon
EnfusionBlenderTools
BlenderAPI
BlenderEndpoints.c
Generated by
1.17.0