feat(plugin): ModuleEvent::PluginFileDialog for native file import
Add-ons had no way to request a file picker — only the host's own Open dialog. PluginFileDialog lets a plugin tool ask the host to open a native picker; on selection the host dispatches "<command> <path>" back to the plugin with original case preserved (bypassing the command-line upper-casing that mangles case-sensitive paths on Linux/macOS). The demo plugin gains an Import tool exercising it. Part of the #100 extensibility epic (surfaced in #106). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
844069b4ef
commit
50825b6346
8 changed files with 107 additions and 7 deletions
|
|
@ -1269,6 +1269,12 @@ pub fn module_event_to_message(event: ModuleEvent) -> Message {
|
|||
ModuleEvent::ClearModels => Message::ClearScene,
|
||||
ModuleEvent::SetWireframe(w) => Message::SetWireframe(w),
|
||||
ModuleEvent::ToggleLayers => Message::ToggleLayers,
|
||||
// Needs the tool context + async picker — route through the normal
|
||||
// ribbon-click handler rather than a direct 1:1 message.
|
||||
e @ ModuleEvent::PluginFileDialog { .. } => Message::RibbonToolClick {
|
||||
tool_id: String::new(),
|
||||
event: e,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue