profburnes / blender-webgl-exporter

Automatically exported from code.google.com/p/blender-webgl-exporter
0 stars 0 forks source link

Problem loading multiple models exported with Native WebGL. #8

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Launch Blender
2. Add a "Cone" mesh in the scene (ie. at the right side of the "Cube")
3. Select "Native WebGL" and "Export ALL scene objects", before pressing the 
Export button.

What is the expected output? What do you see instead?
I see that each object is generated in a different "javascript" file (i.e: 
"Cube.js" and "Cone.js"). 
But when I try to include the 2 models in the same HTML page (with 2 "script" 
tags), the second loaded script replaces the model loaded previously. Although 
each model is loaded in a different property of the "BlenderExport" object 
("BlenderExport.Cube" and "BlenderExport.Cone") , the "BlenderExport" object 
holder is reinitialized in all scripts, because of the first line:
var BlenderExport = {};

In general, each time I update/export the model/s, I have to manually comment 
the first line for all generated scripts (except for the first script that is 
included in the HTML page).

When exporting all scene objects, I would prefer:
- removal of "BlenderExport" object holder (it is really needed?).
- or generate the object scripts without the reinitialization of 
"BlenderExport" object (the initialization code could be loaded from another 
static script like "BlenderExport.js", that you may provide as a library, or 
generate at export time).
- or only 1 javascript with the initialization of "BlenderExport" object, and 
all the scene objects in the same file.

What version of the product are you using? On what operating system?
- WebGLExport.py (r17)
- Blender 2.49b
- Ubuntu Linux 10.4

Please provide any additional information below.

Original issue reported on code.google.com by jordi.ma...@gmail.com on 18 Jul 2010 at 11:08