2
0
Эх сурвалжийг харах

Merge branch 'master' of https://github.com/HeapsIO/hide

Tom SPIRA 6 жил өмнө
parent
commit
95aa1f50bc

+ 5 - 2
bin/defaultProps.json

@@ -8,6 +8,9 @@
 	// custom renderers in the form of { "Name" : "MaterialSetupClassName" }
 	"renderers" : {},
 
+	// set default renderer setup
+	"scene.renderProps" : null,
+
 	// model names that are hidden when open in viewer
 	"scene.autoHide" : [],
 	// background color for 2D/3D viewer
@@ -96,8 +99,8 @@
 	"fx.shaders": [
 		"h3d.shader.AnimatedTexture",
 		"h3d.shader.ColorAdd"],
-		
-	// DomKit css files list	
+
+	// DomKit css files list
 	"domkit.css" : [],
 
 	// reserved for internal ide usage

+ 1 - 1
hide/Ide.hx

@@ -615,7 +615,7 @@ class Ide {
 		var file = path.pop();
 		var c = isWindows ? "\\" : "/";
 		var path = path.join(c);
-		var e = new Element('<input type="file" style="visibility:hidden" value="" nwworkingdir="$path" nwsaveas="$path$c$file"/>');
+		var e = new Element('<input type="file" style="visibility:hidden" value="" nwworkingdir="$path" nwsaveas="$file"/>');
 		e.change(function(_) {
 			var file = makeRelative(e.val());
 			e.remove();

+ 2 - 2
hide/view/Model.hx

@@ -97,7 +97,7 @@ class Model extends FileView {
 		eventList = element.find(".event-editor");
 
 		if( rootPath == null )
-			rootPath = config.get("model.renderProps");
+			rootPath = config.get("scene.renderProps");
 
 		if( rootPath != null )
 			root = ide.loadPrefab(rootPath, hxd.prefab.Library);
@@ -309,7 +309,7 @@ class Model extends FileView {
 		new h3d.scene.Object(scene.s3d).addChild(obj);
 
 		var autoHide : Array<String> = config.get("scene.autoHide");
-		
+
 		function hidePropsRec( obj : h3d.scene.Object ) {
 			for(n in autoHide)
 				if(obj.name != null && obj.name.indexOf(n) == 0)

+ 2 - 1
hide/view/Particles3D.hx

@@ -251,7 +251,7 @@ class Particles3D extends FileView {
 						model.playAnimation(anim);
 					} catch( e : Dynamic ) {
 						ide.error(e);
-						props.anim = e;
+						props.anim = null;
 					}
 				}
 				if( model != null ) {
@@ -277,6 +277,7 @@ class Particles3D extends FileView {
 					var anims = scene.listAnims(props.model);
 					new Element('<option value="">-- none --</option>').appendTo(anim);
 					for( a in anims ) {
+						var a = ide.makeRelative(a);
 						var name = scene.animationName(a);
 						new Element('<option value="$a" ${a == prev ? "selected='selected'" : ""}>$name</option>').appendTo(anim);
 					}