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


C++ UProperty::GetFName方法代码示例

本文整理汇总了C++中UProperty::GetFName方法的典型用法代码示例。如果您正苦于以下问题:C++ UProperty::GetFName方法的具体用法?C++ UProperty::GetFName怎么用?C++ UProperty::GetFName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UProperty的用法示例。


在下文中一共展示了UProperty::GetFName方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: PostEditChangeProperty

void USoundWave::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
{
	Super::PostEditChangeProperty(PropertyChangedEvent);

	static FName CompressionQualityFName = FName( TEXT( "CompressionQuality" ) );
	static FName StreamingFName = GET_MEMBER_NAME_CHECKED(USoundWave, bStreaming);

	// Prevent constant re-compression of SoundWave while properties are being changed interactively
	if (PropertyChangedEvent.ChangeType != EPropertyChangeType::Interactive)
	{
		UProperty* PropertyThatChanged = PropertyChangedEvent.Property;
		// Regenerate on save any compressed sound formats
		if ( PropertyThatChanged && PropertyThatChanged->GetFName() == CompressionQualityFName )
		{
			InvalidateCompressedData();
			FreeResources();
			UpdatePlatformData();
			MarkPackageDirty();
		}
		else if (PropertyThatChanged && PropertyThatChanged->GetFName() == StreamingFName)
		{
			FreeResources();
			UpdatePlatformData();
			MarkPackageDirty();
		}
	}
}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:27,代码来源:SoundWave.cpp

示例2: PostEditChangeChainProperty

void UCanvasPanelSlot::PostEditChangeChainProperty(struct FPropertyChangedChainEvent& PropertyChangedEvent)
{
	SynchronizeProperties();

	static FName AnchorsProperty(TEXT("Anchors"));

	FEditPropertyChain::TDoubleLinkedListNode* AnchorNode = PropertyChangedEvent.PropertyChain.GetHead()->GetNextNode();
	if ( !AnchorNode )
	{
		return;
	}

	FEditPropertyChain::TDoubleLinkedListNode* LayoutDataNode = AnchorNode->GetNextNode();

	if ( !LayoutDataNode )
	{
		return;
	}

	UProperty* AnchorProperty = LayoutDataNode->GetValue();

	if ( AnchorProperty && AnchorProperty->GetFName() == AnchorsProperty )
	{
		RebaseLayout();
	}

	Super::PostEditChangeProperty(PropertyChangedEvent);
}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:28,代码来源:CanvasPanelSlot.cpp

示例3: FindChildPropertyNode

/**
 * Finds a child property node from the provided parent node (does not recurse into grandchildren)
 *
 * @param InParentNode	The parent node to locate the child from
 * @param PropertyName	The property name to find
 * @param Index			The index of the property if its in an array
 */
static TSharedPtr<FPropertyNode> FindChildPropertyNode( FPropertyNode& InParentNode, const FString& PropertyName, int32 Index )
{
	TSharedPtr<FPropertyNode> FoundNode(NULL);

	// search each child for a property with the provided name
	for( int32 ChildIndex = 0; ChildIndex < InParentNode.GetNumChildNodes(); ++ChildIndex )
	{
		TSharedPtr<FPropertyNode>& ChildNode = InParentNode.GetChildNode(ChildIndex);
		UProperty* Property = ChildNode->GetProperty();
		if( Property && Property->GetFName() == *PropertyName )
		{
			FoundNode = ChildNode;
			break;
		}
	}

	// Find the array element.
	if( FoundNode.IsValid() && Index != INDEX_NONE )
	{
		// The found node is the top array so get its child which is the actual node
		FoundNode = FoundNode->GetChildNode( Index );
	}

	return FoundNode;
}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:32,代码来源:DetailLayoutBuilderImpl.cpp

示例4: GetPropertyByNameRecurse

	static UProperty *GetPropertyByNameRecurse( UStruct *InStruct, const FString &TokenString, void ** hContainerPtr, int32 &OutArrayIndex )
	{
		FString FirstToken;
		FString RemainingTokens;
		int32 SplitIndex;
		if ( TokenString.FindChar( '.', SplitIndex ) )
		{
			FirstToken = TokenString.LeftChop( TokenString.Len()-SplitIndex );
			RemainingTokens = TokenString.RightChop(SplitIndex+1);
		}
		else
		{
			FirstToken = TokenString;
			RemainingTokens = FString(TEXT(""));
		}

		//get the array index if there is any
		int32 ArrayIndex = 0;
		if ( FirstToken.FindChar( '[', SplitIndex ) )
		{
			FString ArrayIndexString = FirstToken.RightChop( SplitIndex+1 );
			ArrayIndexString = ArrayIndexString.LeftChop( 1 );
			FDefaultValueHelper::ParseInt( ArrayIndexString, ArrayIndex );

			FirstToken = FirstToken.LeftChop( FirstToken.Len()-SplitIndex );
		}

		for (TFieldIterator<UProperty> PropertyIt(InStruct, EFieldIteratorFlags::IncludeSuper); PropertyIt; ++PropertyIt)
		{
			UProperty* Property = *PropertyIt;
			FName PropertyName = Property->GetFName();
			if ( FirstToken == PropertyName.ToString() )
			{
				if ( RemainingTokens.Len() == 0 )
				{
					check( *hContainerPtr != NULL );
					OutArrayIndex = ArrayIndex;
					return Property;
				}
				else
				{
					UStructProperty *StructProp = Cast<UStructProperty>(Property);
					if ( StructProp )
					{
						check( *hContainerPtr != NULL );
						*hContainerPtr = Property->ContainerPtrToValuePtr<void>( *hContainerPtr, ArrayIndex );
						return GetPropertyByNameRecurse( StructProp->Struct, RemainingTokens, hContainerPtr, OutArrayIndex );
					}
				}
			}
		}

		return NULL;
	}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:54,代码来源:LiveEditorListenServer.cpp

示例5: FindScriptPropertyHelper

UProperty* FindScriptPropertyHelper(UClass* Class, FName PropertyName)
{
	for (TFieldIterator<UProperty> PropertyIt(Class, EFieldIteratorFlags::ExcludeSuper); PropertyIt; ++PropertyIt)
	{
		UProperty* Property = *PropertyIt;
		if (Property->GetFName() == PropertyName)
		{
			return Property;
		}
	}
	return NULL;
}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:12,代码来源:ScriptPlugin.cpp

示例6: SaveClassFieldMapping

void FBlueprintCompileReinstancer::SaveClassFieldMapping(UClass* InClassToReinstance)
{
	check(InClassToReinstance);

	for (UProperty* Prop = InClassToReinstance->PropertyLink; Prop && (Prop->GetOuter() == InClassToReinstance); Prop = Prop->PropertyLinkNext)
	{
		PropertyMap.Add(Prop->GetFName(), Prop);
	}

	for (auto Function : TFieldRange<UFunction>(InClassToReinstance, EFieldIteratorFlags::ExcludeSuper))
	{
		FunctionMap.Add(Function->GetFName(),Function);
	}
}
开发者ID:Codermay,项目名称:Unreal4,代码行数:14,代码来源:KismetReinstanceUtilities.cpp

示例7: PostEditChangeProperty

void UEditorLiveStreamingSettings::PostEditChangeProperty( struct FPropertyChangedEvent& PropertyChangedEvent )
{
	UProperty* PropertyThatChanged = PropertyChangedEvent.Property;

	const FName Name = PropertyThatChanged ? PropertyThatChanged->GetFName() : NAME_None;
// 	if( Name == ??? )
// 	{
//		...
//	}

	// Save config to file, but only if we are not the build machine since game agnostic settings may put the builder in an unclean state
	if( !GIsBuildMachine )
	{
		this->SaveConfig();
	}	
}
开发者ID:Codermay,项目名称:Unreal4,代码行数:16,代码来源:EditorLiveStreamingSettings.cpp

示例8: PostEditChangeProperty

void ADEPRECATED_VolumeAdaptiveBuilder::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
{
	Super::PostEditChangeProperty(PropertyChangedEvent);

	UProperty* PropertyThatChanged = PropertyChangedEvent.Property;
	FName PropertyName = PropertyThatChanged != NULL ? PropertyThatChanged->GetFName() : NAME_None;	

	if (PropertyName == GET_MEMBER_NAME_CHECKED(ADEPRECATED_VolumeAdaptiveBuilder, IsVisibleNavigableVolumes) ||
		PropertyName == GET_MEMBER_NAME_CHECKED(ADEPRECATED_VolumeAdaptiveBuilder, IsVisibleBlockedVolumes) ||
		PropertyName == GET_MEMBER_NAME_CHECKED(ADEPRECATED_VolumeAdaptiveBuilder, IsVisibleInGame)
		)
	{
		for (UDoNNavigationVolumeComponent* volume : NAVVolumeComponents)
		{
			if (!volume)
				continue;

			if (volume->CanNavigate)
				volume->SetVisibility(IsVisibleNavigableVolumes);
			else
				volume->SetVisibility(IsVisibleBlockedVolumes);

			volume->SetHiddenInGame(!IsVisibleInGame);
		}
	}

	if (GenerateNavigationVolumes)
	{
		ADEPRECATED_VolumeAdaptiveBuilder::ConstructBuilder();
		GenerateNavigationVolumes = false;
	}	
	
	if (RegenerateNAVNetwork || PropertyName == GET_MEMBER_NAME_CHECKED(ADEPRECATED_VolumeAdaptiveBuilder, DisplayNAVNeighborGraph))
	{
		FlushPersistentDebugLines(GetWorld());		
		BuildNAVNetwork();
		RegenerateNAVNetwork = false;
	}

	if (CleanUpAllData)
	{
		CleanUp();
		CleanUpAllData = false;
	}

	
}
开发者ID:Helical-Games,项目名称:DonAINavigation,代码行数:47,代码来源:DEPRECATED_VolumeAdaptiveBuilder.cpp

示例9: Supports

bool FConfigPropertyCustomColumn::Supports(const TSharedRef< IPropertyTableColumn >& Column, const TSharedRef< IPropertyTableUtilities >& Utilities) const
{
	bool IsSupported = false;

	if (Column->GetDataSource()->IsValid())
	{
		TSharedPtr< FPropertyPath > PropertyPath = Column->GetDataSource()->AsPropertyPath();
		if (PropertyPath.IsValid() && PropertyPath->GetNumProperties() > 0)
		{
			const FPropertyInfo& PropertyInfo = PropertyPath->GetRootProperty();
			UProperty* Property = PropertyInfo.Property.Get();
			IsSupported = Property->GetFName() == TEXT("ExternalProperty");
		}
	}

	return IsSupported;
}
开发者ID:PickUpSU,项目名称:UnrealEngine4,代码行数:17,代码来源:ConfigPropertyColumn.cpp

示例10: PostEditChangeProperty

void ULevelStreaming::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
{
	UProperty* OutermostProperty = PropertyChangedEvent.Property;
	if ( OutermostProperty != NULL )
	{
		const FName PropertyName = OutermostProperty->GetFName();
		if (PropertyName == GET_MEMBER_NAME_CHECKED(ULevelStreaming, LevelTransform))
		{
			GetWorld()->UpdateLevelStreaming();
		}

		if (PropertyName == GET_MEMBER_NAME_CHECKED(ULevelStreaming, EditorStreamingVolumes))
		{
			RemoveStreamingVolumeDuplicates();

			// Update levels references in each streaming volume 
			for (TActorIterator<ALevelStreamingVolume> It(GetWorld()); It; ++It)
			{
				(*It)->UpdateStreamingLevelsRefs();
			}
		}

		else if (PropertyName == GET_MEMBER_NAME_CHECKED(ULevelStreaming, LevelColor))
		{
			// Make sure the level's Level Color change is applied immediately by reregistering the
			// components of the actor's in the level
			if( LoadedLevel != NULL )
			{
				UPackage* Package = LoadedLevel->GetOutermost();
				for( TObjectIterator<UActorComponent> It; It; ++It )
				{
					if( It->IsIn( Package ) )
					{
						UActorComponent* ActorComponent = Cast<UActorComponent>( *It );
						if( ActorComponent )
						{
							ActorComponent->RecreateRenderState_Concurrent();
						}
					}
				}
			}
		}
	}

	Super::PostEditChangeProperty(PropertyChangedEvent);
}
开发者ID:ErwinT6,项目名称:T6Engine,代码行数:46,代码来源:LevelStreaming.cpp

示例11: GetMatchingProperties

void FAIDataProviderValue::GetMatchingProperties(TArray<FName>& MatchingProperties) const
{
	if (DataBinding)
	{
		for (UProperty* Prop = DataBinding->GetClass()->PropertyLink; Prop; Prop = Prop->PropertyLinkNext)
		{
			if (Prop->HasAnyPropertyFlags(CPF_Edit))
			{
				continue;
			}

			if (IsMatchingType(Prop))
			{
				MatchingProperties.Add(Prop->GetFName());
			}
		}
	}
}
开发者ID:Foreven,项目名称:Unreal4-1,代码行数:18,代码来源:AIDataProvider.cpp

示例12: GetPropertyByNameRecurse

	static UProperty *GetPropertyByNameRecurse( UStruct *InStruct, const FString &TokenString )
	{
		FString FirstToken;
		FString RemainingTokens;
		int32 SplitIndex;
		if ( TokenString.FindChar( '.', SplitIndex ) )
		{
			FirstToken = TokenString.LeftChop( TokenString.Len()-SplitIndex );
			RemainingTokens = TokenString.RightChop(SplitIndex+1);
		}
		else
		{
			FirstToken = TokenString;
			RemainingTokens = FString(TEXT(""));
		}

		if ( FirstToken.FindChar( '[', SplitIndex ) )
		{
			FirstToken = FirstToken.LeftChop( FirstToken.Len()-SplitIndex );
		}

		for (TFieldIterator<UProperty> PropertyIt(InStruct, EFieldIteratorFlags::IncludeSuper); PropertyIt; ++PropertyIt)
		{
			UProperty* Property = *PropertyIt;
			FName PropertyName = Property->GetFName();
			if ( FirstToken == PropertyName.ToString() )
			{
				if ( RemainingTokens.Len() == 0 )
				{
					return Property;
				}
				else
				{
					UStructProperty *StructProp = Cast<UStructProperty>(Property);
					if ( StructProp )
					{
						return GetPropertyByNameRecurse( StructProp->Struct, RemainingTokens );
					}
				}
			}
		}

		return NULL;
	}
开发者ID:kidaa,项目名称:UnrealEngineVR,代码行数:44,代码来源:K2Node_LiveEditObject.cpp

示例13: FindTableProperty

/** Returns the column property where PropertyName matches the name of the column property. Returns NULL if no match is found or the match is not a supported table property */
UProperty* UDataTable::FindTableProperty(const FName& PropertyName) const
{
    UProperty* Property = NULL;
    for (TFieldIterator<UProperty> It(RowStruct); It; ++It)
    {
        Property = *It;
        check(Property != NULL);
        if (PropertyName == Property->GetFName())
        {
            break;
        }
    }
    if (!DataTableUtils::IsSupportedTableProperty(Property))
    {
        Property = NULL;
    }

    return Property;
}
开发者ID:magetron,项目名称:UnrealEngine4-mod,代码行数:20,代码来源:DataTable.cpp

示例14: CopyFromStruct

void UGAAttributesBase::CopyFromStruct(UStruct* StructType, void* StructObject)
{
	for (TFieldIterator<UProperty> StrIt(StructType); StrIt; ++StrIt)
	{
		UProperty* Property = *StrIt;
		if (UStructProperty* StructProp = Cast<UStructProperty>(Property))
		{
			FAFAttributeBase* StructAttr = StructProp->ContainerPtrToValuePtr<FAFAttributeBase>(StructObject);
			UProperty* ThisProp = FindProperty(FGAAttribute(Property->GetFName()));
			if (ThisProp)
			{
				FAFAttributeBase* ThisAttribute = ThisProp->ContainerPtrToValuePtr<FAFAttributeBase>(this);
				if (StructAttr && ThisAttribute)
				{
					ThisAttribute->CopyFromOther(StructAttr);
				}
			}
		}
	}
}
开发者ID:iniside,项目名称:ActionRPGGame,代码行数:20,代码来源:GAAttributesBase.cpp

示例15: RegisterDelegateNet

	void RegisterDelegateNet(FKismetFunctionContext& Context, UK2Node_DelegateSet* DelegateNode)
	{
		check(DelegateNode);

		UEdGraphPin* DelegatePin = DelegateNode->GetDelegateOwner();
		check(DelegatePin);

		// Find the property on the specified scope
		UProperty* BoundProperty = NULL;
		for (TFieldIterator<UProperty> It(DelegateNode->DelegatePropertyClass, EFieldIteratorFlags::IncludeSuper); It; ++It)
		{
			UProperty* Prop = *It;
			if( Prop->GetFName() == DelegateNode->DelegatePropertyName )
			{
				check(Prop->HasAllPropertyFlags(CPF_BlueprintAssignable));
				BoundProperty = Prop;
				break;
			}
		}

		// Create a term for this property
		if( BoundProperty != NULL )
		{
			FBPTerminal* Term = new(Context.VariableReferences) FBPTerminal();
			Term->CopyFromPin(DelegatePin, DelegatePin->PinName);
			Term->AssociatedVarProperty = BoundProperty;

			Context.NetMap.Add(DelegatePin, Term);

			// Find the context for this term (the object owning the delegate property)
			FBPTerminal** pContextTerm = Context.NetMap.Find(FEdGraphUtilities::GetNetFromPin(DelegatePin));
			if( pContextTerm )
			{
				Term->Context = *pContextTerm;
			}
			else
			{
				CompilerContext.MessageLog.Error(*FString(*LOCTEXT("FindDynamicallyBoundDelegate_Error", "Couldn't find target for dynamically bound delegate node @@").ToString()), DelegateNode);
			}
		}
	}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:41,代码来源:K2Node_DelegateSet.cpp


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