Browse Source

L3D: Minor improvements

trethaller 6 years ago
parent
commit
47f3c38bb1
2 changed files with 3 additions and 1 deletions
  1. 2 0
      hide/comp/SceneEditor.hx
  2. 1 1
      hide/view/l3d/Level3D.hx

+ 2 - 0
hide/comp/SceneEditor.hx

@@ -782,6 +782,8 @@ class SceneEditor {
 	public function addObject( e : PrefabElement ) {
 	public function addObject( e : PrefabElement ) {
 		var roots = e.parent.children;
 		var roots = e.parent.children;
 		var parentCtx = getContext(e.parent);
 		var parentCtx = getContext(e.parent);
+		if(parentCtx == null)
+			parentCtx = context;
 		e.makeInstance(parentCtx);
 		e.makeInstance(parentCtx);
 		var local3d = getSelfObject(e);
 		var local3d = getSelfObject(e);
 		var parentObj = local3d != null ? local3d.parent : null;
 		var parentObj = local3d != null ? local3d.parent : null;

+ 1 - 1
hide/view/l3d/Level3D.hx

@@ -553,7 +553,7 @@ class Level3D extends FileView {
 	}
 	}
 
 
 	function refreshSceneFilters() {
 	function refreshSceneFilters() {
-		var filters = ["model", "polygon", "box", "instance", "light"];
+		var filters = ["terrain", "model", "polygon", "box", "instance", "light"];
 		for(sheet in getCdbTypes()) {
 		for(sheet in getCdbTypes()) {
 			filters.push(getCdbTypeId(sheet));
 			filters.push(getCdbTypeId(sheet));
 		}
 		}