mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-18 22:33:50 +02:00
feat: Add options to save the current world name/id to screenshot metadata/filenames
This commit is contained in:
@@ -9272,6 +9272,22 @@ speechSynthesis.getVoices();
|
||||
this.nowPlaying.offset = parseInt(timestamp, 10);
|
||||
}
|
||||
return;
|
||||
case 'screenshot':
|
||||
if (!this.isGameRunning || !this.screenshotHelper) return;
|
||||
|
||||
var entry = {
|
||||
created_at: gameLog.dt,
|
||||
type: 'Event',
|
||||
//location: location,
|
||||
data: "Screenshot Processed: " + gameLog.screenshotPath.replace(/^.*[\\\/]/, ''),
|
||||
};
|
||||
|
||||
let world = API.parseLocation(this.lastLocation.location);
|
||||
let worldID = world.worldId;
|
||||
|
||||
database.addGamelogEventToDatabase(entry);
|
||||
AppApi.AddScreenshotMetadata(gameLog.screenshotPath, this.lastLocation.name, worldID, this.screenshotHelperModifyFilename);
|
||||
break;
|
||||
case 'api-request':
|
||||
var bias = Date.parse(gameLog.dt) + 60 * 1000;
|
||||
if (
|
||||
@@ -13477,6 +13493,9 @@ speechSynthesis.getVoices();
|
||||
'VRCX_progressPieFilter'
|
||||
);
|
||||
|
||||
$app.data.screenshotHelper = configRepository.getBool('VRCX_screenshotHelper');
|
||||
$app.data.screenshotHelperModifyFilename = configRepository.getBool('VRCX_screenshotHelperModifyFilename');
|
||||
|
||||
$app.methods.updateVRConfigVars = function () {
|
||||
var notificationTheme = 'relax';
|
||||
if (this.isDarkMode) {
|
||||
@@ -20060,6 +20079,18 @@ speechSynthesis.getVoices();
|
||||
this.VRChatConfigFile.screenshot_res_width = res.width;
|
||||
};
|
||||
|
||||
// Screenshot Helper
|
||||
|
||||
$app.methods.saveScreenshotHelper = function () {
|
||||
console.log("save helper toggle press")
|
||||
configRepository.setBool('VRCX_screenshotHelper', this.screenshotHelper);
|
||||
};
|
||||
|
||||
$app.methods.saveScreenshotHelperModifyFilename = function () {
|
||||
console.log("save helper filename toggle press")
|
||||
configRepository.setBool('VRCX_screenshotHelperSaveFilename', this.screenshotHelperModifyFilename);
|
||||
};
|
||||
|
||||
// YouTube API
|
||||
|
||||
$app.data.youTubeApiKey = '';
|
||||
|
||||
@@ -1444,6 +1444,20 @@ html
|
||||
div.options-container-item
|
||||
span.name {{ $t('view.settings.advanced.advanced.video_progress_pie.dance_world_only') }}
|
||||
el-switch(v-model="progressPieFilter" @change="changeYouTubeApi" :disabled="!openVR")
|
||||
div.options-container
|
||||
span.header {{ $t('view.settings.advanced.advanced.screenshot_helper.header') }}
|
||||
div.options-container-item
|
||||
span.name {{ $t('view.settings.advanced.advanced.screenshot_helper.description') }}
|
||||
el-tooltip(placement="top" style="margin-left:5px" :content="$t('view.settings.advanced.advanced.screenshot_helper.description_tooltip')")
|
||||
i.el-icon-info
|
||||
div.options-container-item
|
||||
span.name {{ $t('view.settings.advanced.advanced.screenshot_helper.enable') }}
|
||||
el-switch(v-model="screenshotHelper" @change="saveScreenshotHelper")
|
||||
div.options-container-item
|
||||
span.name {{ $t('view.settings.advanced.advanced.screenshot_helper.modify_filename') }}
|
||||
el-tooltip(placement="top" style="margin-left:5px" :content="$t('view.settings.advanced.advanced.screenshot_helper.modify_filename_tooltip')")
|
||||
i.el-icon-info
|
||||
el-switch(v-model="screenshotHelperModifyFilename" @change="saveScreenshotHelperModifyFilename")
|
||||
div.options-container(v-if="photonLoggingEnabled")
|
||||
span.header {{ $t('view.settings.advanced.photon.header') }}
|
||||
div.options-container-item
|
||||
|
||||
@@ -381,6 +381,14 @@
|
||||
"enable_tooltip": "Requires SteamVR overlay to be enabled",
|
||||
"dance_world_only": "Dance worlds only"
|
||||
},
|
||||
"screenshot_helper": {
|
||||
"header": "Screenshot Helper",
|
||||
"description": "Will store the world ID and world name in the file metadata of any pictures you take in-game.",
|
||||
"description_tooltip": "Unfortunately, windows doesn't support viewing PNG text chunks(few things do) natively, but you can view it using a command-line tool like exiftool, a png chunk inspector, or a hex editor.",
|
||||
"enable": "Enable",
|
||||
"modify_filename": "Modify Filename",
|
||||
"modify_filename_tooltip": "Will add the World ID to screenshot filename, in addition to file metadata."
|
||||
},
|
||||
"cache_debug": {
|
||||
"header": "VRCX Instance Cache/Debug",
|
||||
"disable_gamelog": "Disable GameLog",
|
||||
|
||||
@@ -380,6 +380,14 @@
|
||||
"enable_tooltip": "스팀VR 오버레이 사용 필요",
|
||||
"dance_world_only": "댄스 월드에서만 사용"
|
||||
},
|
||||
"screenshot_helper": {
|
||||
"header": "스크린샷 도우미",
|
||||
"description": "게임 내에서 찍은 사진의 파일 메타데이터에 월드 ID와 월드 이름을 저장합니다.",
|
||||
"description_tooltip": "안타깝게도 Windows는 기본적으로 PNG 텍스트 청크 보기를 지원하지 않지만(몇 가지 기능은 지원), exiftool, PNG chunk inspector 또는 헥스 에디터와 같은 명령줄 도구를 사용하여 볼 수 있습니다.",
|
||||
"enable": "사용",
|
||||
"modify_filename": "파일 이름 수정",
|
||||
"modify_filename_tooltip": "파일 메타데이터 외에 스크린샷 파일 이름에 월드 ID를 추가합니다."
|
||||
},
|
||||
"cache_debug": {
|
||||
"header": "VRCX 인스턴스 캐시/디버그",
|
||||
"disable_gamelog": "게임 기록 하지 않기",
|
||||
|
||||
@@ -374,11 +374,13 @@
|
||||
"enable": "啟用",
|
||||
"youtube_api_key": "Youtube API 金鑰"
|
||||
},
|
||||
"video_progress_pie": {
|
||||
"header": "影片進度圓餅疊層",
|
||||
"screenshot_helper": {
|
||||
"header": "屏幕截图助手",
|
||||
"description": "将在你在游戏中拍摄的任何照片的文件元数据中存储世界ID和世界名称。",
|
||||
"description_tooltip": "不幸的是,windows不支持本机查看PNG文本块(很多东西都不支持),但你可以使用exiftool等命令行工具、png块检查器或十六进制编辑器来查看。",
|
||||
"enable": "啟用",
|
||||
"enable_tooltip": "需要啟用 SteamVR 疊層選項",
|
||||
"dance_world_only": "僅限跳舞世界"
|
||||
"modify_filename": "修改文件名",
|
||||
"modify_filename_tooltip": "除了文件元数据外,将把世界ID添加到截图文件名中。"
|
||||
},
|
||||
"cache_debug": {
|
||||
"header": "VRCX 世界快取/除錯",
|
||||
|
||||
@@ -58,6 +58,10 @@ class GameLogService {
|
||||
gameLog.photonId = args[1];
|
||||
break;
|
||||
|
||||
case 'screenshot':
|
||||
gameLog.screenshotPath = args[0]
|
||||
break;
|
||||
|
||||
case 'vrc-quit':
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user