How to directly load database materials into exporter?

A forum for exporter development discussion.
Post Reply
7 posts • Page 1 of 1
User avatar
Whaat
Developer
Posts: 1827
Joined: Fri Dec 22, 2006 6:15 am
Location: Canada
Contact:

How to directly load database materials into exporter?

Post by Whaat » Fri Sep 04, 2009 8:21 am

Is there a way to download a PIGM file from the internet and load it into the exporter without the user having to save the PIGM to a specific location and then browse to load it? I think Maxigo does this but I am a bit stumped for how to do this using Ruby and Javascript.

User avatar
benn
Posts: 1046
Joined: Mon Dec 08, 2008 12:47 pm
Location: Wellington, New Zealand
Contact:

Re: How to directly load database materials into exporter?

Post by benn » Fri Sep 04, 2009 10:29 am

Use net/http to download the file. Use the json code to search for materials, then fire net/http, or open-uri, then you're good to go :)

User avatar
suvakas
3rd Place Winner
Posts: 2613
Joined: Mon Sep 04, 2006 11:08 pm
Location: Estonia
Contact:

Re: How to directly load database materials into exporter?

Post by suvakas » Fri Sep 04, 2009 6:46 pm

Hey Whaat,
Maxigo downloads pigm from the database to a temporary folder. That's why the saving process seems transparent for the user. I never ask for the location to save, but using a temp folder instead.

User avatar
Whaat
Developer
Posts: 1827
Joined: Fri Dec 22, 2006 6:15 am
Location: Canada
Contact:

Re: How to directly load database materials into exporter?

Post by Whaat » Sat Sep 05, 2009 2:46 am

suvakas wrote:Hey Whaat,
Maxigo downloads pigm from the database to a temporary folder. That's why the saving process seems transparent for the user. I never ask for the location to save, but using a temp folder instead.
Yes, I assumed that. My problem is that I don't know how to download to the temporary folder. I don't know how to control the path for the download.

@benn: Thanks, but your post was not very helpful. I'm not a programmer by trade, remember? :roll: I need it spelled out for me. Can you give some working sample code?

User avatar
fused
Developer
Posts: 3648
Joined: Fri Sep 22, 2006 7:19 am
Location: Berlin, Germany
3D Software: Cinema 4D

Re: How to directly load database materials into exporter?

Post by fused » Sat Sep 05, 2009 2:48 am

im looking for a way to download stuff via c++.

if anyone know one, id appreciate a hint :)

User avatar
dougal2
Developer
Posts: 2532
Joined: Wed Nov 15, 2006 8:17 am
Location: South London

Re: How to directly load database materials into exporter?

Post by dougal2 » Sat Sep 05, 2009 3:23 am

fused wrote:im looking for a way to download stuff via c++.

if anyone know one, id appreciate a hint :)
libcurl ?

User avatar
fused
Developer
Posts: 3648
Joined: Fri Sep 22, 2006 7:19 am
Location: Berlin, Germany
3D Software: Cinema 4D

Re: How to directly load database materials into exporter?

Post by fused » Sat Sep 05, 2009 4:07 am

ah yes. now you said it i recall Nick said it once...

thanks a million! :)

Post Reply
7 posts • Page 1 of 1

Who is online

Users browsing this forum: No registered users and 4 guests