X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.plant3d%2Fscl%2Fplant3d%2Futils%2FLoader.scl;fp=org.simantics.plant3d%2Fscl%2Fplant3d%2Futils%2FLoader.scl;h=a039f7e7b5c3620418e4ab741f800b7199cdccd7;hb=8da9a6a979f4513be2e0ab5533acc5e4763cf00e;hp=0000000000000000000000000000000000000000;hpb=0602e0f78f22aaf27211ef1de801ddc631e103c0;p=simantics%2F3d.git diff --git a/org.simantics.plant3d/scl/plant3d/utils/Loader.scl b/org.simantics.plant3d/scl/plant3d/utils/Loader.scl new file mode 100644 index 00000000..a039f7e7 --- /dev/null +++ b/org.simantics.plant3d/scl/plant3d/utils/Loader.scl @@ -0,0 +1,13 @@ +import "Simantics/DB" +import "plant3d/scenegraph/P3DRootNode" +import "./P3DScriptNodeMap" +import "JavaBuiltin" + +importJava "org.simantics.plant3d.scl.SCLUtil" where + + loadReadOnly :: Resource -> P3DRootNode + load :: Resource -> P3DScriptNodeMap + +safeCoerce :: a -> Maybe b +safeCoerce a = do + (Just $ unsafeCoerce a) `catch` (\(_ :: Exception) -> Nothing) \ No newline at end of file