public void snapshotMaterials() { if (!"TerrainMaterialDlgSnapshot".isObject()) { new ObjectCreator("SimGroup", "TerrainMaterialDlgSnapshot").Create(); } SimGroup group = "TerrainMaterialDlgSnapshot"; SimSet TerrainMaterialSet = "TerrainMaterialSet"; group.clear(); int matCount = TerrainMaterialSet.getCount(); for (uint i = 0; i < matCount; i++) { TerrainMaterial mat = TerrainMaterialSet.getObject(i); if (!mat.isMemberOfClass("TerrainMaterial")) { continue; } ObjectCreator oc = new ObjectCreator("ScriptObject"); oc["parentGroup"] = group.ID; oc["material"] = mat; oc["internalName"] = mat["internalName"]; oc["diffuseMap"] = mat["diffuseMap"]; oc["normalMap"] = mat["normalMap"]; oc["detailMap"] = mat["detailMap"]; oc["macroMap"] = mat["macroMap"]; oc["detailSize"] = mat["detailSize"]; oc["diffuseSize"] = mat["diffuseSize"]; oc["detailStrength"] = mat["detailStrength"]; oc["detailDistance"] = mat["detailDistance"]; oc["macroSize"] = mat["macroSize"]; oc["macroStrength"] = mat["macroStrength"]; oc["macroDistance"] = mat["macroDistance"]; oc["useSideProjection"] = mat["useSideProjection"]; oc["parallaxScale"] = mat["parallaxScale"]; oc.Create(); } }