Navigation
API > API/Plugins > API/Plugins/DynamicMaterial > API/Plugins/DynamicMaterial/Model
Inheritance Hierarchy
- UObject
- UDynamicMaterialModelBase
- UDynamicMaterialModel
References
| Module | DynamicMaterial |
| Header | /Engine/Plugins/Experimental/DynamicMaterial/Source/DynamicMaterial/Public/Model/DynamicMaterialModel.h |
| Include | #include "Model/DynamicMaterialModel.h" |
Syntax
UCLASS (MinimalAPI, ClassGroup="Material Designer", DefaultToInstanced, BlueprintType,
Meta=(DisplayThumbnail="true"))
class UDynamicMaterialModel : public UDynamicMaterialModelBase
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bCreateMaterialPackage | ||
| TEnumAsByte< EBlendMode > | BlendMode | These properties used to exist on the editor-only subclass of this model. | |
| TObjectPtr< UMaterial > | DynamicMaterial | Material generated by the Model. | |
| TObjectPtr< UDynamicMaterialInstance > | DynamicMaterialInstance | Material Designer Material representing the MID for this Model. | |
| TScriptInterface< IDynamicMaterialModelEditorOnlyDataInterface > | EditorOnlyDataSI | Object holding the editor-only data used by this model. | |
| TArray< TObjectPtr< UMaterialExpression > > | Expressions | ||
| TObjectPtr< UDMMaterialValue > | GlobalAmbientOcclusionParameterValue | ||
| TObjectPtr< UDMMaterialValue > | GlobalAnisotropyParameterValue | ||
| TObjectPtr< UDMMaterialValue > | GlobalBaseColorParameterValue | ||
| TObjectPtr< UDMMaterialValue > | GlobalDisplacementParameterValue | ||
| TObjectPtr< UDMMaterialValue > | GlobalEmissiveColorParameterValue | ||
| TObjectPtr< UDMMaterialValue > | GlobalMetallicParameterValue | ||
| TObjectPtr< UDMMaterialValue > | GlobalNormalParameterValue | ||
| TObjectPtr< UDMMaterialValue > | GlobalOffsetParameterValue | ||
| TObjectPtr< UDMMaterialValue > | GlobalOpacityParameterValue | ||
| TObjectPtr< UDMMaterialValueFloat1 > | GlobalOpacityValue | ||
| TObjectPtr< UDMMaterialValue > | GlobalPixelDepthOffsetParameterValue | ||
| TObjectPtr< UDMMaterialValue > | GlobalRefractionParameterValue | ||
| TObjectPtr< UDMMaterialValue > | GlobalRotationParameterValue | ||
| TObjectPtr< UDMMaterialValue > | GlobalRoughnessParameterValue | ||
| TObjectPtr< UDMMaterialValue > | GlobalSpecularParameterValue | ||
| TObjectPtr< UDMMaterialValue > | GlobalSubsurfaceColorParameterValue | ||
| TObjectPtr< UDMMaterialValue > | GlobalSurfaceThicknessParameterValue | ||
| TObjectPtr< UDMMaterialValue > | GlobalTangentParameterValue | ||
| TObjectPtr< UDMMaterialValue > | GlobalTilingParameterValue | ||
| TObjectPtr< UDMMaterialValue > | GlobalWorldPositionOffsetParameterValue | ||
| FDMOnTextureUVUpdated | OnTextureUVUpdateDelegate | Delegate called when a value is updated. @See GetOnValueUpdateDelegate. | |
| FDMOnValueUpdated | OnValueUpdateDelegate | Delegate called when a value is updated. @See GetOnValueUpdateDelegate. | |
| TMap< FName, TWeakObjectPtr< UDMMaterialParameter > > | ParameterMap | Map of parameter names to the objects representing that parameter. | |
| TMap< EDMMaterialPropertyType, TObjectPtr< UObject > > | Properties | ||
| TMap< EDMMaterialPropertyType, TObjectPtr< UObject > > | PropertySlotMap | ||
| TSet< TObjectPtr< UDMMaterialComponent > > | RuntimeComponents | References to runtime components outered to this model which are not otherwise referenced. | |
| EDMMaterialShadingModel | ShadingModel | ||
| TArray< TObjectPtr< UObject > > | Slots | ||
| TArray< TObjectPtr< UDMMaterialValue > > | Values | Global values |
Constructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddRuntimeComponentReference
(
UDMMaterialComponent* InValue |
Adds a reference to a component so they don't get garbage collected at runtime. | |
| UDMMaterialValue * | AddValue
(
TSubclassOf< UDMMaterialValue > InValueClass |
Creates a new value of the given class and returns it. | |
| void | ApplyComponents
(
UMaterialInstanceDynamic* InMID |
||
| TScriptInterface< IDynamicMaterialModelEditorOnlyDataInterface > | Returns the editor only data for this model. | ||
| bool | ConditionalFreeParameter
(
UDMMaterialParameter* InParameter |
Removes this specific object from the parameter map if the name is in use by a different parameter. | |
| UDMMaterialParameter * | CreateUniqueParameter
(
FName InBaseName |
Creates a new parameter and assigns it a unique name. | |
| FName | CreateUniqueParameterName
(
FName InBaseName |
Checks the current parameters and returns the first parameter name that is not in used (BaseName1, 2, etc, etc.) | |
| void | Attempts to fix global opacity to give it a range of 0-1. | ||
| void | Makes sure the global parameter values have the correct name. | ||
| void | ForEachGlobalParameter
(
TFunctionRef< void(UDMMaterialValue*InGlobalParameterValue)> InCallable |
||
| void | FreeParameter
(
UDMMaterialParameter* InParameter |
Removes parameter by the name assigned to this parameter object. | |
| InComponentClass * | GetComponentByPath
(
FDMComponentPath& InPath |
Searches the model for a specific component based on a path and Casts it to the given type. | |
| UDMMaterialComponent * | GetComponentByPath
(
FDMComponentPath& InPath |
Searches the model for a specific component based on a path. | |
| UDMMaterialComponent * | GetComponentByPath
(
const FString& InPath |
Searches the model for a specific component based on a path. | |
| IDynamicMaterialModelEditorOnlyDataInterface * | Returns the editor only data for this model. | ||
| UMaterial * | |||
| UDMMaterialValueFloat1 * | |||
| UDMMaterialValue * | GetGlobalParameterValue
(
FName InName |
Returns a specific global parameter value (such as global opacity) of the given object name (see global parameter FNames) or nullptr. | |
| UDMMaterialValue * | Returns a specific global parameter value (such as global opacity) for the given material property or nullptr. | ||
| InValueClass * | Returns a Cast version of a specific global value (such as global opacity) or nullptr. | ||
| FDMOnTextureUVUpdated::RegistrationType & | Returns the texture uv update delegate to (un)subscribe. | ||
| FDMOnValueUpdated::RegistrationType & | Returns the value update delegate to (un)subscribe. | ||
| const TSet< TObjectPtr< UDMMaterialComponent > > & | Returns a set of components that require a runtime reference, such as texture uvs. | ||
| InValueClass * | GetTypedGlobalParameterValue
(
FName InName |
Returns a Cast version of a specific global value (such as global opacity) or nullptr. | |
| UDMMaterialValue * | GetValueByName
(
FName InName |
Returns a specific (non-global parameter) value of the given object name. | |
| const TArray< UDMMaterialValue * > & | GetValues () |
Returns an array of the (non-global parameter) values used in this Model. | |
| bool | HasParameterName
(
FName InParameterName |
Returns true if a parameter has with the given name exists on this Model. | |
| bool | IsModelValid () |
Returns this if this is IsValid() and isn't isn't being destroyed. | |
| void | OnTextureUVUpdated
(
UDMTextureUV* InTextureUV |
Called by the texture uv when it updates. | |
| void | OnValueUpdated
(
UDMMaterialValue* InValue, |
Called by the value when it updates. Updates Material Designer Material and triggers the delegate. | |
| void | PostDuplicate
(
bool bInDuplicateForPIE |
||
| void | |||
| void | Called to ensure that the object hierarchy is correct. | ||
| void | PostEditUndo () |
||
| void | PostLoad () |
||
| void | Called to ensure that all components are correctly initialized. | ||
| void | RemoveRuntimeComponentReference
(
UDMMaterialComponent* InValue |
Removes a reference to a component. | |
| void | RemoveValueByParameterName
(
FName InName |
Removes a value based on its parameter name. | |
| void | RenameParameter
(
UDMMaterialParameter* InParameter, |
Updates the name on an existing parameter. | |
| void | SetDynamicMaterialInstance
(
UDynamicMaterialInstance* InDynamicMaterialInstance |
Overridden from UDynamicMaterialModelBase
| Type | Name | Description | |
|---|---|---|---|
| UDynamicMaterialInstance * | Returns the Material Designer Material that contains this Model, if there is one. | ||
| UDynamicMaterialModel * | Returns the Material Designer Model that is the base for this Model. |