petrbroz / vscode-forge-tools

Visual Studio Code extension for accessing Autodesk Forge services and content.
https://marketplace.visualstudio.com/items?itemName=petrbroz.vscode-forge-tools
MIT License
74 stars 17 forks source link

Translating multiple objects by selecting multiple nodes #26

Closed fpmalard closed 4 years ago

fpmalard commented 4 years ago

Screen Shot 2020-06-10 at 13 50 33

petrbroz commented 4 years ago

Good idea, the same functionality would be nice for other operations as well, e.g., deleting multiple objects. I'll need to see if vscode API supports multi-selection.

petrbroz commented 4 years ago

Still waiting to hear back from vscode but at this point it looks like there's no official support for handling multi-selections in custom trees: https://github.com/microsoft/vscode/issues/99767. Marking as wontfix for now.

ofcdesk commented 4 years ago

What if you do per bucket? User right click the bucket then, using the same input box you were using to select mime-type for SVF download, you ask them for a name filter (default to " . "). Then, via code, you collect the folder objects based on that. Not ideal but since there is no multi-select feature, it could temporarily work.

petrbroz commented 4 years ago

That would probably work but it seems like a very specific, niche use case hack. I don't think that users would often need to translate all (or wildcard-ed) objects in a bucket. The same thing could probably be done easily using the command line tools, for example, with this bash command:

for object_id in $(forge-dm list-objects my-bucket --short | grep ".sat")
do
    urn=$(echo $object_id | base64 | sed 's/=+$//')
    forge-md translate $urn
done
petrbroz commented 4 years ago

Closing this for now. If this kind of feature is requested by more users, we can reopen it.