Thread: Avisynth+
View Single Post
Old 22nd July 2018, 22:22   #4144  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
EDIT: RUBBISH POST, PLEASE IGNORE.
Seems that I generated this bit with Grunt installed, thought is was from AVS+
I investigated it with Grunt not installed, however it had already been generated some time previous.
The scan examined builtin names, but got parameters from the Grunt plugin because of same Scriptclip name, oops.
Code:
ScriptClip  "cs[showx]b[after_frame]b[args]s[local]b"


I'm trying to figure out how to adapt to using AVS standard with Grunt, or AVS+ without (concerning ScriptClip).

From http://avisynth.nl/index.php/GRunT
Quote:
GRunT provides extended versions of the following run-time filters:
ScriptClip, ...

ScriptClip (clip clip, string filter [, bool showx, bool after_frame, string args, bool local])
GScriptClip(clip clip, string filter [, bool show , bool after_frame, string args, bool local])

As in the AviSynth internal counterparts, show (or showx) to true will display the actual values on the screen.
Presume that show/showx can be used to force original Scriptclip or GRunt version of ScriptClip when Grunt extended args NOT used.

AVS+, I See this Auto Generated using RT_InternalFunctions from Avisynth r2728 [EDIT: Via RT_Stats Make_Avisynth_BuiltIn_FunctionList.avs]
Code:
ScriptClip  "cs[showx]b[after_frame]b[args]s[local]b"
There are probably multiple function definitions in AVS+ source, but there is only a single one available via InternalFunctions().

Code:
Colorbars(Pixel_Type="YV12").ShowFrameNumber
SSS="""
	x=averageluma
	Subtitle("Fred Exist="+String(VarExist("fred"))+String(x," : X=%f"),Size=24,align=5)
"""
fred=true
# UnComment below lines one at a time
#####################################
##### AVS+ With GRunt Installed #####
#ScriptClip(SSS,show=true)      # OK, builtin
#ScriptClip(SSS,showx=true)     # OK, Grunt
#ScriptClip(SSS,args="fred")    # OK, Grunt
#ScriptClip(SSS,local=true)     # OK, Grunt
#
#GScriptClip(SSS,show=true)     # OK
#GScriptClip(SSS,showx=true)    # Script Error. GScriptclip does not have a named argument 'showx'. EDIT: So OK, expected
#GScriptClip(SSS,args="fred")   # OK
#GScriptClip(SSS,local=true)    # OK
#####################################
##### AVS+ With GRunt Missing   #####
#ScriptClip(SSS,show=true)      # OK
#ScriptClip(SSS,showx=true)     # Script Error. Scriptclip does not have a named argument 'showx'.
#ScriptClip(SSS,args="fred")    # Script Error. Scriptclip does not have a named argument 'args'.
#ScriptClip(SSS,local=true)     # Script Error. Scriptclip does not have a named argument 'local'.
#
#GScriptClip(SSS,show=true)     # All GScripClip fail with missing Grunt dll, as not supported in Avs+
#GScriptClip(SSS,showx=true)    #
#GScriptClip(SSS,args="fred")   #
#GScriptClip(SSS,local=true)    #
#####################################
Is AVS+ ScriptClip with showx, args and local documented somewhere ? [EDIT: the func definition 2 code blocks up suggests it exists]

GScript dll:- http://avisynth.nl/index.php/GScript
GSCript in Avs+: http://avisynth.nl/index.php/AviSynth%2B#GScript

Quote:
In AviSynth+ there is no need to wrap your GScript code in a string. The language extensions are native to
AviSynth+ and can be used transparently.
Might best be rewritten in docs as
Quote:
In AviSynth+ you must not wrap your GScript code in a GScript(" ... ") ...
Also, should be doc'ed that as well as GScript(), GEval(), and GImport() are not supported.

EDIT: I'm using below to implement script in both AVS with GSCript and AVS+ without [needs RT_FunctionExist()]
Where InstS = a multiline string.
Code:
    IsAvsPlus=(FindStr(UCase(versionString),"AVISYNTH+")!=0) HasGScript=RT_FunctionExist("GScript")  
    Assert(IsAvsPlus || HasGScript,RT_String("%sNeed either GScript or AVS+",myName))
   ...
    HasGScript ? GScript(InstS) : Eval(InstS)   # Use GSCript if installed (loaded plugs override builtin)
EDIT:
Maybe GScript, GEval, and GImport, could be implemented as script functions (with some other names) and act based on
whether GScript dll or AVS+ present, GImport equivalent though might be tricky as I think the ScriptDir() type stuff changes
to the target directory of the imported file, probably not impossible to kludge around.

EDIT: If anybody wants complete listing of AVS+ r2728 BuiltIn function definitions, see SendSpace in sig below this post, or here:
http://www.mediafire.com/file/py8985...on_List.TXT.7z [~5KB]
NOTE, Only a single definition for each function is available, eg AssumeFPS has multiple definitions, using float FPS, or int numerator, int denominator.
(Not sure if its the first or last definition that is produced by Avs API.)
The actual script to produce the list is included in RT_Stats (any recentish version, last 3 or 4 years).
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 23rd July 2018 at 22:16.
StainlessS is offline