How to edit more complex 3D options through API?


(Klaasnienhuis) #61

It's definitely true that API fixes are not top priority.


(Tribble42) #62

Hi Klaas,

The error is legit as you're patching the options with a texture object without an uid, we can't accept an empty reference.
Regarding the matcap issue {"detail":{"materials":["Texture(s) with uid 35c4d334eded44d8a657f390954a32dd doesn't exist."]}} error we still haven't shipped the fix so I'm wondering what made you say that we fixed it :slight_smile: . Several of our staff are on vacations and we expect a release this week. I'm sorry for the delay :confused:


(Tribble42) #63

Also, as a general answer to this thread,

We don't have a future proof / well maintained solution to handle model options, use V2 at your own risk.
There are plans to improve the v3 options but nothing short term and it's not a priority.

Best,

Fred


(Klaasnienhuis) #64

Hi @tribble42, You're right the error is legit. I just don't remember me actually working around that by removing the texture reference. I recall that even without the texture reference an error still occurred. That's why I thought that something had been done about this.
But I can actually work around that Matcap thing. But the None is not of type u'string' thing baffles me. I do'nt know how to work around that.
Looking forward to the API update


(Klaasnienhuis) #65

Hi @tribble42 and @stephomi,
any word on a fix for the {"detail":{"materials":["Failed to save option materials : None is not of type u'string'."]}} issue?
Things are starting to become critical with my project.
Klaas


(Klaasnienhuis) #66

@tribble42, @stephomi, just to keep this thread alive. I've checked yesterday, and the issue still persist. This makes the patch API feature useless for materials. I am able to patch other stuff though, like lights, environment, post processing and so on.


(Stephomi) #67

@tribble42 promised me to answer tomorrow :slight_smile:

I'm not really knowledgeable at all concerning the backend api, but for now make sure to save the models that you are trying to patch in the editor first (that way their model options will be up to date).
You'll only be able to patch "recent" model (meaning that their structure should receive a correct validation from our backend when patching them). That's why v2 end point is "unofficially" supported : it's limited.
If you can't patch a recently uploaded/saved model then there might be an issue on our end, but I'll let tribble42 investigate.


(Tribble42) #68

Hi,

I just uploaded a model (with materials/textures), fetched its options and patched them and didn't get any error.
I used your js script (but removed the part where you set a texture with a null uid because that does not make any sense and cannot work, hence the Failed to save option materials : None is not of type u'string' error)

We used indeed to have a matcap/texture issue but it has been fixed shortly after my last message 16d ago. ("Texture(s) with uid XXX doesn't exist.")

As stephomi says, if you get format errors for older models, try to save the model in the editor to refresh its options. If you try to get/patch options on a few month's old model without doing this, you're likely to get errors.

So to conclude, other than the matcap bug that has been fixed, there does not seem to be another issue on our end


(Kanoute13) #69

Hi guys,

i am facing the same problem, i cannot change the textures with the normal viewer API.

I am trying the update texture api function in order to achieve to change the textures manually and cannot work.

I am answering if it’s a way to do it through the CORS url directly and this think does not happening.

Does someone made it so far?

Please HELP!

Dimitris