From b1d1f9c2eb448ae0835ebe2b3d353b0fb4588da9 Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Sat, 15 Jul 2023 18:04:15 +0200 Subject: [PATCH] Prevent applying to target in GPose. --- Glamourer/Gui/Tabs/ActorTab/ActorPanel.cs | 2 +- Glamourer/Gui/Tabs/DesignTab/DesignPanel.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Glamourer/Gui/Tabs/ActorTab/ActorPanel.cs b/Glamourer/Gui/Tabs/ActorTab/ActorPanel.cs index 5b63afb..ae34869 100644 --- a/Glamourer/Gui/Tabs/ActorTab/ActorPanel.cs +++ b/Glamourer/Gui/Tabs/ActorTab/ActorPanel.cs @@ -372,7 +372,7 @@ public class ActorPanel ? "Apply the current state to your current target." : "The current target can not be manipulated." : "No valid target selected."; - if (!ImGuiUtil.DrawDisabledButton("Apply to Target", Vector2.Zero, tt, !data.Valid || id == _identifier || !_state!.ModelData.IsHuman)) + if (!ImGuiUtil.DrawDisabledButton("Apply to Target", Vector2.Zero, tt, !data.Valid || id == _identifier || !_state!.ModelData.IsHuman || _objects.IsInGPose)) return; if (_stateManager.GetOrCreate(id, data.Objects[0], out var state)) diff --git a/Glamourer/Gui/Tabs/DesignTab/DesignPanel.cs b/Glamourer/Gui/Tabs/DesignTab/DesignPanel.cs index 9fef3e1..648ea43 100644 --- a/Glamourer/Gui/Tabs/DesignTab/DesignPanel.cs +++ b/Glamourer/Gui/Tabs/DesignTab/DesignPanel.cs @@ -360,7 +360,7 @@ public class DesignPanel ? "Apply the current design with its settings to your current target." : "The current target can not be manipulated." : "No valid target selected."; - if (!ImGuiUtil.DrawDisabledButton("Apply to Target", Vector2.Zero, tt, !data.Valid)) + if (!ImGuiUtil.DrawDisabledButton("Apply to Target", Vector2.Zero, tt, !data.Valid || _objects.IsInGPose)) return; if (_state.GetOrCreate(id, data.Objects[0], out var state))