android-3D-model-viewer icon indicating copy to clipboard operation
android-3D-model-viewer copied to clipboard

How to upload texture from github without CreateChooserDialog

Open rutraq opened this issue 5 years ago • 5 comments

Hello. I have a problem. I want just to send a uri and upload the texture of a 3D model. But something goes wrong. Please help me how to do this without this AlertDialog. Probably I needn't a function ContentUtils.createChooserDialog XDiWYaaTXgk

rutraq avatar Oct 05 '20 19:10 rutraq

hi. if you want to update an object texture you can code something like this

obj.getMaterial().setTextureData(IOUtils.read(ContentUtils.getInputStream(uri)))

This code updates the material texture data with the raw bytes of your bimap. Mind that the object must have texture coordinates for that to work.

Hope this helps

andresoviedo avatar Oct 10 '20 15:10 andresoviedo

hi. if you want to update an object texture you can code something like this

obj.getMaterial().setTextureData(IOUtils.read(ContentUtils.getInputStream(uri)))

This code updates the material texture data with the raw bytes of your bimap. Mind that the object must have texture coordinates for that to work.

Hope this helps

Don't understand exactly what I need to do

rutraq avatar Oct 12 '20 15:10 rutraq

Just need like this without ChooserDialog. But in this case it's doesn't working image

rutraq avatar Oct 12 '20 15:10 rutraq

Hi. The code you sent I think it should work

Would you please paste The logcat output?

andresoviedo avatar Oct 13 '20 06:10 andresoviedo

Hi. The code you sent I think it should work

Would you please paste The logcat output?

Hi. It's don't work( image

rutraq avatar Oct 13 '20 10:10 rutraq