Skip to content

mewspring/blend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

blend

Build Status Coverage Status GoDoc

The blend project provides support for reading blend files, which are used by Blender.

Documentation

Documentation provided by GoDoc.

  • blend: implements parsing of Blender files.
    • block: implements parsing of blend file blocks.

Installation

go get github.com/mewmew/blend

To parse more complex blend files "block/struct.go" and "block/parse.go" may need to be regenereted. To regenerate these two files for any given blend file, use the blendef tool.

go get github.com/mewmew/blend/cmd/blendef
cd $GOPATH/src/github.com/mewmew/blend/block
blendef /path/to/complex.blend

A more detailed description is given in the "self-describing format" section.

Examples

  • Extract an embedded thumbnail from a blend file.

      go get github.com/mewmew/blend/examples/blendview
      cd $GOPATH/src/github.com/mewmew/blend/testdata
      blendview block.blend
    

Extracted thumbnail

Self-describing format

One unique feature of blend files is that they contain a full definition of every structure used in its file blocks. The structure definitions are stored in the DNA block.

All block structure definitions ("block/struct.go") and the block parsing logic ("block/parse.go") have been generating by parsing the DNA block of "testdata/block.blend".

The tool which was used to generate these two files is located at:

github.com/mewmew/blend/cmd/blendef

More complex blend files may contain structures which are not yet defined in the block package. If so, use blendef to regenerate "struct.go" and "parse.go" for the given blend file.

Public domain

The source code and any original content of this repository is hereby released into the public domain.

About

Package blend implements parsing of Blender files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages