3class EBTContainerFields
6 static const string conf =
"Configurations";
7 static const string materialAssigns =
"MaterialAssigns";
8 static const string UVTransform =
"MatUVTransform";
10 static const string conversion =
"Conversion";
11 static const string colorSpace =
"ColorSpace";
12 static const string mips =
"ContainsMips";
13 static const string rgHQCompression =
"RedGreenHQCompression";
14 static const string colorHQCompression =
"ColorHQCompression";
15 static const string tosRGB =
"TosRGB";
16 static const string toLinear =
"ToLinear";
17 static const string raw =
"Raw";
18 static const string sRGB =
"sRGB";
19 static const string redHQCompression =
"RedHQCompression";
21 static const string coords =
"coords";
22 static const string angles =
"angles";
23 static const string scale =
"scale";
24 static const string pivot =
"PivotID";
25 static const string hierarchy =
"Hierarchy";
26 static const string components =
"components";
27 static const string meshObject =
"MeshObject";
28 static const string object =
"Object";
29 static const ref array<string> supportedTypes = {
"GenericEntity",
"Building",
"GameEntity",
"StaticModelEntity",
"DestructibleEntity",
"SCR_DestructibleEntity"};
37 void GetRelativePathRequest()
48 void GetRelativePathResponse()
56class GetRelativePath : NetApiHandler
61 return new GetRelativePathRequest();
65 override JsonApiStruct
GetResponse(JsonApiStruct request)
67 GetRelativePathRequest req = GetRelativePathRequest.Cast(request);
68 GetRelativePathResponse res = GetRelativePathResponse();
70 if (req.absPath.StartsWith(
"{"))
72 res.relPath = req.absPath;
76 ResourceManager resourceManager = Workbench.GetModule(ResourceManager);
77 MetaFile metaFile = resourceManager.GetMetaFile(req.absPath);
81 res.errorString =
"No Resource found at given absolute path " + req.absPath;
85 res.relPath = metaFile.GetResourceID();
94 bool GetMaterials(
string xobPath, out map<string,ResourceName> AssignedMats)
97 ResourceManager resourceManager = Workbench.GetModule(ResourceManager);
98 MetaFile meta = resourceManager.GetMetaFile(xobPath);
105 BaseContainerList configurations = meta.GetObjectArray(EBTContainerFields.conf);
106 BaseContainer cfg = configurations.Get(0);
107 string materialAssigns;
108 array<string> pairs =
new array<string>;
109 cfg.Get(EBTContainerFields.materialAssigns, materialAssigns);
112 materialAssigns.Split(
";", pairs,
true);
113 foreach (
string pair : pairs)
115 array<string> keyValue =
new array<string>;
116 pair.Split(
",", keyValue,
true);
117 AssignedMats.Set(keyValue[0], keyValue[1]);
override JsonApiStruct GetResponse(JsonApiStruct request)
ref array< string > coords
ref array< string > angles
SCR_AICombatMoveRequestBase GetRequest()
Configs ServerBrowser KickDialogs conf
base classes for filtering in server browser