]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.plant3d/scl/plant3d/utils/Loader.scl
Additional SCL Bindings to G3D and Plant3D classes
[simantics/3d.git] / org.simantics.plant3d / scl / plant3d / utils / Loader.scl
diff --git a/org.simantics.plant3d/scl/plant3d/utils/Loader.scl b/org.simantics.plant3d/scl/plant3d/utils/Loader.scl
new file mode 100644 (file)
index 0000000..a039f7e
--- /dev/null
@@ -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