mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Implemented profile default loading and rendering without the editor
Changed edit tool rotation to allow rotation past 360 degrees
This commit is contained in:
1 parent
f8fc30ace2
commit
fabb385556
13 files changed
+116
-41
No files matched your search
@@ -7,6 +7,7 @@ namespace Artemis.Core.Services.Storage.Interfaces
|
||||
{
|
||||
public interface IProfileService : IArtemisService
|
||||
{
|
||||
void ActivateDefaultProfiles();
|
||||
Profile CreateProfile(ProfileModule module, string name);
|
||||
List<Profile> GetProfiles(ProfileModule module);
|
||||
Profile GetActiveProfile(ProfileModule module);
|
||||
|
||||
@@ -14,7 +14,7 @@ using Newtonsoft.Json;
|
||||
namespace Artemis.Core.Services.Storage
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides access to profile storage
|
||||
/// Provides access to profile storage and is responsible for activating default profiles
|
||||
/// </summary>
|
||||
public class ProfileService : IProfileService
|
||||
{
|
||||
@@ -35,6 +35,14 @@ namespace Artemis.Core.Services.Storage
|
||||
_pluginService.PluginLoaded += OnPluginLoaded;
|
||||
}
|
||||
|
||||
public void ActivateDefaultProfiles()
|
||||
{
|
||||
foreach (var profileModule in _pluginService.GetPluginsOfType<ProfileModule>())
|
||||
{
|
||||
var activeProfile = GetActiveProfile(profileModule);
|
||||
ActivateProfile(profileModule, activeProfile);
|
||||
}
|
||||
}
|
||||
|
||||
public List<Profile> GetProfiles(ProfileModule module)
|
||||
{
|
||||
@@ -204,6 +212,11 @@ namespace Artemis.Core.Services.Storage
|
||||
ActiveProfilesInstantiateProfileLayerBrushes();
|
||||
ActiveProfilesInstantiateKeyframeEngines();
|
||||
}
|
||||
else if (e.PluginInfo.Instance is ProfileModule profileModule)
|
||||
{
|
||||
var activeProfile = GetActiveProfile(profileModule);
|
||||
ActivateProfile(profileModule, activeProfile);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in new issue
Block a user