Skip to content

🎥 Make videos programmatically with React

@remotion/studio: Expand keyframed properties

Jonny Burger3656e6beb05f
diff --git a/packages/studio/src/components/Timeline/TimelineKeyframeControls.tsx b/packages/studio/src/components/Timeline/TimelineKeyframeControls.tsx
index 1dfa2105c4..b7d3b9c955 100644
--- a/packages/studio/src/components/Timeline/TimelineKeyframeControls.tsx
+++ b/packages/studio/src/components/Timeline/TimelineKeyframeControls.tsx
@@ -23,6 +23,7 @@ import {
type TimelineTreeNode,
} from '../../helpers/timeline-layout';
import {timelineNodePathInfoToKey} from '../../helpers/timeline-node-path-key';
+import {ExpandedTracksSetterContext} from '../ExpandedTracksProvider';
import {
callAddKeyframes,
type AddEffectKeyframeChange,
@@ -531,6 +532,7 @@ export const TimelineKeyframeControls: React.FC<{
Internals.VisualModeDragOverridesContext,
);
const {previewServerState} = useContext(StudioServerConnectionCtx);
+ const {expandParentTracks} = useContext(ExpandedTracksSetterContext);
const {selectedItems, selectItems} = useTimelineSelection();
const tracks = useTimelineKeyframeTracks();
@@ -781,6 +783,10 @@ export const TimelineKeyframeControls: React.FC<{
setPropStatuses,
clientId,
});
+ for (const {target} of addChanges) {
+ expandParentTracks(target.nodePathInfo);
+ }
+
if (mode === 'timeline') {
selectItems(
addChanges.map(({target}) => ({
@@ -795,6 +801,7 @@ export const TimelineKeyframeControls: React.FC<{
[
canToggleKeyframe,
clientId,
+ expandParentTracks,
hasKeyframeAtCurrentFrame,
keyframeToggleTargets,
mode,