2
0
Nicolas Cannnasse 8 жил өмнө
parent
commit
a48900f557
2 өөрчлөгдсөн 4 нэмэгдсэн , 4 устгасан
  1. 2 2
      bin/hide.js
  2. 2 2
      hide/view/Model.hx

+ 2 - 2
bin/hide.js

@@ -16636,7 +16636,7 @@ hide_view_Model.prototype = $extend(hide_view_FileView.prototype,{
 	,init: function() {
 		var _gthis = this;
 		this.obj = this.scene.loadModel(this.state.path);
-		this.scene.s3d.addChild(this.obj);
+		new h3d_scene_Object(this.scene.s3d).addChild(this.obj);
 		this.control = new h3d_scene_CameraController(null,this.scene.s3d);
 		this.resetCamera();
 		this.tree.init();
@@ -16703,7 +16703,7 @@ hide_view_Model.prototype = $extend(hide_view_FileView.prototype,{
 		return anims;
 	}
 	,getSceneElements: function(id) {
-		var root = this.obj;
+		var root = this.obj.parent;
 		var path = id == null ? "" : id + "/";
 		if(id != null) {
 			var _g = [];

+ 2 - 2
hide/view/Model.hx

@@ -20,7 +20,7 @@ class Model extends FileView {
 	
 	function init() {
 		obj = scene.loadModel(state.path);
-		scene.s3d.addChild(obj);
+		new h3d.scene.Object(scene.s3d).addChild(obj);
 		control = new h3d.scene.CameraController(scene.s3d);
 		resetCamera();
 		tree.init();
@@ -66,7 +66,7 @@ class Model extends FileView {
 	}
 
 	function getSceneElements( id : String ) {
-		var root = obj; 
+		var root = obj.parent; 
 		var path = id == null ? "" : id+"/";
 		if( id != null ) {
 			var parts = [for(p in id.split("/")) Std.parseInt(p)];