[][src]Struct blend::runtime::Blend

pub struct Blend {
    pub blend: RawBlend,
}

Fields

blend: RawBlend

blend field contains the header, file-blocks and dna of the .blend file, which are used in runtime to interpret the blend file data.

Methods

impl Blend[src]

pub fn from_path<T: AsRef<Path>>(path: T) -> Blend[src]

pub fn new<T: Read>(data: T) -> Blend[src]

pub fn get_all_root_blocks(&self) -> Vec<Instance>[src]

A blend file is made of blocks of binary data which represent structs. These blocks can have pointers to other blocks but only root blocks have a defined type (Object, Mesh, Materal, etc). Subsidiary blocks may or may not have the correct type information in their headers, but their type is defined by the field that accesses them. You can only query for root blocks because subsidiary blocks have to be accessed through some field for their type to be known.

pub fn get_by_code(&self, search_code: [u8; 2]) -> Vec<Instance>[src]

Root blocks have a code that tells us their type, "OB" for object, "ME" for mesh, "MA" for material, etc. You can use this method to filter for a single type of block.

Auto Trait Implementations

impl Send for Blend

impl Unpin for Blend

impl Sync for Blend

impl UnwindSafe for Blend

impl RefUnwindSafe for Blend

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]