summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/all.h6
-rw-r--r--src/include/imgui_internal_widgets.h3
-rw-r--r--src/include/keybinds.h3
-rw-r--r--src/include/main.h21
-rw-r--r--src/include/memory.h2
5 files changed, 24 insertions, 11 deletions
diff --git a/src/include/all.h b/src/include/all.h
index a0368d8..9d7fe77 100644
--- a/src/include/all.h
+++ b/src/include/all.h
@@ -2,7 +2,7 @@
static uint32
Bezier_Shape_Sort(memory *Memory, shape_layer *Shape, bezier_point *PointData,
project_state *State, layer_transforms T, int Width, int Height,
- int CompWidth, int CompHeight, bool32 Interact);
+ int CompWidth, int CompHeight, real32 Radius, bool32 Interact);
static bezier_point *
Bezier_LookupAddress(memory *Memory, uint16 *Block_Bezier_Index, uint16 Index, bool32 AssertExists = 1);
@@ -317,7 +317,7 @@ ImGui_Viewport_TransformUI(project_data *File, project_state *State, memory *Mem
interact_transform *Interact, ImVec2 ViewportMin, uint32 CompWidth, uint32 CompHeight, uint16 *SortedKeyframeArray);
static void
-ImGui_Viewport_SelectedLayerUI(project_state *State, memory *Memory, ui *UI, ImGuiIO &io, ImDrawList *draw_list, block_composition *MainComp, uint32 CompIndex, block_layer *ParentLayer[4], uint32 Recursions,
+ImGui_Viewport_SelectedLayerUI(project_state *State, memory *Memory, ui *UI, ImGuiIO &io, ImDrawList *draw_list, block_composition *MainComp, uint32 CompIndex, block_layer *ParentLayer[4], uint32 Recursions, v2 *Min, v2 *Max,
sorted_comp_array *SortedCompArray, sorted_layer_array *SortedLayerArray);
static void
@@ -460,7 +460,7 @@ static void
Data_Decompress(memory *Memory, void *CompressedLocation, uint64 CompressedSize, void *BitmapLocation, uint64 ExpectedSize);
static uint32
-NVG_FlattenPath(memory *Memory, shape_layer *Shape, nvg_point *PointData,
+NVG_FlattenPath(memory *Memory, shape_layer *Shape, shape_options ShapeOpt, nvg_point *PointData,
project_state *State, layer_transforms T, int Width, int Height,
int CompWidth, int CompHeight, bool32 Interact, v2 *Min, v2 *Max);
diff --git a/src/include/imgui_internal_widgets.h b/src/include/imgui_internal_widgets.h
index 863e934..875d21c 100644
--- a/src/include/imgui_internal_widgets.h
+++ b/src/include/imgui_internal_widgets.h
@@ -6,7 +6,8 @@
// NOTE(fox): Appending to the standard ImGui namespace so I don't have to convert all the functions to ImGui::Function()
namespace ImGui {
- IMGUI_API void MyWindowSetup(ImGuiID id);
+ IMGUI_API void MyWindowSetup(ImGuiID *Placement, ImGuiID id);
+ IMGUI_API void MyDockWindow(char *Window, ImGuiID Dock);
IMGUI_API bool SliderLevels(const char* label, const char* label2, const char* label3, void* p_data, void* p_min, void* p_max);
IMGUI_API bool TestLine(ImVec2 P1, ImVec2 P2);
IMGUI_API bool BezierInteractive(ImVec2 p0, ImVec2 p1, ImVec2 p2, ImVec2 p3);
diff --git a/src/include/keybinds.h b/src/include/keybinds.h
index 7ea0499..ddacb49 100644
--- a/src/include/keybinds.h
+++ b/src/include/keybinds.h
@@ -45,7 +45,10 @@ static shortcut_entry ShortcutArray[] {
{ ImGuiKey_None, Mod_None, key_mode_viewport, "Hold right click to pan." },
{ ImGuiKey_None, Mod_None, key_mode_viewport, "Hold Z and drag left click to zoom." },
{ ImGuiKey_None, Mod_None, key_mode_viewport, "Press Enter or ctrl+click to commit a transform." },
+ { ImGuiKey_None, Mod_None, key_mode_viewport, "Hold alt while dragging a layer to duplicate it." },
{ ImGuiKey_T, Mod_None, key_mode_viewport, "Transform selected layers" },
+ { ImGuiKey_D, Mod_None, key_mode_viewport, "Stepped duplicate" },
+ { ImGuiKey_X, Mod_Shift, key_mode_viewport, "Swap stroke/fill colors of selected shape layers" },
{ ImGuiKey_Tab, Mod_None, key_mode_timeline, "Switch between timeline and graph" },
{ ImGuiKey_2, Mod_None, key_mode_timeline, "Toggle precomp view" },
diff --git a/src/include/main.h b/src/include/main.h
index 3129c5d..de33a25 100644
--- a/src/include/main.h
+++ b/src/include/main.h
@@ -248,10 +248,10 @@ struct sorted_file
struct shape_options {
int Visibility;
v4 FillCol = {1, 1, 1, 1};
- v4 StrokeCol = {1, 0, 0, 1};
- float StrokeWidth = 10;
- nvg_line_cap LineJoinType = NVG_ROUND;
- nvg_line_cap LineCapType = NVG_ROUND;
+ v4 StrokeCol = {0, 0, 0, 1};
+ float StrokeWidth = 0;
+ nvg_line_cap LineJoinType = NVG_SQUARE;
+ nvg_line_cap LineCapType = NVG_MITER;
real32 Roundness;
};
@@ -265,7 +265,6 @@ struct shape_layer {
// They get set once the shape becomes a shape layer!
real32 Width;
real32 Height;
- shape_options Opt;
};
enum timeline_mode
@@ -301,6 +300,7 @@ enum interact_type
interact_type_layer_timeadjust,
interact_type_viewport_selection,
interact_type_viewport_transform,
+ interact_type_viewport_transform_gizmo,
interact_type_viewport_duplicate,
interact_type_viewport_slide,
interact_type_keyframe_move,
@@ -341,6 +341,12 @@ struct interact_transform
uint32 TransformMode;
};
+struct interact_slide_layer
+{
+ uint16 Index;
+ real32 Offset[4];
+};
+
enum hotkey_input
{
hotkey_none,
@@ -483,6 +489,9 @@ struct project_state
real32 Interact_Offset[12];
real32 Interact_Dup_Previous[2];
void *Interact_Address;
+ int Interact_Count;
+
+ ImGuiID RightDock;
// NOTE(fox): We need to keep track of when the user changes the CurrentValue of a
// channel that has keyframes on it (i.e. CurrentValue will now evaluate to
@@ -547,6 +556,7 @@ struct ui
#endif
shape_layer Shape;
+ shape_options ShapeOpt;
ImU32 LayerColors[16] = {
0xff8b1f1f,
@@ -675,6 +685,7 @@ struct block_layer {
uint16 Block_Effect_Count;
shape_layer Shape;
+ shape_options ShapeOpt;
blend_mode BlendMode;
diff --git a/src/include/memory.h b/src/include/memory.h
index e6b7676..ae3fd61 100644
--- a/src/include/memory.h
+++ b/src/include/memory.h
@@ -2,7 +2,6 @@ enum memory_table_list {
P_AVInfo,
P_UndoBuffer,
- P_MiscCache,
F_File,
F_Precomps,
@@ -17,7 +16,6 @@ enum memory_table_list {
B_Thumbnails,
B_PointData,
B_ScratchSpace,
- B_CacheEntries,
B_CachedBitmaps,
M_Count