本文整理汇总了C++中USceneComponent::GetOuter方法的典型用法代码示例。如果您正苦于以下问题:C++ USceneComponent::GetOuter方法的具体用法?C++ USceneComponent::GetOuter怎么用?C++ USceneComponent::GetOuter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类USceneComponent
的用法示例。
在下文中一共展示了USceneComponent::GetOuter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InputWidgetDelta
//.........这里部分代码省略.........
FRotator OldRelativeRotation = SelectedTemplate->RelativeRotation;
FVector OldRelativeScale3D = SelectedTemplate->RelativeScale3D;
// Adjust the deltas as necessary
FComponentEditorUtils::AdjustComponentDelta(SceneComp, Drag, Rot);
TSharedPtr<ISCSEditorCustomization> Customization = BlueprintEditor->CustomizeSCSEditor(SceneComp);
if(Customization.IsValid() && Customization->HandleViewportDrag(SceneComp, SelectedTemplate, Drag, Rot, ModifiedScale, GetWidgetLocation()))
{
UpdatedComponents.Add(SceneComp);
UpdatedComponents.Add(SelectedTemplate);
}
else
{
// Apply delta to the preview actor's scene component
GEditor->ApplyDeltaToComponent(
SceneComp,
true,
&Drag,
&Rot,
&ModifiedScale,
SceneComp->RelativeLocation );
UpdatedComponents.Add(SceneComp);
// Apply delta to the template component object
GEditor->ApplyDeltaToComponent(
SelectedTemplate,
true,
&Drag,
&Rot,
&ModifiedScale,
SelectedTemplate->RelativeLocation );
UpdatedComponents.Add(SelectedTemplate);
}
UBlueprint* PreviewBlueprint = UBlueprint::GetBlueprintFromClass(PreviewActor->GetClass());
if(PreviewBlueprint != NULL)
{
// Like PostEditMove(), but we only need to re-run construction scripts
if(PreviewBlueprint && PreviewBlueprint->bRunConstructionScriptOnDrag)
{
PreviewActor->RerunConstructionScripts();
}
SceneComp->PostEditComponentMove(true); // @TODO HACK passing 'finished' every frame...
// If a constraint, copy back updated constraint frames to template
UPhysicsConstraintComponent* ConstraintComp = Cast<UPhysicsConstraintComponent>(SceneComp);
UPhysicsConstraintComponent* TemplateComp = Cast<UPhysicsConstraintComponent>(SelectedTemplate);
if(ConstraintComp && TemplateComp)
{
TemplateComp->ConstraintInstance.CopyConstraintGeometryFrom(&ConstraintComp->ConstraintInstance);
}
// Iterate over all the active archetype instances and propagate the change(s) to the matching component instance
TArray<UObject*> ArchetypeInstances;
if(SelectedTemplate->HasAnyFlags(RF_ArchetypeObject))
{
SelectedTemplate->GetArchetypeInstances(ArchetypeInstances);
for(int32 InstanceIndex = 0; InstanceIndex < ArchetypeInstances.Num(); ++InstanceIndex)
{
SceneComp = Cast<USceneComponent>(ArchetypeInstances[InstanceIndex]);
if(SceneComp && SceneComp->GetOwner() != PreviewActor)
{
FComponentEditorUtils::ApplyDefaultValueChange(SceneComp, SceneComp->RelativeLocation, OldRelativeLocation, SelectedTemplate->RelativeLocation);
FComponentEditorUtils::ApplyDefaultValueChange(SceneComp, SceneComp->RelativeRotation, OldRelativeRotation, SelectedTemplate->RelativeRotation);
FComponentEditorUtils::ApplyDefaultValueChange(SceneComp, SceneComp->RelativeScale3D, OldRelativeScale3D, SelectedTemplate->RelativeScale3D);
}
}
}
else if(UObject* Outer = SelectedTemplate->GetOuter())
{
Outer->GetArchetypeInstances(ArchetypeInstances);
for(int32 InstanceIndex = 0; InstanceIndex < ArchetypeInstances.Num(); ++InstanceIndex)
{
if(ArchetypeInstances[InstanceIndex] != PreviewActor)
{
SceneComp = static_cast<USceneComponent*>(FindObjectWithOuter(ArchetypeInstances[InstanceIndex], SelectedTemplate->GetClass(), SelectedTemplate->GetFName()));
if(SceneComp)
{
FComponentEditorUtils::ApplyDefaultValueChange(SceneComp, SceneComp->RelativeLocation, OldRelativeLocation, SelectedTemplate->RelativeLocation);
FComponentEditorUtils::ApplyDefaultValueChange(SceneComp, SceneComp->RelativeRotation, OldRelativeRotation, SelectedTemplate->RelativeRotation);
FComponentEditorUtils::ApplyDefaultValueChange(SceneComp, SceneComp->RelativeScale3D, OldRelativeScale3D, SelectedTemplate->RelativeScale3D);
}
}
}
}
}
}
}
}
GUnrealEd->RedrawLevelEditingViewports();
}
}
Invalidate();
}
return bHandled;
}