Compare commits
No commits in common. "c6e4ac79621b766154a83adc1e6ad241cbddf4f7" and "686d29cf25dad4c82205566952046765d4614992" have entirely different histories.
c6e4ac7962
...
686d29cf25
@ -357,9 +357,6 @@ public class StreamDeckServerManager : MonoBehaviour
|
||||
case "capture_screenshot":
|
||||
case "capture_alpha_screenshot":
|
||||
case "open_screenshot_folder":
|
||||
case "refresh_magica_cloth":
|
||||
case "reset_magica_cloth":
|
||||
case "reset_magica_cloth_keep_pose":
|
||||
HandleSystemCommand(message);
|
||||
break;
|
||||
|
||||
|
||||
@ -4,9 +4,6 @@ using System.Linq;
|
||||
using System.IO;
|
||||
using System;
|
||||
using Entum;
|
||||
#if MAGICACLOTH2
|
||||
using MagicaCloth2;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// StreamDeck 단일 기능 버튼들을 통합 관리하는 시스템 컨트롤러
|
||||
@ -684,77 +681,6 @@ public class SystemController : MonoBehaviour
|
||||
|
||||
#endregion
|
||||
|
||||
#region MagicaCloth 시뮬레이션 기능
|
||||
|
||||
#if MAGICACLOTH2
|
||||
/// <summary>
|
||||
/// 씬의 모든 MagicaCloth 시뮬레이션을 리셋합니다
|
||||
/// </summary>
|
||||
/// <param name="keepPose">true면 현재 포즈를 유지하면서 리셋</param>
|
||||
public void RefreshAllMagicaCloth(bool keepPose = false)
|
||||
{
|
||||
var allMagicaCloths = FindObjectsByType<MagicaCloth>(FindObjectsSortMode.None);
|
||||
|
||||
if (allMagicaCloths == null || allMagicaCloths.Length == 0)
|
||||
{
|
||||
Log("씬에 MagicaCloth 컴포넌트가 없습니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
int resetCount = 0;
|
||||
foreach (var cloth in allMagicaCloths)
|
||||
{
|
||||
if (cloth != null && cloth.IsValid())
|
||||
{
|
||||
try
|
||||
{
|
||||
cloth.ResetCloth(keepPose);
|
||||
resetCount++;
|
||||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
LogError($"MagicaCloth 리셋 실패 ({cloth.gameObject.name}): {e.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Log($"MagicaCloth 시뮬레이션 리셋 완료 ({resetCount}/{allMagicaCloths.Length}개)");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 씬의 모든 MagicaCloth 시뮬레이션을 완전히 초기 상태로 리셋합니다
|
||||
/// </summary>
|
||||
public void ResetAllMagicaCloth()
|
||||
{
|
||||
RefreshAllMagicaCloth(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 씬의 모든 MagicaCloth 시뮬레이션을 현재 포즈를 유지하면서 리셋합니다
|
||||
/// </summary>
|
||||
public void ResetAllMagicaClothKeepPose()
|
||||
{
|
||||
RefreshAllMagicaCloth(true);
|
||||
}
|
||||
#else
|
||||
public void RefreshAllMagicaCloth(bool keepPose = false)
|
||||
{
|
||||
LogError("MagicaCloth2가 설치되어 있지 않습니다.");
|
||||
}
|
||||
|
||||
public void ResetAllMagicaCloth()
|
||||
{
|
||||
LogError("MagicaCloth2가 설치되어 있지 않습니다.");
|
||||
}
|
||||
|
||||
public void ResetAllMagicaClothKeepPose()
|
||||
{
|
||||
LogError("MagicaCloth2가 설치되어 있지 않습니다.");
|
||||
}
|
||||
#endif
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 명령어 실행 - WebSocket에서 받은 명령을 처리
|
||||
/// </summary>
|
||||
@ -821,16 +747,6 @@ public class SystemController : MonoBehaviour
|
||||
OpenScreenshotFolder();
|
||||
break;
|
||||
|
||||
// MagicaCloth 시뮬레이션
|
||||
case "refresh_magica_cloth":
|
||||
case "reset_magica_cloth":
|
||||
ResetAllMagicaCloth();
|
||||
break;
|
||||
|
||||
case "reset_magica_cloth_keep_pose":
|
||||
ResetAllMagicaClothKeepPose();
|
||||
break;
|
||||
|
||||
default:
|
||||
LogError($"알 수 없는 명령어: {command}");
|
||||
break;
|
||||
|
||||
BIN
Streamdeck/com.mirabox.streamingle.sdPlugin/images/magica_cloth_reload.png
(Stored with Git LFS)
BIN
Streamdeck/com.mirabox.streamingle.sdPlugin/images/magica_cloth_reload.png
(Stored with Git LFS)
Binary file not shown.
BIN
Streamdeck/com.mirabox.streamingle.sdPlugin/manifest.json
(Stored with Git LFS)
BIN
Streamdeck/com.mirabox.streamingle.sdPlugin/manifest.json
(Stored with Git LFS)
Binary file not shown.
@ -147,20 +147,6 @@ function connectElgatoStreamDeckSocket(inPort, inUUID, inEvent, inInfo, inAction
|
||||
newSettings.actionType = 'screenshot_alpha';
|
||||
console.log('📷 알파 스크린샷 버튼으로 강제 설정됨');
|
||||
|
||||
// StreamDock SDK에 저장
|
||||
if (websocket) {
|
||||
const setSettingsMessage = {
|
||||
event: 'setSettings',
|
||||
context: jsonObj.context,
|
||||
payload: newSettings
|
||||
};
|
||||
websocket.send(JSON.stringify(setSettingsMessage));
|
||||
console.log('💾 강제 설정 저장:', newSettings);
|
||||
}
|
||||
} else if (jsonObj.action === 'com.mirabox.streamingle.magica_cloth_refresh') {
|
||||
newSettings.actionType = 'magica_cloth_refresh';
|
||||
console.log('👗 MagicaCloth 리프레시 버튼으로 강제 설정됨');
|
||||
|
||||
// StreamDock SDK에 저장
|
||||
if (websocket) {
|
||||
const setSettingsMessage = {
|
||||
@ -254,14 +240,6 @@ function connectElgatoStreamDeckSocket(inPort, inUUID, inEvent, inInfo, inAction
|
||||
|
||||
// 기본 제목 설정
|
||||
setButtonTitle(jsonObj.context, '알파\n스크린샷');
|
||||
} else if (jsonObj.action === 'com.mirabox.streamingle.magica_cloth_refresh') {
|
||||
settings.actionType = 'magica_cloth_refresh';
|
||||
console.log('👗👗👗 MAGICA CLOTH REFRESH BUTTON DETECTED 👗👗👗');
|
||||
console.log('👗 This is the MagicaCloth Refresh button!');
|
||||
console.log('👗 When clicked, it should send: refresh_magica_cloth');
|
||||
|
||||
// 기본 제목 설정
|
||||
setButtonTitle(jsonObj.context, '마지카\n리프레시');
|
||||
} else {
|
||||
settings.actionType = 'camera';
|
||||
console.log('📹 카메라 컨트롤러 등록 (기본값)');
|
||||
@ -508,9 +486,6 @@ function handleButtonClick(context, actionUUID) {
|
||||
} else if (actionUUID === 'com.mirabox.streamingle.screenshot_alpha') {
|
||||
actionType = 'screenshot_alpha';
|
||||
console.log('📷 알파 스크린샷 버튼으로 인식');
|
||||
} else if (actionUUID === 'com.mirabox.streamingle.magica_cloth_refresh') {
|
||||
actionType = 'magica_cloth_refresh';
|
||||
console.log('👗 MagicaCloth 리프레시 버튼으로 인식');
|
||||
} else if (actionUUID === 'com.mirabox.streamingle.item') {
|
||||
actionType = 'item';
|
||||
} else if (actionUUID === 'com.mirabox.streamingle.event') {
|
||||
@ -587,11 +562,6 @@ function handleButtonClick(context, actionUUID) {
|
||||
console.log(' Will send: {"type":"capture_alpha_screenshot"}');
|
||||
handleAlphaScreenshot(context);
|
||||
break;
|
||||
case 'magica_cloth_refresh':
|
||||
console.log('➡️ Routing to: MAGICA CLOTH REFRESH handler');
|
||||
console.log(' Will send: {"type":"refresh_magica_cloth"}');
|
||||
handleMagicaClothRefresh(context);
|
||||
break;
|
||||
default:
|
||||
console.log('⚠️ WARNING: Unknown actionType:', actionType);
|
||||
console.log(' Defaulting to CAMERA handler');
|
||||
@ -992,37 +962,6 @@ function handleAlphaScreenshot(context) {
|
||||
}
|
||||
}
|
||||
|
||||
// MagicaCloth 리프레시 액션 처리
|
||||
function handleMagicaClothRefresh(context) {
|
||||
console.log('👗 MagicaCloth 시뮬레이션 리프레시 실행');
|
||||
|
||||
// Unity에 MagicaCloth 리프레시 요청
|
||||
const message = JSON.stringify({
|
||||
type: 'refresh_magica_cloth'
|
||||
});
|
||||
|
||||
console.log('📤 Unity에 MagicaCloth 리프레시 요청 전송:', message);
|
||||
console.log('🔍 Unity 연결 상태:', isUnityConnected);
|
||||
console.log('🔍 Unity 소켓 상태:', !!unitySocket);
|
||||
|
||||
if (unitySocket && unitySocket.readyState === WebSocket.OPEN) {
|
||||
unitySocket.send(message);
|
||||
console.log('✅ 메시지 전송 완료');
|
||||
|
||||
// 피드백을 위해 제목을 잠시 변경
|
||||
setButtonTitle(context, '리셋\n중...');
|
||||
|
||||
// 1초 후 원래 제목으로 복구
|
||||
setTimeout(() => {
|
||||
setButtonTitle(context, '마지카\n리프레시');
|
||||
}, 1000);
|
||||
} else {
|
||||
console.error('❌ Unity 소켓이 연결되지 않음');
|
||||
console.log('🔄 Unity 재연결 시도...');
|
||||
connectToUnity();
|
||||
}
|
||||
}
|
||||
|
||||
// Property Inspector 메시지 처리
|
||||
function handlePropertyInspectorMessage(payload, context, actionUUID) {
|
||||
const command = payload.command;
|
||||
@ -2008,11 +1947,6 @@ function updateButtonTitle(context) {
|
||||
title = '알파\n스크린샷';
|
||||
isActive = true; // 항상 활성 상태
|
||||
console.log('📷 알파 스크린샷 버튼 제목:', title);
|
||||
} else if (actionType === 'magica_cloth_refresh') {
|
||||
// MagicaCloth 리프레시 버튼
|
||||
title = '마지카\n리프레시';
|
||||
isActive = true; // 항상 활성 상태
|
||||
console.log('👗 MagicaCloth 리프레시 버튼 제목:', title);
|
||||
}
|
||||
|
||||
// StreamDock에 제목 업데이트 요청
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user