void FWidgetBlueprintEditor::ChangeViewedAnimation( UWidgetAnimation& InAnimationToView )
{
	TSharedRef<FUMGSequencerObjectBindingManager> NewObjectBindingManager = MakeShareable(new FUMGSequencerObjectBindingManager(*this, InAnimationToView));
	Sequencer->ResetToNewRootMovieScene(*InAnimationToView.MovieScene, NewObjectBindingManager);

	check(SequencerObjectBindingManager.IsUnique());
	SequencerObjectBindingManager = NewObjectBindingManager;
	SequencerObjectBindingManager->InitPreviewObjects();

	TSharedPtr<SOverlay> SequencerOverlayPin = SequencerOverlay.Pin();
	if (SequencerOverlayPin.IsValid())
	{
		TSharedPtr<STextBlock> NoAnimationTextBlockPin = NoAnimationTextBlock.Pin();
		if( &InAnimationToView == UWidgetAnimation::GetNullAnimation())
		{
			// Disable sequencer from interaction
			Sequencer->GetSequencerWidget()->SetEnabled(false);
			Sequencer->SetAutoKeyEnabled(false);
			NoAnimationTextBlockPin->SetVisibility(EVisibility::Visible);
			SequencerOverlayPin->SetVisibility( EVisibility::HitTestInvisible );
		}
		else
		{
			// Allow sequencer to be interacted with
			Sequencer->GetSequencerWidget()->SetEnabled(true);
			NoAnimationTextBlockPin->SetVisibility(EVisibility::Collapsed);
			SequencerOverlayPin->SetVisibility( EVisibility::SelfHitTestInvisible );
		}
	}
	InvalidatePreview();
}
void CPrint::UpdateSizeView()
{
	UpdateData();
	CWnd* item =  GetDlgItem(IDC_STATIC_WIDTH);

	if(2 == m_iPageSize)
	{
		item->EnableWindow();
		item =  GetDlgItem(IDC_WIDTH);
		item->EnableWindow();
		item =  GetDlgItem(IDC_WIDTH_UNITS);
		item->EnableWindow();
		item =  GetDlgItem(IDC_STATIC_HEIGHT);
		item->EnableWindow();
		item =  GetDlgItem(IDC_HEIGHT);
		item->EnableWindow();
		item =  GetDlgItem(IDC_HEIGHT_UNITS);
		item->EnableWindow();
	}
	else
	{
		item->EnableWindow(false);
		item =  GetDlgItem(IDC_WIDTH);
		item->EnableWindow(false);
		item =  GetDlgItem(IDC_WIDTH_UNITS);
		item->EnableWindow(false);
		item =  GetDlgItem(IDC_STATIC_HEIGHT);
		item->EnableWindow(false);
		item =  GetDlgItem(IDC_HEIGHT);
		item->EnableWindow(false);
		item =  GetDlgItem(IDC_HEIGHT_UNITS);
		item->EnableWindow(false);
	}
	InvalidatePreview();
}
void CPrint::OnSetup() 
{
	PRINTDLG print;
	print = m_PrintDlg.m_pd;
	m_bRepaintPreview = false;

	if(IDCANCEL == m_PrintDlg.DoModal()){
		m_PrintDlg.m_pd = print;
		InvalidatePreview();
		m_bRepaintPreview = true;
		return;
	}
	
	SetDlgItemText(IDC_PRINTER, m_PrintDlg.GetDeviceName());
	m_bRepaintPreview = true;
	InvalidatePreview();
}
void CPrint::OnTitleOn() 
{
	CWnd* item =  GetDlgItem(IDC_TITLE);

	if(BST_CHECKED == IsDlgButtonChecked(IDC_TITLE_ON))
		item->EnableWindow();
	else
		item->EnableWindow(false);

	InvalidatePreview();
}
void FSCSEditorViewportClient::Tick(float DeltaSeconds)
{
	FEditorViewportClient::Tick(DeltaSeconds);

	// Register the selection override delegate for the preview actor's components
	TSharedPtr<SSCSEditor> SCSEditor = BlueprintEditorPtr.Pin()->GetSCSEditor();
	AActor* PreviewActor = GetPreviewActor();
	if (PreviewActor != nullptr)
	{
		TInlineComponentArray<UPrimitiveComponent*> PrimitiveComponents;
		PreviewActor->GetComponents(PrimitiveComponents);

		for (int32 CompIdx = 0; CompIdx < PrimitiveComponents.Num(); ++CompIdx)
		{
			UPrimitiveComponent* PrimComponent = PrimitiveComponents[CompIdx];
			if (!PrimComponent->SelectionOverrideDelegate.IsBound())
			{
				SCSEditor->SetSelectionOverride(PrimComponent);
			}
		}
	}
	else
	{
		InvalidatePreview(false);
	}

	if ( PreviewActor != LastPreviewActor.Get() || PreviewActor == nullptr || IsRealtime() )
	{
		LastPreviewActor = PreviewActor;

		Invalidate();
		RefreshPreviewBounds();
	}

	// Tick the preview scene world.
	if (!GIntraFrameDebuggingGameThread)
	{
		// Ensure that the preview actor instance is up-to-date for component editing (e.g. after compiling the Blueprint, the actor may be reinstanced outside of this class)
		if(PreviewActor != BlueprintEditorPtr.Pin()->GetBlueprintObj()->SimpleConstructionScript->GetComponentEditorActorInstance())
		{
			BlueprintEditorPtr.Pin()->GetBlueprintObj()->SimpleConstructionScript->SetComponentEditorActorInstance(PreviewActor);
		}

		// Allow full tick only if preview simulation is enabled and we're not currently in an active SIE or PIE session
		if(bIsSimulateEnabled && GEditor->PlayWorld == NULL && !GEditor->bIsSimulatingInEditor)
		{
			PreviewScene->GetWorld()->Tick(IsRealtime() ? LEVELTICK_All : LEVELTICK_TimeOnly, DeltaSeconds);
		}
		else
		{
			PreviewScene->GetWorld()->Tick(IsRealtime() ? LEVELTICK_ViewportsOnly : LEVELTICK_TimeOnly, DeltaSeconds);
		}
	}
}
void CPrint::OnSelchangeHeightUnits() {	InvalidatePreview();}
void CPrint::OnSelchangeWidthUnits() {	InvalidatePreview();}
void CPrint::OnChangeHeight() {	InvalidatePreview();}
void CPrint::OnChangeWidth() { InvalidatePreview();}
void CPrint::OnEquations() { InvalidatePreview();}
void CPrint::OnCenter() { InvalidatePreview();}
Exemple #12
0
void CSVGGradientEditCtl::NewColor(COLORREF newrgb)
{
	PrepareRange();
	InvalidatePreview();
	InvalidateGradient();
}