model-viewer icon indicating copy to clipboard operation
model-viewer copied to clipboard

The editor doesn't export/download the scene after adding variants to the model.

Open plutorkhan opened this issue 3 years ago • 3 comments

I want to apply different texture variants to a hottub 3d model via model-viewer editor. I could import and add textures per variant, but couldn't download the scene. I've tested other glb 3d models the same bug happens again. The console logs:

(in promise) TypeError: Cannot read properties of undefined (reading 'material') at space-opera.js:88772:60 at Mesh.traverse (space-opera.js:33845:3) at Group.traverse (space-opera.js:33851:18) at GLTFExporterMaterialsVariantsExtension.beforeParse (space-opera.js:88763:20) at space-opera.js:88132:27 at GLTFWriter._invokeAll (space-opera.js:88178:4) at GLTFWriter.processInput (space-opera.js:88130:8) at GLTFWriter.write (space-opera.js:86499:8) at GLTFExporter.parse (space-opera.js:86187:10) at space-opera.js:90230:26

I used chrome and edge, the results are the same.

plutorkhan avatar May 04 '22 22:05 plutorkhan

It's working for me; can you please list specific repro steps? Something like

  1. load this model -
  2. click X button
  3. click y button ... n) click download scene

elalish avatar May 05 '22 16:05 elalish

I had this issue as well. To get around it I had to create the variants in the model editor and import each material as I created a variant. Our Blender developer suggested that materials baked into the model may be to large for the 'download scene' to handle.

jgboulay avatar Jun 08 '22 16:06 jgboulay

Perhaps, but I can tell you exactly what's going on if you can give me reliable repro steps.

elalish avatar Jun 08 '22 17:06 elalish