stef-levesque / vscode-3dviewer

Preview 3D meshes in VSCode
MIT License
96 stars 20 forks source link

FR: Open the current document in the viewer #8

Closed gerroon closed 3 years ago

gerroon commented 5 years ago

Hi

I am wondering if it is also possible to open the currently opened .obj(or other formats) document in the 3d viewer?

Here is how the use case would be, the user drags and drops an .obj file from the system's explorer or the file browser for inspection. Then fire "ctrl-shift-p -> open in 3d viewer"

At the moment the mesh file has to be in the opened folder inside Vscode.

thanks

stef-levesque commented 4 years ago

Hey, sorry for not maintaining the repo over the last few months.

The new API for custom editor allows to do that. You can track the progress in the custom-editorbranch

I'll submit an update for the extension when the proposed API is approved

stef-levesque commented 4 years ago

@mjbvz correct me if I'm wrong, but I don't thing that extensions can receive drag-and-drop event.

mjbvz commented 4 years ago

No, this is not currently possible. Dragging and dropping a file onto a webview should currently open that file in VS Code

ForrestPi commented 4 years ago

when I use vscode in remote , I cannot open the obj file in the remote machine server .

stef-levesque commented 3 years ago

Closing this issue, as drag-and-drop is not something that VSCode support. @ForrestPi I'm afraid the libs I'm using to display the mesh won't be compatible with VSCode remote feature, unfortunately.