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


C++ UInterpGroupInst::GetGroupActor方法代码示例

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


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

示例1: PreCreateTrack

bool UMatineeTrackVectorPropHelper::PreCreateTrack( UInterpGroup* Group, const UInterpTrack *TrackDef, bool bDuplicatingTrack, bool bAllowPrompts ) const
{
	bool bResult = true;

	if( bAllowPrompts && bDuplicatingTrack == false )
	{
		bResult = false;

		// For Property tracks - pop up a dialog to choose property name.
		TrackAddPropName = NAME_None;

		FEdModeInterpEdit* Mode = (FEdModeInterpEdit*)GEditorModeTools().GetActiveMode( FBuiltinEditorModes::EM_InterpEdit );
		check(Mode != NULL);

		IMatineeBase* InterpEd = Mode->InterpEd;
		check(InterpEd != NULL);

		UInterpGroupInst* GrInst = InterpEd->GetMatineeActor()->FindFirstGroupInst(Group);
		check(GrInst);

		AActor* Actor = GrInst->GetGroupActor();
		if ( Actor != NULL )
		{
			TArray<FName> PropNames;
			FMatineeUtils::GetInterpVectorPropertyNames(Actor, PropNames);
			bResult = ChooseProperty(PropNames);
		}
	}

	return bResult;
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:31,代码来源:MatineeTrackHelpers.cpp

示例2: RestoreActorState

void UFaceFXMatineeControlInst::RestoreActorState(UInterpTrack* Track)
{
	UInterpGroupInst* GrInst = CastChecked<UInterpGroupInst>( GetOuter() );

	//called when matinee closes. In that case we stop any running animation/sounds
	if(const AActor* GroupActor = GrInst->GetGroupActor())
	{
		if(UFaceFXComponent* FaceFXComp = GroupActor->FindComponentByClass<UFaceFXComponent>())
		{
			FaceFXComp->StopAll();
		}
	}
}
开发者ID:oliverzx,项目名称:FaceFX-UE4,代码行数:13,代码来源:FaceFXMatineeControlInst.cpp

示例3: CreateFromInterpGroup

bool UCameraAnim::CreateFromInterpGroup(class UInterpGroup* SrcGroup, class AMatineeActor* InMatineeActor)
{
	// assert we're controlling a camera actor
#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
	{
		UInterpGroupInst* GroupInst = InMatineeActor ? InMatineeActor->FindFirstGroupInst(SrcGroup) : NULL;
		if (GroupInst)
		{
			check( GroupInst->GetGroupActor()->IsA(ACameraActor::StaticClass()) );
		}
	}
#endif
	
	// copy length information
	AnimLength = (InMatineeActor && InMatineeActor->MatineeData) ? InMatineeActor->MatineeData->InterpLength : 0.f;

	UInterpGroup* OldGroup = CameraInterpGroup;

	if (CameraInterpGroup != SrcGroup)
	{
		// copy the source interp group for use in the CameraAnim
		// @fixme jf: fixed this potentially creating an object of UInterpGroup and raw casting it to InterpGroupCamera.  No source data in UE4 to test though.
		CameraInterpGroup = Cast<UInterpGroupCamera>(StaticDuplicateObject(SrcGroup, this, NAME_None, RF_AllFlags, UInterpGroupCamera::StaticClass()));

		if (CameraInterpGroup)
		{
			// delete the old one, if it exists
			if (OldGroup)
			{
				OldGroup->MarkPendingKill();
			}

			// success!
			return true;
		}
		else
		{
			// creation of new one failed somehow, restore the old one
			CameraInterpGroup = OldGroup;
		}
	}
	else
	{
		// no need to perform work above, but still a "success" case
		return true;
	}

	// failed creation
	return false;
}
开发者ID:WasPedro,项目名称:UnrealEngine4.11-HairWorks,代码行数:50,代码来源:CameraAnim.cpp

示例4: GetGroupActor

AActor* UInterpTrackHelper::GetGroupActor(const UInterpTrack* Track) const
{
	FEdModeInterpEdit* mode = (FEdModeInterpEdit*)GEditorModeTools().GetActiveMode( FBuiltinEditorModes::EM_InterpEdit );
	check(mode != NULL);

	IMatineeBase* InterpEd = mode->InterpEd;
	check(InterpEd != NULL);

	UInterpGroupInst* GrInst = NULL;

	// Traverse through the selected tracks in hopes of finding the associated group. 
	for( FSelectedTrackIterator TrackIt(InterpEd->GetSelectedTrackIterator()); TrackIt; ++TrackIt )
	{
		if( (*TrackIt) == Track )
		{
			GrInst = InterpEd->GetMatineeActor()->FindFirstGroupInst(TrackIt.GetGroup());
			break;
		}
	}
	
	return ( GrInst != NULL ) ? GrInst->GetGroupActor() : NULL;
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:22,代码来源:MatineeTrackHelpers.cpp

示例5: DrawTrack

void UFaceFXMatineeControl::DrawTrack( FCanvas* Canvas, UInterpGroup* Group, const FInterpTrackDrawParams& Params )
{
	static const FColor	KeySelectedColor(255,128,0);
	static const FColor KeyLabelColor(225,225,225);
	static const FColor KeyBackgroundColor(0,150,200);
	static const FColor KeyColorBlack(0,0,0);
	static const int32	KeyVertOffset = 3;

	const bool bHitTesting = Canvas->IsHitTesting();
	const bool bAllowBarSelection = bHitTesting && Params.bAllowKeyframeBarSelection;
	const bool bAllowTextSelection = bHitTesting && Params.bAllowKeyframeTextSelection;

	AMatineeActor* MatineeActor = CastChecked<AMatineeActor>(Group->GetOuter()->GetOuter());
	UInterpGroupInst* GroupInst = MatineeActor->FindFirstGroupInst(Group);
	const AActor* GroupActor = GroupInst ? GroupInst->GetGroupActor() : nullptr;

	//cached animation ids
	TArray<FFaceFXAnimId> AnimIds;
	AnimIds.AddUninitialized(Keys.Num());
	
	//Draw the tiles for each animation
	for (int32 i = 0; i < Keys.Num(); i++)
	{
		const FFaceFXTrackKey& AnimKey = Keys[i];

		FFaceFXAnimId AnimationId;
		if(AnimKey.AnimationId.IsValid())
		{
			AnimationId = AnimKey.AnimationId;
		}
		else if(const UFaceFXAnim* Animation = GetAnimation(AnimKey, this))
		{
			AnimationId = Animation->GetId();
		}

		AnimIds[i] = AnimationId;

		//determine animation duration
		const float AnimStartTime = AnimKey.Time;
		const float AnimEndTime = AnimStartTime + AnimKey.GetAnimationDuration(GroupActor);

		const int32 StartPixelPos = FMath::TruncToInt((AnimStartTime - Params.StartTime) * Params.PixelsPerSec);
		const int32 EndPixelPos = FMath::TruncToInt((AnimEndTime - Params.StartTime) * Params.PixelsPerSec);

		// Find if this sound is one of the selected ones.
		bool bKeySelected = false;
		for (const FInterpEdSelKey& SelectedKey : Params.SelectedKeys)
		{
			if(SelectedKey.Group == Group && SelectedKey.Track == this && SelectedKey.KeyIndex == i)
			{
				bKeySelected = true;
				break;
			}
		}

		const FColor& BorderColor = bKeySelected ? KeySelectedColor : KeyColorBlack;

		if(bAllowBarSelection) 
		{
			Canvas->SetHitProxy(new HInterpTrackKeypointProxy(Group, this, i));
		}
		Canvas->DrawTile(StartPixelPos, KeyVertOffset, EndPixelPos - StartPixelPos + 1, FMath::TruncToFloat(Params.TrackHeight - 2.f*KeyVertOffset), 0.f, 0.f, 1.f, 1.f, BorderColor);
		Canvas->DrawTile(StartPixelPos+1, KeyVertOffset+1, EndPixelPos - StartPixelPos - 1, FMath::TruncToFloat(Params.TrackHeight - 2.f*KeyVertOffset) - 2, 0.f, 0.f, 1.f, 1.f, KeyBackgroundColor);
		if(bAllowBarSelection)
		{
			Canvas->SetHitProxy(nullptr);
		}
	}
	
	// Use base-class to draw key triangles
	Super::DrawTrack( Canvas, Group, Params );

	//Draw animation names on top
	for (int32 i = 0; i < Keys.Num(); i++)
	{
		const FFaceFXTrackKey& AnimKey = Keys[i];
		
		//fetch the cached animation id for the key
		const FFaceFXAnimId& AnimId = AnimIds[i];

		FString AnimName(TEXT("Unknown"));
		if(AnimId.IsValid())
		{
			AnimName = AnimId.Group.IsNone() ? TEXT("") : AnimId.Group.ToString() + TEXT(" / ");
			AnimName += AnimId.Name.ToString();
		}

		if(AnimKey.bLoop)
		{
			AnimName += TEXT(" [Looping]");
		}

		int32 XL, YL;
		StringSize(GEngine->GetSmallFont(), XL, YL, *AnimName);

		if (bAllowTextSelection)
		{
			Canvas->SetHitProxy(new HInterpTrackKeypointProxy(Group, this, i));
		}

//.........这里部分代码省略.........
开发者ID:eirland,项目名称:FaceFX-UE4,代码行数:101,代码来源:FaceFXMatineeControl.cpp


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