Procházet zdrojové kódy

Material: fix if editor

lviguier před 2 měsíci
rodič
revize
c839ff5399
1 změnil soubory, kde provedl 9 přidání a 9 odebrání
  1. 9 9
      hrt/prefab/Material.hx

+ 9 - 9
hrt/prefab/Material.hx

@@ -814,15 +814,6 @@ class Material extends Prefab {
 
 
 		return true;
 		return true;
 	}
 	}
-	#end
-
-	public static function hasOverride(p: Prefab) {
-		if(Lambda.exists(p.children, c -> Std.isOfType(c, Material) && c.enabled))
-			return true;
-		if(Type.getClass(p.parent) == Object3D)
-			return Lambda.exists(p.parent.children, c -> Std.isOfType(c, Material) && c.enabled);
-		return false;
-	}
 
 
 	public static function findMaterialLibraryRefs(libPath : String, matName : String) : Array<hide.view.RefViewer.Reference> {
 	public static function findMaterialLibraryRefs(libPath : String, matName : String) : Array<hide.view.RefViewer.Reference> {
 		// Find every material.props file with ref of the material library that we're searching
 		// Find every material.props file with ref of the material library that we're searching
@@ -929,6 +920,15 @@ class Material extends Prefab {
 
 
 		return refs;
 		return refs;
 	}
 	}
+	#end
+
+	public static function hasOverride(p: Prefab) {
+		if(Lambda.exists(p.children, c -> Std.isOfType(c, Material) && c.enabled))
+			return true;
+		if(Type.getClass(p.parent) == Object3D)
+			return Lambda.exists(p.parent.children, c -> Std.isOfType(c, Material) && c.enabled);
+		return false;
+	}
 
 
 	static var _ = Prefab.register("material", Material);
 	static var _ = Prefab.register("material", Material);
 }
 }