Public Member Functions | Public Attributes | Protected Member Functions

FBMaterial Class Reference

This reference page is linked to from the following overview topics: MotionBuilder 2014, MotionBuilder 2013, Your First Python Program, FBProperty - Object Properties, Scene Elements, FBModel - Transformation Data and the Scene Graph, FBMaterial and FBTexture - Materials and Textures, Updated Objects.


Search for all occurrences

Detailed Description

Material class.

Definition at line 87 of file fbmaterial.h.

#include <fbmaterial.h>

Inheritance diagram for FBMaterial:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 FBMaterial (const char *pName, HIObject pObject=NULL)
 Constructor.
FBMaterialClone ()
 Clone the material.
FBTextureGetTexture (FBMaterialTextureType pType=kFBMaterialTextureDiffuse)
 Retrieve associated texture.
void SetTexture (FBTexture *pTexture, FBMaterialTextureType pType=kFBMaterialTextureDiffuse)
 Set associated texture.
void OGLInit ()
 Setup OpenGL fixed pipeline material settings.
virtual const char * GetMaterialName () const
 Return Material Name.
virtual const char * GetMaterialDesc () const
 Return Material Desc Name.
virtual bool FbxStore (FBFbxObject *pFbxObject, kFbxObjectStore pStoreWhat)
 Store and Retrieve function that can be overloaded.
virtual bool FbxRetrieve (FBFbxObject *pFbxObject, kFbxObjectStore pStoreWhat)
virtual const char * FbxGetObjectType () override
 Returns the class type inherited by the class of an object, for example: 'Material'.
virtual const char * FbxGetObjectSubType () override
 Returns the class sub type inherited by the class of an object, for example: 'Default', 'Custom Material'.

Public Attributes

FBPropertyAnimatableColor Ambient
 Read Write Property: Ambient color.
FBPropertyAnimatableDouble AmbientFactor
 Read Write Property: Ambient Factor value.
FBPropertyAnimatableColor Emissive
 Read Write Property: Emissive color.
FBPropertyAnimatableDouble EmissiveFactor
 Read Write Property: Emissive Factor value.
FBPropertyAnimatableColor Diffuse
 Read Write Property: Diffuse color.
FBPropertyAnimatableDouble DiffuseFactor
 Read Write Property: Diffuse Factor value.
FBPropertyAnimatableColor TransparentColor
 Read Write Property: Transparent color.
FBPropertyAnimatableDouble TransparencyFactor
 Read Write Property: Transparency Factor value.
FBPropertyAnimatableColor Bump
 Read Write Property: Bump.
FBPropertyAnimatableColor NormalMap
 Read Write Property: Normal Map.
FBPropertyAnimatableDouble BumpFactor
 Read Write Property: Bump Factor value.
FBPropertyAnimatableColor Specular
 Read Write Property: Specular color.
FBPropertyAnimatableDouble SpecularFactor
 Read Write Property: Specular Factor value.
FBPropertyAnimatableDouble Shininess
 Read Write Property: Shininess value.
FBPropertyAnimatableColor Reflection
 Read Write Property: Reflection color.
FBPropertyAnimatableDouble ReflectionFactor
 Read Write Property: Reflection Factor value.
FBPropertyAnimatableColor DisplacementColor
 Read Write Property: Displacement color.
FBPropertyAnimatableDouble DisplacementFactor
 Read Write Property: Displacement Factor value.

Protected Member Functions

FBPropertyCreateTextureConnectableUserProperty (const char *pName, FBPropertyType pType, const char *pDataType, bool pAnimatable)
 Create user custom texture connect property for custom material derived from FBMaterial only.

Constructor & Destructor Documentation

FBMaterial ( const char *  pName,
HIObject  pObject = NULL 
)

Constructor.

Parameters:
pNameName of material.
pObjectFor internal use only(default=NULL).

Member Function Documentation

FBMaterial* Clone ( )

Clone the material.

This will duplicated the current material.

Returns:
Newly created material.
FBTexture* GetTexture ( FBMaterialTextureType  pType = kFBMaterialTextureDiffuse)

Retrieve associated texture.

Parameters:
pTypeMaterialTextureType to get connected texture from (default is Diffuse is not specified).
void SetTexture ( FBTexture pTexture,
FBMaterialTextureType  pType = kFBMaterialTextureDiffuse 
)

Set associated texture.

Parameters:
pTexturetexture to be connected.
pTypeMaterialTextureType to set connected texture to.
void OGLInit ( )

Setup OpenGL fixed pipeline material settings.

virtual const char* GetMaterialName ( ) const [virtual]

Return Material Name.

Need to be same with FBMaterialLayout

virtual const char* GetMaterialDesc ( ) const [virtual]

Return Material Desc Name.

Need to be same with FBMaterialLayout

virtual bool FbxStore ( FBFbxObject pFbxObject,
kFbxObjectStore  pStoreWhat 
) [virtual]

Store and Retrieve function that can be overloaded.

Parameters:
pFbxObjectFBX Object that is used to communicate I/O operations.
pStoreWhatWhich attributes are currently stored/retrieved.

Reimplemented from FBBox.

virtual bool FbxRetrieve ( FBFbxObject pFbxObject,
kFbxObjectStore  pStoreWhat 
) [virtual]

Reimplemented from FBBox.

virtual const char* FbxGetObjectType ( ) [override, virtual]

Returns the class type inherited by the class of an object, for example: 'Material'.

Reimplemented from FBBox.

virtual const char* FbxGetObjectSubType ( ) [override, virtual]

Returns the class sub type inherited by the class of an object, for example: 'Default', 'Custom Material'.

Reimplemented from FBBox.

FBProperty* CreateTextureConnectableUserProperty ( const char *  pName,
FBPropertyType  pType,
const char *  pDataType,
bool  pAnimatable 
) [protected]

Create user custom texture connect property for custom material derived from FBMaterial only.

Parameters:
pNameThe name of the property.
pTypeType of the property. See enum FBPropertyType.
pDataTypeDataType of the property.
pAnimatableTo specify if the property can be animated..
Returns:
The custom property created.
Remarks:
Only support Color, ColorAndAlpha, Number, Vector, Vector2, Vector4 data type for user texture connect property.

Member Data Documentation

Read Write Property: Ambient color.

Definition at line 102 of file fbmaterial.h.

Read Write Property: Ambient Factor value.

Definition at line 103 of file fbmaterial.h.

Read Write Property: Emissive color.

Definition at line 105 of file fbmaterial.h.

Read Write Property: Emissive Factor value.

Definition at line 106 of file fbmaterial.h.

Read Write Property: Diffuse color.

Definition at line 108 of file fbmaterial.h.

Read Write Property: Diffuse Factor value.

Definition at line 109 of file fbmaterial.h.

Read Write Property: Transparent color.

Definition at line 111 of file fbmaterial.h.

Read Write Property: Transparency Factor value.

Definition at line 112 of file fbmaterial.h.

Read Write Property: Bump.

Definition at line 114 of file fbmaterial.h.

Read Write Property: Normal Map.

Definition at line 115 of file fbmaterial.h.

Read Write Property: Bump Factor value.

Definition at line 116 of file fbmaterial.h.

Read Write Property: Specular color.

Definition at line 118 of file fbmaterial.h.

Read Write Property: Specular Factor value.

Definition at line 119 of file fbmaterial.h.

Read Write Property: Shininess value.

Definition at line 120 of file fbmaterial.h.

Read Write Property: Reflection color.

Definition at line 122 of file fbmaterial.h.

Read Write Property: Reflection Factor value.

Definition at line 123 of file fbmaterial.h.

Read Write Property: Displacement color.

Definition at line 125 of file fbmaterial.h.

Read Write Property: Displacement Factor value.

Definition at line 126 of file fbmaterial.h.


The documentation for this class was generated from the following file:

FBMaterial FBMaterial FBMaterial FBMaterial FBMaterial FBMaterial FBMaterial FBMaterial FBMaterial FBMaterial
FBMaterial FBMaterial FBMaterial FBMaterial FBMaterial FBMaterial FBMaterial FBMaterial FBMaterial FBMaterial