Skip to content

Commit

Permalink
Fixed GLTF import
Browse files Browse the repository at this point in the history
  • Loading branch information
tentone committed Jul 3, 2017
1 parent 6cb7561 commit 6a3fc01
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion source/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,10 @@ Editor.loadGeometry = function(file, onLoad)
{
if(gltf.scene !== undefined)
{
Editor.addToScene(gltf.scene);
for(var i = 0; i < gltf.scene.children.length; i++)
{
Editor.addToScene(gltf.scene.children[i]);
}
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion source/core/objects/Scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ Scene.prototype.setFogMode = function(mode)
*/
Scene.prototype.toJSON = function(meta)
{
if(this.parent !== null && this.parent.type !== "Program")
if(this.parent.type !== "Program")
{
this.type = "Group";
console.warn("nunuStudio: Scene is not on top level serializing as Group.");
Expand Down

0 comments on commit 6a3fc01

Please sign in to comment.