Add actor routine handling in ProjectSchedulePane

This commit is contained in:
2026-04-14 13:48:25 +02:00
parent 0bff78e5c2
commit 542f275fbc

View File

@@ -207,7 +207,13 @@ export function ProjectSchedulePane({
onSetRoutineNumericValue, onSetRoutineNumericValue,
onSetRoutineColorValue, onSetRoutineColorValue,
onSetRoutineAnimationClip, onSetRoutineAnimationClip,
onSetRoutineAnimationLoop onSetRoutineAnimationLoop,
onSetActorRoutinePresence,
onSetActorRoutineAnimationClip,
onSetActorRoutineAnimationLoop,
onSetActorRoutinePath,
onSetActorRoutinePathSpeed,
onSetActorRoutinePathLoop
}: ProjectSchedulePaneProps) { }: ProjectSchedulePaneProps) {
const selectedRoutine = const selectedRoutine =
selectedRoutineId === null ? null : scheduler.routines[selectedRoutineId] ?? null; selectedRoutineId === null ? null : scheduler.routines[selectedRoutineId] ?? null;
@@ -219,13 +225,25 @@ export function ProjectSchedulePane({
selectedRoutine.target selectedRoutine.target
); );
const selectedEffectOptionId = const selectedEffectOptionId =
selectedRoutine === null selectedRoutine === null || selectedRoutine.target.kind === "actor"
? null ? null
: getProjectScheduleEffectOptionId(selectedRoutine.effect); : getProjectScheduleEffectOptionId(selectedRoutine.effects[0]!);
const selectedEffectOptions = const selectedEffectOptions =
selectedTargetOption === null selectedTargetOption === null || selectedTargetOption.target.kind === "actor"
? [] ? []
: listProjectScheduleEffectOptions(selectedTargetOption); : listProjectScheduleEffectOptions(selectedTargetOption);
const selectedActorPresenceEffect =
selectedRoutine === null || selectedRoutine.target.kind !== "actor"
? null
: findProjectScheduleRoutineEffect(selectedRoutine, "setActorPresence");
const selectedActorAnimationEffect =
selectedRoutine === null || selectedRoutine.target.kind !== "actor"
? null
: findProjectScheduleRoutineEffect(selectedRoutine, "playActorAnimation");
const selectedActorPathEffect =
selectedRoutine === null || selectedRoutine.target.kind !== "actor"
? null
: findProjectScheduleRoutineEffect(selectedRoutine, "followActorPath");
const selectedRoutineDays = const selectedRoutineDays =
selectedRoutine === null selectedRoutine === null
? PROJECT_SCHEDULE_WEEKDAYS ? PROJECT_SCHEDULE_WEEKDAYS