Add scene lighting effect check and summary in ProjectSequencesPanel.tsx

This commit is contained in:
2026-04-15 07:57:10 +02:00
parent 1fd6e298aa
commit 6f41e49c30

View File

@@ -313,6 +313,8 @@ export function ProjectSequencesPanel({
const targetKey = getControlTargetRefKey(effect.effect.target); const targetKey = getControlTargetRefKey(effect.effect.target);
const targetOption = const targetOption =
getProjectScheduleTargetOptionByKey(targetOptions, targetKey); getProjectScheduleTargetOptionByKey(targetOptions, targetKey);
const isSceneLightingEffect =
targetOption?.target.kind === "scene";
const effectOptions = const effectOptions =
targetOption === null targetOption === null
? [] ? []
@@ -351,48 +353,56 @@ export function ProjectSequencesPanel({
</div> </div>
) : ( ) : (
<> <>
<div className="vector-inputs vector-inputs--two"> {isSceneLightingEffect ? (
<label className="form-field"> <div className="material-summary">
<span className="label">Target</span> This effect applies to the active scene lighting.
<select </div>
className="select-input" ) : (
value={targetOption.key} <>
onChange={(event) => <div className="vector-inputs vector-inputs--two">
onSetControlStepTarget( <label className="form-field">
selectedSequence.id, <span className="label">Target</span>
effectIndex, <select
event.currentTarget.value className="select-input"
) value={targetOption.key}
} onChange={(event) =>
> onSetControlStepTarget(
{editableTargetOptions.map((option) => ( selectedSequence.id,
<option key={option.key} value={option.key}> effectIndex,
{option.groupLabel} · {option.label} event.currentTarget.value
</option> )
))} }
</select> >
</label> {editableTargetOptions.map((option) => (
</div> <option key={option.key} value={option.key}>
<label className="form-field"> {option.groupLabel} · {option.label}
<span className="label">Effect</span> </option>
<select ))}
className="select-input" </select>
value={effectOptionId} </label>
onChange={(event) => </div>
onSetControlStepEffectOption( <label className="form-field">
selectedSequence.id, <span className="label">Effect</span>
effectIndex, <select
event.currentTarget.value as ProjectScheduleEffectOptionId className="select-input"
) value={effectOptionId}
} onChange={(event) =>
> onSetControlStepEffectOption(
{effectOptions.map((option) => ( selectedSequence.id,
<option key={option.id} value={option.id}> effectIndex,
{option.label} event.currentTarget.value as ProjectScheduleEffectOptionId
</option> )
))} }
</select> >
</label> {effectOptions.map((option) => (
<option key={option.id} value={option.id}>
{option.label}
</option>
))}
</select>
</label>
</>
)}
{effectOptions.find((option) => option.id === effectOptionId) {effectOptions.find((option) => option.id === effectOptionId)
?.valueKind === "number" ? ( ?.valueKind === "number" ? (