View Full Version : Plugins folder
ajp_anton
4th February 2012, 22:14
I'd like to have an external HDD with some captured VHS videos, Avisynth scripts to filter/enhance these, and a folder with all the plugins needed. This should all be completely portable with no interference from any already existing plugins folder on the host computer, only an Avisynth installation should be needed.
Is it possible to temporarily ignore the default plugins auto-load folder?
If so, can you also set a new temporary auto-load folder so you don't have to loadplugin everything separately?
I'm thinking something like
SetAutoload(false) #disables any existing autoloads
SetAutoload("path") #loads everything from here
IanB
4th February 2012, 23:01
There is no formal way to disable the autoload feature. However it is driven by two registry key :-
1. HKEY_CURRENT_USER\Software\Avisynth\PluginDir2_5
and
2. HKEY_LOCAL_MACHINE\Software\Avisynth\PluginDir2_5
If the first does not exist the second is used. If neither exist then the autoload function is abandoned.
If you cannot delete both you may set the first to point to an empty directory, then you can at least knobble the autoload function.
ajp_anton
5th February 2012, 02:12
Well, that doesn't really help portability, to give the HDD to someone and having it "just work" as long as Avisynth is installed.
It might not be such a big problem anyway though, it's just to make it fail-safe with no other plugins/functions using the same names, or wrong versions. But it would be nice if such a feature would be added one day.
cattolicboy
5th February 2012, 02:55
Maybe you can try with SetWorkingDir taken from the GetSystemEnv.dll by stickboy...
librarian
5th February 2012, 03:17
Well, that doesn't really help portability, to give the HDD to someone and having it "just work" as long as Avisynth is installed.
It might not be such a big problem anyway though, it's just to make it fail-safe with no other plugins/functions using the same names, or wrong versions. But it would be nice if such a feature would be added one day.
You might be interested in this (http://avisynth.org/mediawiki/Plugins) :Plugin autoload and name precedence v2 - Plugin autoload and conflicting function names v2.55.
ajp_anton
5th February 2012, 14:17
Ah, so I can just load the needed functions with dllname_functionname?
So if there is mt_masktools.dll in the plugins folder, and I loadplugin a newer version of it, I should rename the file of the newer one to be sure that's the one being used?
And does this work with user defined .avsi functions? If I want to include for example QTGMC, do I have to rename the function, and also change all the filter calls inside it?
It still isn't 100% failsafe, in case the plugin folder just happens to have a plugin with the same name as my renamed file, but I guess the chances of that happening is close to zero =).
It also makes it a little more work to upgrade the included filter package...
librarian
5th February 2012, 14:49
The order in which function names take precedence is as follows:
user-defined function (always have the highest priority)
plugin-function (have higher priority than built-in functions, they will override a built-in function)
built-in function
Inside those groups the function loaded at last takes precedence...
No need to rewrite all functions.Manually loading your plugins is enough.
ajp_anton
5th February 2012, 20:56
So dll filenames aren't even needed, I just manually load the newest version of mvtools2.dll and everything in my script and imported .avs(i) functions will automatically use that instead of the old one that would've been auto-loaded?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.