Skip to content

Commit

Permalink
- made a search for chroma-key to insert FXs before it.
Browse files Browse the repository at this point in the history
- Added "VAF: " prefix in the FXs names.
  • Loading branch information
Zly-u committed Mar 16, 2024
1 parent a6d90b2 commit 86cf768
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Video/VideoAutoFlipper/VP_Presets/AspectratioFixer.eel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Aspectratio fixer
// VAF: Aspectratio fixer
//@param1:p_bg_clr 'green/blue bg' 1 0 1 0.1 1

gfx_b = p_bg_clr;
Expand Down
2 changes: 1 addition & 1 deletion Video/VideoAutoFlipper/VP_Presets/BoxCrop.eel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//Box Crop
// VAF: Box Crop
//By Zly

//@param<idx>[:varname] 'name' [defval minval maxval centval step]
Expand Down
2 changes: 1 addition & 1 deletion Video/VideoAutoFlipper/VP_Presets/Chroma.eel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Chroma-key (RGB version)
// VAF: Chroma-key
//@param1:mode '0=green,1=blue' 1 0 1 0.5 1
//@param2:p primary 1.01 0 6 3 .01
//@param3:rej rejection 3 0 6 3 .01
Expand Down
2 changes: 1 addition & 1 deletion Video/VideoAutoFlipper/VP_Presets/Cropper.eel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//Cropper
// VAF: Cropper
//By Zly

//@param1:left_cut "Left" 0 0 0.5 0.25 0.01
Expand Down
2 changes: 1 addition & 1 deletion Video/VideoAutoFlipper/VP_Presets/Flipper.eel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Flipper
// VAF: Flipper
//@param<idx>[:varname] 'name' [defval minval maxval centval step]
//@param1:h_flip 'Horiz flip' 0 0 1 0.5 1
//@param2:v_flip 'Vert flip' 0 0 1 0.5 1
Expand Down
2 changes: 1 addition & 1 deletion Video/VideoAutoFlipper/VP_Presets/Null.eel
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Null
// VAF: Null
//@param1:null "null" 0 -360 360 0 0.001

2 changes: 1 addition & 1 deletion Video/VideoAutoFlipper/VP_Presets/Opacity.eel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//Opacity
// VAF: Opacity
//@param1:opacity 'Opacity' 1

bg_img = input_ismaster() ? -2 : input_track(0);
Expand Down
2 changes: 1 addition & 1 deletion Video/VideoAutoFlipper/VP_Presets/PositionOffset.eel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//Position Offset
// VAF: Position Offset
//@param<idx>[:varname] 'name' [defval minval maxval centval step]
//@param1:p_x_offs 'X offset' 0 -1 1 0 0.001
//@param2:p_y_offs 'Y offset' 0 -1 1 0 0.001
Expand Down
2 changes: 1 addition & 1 deletion Video/VideoAutoFlipper/VP_Presets/Pre-Compose.eel
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Pre-Compose
// VAF: Pre-Compose
gfx_blit(0, 0);
2 changes: 1 addition & 1 deletion Video/VideoAutoFlipper/VP_Presets/Rotate.eel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//Rotate
// VAF: Rotate
//@param1:rotate 'rotate' 0 -360 360 0 1
//@param2:filter 'filter' 0 0 1 0.5 1

Expand Down
2 changes: 1 addition & 1 deletion Video/VideoAutoFlipper/VP_Presets/Scale.eel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//Scale
// VAF: Scale
//@param<idx>[:varname] 'name' [defval minval maxval centval step]
//@param1:p_scale 'Scale' 1 0.01 2 1
//@param2:p_scale_x 'X Scale' 1 0.01 2 1
Expand Down
2 changes: 1 addition & 1 deletion Video/VideoAutoFlipper/VP_Presets/SolidColorFill.eel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Solid Color Fill
// VAF: Solid Color Fill
//@param1:p_r "R" 1 0 1 0.5 0.05
//@param2:p_g "G" 0 0 1 0.5 0.05
//@param3:p_b "B" 0 0 1 0.5 0.05
Expand Down
5 changes: 3 additions & 2 deletions Video/VideoAutoFlipper/Zly_VideoAutoFlipper.lua
Original file line number Diff line number Diff line change
Expand Up @@ -680,9 +680,10 @@ local VAF = {


AddVFX = function(self, track, name, presset_name, force_add)
local fx_chroma = reaper.TrackFX_GetByName(track, "VAF: Chroma-key", false)
local fx = reaper.TrackFX_GetByName(track, name, false)
if fx == -1 or force_add then
fx = reaper.TrackFX_AddByName(track, "Video processor", 0, 1)
fx = reaper.TrackFX_AddByName(track, "Video processor", 0, fx_chroma ~= -1 and -1000-fx_chroma or 1)
reaper.TrackFX_SetNamedConfigParm(track, fx, "renamed_name", name)
reaper.TrackFX_SetNamedConfigParm(track, fx, "VIDEO_CODE", self.VP_Presets[presset_name])
end
Expand Down Expand Up @@ -1282,7 +1283,7 @@ end

function GUI:TAB_FAQ()
local fla = 0
| reaper.ImGui_WindowFlags_NoResize()
| ImGui.WindowFlags_NoResize()
| ImGui.WindowFlags_AlwaysVerticalScrollbar()
if ImGui.BeginChild(self.ctx, "AI", 0, 0, true, fla) then
local max_line_len = 36
Expand Down

0 comments on commit 86cf768

Please sign in to comment.