mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Profiles - Reworked render pipeline
Profiles - Added two transform modes, normal and clip Intro animation - Disable with debugger attached Profile editor - Added layer copy
This commit is contained in:
1 parent
d37c70371c
commit
427d3d2521
21 files changed
+394
-389
No files matched your search
@@ -289,7 +289,6 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties
|
||||
bool hideRenderRelatedProperties = SelectedLayer?.LayerBrush != null && !SelectedLayer.LayerBrush.SupportsTransformation;
|
||||
|
||||
SelectedLayer.General.ShapeType.IsHidden = hideRenderRelatedProperties;
|
||||
SelectedLayer.General.ResizeMode.IsHidden = hideRenderRelatedProperties;
|
||||
SelectedLayer.General.BlendMode.IsHidden = hideRenderRelatedProperties;
|
||||
SelectedLayer.Transform.IsHidden = hideRenderRelatedProperties;
|
||||
|
||||
|
||||
@@ -122,11 +122,11 @@ namespace Artemis.UI.Screens.ProfileEditor.ProfileTree
|
||||
_updatingTree = false;
|
||||
|
||||
// Auto-select the first layer
|
||||
if (_profileEditorService.SelectedProfile != null && SelectedTreeItem == null)
|
||||
{
|
||||
if (_profileEditorService.SelectedProfile.GetRootFolder().Children.FirstOrDefault() is RenderProfileElement firstElement)
|
||||
Execute.PostToUIThread(() => _profileEditorService.ChangeSelectedProfileElement(firstElement));
|
||||
}
|
||||
// if (_profileEditorService.SelectedProfile != null && SelectedTreeItem == null)
|
||||
// {
|
||||
// if (_profileEditorService.SelectedProfile.GetRootFolder().Children.FirstOrDefault() is RenderProfileElement firstElement)
|
||||
// Execute.PostToUIThread(() => _profileEditorService.ChangeSelectedProfileElement(firstElement));
|
||||
// }
|
||||
}
|
||||
|
||||
private static DragDropType GetDragDropType(IDropInfo dropInfo)
|
||||
|
||||
@@ -17,6 +17,11 @@
|
||||
<MenuItem.Icon>
|
||||
<materialDesign:PackIcon Kind="RenameBox" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Copy" Command="{s:Action CopyElement}">
|
||||
<MenuItem.Icon>
|
||||
<materialDesign:PackIcon Kind="ContentCopy" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Delete" Command="{s:Action DeleteElement}">
|
||||
<MenuItem.Icon>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Artemis.Core;
|
||||
using System.Threading.Tasks;
|
||||
using Artemis.Core;
|
||||
using Artemis.Core.Services;
|
||||
using Artemis.UI.Ninject.Factories;
|
||||
using Artemis.UI.Shared.Services;
|
||||
@@ -7,6 +8,8 @@ namespace Artemis.UI.Screens.ProfileEditor.ProfileTree.TreeItem
|
||||
{
|
||||
public class LayerViewModel : TreeItemViewModel
|
||||
{
|
||||
private readonly IProfileEditorService _profileEditorService;
|
||||
|
||||
public LayerViewModel(ProfileElement layer,
|
||||
IProfileEditorService profileEditorService,
|
||||
IDialogService dialogService,
|
||||
@@ -15,6 +18,16 @@ namespace Artemis.UI.Screens.ProfileEditor.ProfileTree.TreeItem
|
||||
ISurfaceService surfaceService) :
|
||||
base(layer, profileEditorService, dialogService, profileTreeVmFactory, layerBrushService, surfaceService)
|
||||
{
|
||||
_profileEditorService = profileEditorService;
|
||||
}
|
||||
|
||||
public async void CopyElement()
|
||||
{
|
||||
Layer layer = Layer.CreateCopy();
|
||||
|
||||
_profileEditorService.UpdateSelectedProfile();
|
||||
// await Task.Delay(200);
|
||||
_profileEditorService.ChangeSelectedProfileElement(layer);
|
||||
}
|
||||
|
||||
public Layer Layer => ProfileElement as Layer;
|
||||
|
||||
Reference in new issue
Block a user