当前位置: 首页>>代码示例>>C++>>正文


C++ UMaterial::HasDuplicateDynamicParameters方法代码示例

本文整理汇总了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);
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:47,代码来源:MaterialGraphNode.cpp

示例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;
}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:73,代码来源:MaterialGraphNode.cpp


注:本文中的UMaterial::HasDuplicateDynamicParameters方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。