Closed TbtBI closed 3 years ago
Well :), I admit it may throw no errors.
Expr in such case throw "Cannot convert xxx to float" or something like that. Is it possible to have same behavior with luts too?
Expr and masktools, they have completely different parser logic, historically masktools version did not recognize unknown keywords/numbers, Expr - backported from VapourSynth - did it right. Probably yes, possible, because mankind landed even on Moon and scripting problems are a bit easier task than this :) Let's keep this ticket open.
and fun fact, srestore for example has many buggy RPNs (which I did fix but not all peoples use my mods), so fixing this maybe case many scripts like this to not work, so if it done maybe it should be adding new parameter called "RPNDebug"
It is better to throw an error because it is never good to rely on an undefined garbage.
Lut syntax check is a more tough task. The fix should detect not only unidentifiable keywords but must check for unbalanced expression tree as well. Which results in stack overflow/underflow inside. Spent days on it, but it's still under construction. Expression evaluator is used not only for luts but in parameter parsing as well (mt_convolution for example) which behaves a bit differently inside.
Actual "nightly" build https://drive.google.com/uc?export=download&id=1HrkfZ626tIcDGpIREguSX5H4bxRLar2s
It looks ok.
Thanks.
Hi,
If something like
clip.mt_lut("sadada")
is used no error is thrown.