summaryrefslogtreecommitdiff
path: root/createcalls.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'createcalls.cpp')
-rw-r--r--createcalls.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/createcalls.cpp b/createcalls.cpp
index c2122c2..d0ca03e 100644
--- a/createcalls.cpp
+++ b/createcalls.cpp
@@ -65,6 +65,27 @@ Property_GetInfo(memory *Memory, property_channel *Property)
return PropertyInfo;
}
+static graph_info
+Graph_GetInfo(project_data *File, memory *Memory)
+{
+ graph_info GraphInfo = {};
+ for (int a = 0; a < File->Layer_Count; a++) {
+ block_layer *Layer = (block_layer *)Memory_Block_AddressAtIndex(Memory, F_Layers, a);
+ if (!Layer->IsSelected)
+ continue;
+ for (int h = 0; h < AmountOf(Layer->Property); h++) {
+ property_channel *Property = &Layer->Property[h];
+ if (Property->Keyframe_Count) {
+ property_info PropertyInfo = Property_GetInfo(Memory, Property);
+ GraphInfo.MinVal = (PropertyInfo.MinVal < GraphInfo.MinVal) ? PropertyInfo.MinVal : GraphInfo.MinVal;
+ GraphInfo.MaxVal = (PropertyInfo.MaxVal > GraphInfo.MaxVal) ? PropertyInfo.MaxVal : GraphInfo.MaxVal;
+ }
+ }
+ GraphInfo.LowestOffset = (Layer->Vertical_Offset > GraphInfo.LowestOffset) ? Layer->Vertical_Offset : GraphInfo.LowestOffset;
+ }
+ return GraphInfo;
+}
+
static void
Layer_Interact_Evaluate(memory *Memory, project_state *State, uint16 Layer_Index_Physical, sorted_comp_info SortedCompInfo, sorted_layer *SortedLayerInfo,
int32 *Frame_Start, int32 *Frame_End, real32 *Vertical_Offset)