summaryrefslogtreecommitdiff
path: root/src/imgui_ui_properties.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/imgui_ui_properties.cpp')
-rw-r--r--src/imgui_ui_properties.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/imgui_ui_properties.cpp b/src/imgui_ui_properties.cpp
index 5fda218..c6b710c 100644
--- a/src/imgui_ui_properties.cpp
+++ b/src/imgui_ui_properties.cpp
@@ -301,7 +301,7 @@ ImGui_PropertiesPanel(project_data *File, project_state *State, ui *UI, memory *
ImGui::PushID(Property);
if ((h - 1) < AmountOf(Layer->Property) && c == 0) {
if (ImGui::Button("K")) {
- Property_AddKeyframe(Memory, F_Layers, Property, State->Frame_Current, ArrayLocation);
+ Property_AddKeyframe(Memory, F_Layers, Property, State->Frame_Current - Layer->Frame_Offset, ArrayLocation);
}
ImGui::SameLine();
#if DEBUG
@@ -358,14 +358,14 @@ ImGui_PropertiesPanel(project_data *File, project_state *State, ui *UI, memory *
if (EffectHeader->DisplayType == effect_display_type_standard) {
if (ChannelHeader.DisplayType == property_display_type_standard) {
if (ImGui::Button("K")) {
- Property_AddKeyframe(Memory, F_Properties, Property, State->Frame_Current, ArrayLocation);
+ Property_AddKeyframe(Memory, F_Properties, Property, State->Frame_Current - Layer->Frame_Offset, ArrayLocation);
}
ImGui::SameLine();
ImGui::DragScalar(Name, ImGuiDataType_Float, &Property->CurrentValue, Property->ScrubVal, &Property->MinVal, &Property->MaxVal, "%f");
ImGui_Properties_Slider(State, Memory, Property, io, WindowMinAbs, WindowMaxAbs, F_Properties);
} else if (ChannelHeader.DisplayType == property_display_type_color) {
if (ImGui::Button("K")) {
- Property_AddKeyframe(Memory, F_Properties, Property, State->Frame_Current, ArrayLocation);
+ Property_AddKeyframe(Memory, F_Properties, Property, State->Frame_Current - Layer->Frame_Offset, ArrayLocation);
}
ImGui::SameLine();
ImGui::DragScalar(Name, ImGuiDataType_Float, &Property->CurrentValue, Property->ScrubVal, &Property->MinVal, &Property->MaxVal, "%f");