Download

Copy material attributes via c++

Is it any way to get material attributes from recently created material?

I try to get some data both with MaterialAttributes property and with direct expressions of separate property but it seems not a usual practice. Broke google trying to find solution for this issue. So this is method interface and I want it back correct and full copy of currently created material.

UMaterialExpressionMakeMaterialAttributes* UMaterialFactoryNewExtend::GetMaterialAttributes(UMaterial* From, UMaterial* To) {

	auto MaterialAttributes = NewObject<UMaterialExpressionMakeMaterialAttributes>(To);

	UE_LOG(LogTemp, Warning, TEXT("%s"), *From->BaseColor.ExpressionName.ToString());
        // print None even if it is some transformed TexCoord in original material

       // new MaterialAttributes expressions should fully copy all setup from input material ...
       
      
}