03.10.2025, 20:30
(03.10.2025, 19:48)Selur Wrote:Quote:In the new RC4, the following plugins: Retinex.dll, MiscFilters.dll, ReduceFlicker.dllOkay,.. sounds like a bad idea to me, but no problem.
Will be automatically loaded by HAVC as needed.
It is not necessary that you add the loading of these plugins in the script.
I assume that you will only implement the autoloading for Windows.
MiscFilters: still hoping https://github.com/adworacz/zscene will be changed to not require an external call,...
Cu Selur
I tested it and it works. Here an example of loading the SCDetect filter
vsutils_dir: str = os.path.dirname(os.path.realpath(__file__))
MiscFilter_dir: str = os.path.join(vsutils_dir, "..", "..", "..", "..", "..", "vsfilters", "MiscFilter", "MiscFilters")
def load_SCDetect_plugin() -> bool:
"""
Ensures SCDetect VapourSynth plugin is loaded.
"""
plugin_path = os.path.join(MiscFilter_dir, "MiscFilters.dll")
try:
if hasattr(vs.core, 'misc') and hasattr(vs.core.misc, 'SCDetect'):
HAVC_LogMessage(MessageType.INFORMATION,"[INFO] Plugin 'SCDetect' already loaded.")
return True
else:
vs.core.std.LoadPlugin(path=plugin_path)
HAVC_LogMessage(MessageType.INFORMATION, f"[INFO] Plugin 'SCDetect' loaded from: {plugin_path}")
return True
except Exception as error:
HAVC_LogMessage(MessageType.WARNING, "[WARNING] Plugin 'SCDetect': check/load failed ->", str(error))
return False
The code is path-independent and does not explicitly use directory separators.
Dan