本文整理汇总了C++中UMaterial::GetAllFontParameterNames方法的典型用法代码示例。如果您正苦于以下问题:C++ UMaterial::GetAllFontParameterNames方法的具体用法?C++ UMaterial::GetAllFontParameterNames怎么用?C++ UMaterial::GetAllFontParameterNames使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UMaterial
的用法示例。
在下文中一共展示了UMaterial::GetAllFontParameterNames方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RegenerateArrays
//.........这里部分代码省略.........
// Texture Parameters.
ParentMaterial->GetAllTextureParameterNames(ParameterNames, Guids);
for(int32 ParameterIdx=0; ParameterIdx<ParameterNames.Num(); ParameterIdx++)
{
UDEditorTextureParameterValue& ParameterValue = *(NewObject<UDEditorTextureParameterValue>());
FName ParameterName = ParameterNames[ParameterIdx];
UTexture* Value;
ParameterValue.bOverride = false;
ParameterValue.ParameterName = ParameterName;
ParameterValue.ExpressionId = Guids[ParameterIdx];
if(SourceInstance->GetTextureParameterValue(ParameterName, Value))
{
ParameterValue.ParameterValue = Value;
}
// @todo: This is kind of slow, maybe store these in a map for lookup?
// See if this keyname exists in the source instance.
for(int32 TextureParameterIdx=0; TextureParameterIdx<SourceInstance->TextureParameterValues.Num(); TextureParameterIdx++)
{
FTextureParameterValue& SourceParam = SourceInstance->TextureParameterValues[TextureParameterIdx];
if(ParameterName==SourceParam.ParameterName)
{
ParameterValue.bOverride = true;
ParameterValue.ParameterValue = SourceParam.ParameterValue;
}
}
AssignParameterToGroup(ParentMaterial, Cast<UDEditorParameterValue>(&ParameterValue));
}
// Font Parameters.
ParentMaterial->GetAllFontParameterNames(ParameterNames, Guids);
for(int32 ParameterIdx=0; ParameterIdx<ParameterNames.Num(); ParameterIdx++)
{
UDEditorFontParameterValue& ParameterValue = *(NewObject<UDEditorFontParameterValue>());
FName ParameterName = ParameterNames[ParameterIdx];
UFont* FontValue;
int32 FontPage;
ParameterValue.bOverride = false;
ParameterValue.ParameterName = ParameterName;
ParameterValue.ExpressionId = Guids[ParameterIdx];
if(SourceInstance->GetFontParameterValue(ParameterName, FontValue,FontPage))
{
ParameterValue.ParameterValue.FontValue = FontValue;
ParameterValue.ParameterValue.FontPage = FontPage;
}
// @todo: This is kind of slow, maybe store these in a map for lookup?
// See if this keyname exists in the source instance.
for(int32 FontParameterIdx=0; FontParameterIdx<SourceInstance->FontParameterValues.Num(); FontParameterIdx++)
{
FFontParameterValue& SourceParam = SourceInstance->FontParameterValues[FontParameterIdx];
if(ParameterName==SourceParam.ParameterName)
{
ParameterValue.bOverride = true;
ParameterValue.ParameterValue.FontValue = SourceParam.FontValue;
ParameterValue.ParameterValue.FontPage = SourceParam.FontPage;
}
}
AssignParameterToGroup(ParentMaterial, Cast<UDEditorParameterValue>(&ParameterValue));
}