Batch processing with data API v3 (camera position, fov and other settings)

For some of our e-com clients we ran into a situation where we have to change certain editable settings for hundreds of models. Searching thru forum it seemed there was a way to do this with v2 api by patching options directly but that doesn’t seem to work any longer and we don’t see any viable ways to do it with v3 api.

Are we missing something there?

What’s the official suggested way to modify hundreds and possibly thousands model settings ? How do we batch that?

It depends on what you need; you can only edit background, environment, orientation, and renderer with an options PATCH.

Yes. That’s what the official v4 API suggest. But unfortunately, in practice, we need to modify a lot more than that. Even when you have 10-20 objects that you’d want to integrate to the WEB and support design changes or other client requests it becomes impossible to do.

Let’s say, we take one object and tune everything, lighting (env and all of the lights), initial camera position, a bunch of post processing parameters and then need to replicate it to all of the models, so the web store looks consistent. Then clients comes over and asks to adjust some things, again, you do it on a single mode but then want to use the same settings for another set of models.

There are also cases when it’s not that trivial. Let’s say, we make an adjustment to some post effects like tone mapping, to make the background look a certain way, but then need to re-adjust material properties accordingly, for instance, multiply all current Albedo and Specular by 0.75. Meaning, it can’t be just a simple kind of preset but rather something that also relying on the way a set of models are setup.

Ideally, we should be able to modify anything you can modify by hand on Sketchfab when setting up a model with an API. Otherwise I am not sure how you can organize the whole e-commerce integration in a production oriented way.

It also doesn’t help that some things like light position and directions or even orientation itself doesn’t have any numeric representation. You can only modify those things with gizmos but you can’t copy-paste values from a different model.

It looked like API v2 hack was the best solution before it stopped working.

Then there was less ideal but kind of usable script for Tampermonkey:
https://raw.githubusercontent.com/PadreZippo/sketchfab-editor-presets
But that stopped working at some point as well. Because some changes on the client JavaScript side made it so that setJSON doesn’t pass validation of the data returned by getJSON. So the only other is a super hacky option that requires a custom browser client and patching .js files with disabled validation. But this method is semi-manual and definitely not how this should be done.

1 Like

I understand, but right now our API does not support such changes, sorry.