Esempio n. 1
0
void UK2Node_DynamicCast::PostPlacedNewNode()
{
	Super::PostPlacedNewNode();

	const UBlueprintEditorSettings* BlueprintSettings = GetDefault<UBlueprintEditorSettings>();
	SetPurity(BlueprintSettings->bFavorPureCastNodes);
}
Esempio n. 2
0
void UK2Node_DynamicCast::TogglePurity()
{
	FText TransactionTitle;
	if(bIsPureCast)
	{
		TransactionTitle = LOCTEXT("TogglePure", "Convert to Pure Cast");
	}
	else
	{
		TransactionTitle = LOCTEXT("ToggleImpure", "Convert to Impure Cast");
	}
	const FScopedTransaction Transaction( TransactionTitle );
	Modify();

	SetPurity(!bIsPureCast);
}
void UK2Node_VariableGet::TogglePurity()
{
	FText TransactionTitle;
	if(!bIsPureGet)
	{
		TransactionTitle = LOCTEXT("TogglePureGet", "Convert to Pure Get");
	}
	else
	{
		TransactionTitle = LOCTEXT("ToggleImpureGet", "Convert to Impure Get");
	}
	const FScopedTransaction Transaction( TransactionTitle );
	Modify();

	SetPurity(!bIsPureGet);
}