Automate Turbosquid uploading with Python script
-
Hi,
I'd like a python script to automate Turbosquid uploading. I've emailed Maxon and they said I need to "pass a basecontainer with the settings to the SaveDocument method". My speciality is 3d modeling - does anyone one know an available python Cinema 4d programer I can hire?
Thanks,
Jasen -
Hi JasenLux, thanks for reaching out us.
I've moved the question to the Plugin Discussion section where our community might answer back to you and offer help.
That said, rest assured that the feasibility of the script mostly depends on the fact that TurboSquid provides some "API" to grant files being uploaded automatically or have some formatted HTML POST syntax that must be used.Best, R.
-
Hi,
@r_gigante already has given you an answer to your question, but I feel some other points are worth mentioning:
- Developers usually provide an API if they want you to be able to use their service from your own code. I do not think that TurboSquid does provide an API. The first thing that comes up when googling "turbosquid api" is the sketchfab API.
- You usually can force your way into a service even if the developers do not provide an API (the whole metadata harvesting industry relies on that), but this comes at a cost.
- Websites usually do not like it if you interact with them with bots outside of APIs and what they allow in their robots.txt. In the best case scenario you get throttled or cache served, in the worst case scenario IP or account banned.
My advice would be: Write a mail to TurboSquid, since you are a customer and business partner of them, and detail your problem and ask for solutions, i.e. what APIs they do offer. If they do not offer an APIs you can still realise your feature, but should be aware that this will be a continuously development effort, since their internal API - the request and response syntax of their servers - could change on a daily basis (some companies actually do that on a daily basis, just to throw off bots).
After you have sorted that out you can look for a developer. But you should look for a web developer, since this is a web service and not a computer graphics / c4d problem.
PS: You should take down your personal information in your first posting, this site is infested with bots.
Cheers
zipit -
@r_gigante Thank you
-
Zipit,
I did a support Chat with Brittney at Turbosquid and she is going to pass the message along to the Turbosquid Developers Team.
Another part of the script is rendering out a few frames at different sizes - for example a thumbnail at 1200 x 1200. Then 5 more thumbnails at 1920 x 1080. Then two wireframes. I'd pay someone to write it if I could afford the fee.
Thanks,
Jasen -
Hi,
I would really put the c4d part (generating the metadata and invoking the whole process on a c4d, obj, etc. file) on the back burner. That part is sort of trivial and can be sorted out relatively easily. I would focus first on the TurboSquid part. The main points would be:
- Get some sort of confirmation that they do not have a bot detection running (which seems unlikely for a service of this scope) or guidelines on how to prevent to be flagged, so that your account won't be banned.
- Ask nicely for tips on how to use their service programmatically.
The more work you put into that stuff the more likely you are going to find a dev who is willing to take the task. Otherwise things will probably more expensive than you would anticipate. There is also @Cairyn here in the forum, you could ask him if he would be interested. I think he does some freelance work. But then again, a web developer is probably cheaper, since there are so many of them.
Cheers
zipit -
I just had a quick look at their website, their robots.txt[1] is super strict, and I wouldn't be suprised if they had measures running to enforce these rules. I also peeked into their upload process via chrome dev tools and there is a lot of stuff going on. Not sure if this was all upload related, but there was a s****load of requests and responses going in and out just for loading up a single file. Probably not something you would be willing to reverse engineer for a freelancer fee. I do not mean this judgmental, this is just an honest evaluation of your feature request and the money you are probably willing to pay.
-
@zipit thanks - I'll reach out to @Cairyn because even if I automated the rendering aspect it would be great... Turbosquid wants you to "current state to object" your scene to submit for Turbosquid Pro. I'd want for the script to take a .c4d file and it's textures - and then make a few new folders on my desktop. The Turbosquid Pro upload has specific renders settings: thumbnail 1200 x 1200 - 5x more thumbnails at 1920 x 1080 - 2 more wire frames (with 3 specifically color requirements for background color, object color and wireframe line color) - a 36 frame turn around. Tags and description...
Now this is not the best file for the C4D user - he/she wants the source file before I "current state to object" everything... So this C4D is not for Turbosquid Pro - but it's for the C4D guys...
Then I need a low poly version - this is a hard request to automate...
Even if in the morning I've got a bunch or renders done over night - and it's all automated - I'd be very happy.
Thanks,
Jasen -
@JasenLux said in Automate Turbosquid uploading with Python script:
Even if in the morning I've got a bunch or renders done over night - and it's all automated - I'd be very happy.
A more or less automated rendering could be achieved by using the native Render Queue if you create your files with some rigid discipline.
Start out by creating a base C4D file that contains the necessary cameras and render settings with some appropriate naming. The render settings should be hierarchically ordered, with the basic setting on top and all the different resolutions as children of that setting, with only the necessary settings overwritten.
If there are TurboSquid requirements that you cannot achieve with render settings, you can create some takes that offer the necessary changes (this might be the most difficult part, as you may need to overwrite parameters in tags that you don't have in the basic file, but only create with your project, but that very much depends on what you really need to change, I am not familiar with the TurboSquid requirements.
Once that file is set up, you only need to copy your master data into that, save it under the appropriate name, and in the evening add it a few times to the render queue. As you can select the take, rendersetting, and camera for each job, the prepared file can be rendered out without saving multiple versions of it first.
(That sounds like some script would make it easier, too, but I just fleetingly looked at the Python and C++ documents about BatchRender, and it doesn't look as if you can control the job settings individually?)
I recognize that this would only be good for the rendering part, but... if TurboSquid doesn't offer an official, supported web interface for uploading, then as @zipit said, "hacking" into the protocols would be just one gigantic mess that you don't really want to spend money on as it is very likely to break at the first opportunity.
Thanks for mentioning me