Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
7th August 2015, 07:54 | #1 | Link |
Registered User
Join Date: Jan 2008
Posts: 42
|
simple boolean check doesn't work
Hi folks,
I'm writing a small script. Due function declaration I define a variable as: bool "bgBlur" Now later on in the script I'm checking if bgBlur is true or false: Code:
... # if bgBlur true item = (bgBlur == true) ? { bb_left = pic.Crop(0,0,100,0) bb_right = pic.Crop((pic_x + 100),0,0,0) StackVertical(bb_left,pic,bb_right) } : { Overlay(bg_img,pic,padding,0,mode="Blend",opacity=1) } ... But I can't see an error here ... Block statements should be possible ! |
7th August 2015, 08:41 | #2 | Link |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
If you read that link, you will see that the standard Avisynth syntax does not support block statements in that way.
You need to use either Avisynth+ or the GScript plugin. However, even then, you would have to write it this way: Code:
if (bgBlur == true) { bb_left = pic.Crop(0,0,100,0) bb_right = pic.Crop((pic_x + 100),0,0,0) item = StackVertical(bb_left,pic,bb_right) } else { item = Overlay(bg_img,pic,padding,0,mode="Blend",opacity=1) } Last edited by Gavino; 7th August 2015 at 08:49. Reason: code example |
Thread Tools | Search this Thread |
Display Modes | |
|
|