Create Shapes/Masks from Text in the layer context menu (#872)

The engine's layer.create has shapesFromText and masksFromText, but the
timeline and Composition context menus only offered Create Shapes from Vector
Layer, so text could not be converted to editable outlines from the UI. Gate
the two text conversions on a text layer (LayerMenuCaps replaces the lone
vector flag), beside the vector one.
This commit is contained in:
Vikram Bhaskaran
2026-10-13 01:47:19 +11:00
parent 9efe75330c
commit 3e900db974
3 changed files with 86 additions and 11 deletions
+10 -5
View File
@@ -1223,11 +1223,16 @@ pub fn show(app: &mut EffectcraftApp, ui: &mut egui::Ui, rect: Rect) {
if context_layers.is_empty() {
ui.label(crate::i18n::tr("No unlocked layer selected"));
} else {
let vector = context_layers
.iter()
.filter_map(|id| comp.layer(effectcraft_engine::project::LayerId(*id)))
.any(|layer| super::timeline::vector_footage_layer(&app.session.project, layer));
super::timeline::layer_menu(ui, &context_layers, vector, &mut context_actions);
let caps = context_layers.iter().filter_map(|id| comp.layer(effectcraft_engine::project::LayerId(*id))).fold(
super::timeline::LayerMenuCaps::default(),
|mut caps, layer| {
let c = super::timeline::LayerMenuCaps::of(&app.session.project, layer);
caps.vector |= c.vector;
caps.text |= c.text;
caps
},
);
super::timeline::layer_menu(ui, &context_layers, caps, &mut context_actions);
}
ui.separator();
if ui.button(copy_frame).clicked() {