Fix issue with materials.

This commit is contained in:
Ottermandias 2024-03-14 16:22:27 +01:00
parent 7af0a1d562
commit 5ddf882077
2 changed files with 3 additions and 1 deletions

View file

@ -162,6 +162,7 @@ public sealed unsafe class AdvancedDyePopup(
ImGui.SetNextWindowPos(position);
flags |= ImGuiWindowFlags.NoMove;
}
var size = new Vector2(7 * ImGui.GetFrameHeight() + 3 * ImGui.GetStyle().ItemInnerSpacing.X + 300 * ImGuiHelpers.GlobalScale,
18 * ImGui.GetFrameHeightWithSpacing() + ImGui.GetStyle().WindowPadding.Y + 2 * ImGui.GetStyle().ItemSpacing.Y);
ImGui.SetNextWindowSize(size);
@ -261,6 +262,7 @@ public sealed unsafe class AdvancedDyePopup(
else
{
_anyChanged = true;
value = new MaterialValueState(value.Game, value.Model, value.DrawData, StateSource.Manual);
}
var buttonSize = new Vector2(ImGui.GetFrameHeight());

View file

@ -331,7 +331,7 @@ public class StateEditor(
var source = settings.Source.SetPending();
if (state.Materials.TryGetValue(idx, out var materialState))
{
if (settings.RespectManual && !materialState.Source.IsManual())
if (settings.RespectManual && materialState.Source.IsManual())
continue;
if (value.Revert)