Navigation
API > API/Plugins > API/Plugins/DynamicMaterial > API/Plugins/DynamicMaterial/Model
Inheritance Hierarchy
- UObject
- UDynamicMaterialModelBase
- UDynamicMaterialModelDynamic
References
| Module | DynamicMaterial |
| Header | /Engine/Plugins/Experimental/DynamicMaterial/Source/DynamicMaterial/Public/Model/DynamicMaterialModelDynamic.h |
| Include | #include "Model/DynamicMaterialModelDynamic.h" |
Syntax
UCLASS (MinimalAPI, BlueprintType, ClassGroup="Material Designer",
Meta=(DisplayName="Material Designer Model Instance"))
class UDynamicMaterialModelDynamic : public UDynamicMaterialModelBase
Remarks
Represents a MID-like version of a Material Designer Model. Uses dynamic values/texture uvs to link to the original model.
Variables
| Type | Name | Description | |
|---|---|---|---|
| TMap< FName, TObjectPtr< UDMMaterialComponentDynamic > > | DynamicComponents | Map of the dynamic components that reference the parent model. | |
| TObjectPtr< UDynamicMaterialInstance > | DynamicMaterialInstance | Hard reference to the instance, if it exists. | |
| FDMOnTextureUVDynamicUpdated | OnTextureUVDynamicUpdateDelegate | Delegate called when texture uvs update. @See GetOnTextureUVDynamicUpdateDelegate | |
| FDMOnValueDynamicUpdated | OnValueDynamicUpdateDelegate | Delegate called when values update. @See GetOnValueDynamicUpdateDelegate | |
| TObjectPtr< UDynamicMaterialModel > | ParentModel | Hard reference to the parent model, loaded when the model is first accessed. | |
| TSoftObjectPtr< UDynamicMaterialModel > | ParentModelSoft | Soft reference to the parent model. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | AddComponentDynamic
(
UDMMaterialComponentDynamic* InValueDynamic |
Adds the given component. Won't add if a component with the same name already exists. | |
| void | ApplyComponents
(
UMaterialInstanceDynamic* InMID |
||
| UDynamicMaterialModelDynamic * | Create
(
UObject* InOuter, |
Create a new Material Designer Model Instance based on a parent Model. | |
| void | Checks the parent model to make sure that all components that exist on the parent model are added and that all components that no longer exist on the parent model are removed. | ||
| UDynamicMaterialModel * | Loads the parent model from the soft reference, if it is not already loaded. | ||
| UDMMaterialComponent * | GetComponentByPath
(
const FString& InPath |
Finds the component with the given path. | |
| UDMMaterialComponent * | GetComponentByPath
(
FDMComponentPath& InPath |
Finds the component with the given path. | |
| UDMMaterialComponentDynamic * | GetComponentDynamic
(
FName InName |
Returns the component with the given name or nullptr. | |
| UMaterial * | |||
| FDMOnTextureUVDynamicUpdated::RegistrationType & | Returns the on value update method so it can (un)subscribed to. | ||
| FDMOnValueDynamicUpdated::RegistrationType & | Returns the on value update method so it can (un)subscribed to. | ||
| UDynamicMaterialModel * | Resolves and returns the parent model from ParentModelSoft, saving it in the transient ParentModel. | ||
| void | Scans the parent Material Model and adds all the components from there as Instance Components. | ||
| void | OnTextureUVUpdated
(
UDMTextureUVDynamic* InTextureUVDynamic |
Called when a texture uv changes so that the Material Designer Material can be updated and the event broadcast | |
| void | OnValueUpdated
(
UDMMaterialValueDynamic* InValueDynamic |
Called when a value changes so that the Material Designer Material can be updated and the event broadcast | |
| void | PostLoad () |
||
| bool | RemoveComponentDynamic
(
UDMMaterialComponentDynamic* InValueDynamic |
Removes the given component. Won't remove if the name doesn't exist or the components don't match. | |
| void | SetDynamicMaterialInstance
(
UDynamicMaterialInstance* InDynamicMaterialInstance |
||
| UDynamicMaterialModel * | ToEditable
(
UObject* InOuter |
Converts this model dynamic to a new model and returns it. |
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. |
Constants
| Name | Description |
|---|---|
| DynamicComponentsPathToken | |
| ParentModelPathToken |