FString UDebugSkelMeshComponent::GetPreviewText() const { #define LOCTEXT_NAMESPACE "SkelMeshComponent" if (IsPreviewOn()) { if (UBlendSpaceBase* BlendSpace = Cast<UBlendSpaceBase>(PreviewInstance->CurrentAsset)) { return FText::Format( LOCTEXT("BlendSpace", "Blend Space {0}"), FText::FromString(BlendSpace->GetName()) ).ToString(); } else if (UAnimMontage* Montage = Cast<UAnimMontage>(PreviewInstance->CurrentAsset)) { return FText::Format( LOCTEXT("Montage", "Montage {0}"), FText::FromString(Montage->GetName()) ).ToString(); } else if(UAnimComposite* Composite = Cast<UAnimComposite>(PreviewInstance->CurrentAsset)) { return FText::Format(LOCTEXT("Composite", "Composite {0}"), FText::FromString(Composite->GetName())).ToString(); } else if (UAnimSequence* Sequence = Cast<UAnimSequence>(PreviewInstance->CurrentAsset)) { return FText::Format( LOCTEXT("Animation", "Animation {0}"), FText::FromString(Sequence->GetName()) ).ToString(); } else if (UVertexAnimation* VertAnim = Cast<UVertexAnimation>(PreviewInstance->CurrentVertexAnim)) { return FText::Format( LOCTEXT("VertexAnim", "VertexAnim {0}"), FText::FromString(VertAnim->GetName()) ).ToString(); } } return LOCTEXT("ReferencePose", "Reference Pose").ToString(); #undef LOCTEXT_NAMESPACE }
void MatchTemplatePlugin::DoPreview() { if (!IsPreviewOn()) return; cm->ReloadCurrentFrameContours(false); ProcessImage(&cm->img, cm->GetPos(), cm->GetZPos()); cm->Redraw(false); }
void CamShiftPlugin::DoPreview() { if (!IsPreviewOn()) return; cm->ReloadCurrentFrameContours(false); ProcessImage(&cm->img, cm->GetPos()); cm->Redraw(false); }
void NormalizeContoursPlugin::DoPreview() { if (!IsPreviewOn()) return; cm->ReloadCurrentFrameContours(false); ProcessImage(&cm->img); cm->Redraw(false); }
void SmoothPlugin::DoPreview() { if (!IsPreviewOn()) return; cm->ReloadCurrentFrame(false); ProcessImage(&cm->img); cm->Redraw(false); }
void UDebugSkelMeshComponent::EnablePreview(bool bEnable, UAnimationAsset* PreviewAsset, UVertexAnimation* PreviewVertexAnim) { if (PreviewInstance) { if (bEnable) { // back up current AnimInstance if not currently previewing anything if (!IsPreviewOn()) { SavedAnimScriptInstance = AnimScriptInstance; } AnimScriptInstance = PreviewInstance; #if WITH_APEX_CLOTHING // turn off these options when playing animations because max distances / back stops don't have meaning while moving bDisplayClothMaxDistances = false; bDisplayClothBackstops = false; // restore previous state bDisableClothSimulation = bPrevDisableClothSimulation; #endif // #if WITH_APEX_CLOTHING if(PreviewAsset) { PreviewInstance->SetVertexAnimation(NULL); PreviewInstance->SetAnimationAsset(PreviewAsset); } else { PreviewInstance->SetAnimationAsset(NULL); PreviewInstance->SetVertexAnimation(PreviewVertexAnim); } } else if (IsPreviewOn()) { if (PreviewInstance->CurrentAsset == PreviewAsset || PreviewAsset == NULL) { // now recover to saved AnimScriptInstance; AnimScriptInstance = SavedAnimScriptInstance; PreviewInstance->SetAnimationAsset(NULL); PreviewInstance->SetVertexAnimation(NULL); } } } }
void FindFeaturesPlugin::DoPreview() { if (!IsPreviewOn()) return; if (!sidebar->clean->GetValue()) cm->ReloadCurrentFrameContours(false); ProcessImage(&cm->img); cm->Redraw(false); }