Merge main into M9.6 text animation branch
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -27,6 +27,8 @@ enum RowKind {
|
||||
open: bool,
|
||||
has_children: bool,
|
||||
fx: Option<bool>,
|
||||
/// Eye switch (layer styles).
|
||||
eye: Option<bool>,
|
||||
},
|
||||
Prop {
|
||||
uid: u64,
|
||||
@@ -250,6 +252,7 @@ fn build_rows(app: &EffectcraftApp, comp: &Comp) -> Vec<Row> {
|
||||
open: tl.open_groups.contains(&g.uid),
|
||||
has_children: true,
|
||||
fx: Some(g.enabled),
|
||||
eye: None,
|
||||
},
|
||||
});
|
||||
if tl.open_groups.contains(&g.uid) {
|
||||
@@ -264,7 +267,14 @@ fn build_rows(app: &EffectcraftApp, comp: &Comp) -> Vec<Row> {
|
||||
rows.push(Row {
|
||||
layer: l.id,
|
||||
depth: 1,
|
||||
kind: RowKind::Group { uid: g.uid, name: g.name.clone(), open: tl.open_groups.contains(&g.uid), has_children: true, fx: None },
|
||||
kind: RowKind::Group {
|
||||
uid: g.uid,
|
||||
name: g.name.clone(),
|
||||
open: tl.open_groups.contains(&g.uid),
|
||||
has_children: true,
|
||||
fx: None,
|
||||
eye: None,
|
||||
},
|
||||
});
|
||||
if tl.open_groups.contains(&g.uid) {
|
||||
push_group(&mut rows, l, g, 2, &tl.open_groups);
|
||||
@@ -298,7 +308,14 @@ fn build_rows(app: &EffectcraftApp, comp: &Comp) -> Vec<Row> {
|
||||
rows.push(Row {
|
||||
layer: l.id,
|
||||
depth: 1,
|
||||
kind: RowKind::Group { uid: g.uid, name: g.name.clone(), open, has_children: !g.children.is_empty(), fx: None },
|
||||
kind: RowKind::Group {
|
||||
uid: g.uid,
|
||||
name: g.name.clone(),
|
||||
open,
|
||||
has_children: !g.children.is_empty(),
|
||||
fx: None,
|
||||
eye: (g.match_id == effectcraft_engine::project::styles::GROUP).then_some(g.enabled),
|
||||
},
|
||||
});
|
||||
if open {
|
||||
push_group(&mut rows, l, g, 2, &tl.open_groups);
|
||||
@@ -332,10 +349,13 @@ fn push_group(rows: &mut Vec<Row>, l: &Layer, g: &PropGroup, depth: usize, open:
|
||||
Node::Group(sg) => {
|
||||
let o = open.contains(&sg.uid);
|
||||
let fx = matches!(sg.kind, GroupKind::Effect { .. }).then_some(sg.enabled);
|
||||
// Layer style groups have eye switches (not Blending Options).
|
||||
let eye = (g.match_id == effectcraft_engine::project::styles::GROUP && sg.match_id != effectcraft_engine::project::styles::BLENDING)
|
||||
.then_some(sg.enabled);
|
||||
rows.push(Row {
|
||||
layer: l.id,
|
||||
depth,
|
||||
kind: RowKind::Group { uid: sg.uid, name: sg.name.clone(), open: o, has_children: !sg.children.is_empty(), fx },
|
||||
kind: RowKind::Group { uid: sg.uid, name: sg.name.clone(), open: o, has_children: !sg.children.is_empty(), fx, eye },
|
||||
});
|
||||
if o {
|
||||
push_group(rows, l, sg, depth + 1, open);
|
||||
@@ -926,7 +946,7 @@ pub fn show(app: &mut EffectcraftApp, ui: &mut egui::Ui, rect: Rect) {
|
||||
}
|
||||
}
|
||||
}
|
||||
RowKind::Group { uid, name, open, has_children, fx } => {
|
||||
RowKind::Group { uid, name, open, has_children, fx, eye } => {
|
||||
lp.rect_filled(left, 0.0, if ri % 2 == 0 { t.row } else { t.row_alt });
|
||||
gp.rect_filled(Rect::from_min_max(pos2(graph_x0, r.min.y), r.max), 0.0, t.tl_bg);
|
||||
let indent = cw.name + 6.0 + 14.0 * row.depth as f32;
|
||||
@@ -942,6 +962,16 @@ pub fn show(app: &mut EffectcraftApp, ui: &mut egui::Ui, rect: Rect) {
|
||||
if widgets::icon_toggle(ui, fr_, Icon::Fx, *en, &t, egui::Id::new(("gfx", uid)), None).clicked() {
|
||||
actions.push(("effect.toggle".into(), json!({"layer": layer.id.0, "effect": uid})));
|
||||
}
|
||||
app.auto.add(&format!("timeline.group.{uid}.fx"), fr_, name);
|
||||
}
|
||||
if let Some(en) = eye {
|
||||
// Layer style eye switch in the A/V column, like AE.
|
||||
let er = Rect::from_center_size(pos2(cw.av + 10.0, cy), vec2(17.0, 17.0));
|
||||
lp.rect_stroke(er.shrink(1.5), 2.0, Stroke::new(1.0, t.separator), StrokeKind::Inside);
|
||||
if widgets::icon_toggle(ui, er, Icon::Eye, *en, &t, egui::Id::new(("geye", uid)), None).clicked() {
|
||||
actions.push(("layer.style.toggle".into(), json!({"layer": layer.id.0, "style": uid})));
|
||||
}
|
||||
app.auto.add(&format!("timeline.group.{uid}.eye"), er, name);
|
||||
}
|
||||
lp.text(pos2(indent + 10.0, cy), Align2::LEFT_CENTER, name, Tokens::ui(12.0), t.text);
|
||||
text_anim_popups(app, ui, &lp, layer, *uid, cw.switches, cy, &mut actions);
|
||||
|
||||
Reference in New Issue
Block a user