diff --git a/src/app/App.tsx b/src/app/App.tsx index af2a03f9..6336a6e4 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -10957,31 +10957,222 @@ export function App({ store, initialStatusMessage }: AppProps) { - ) : ( -
-
- - -
-
+ ) : link.action.type === "control" ? ( + (() => { + const targetOption = resolveInteractionControlTargetOption( + getControlTargetRefKey(link.action.effect.target) + ); + const effectOptions = + targetOption === null + ? [] + : listProjectInteractionControlEffectOptions(targetOption); + const effectOptionId = + targetOption === null + ? null + : (() => { + try { + const nextEffectOptionId = + getProjectScheduleEffectOptionId( + link.action.effect + ); + + return effectOptions.some( + (effectOption) => + effectOption.id === nextEffectOptionId + ) + ? nextEffectOptionId + : null; + } catch { + return null; + } + })(); + const selectedEffectOption = + effectOptionId === null + ? null + : (effectOptions.find( + (effectOption) => effectOption.id === effectOptionId + ) ?? null); + + if (targetOption === null || selectedEffectOption === null) { + return ( +
+
+ {`${formatControlEffectValue(link.action.effect)}. This control link is preserved, but the current inspector can only edit effects exposed through the shared control catalog.`} +
+
+ + +
+
+ ); + } + + return ( +
+
+ + +
+ + {selectedEffectOption.valueKind === "number" ? ( + + ) : null} + + {selectedEffectOption.valueKind === "color" ? ( + + ) : null} + + {link.action.effect.type === "playModelAnimation" || + link.action.effect.type === "playActorAnimation" ? ( + <> + + + + ) : null} +
+ ); + })() )}