Struct blender_mesh::PrincipledBSDF[][src]

pub struct PrincipledBSDF { /* fields omitted */ }

Material data for a mesh

Blender

When exporting from Blender we read this data from the first Principled BSDF node in the node editor for the material

https://docs.blender.org/manual/en/latest/render/cycles/nodes/types/shaders/principled.html

Implementations

impl PrincipledBSDF[src]

pub fn new(
    base_color: MaterialInput<[f32; 3], String>,
    roughness: MaterialInput<f32, (String, Channel)>,
    metallic: MaterialInput<f32, (String, Channel)>,
    normal_map: Option<String>
) -> Self
[src]

Create a new physically-based material.

pub fn base_color(&self) -> &MaterialInput<[f32; 3], String>[src]

The base_color of the material.

https://docs.blender.org/api/blender2.8/bpy.types.Material.html#bpy.types.Material.diffuse_color

pub fn roughness(&self) -> &MaterialInput<f32, (String, Channel)>[src]

The roughness of the material.

https://docs.blender.org/api/blender2.8/bpy.types.Material.html#bpy.types.Material.roughness

pub fn metallic(&self) -> &MaterialInput<f32, (String, Channel)>[src]

How metallic the material is. Most materials should be 0.0 or 1.0.

https://docs.blender.org/api/blender2.8/bpy.types.Material.html#bpy.types.Material.metallic

pub fn normal_map(&self) -> Option<&String>[src]

The normal map

Trait Implementations

impl Clone for PrincipledBSDF[src]

impl Debug for PrincipledBSDF[src]

impl Default for PrincipledBSDF[src]

impl<'de> Deserialize<'de> for PrincipledBSDF[src]

impl PartialEq<PrincipledBSDF> for PrincipledBSDF[src]

impl Serialize for PrincipledBSDF[src]

impl StructuralPartialEq for PrincipledBSDF[src]

Auto Trait Implementations

impl RefUnwindSafe for PrincipledBSDF

impl Send for PrincipledBSDF

impl Sync for PrincipledBSDF

impl Unpin for PrincipledBSDF

impl UnwindSafe for PrincipledBSDF

Blanket Implementations

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

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

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

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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<V, T> VZip<V> for T where
    V: MultiLane<T>,