Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for assets uploading #271

Open
keianhzo opened this issue Mar 13, 2024 · 0 comments
Open

Add support for assets uploading #271

keianhzo opened this issue Mar 13, 2024 · 0 comments

Comments

@keianhzo
Copy link
Contributor

Is your feature request related to a problem? Please describe.
After adding support for scene uploading there is still a feature missing for full parity with Spoke: Assets uploading. In spoke you can drag and drop and asset to the "My assets" panel that will be uploaded to your instance. Once uploaded you can:

  • Drag and drop it which will create an entity with the corresponding media component attached
  • Copy the URL and paste it in a URL field of any component
    We should have a similar workflow in the Blender add-on so users can avoid having to manually upload media to their instance through Spoke.

Describe the solution you'd like
We can have a similar panel to the scenes one where we can list all the assets in your instance, upload or delete assets. Not sure if we can add viewport drag & drop support and create an empty+component for that media but at least we should allow to easily copy the asset URL so the user can paste it in the component URL field. Blender supports copying a property if you do a Ctrl/Cmd+C while hovering it. We should check if that's intuitive enough or it's wort adding a specific button or a right click modal to make it more obvious.

Additional context
We already have a function to upload media to the Hubs instance that we use for scene GLBs upload: https://github.com/MozillaReality/hubs-blender-exporter/blob/28cb74178066f2da50b20bebfc6637a3afea7c7c/addons/io_hubs_addon/api.py#L30 We can probably repurpose that one for generic media uploading. That is based on this Spoke code: https://github.com/mozilla/Spoke/blob/9fe7af7e0b4eab5908d1ada17c06aab223c978ce/src/api/Api.js#L372
There is also an endpoint for assets deletion, we should implement an equivalent function for that one in Blender: https://github.com/mozilla/Spoke/blob/9fe7af7e0b4eab5908d1ada17c06aab223c978ce/src/api/Api.js#L1189

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant