OpenToLibrary opens object(s) from given file into the scene's Library using a decoder based on the file extension. The library key name must be unique, and is given by libnm -- if empty, then the filename (only) without extension is used. Supported formats include: .obj = Wavefront OBJ format, inc
(fname string, libnm string)
| 195 | // |
| 196 | // must have same name as .obj, or a default material is used. |
| 197 | func (sc *Scene) OpenToLibrary(fname string, libnm string) (*Group, error) { |
| 198 | dfs, fnm, err := fsx.DirFS(fname) |
| 199 | if err != nil { |
| 200 | return nil, err |
| 201 | } |
| 202 | return sc.OpenToLibraryFS(dfs, fnm, libnm) |
| 203 | } |
| 204 | |
| 205 | // OpenToLibraryFS opens object(s) from given file in the given filesystem into the scene's Library |
| 206 | // using a decoder based on the file extension. The library key name |
nothing calls this directly
no test coverage detected