本文整理汇总了C++中UMaterial::HasDuplicateDynamicParameters方法的典型用法代码示例。如果您正苦于以下问题:C++ UMaterial::HasDuplicateDynamicParameters方法的具体用法?C++ UMaterial::HasDuplicateDynamicParameters怎么用?C++ UMaterial::HasDuplicateDynamicParameters使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UMaterial
的用法示例。
在下文中一共展示了UMaterial::HasDuplicateDynamicParameters方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetNodeTitleColor
FLinearColor UMaterialGraphNode::GetNodeTitleColor() const
{
UMaterial* Material = CastChecked<UMaterialGraph>(GetGraph())->Material;
// Generate title color
FColor TitleColor = MaterialExpression->BorderColor;
TitleColor.A = 255;
if (bIsErrorExpression)
{
// Outline expressions that caused errors in red
TitleColor = FColor( 255, 0, 0 );
}
else if (bIsCurrentSearchResult)
{
TitleColor = FColor( 64, 64, 255 );
}
else if (bIsPreviewExpression)
{
// If we are currently previewing a node, its border should be the preview color.
TitleColor = FColor( 70, 100, 200 );
}
else if (UMaterial::IsParameter(MaterialExpression))
{
if (Material->HasDuplicateParameters(MaterialExpression))
{
TitleColor = FColor( 0, 255, 255 );
}
else
{
TitleColor = FColor( 0, 128, 128 );
}
}
else if (UMaterial::IsDynamicParameter(MaterialExpression))
{
if (Material->HasDuplicateDynamicParameters(MaterialExpression))
{
TitleColor = FColor( 0, 255, 255 );
}
else
{
TitleColor = FColor( 0, 128, 128 );
}
}
return FLinearColor(TitleColor);
}
示例2: GetNodeTitleColor
FLinearColor UMaterialGraphNode::GetNodeTitleColor() const
{
UMaterial* Material = CastChecked<UMaterialGraph>(GetGraph())->Material;
if (bIsPreviewExpression)
{
// If we are currently previewing a node, its border should be the preview color.
return FColor( 70, 100, 200 );
}
const UGraphEditorSettings* Settings = GetDefault<UGraphEditorSettings>();
if (UsesBoolColour(MaterialExpression))
{
return Settings->BooleanPinTypeColor;
}
else if (UsesFloatColour(MaterialExpression))
{
return Settings->FloatPinTypeColor;
}
else if (UsesVectorColour(MaterialExpression))
{
return Settings->VectorPinTypeColor;
}
else if (UsesObjectColour(MaterialExpression))
{
return Settings->ObjectPinTypeColor;
}
else if (UsesEventColour(MaterialExpression))
{
return Settings->EventNodeTitleColor;
}
else if (MaterialExpression->IsA(UMaterialExpressionMaterialFunctionCall::StaticClass()))
{
// Previously FColor(0, 116, 255);
return Settings->FunctionCallNodeTitleColor;
}
else if (MaterialExpression->IsA(UMaterialExpressionFunctionOutput::StaticClass()))
{
// Previously FColor(255, 155, 0);
return Settings->ResultNodeTitleColor;
}
else if (MaterialExpression->IsA(UMaterialExpressionCustomOutput::StaticClass()))
{
// Previously FColor(255, 155, 0);
return Settings->ResultNodeTitleColor;
}
else if (UMaterial::IsParameter(MaterialExpression))
{
if (Material->HasDuplicateParameters(MaterialExpression))
{
return FColor( 0, 255, 255 );
}
else
{
return FColor( 0, 128, 128 );
}
}
else if (UMaterial::IsDynamicParameter(MaterialExpression))
{
if (Material->HasDuplicateDynamicParameters(MaterialExpression))
{
return FColor( 0, 255, 255 );
}
else
{
return FColor( 0, 128, 128 );
}
}
// Assume that most material expressions act like pure functions and don't affect anything else
return Settings->PureFunctionCallNodeTitleColor;
}