Module: OpenUSD::Format::Usda::Reader

Defined in:
lib/openusd/format/usda/parser.rb

Overview

File reader adapter for the format registry.

Class Method Summary collapse

Class Method Details

.read(path) ⇒ Layer

Read a USDA layer from a filesystem path.

Returns:



330
331
332
333
334
# File 'lib/openusd/format/usda/parser.rb', line 330

def read(path)
  Parser.parse(File.binread(path).force_encoding(Encoding::UTF_8), file: path)
rescue Errno::ENOENT
  raise CompositionError, "layer not found: #{path}"
end