Skip to content

Commit

Permalink
Remove unused function for R60 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Infiziert90 committed Aug 6, 2022
1 parent 800bab8 commit a61caca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
5 changes: 2 additions & 3 deletions getnative/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from pathlib import Path
from functools import partial
from typing import Union, List, Tuple
from getnative.utils import GetnativeException, plugin_from_identifier, get_attr, get_source_filter, to_float
from getnative.utils import GetnativeException, get_attr, get_source_filter, to_float
try:
import matplotlib as mpl
import matplotlib.pyplot as pyplot
Expand Down Expand Up @@ -44,8 +44,7 @@ def __init__(self, kernel: str, b: Union[float, int] = 0, c: Union[float, int] =
self.b = b
self.c = c
self.taps = taps
_d = plugin_from_identifier(core, "tegaf.asi.xe")
self.plugin = _d if _d is not None else get_attr(core, 'descale', None)
self.plugin = get_attr(core, 'descale', None)
if self.plugin is None:
return

Expand Down
17 changes: 0 additions & 17 deletions getnative/utils.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,12 @@
import os
import argparse
import vapoursynth
from typing import Union, Callable


class GetnativeException(BaseException):
pass


def plugin_from_identifier(core: vapoursynth.Core, identifier: str) -> Union[Callable, None]:
"""
Get a plugin from vapoursynth with only the plugin identifier
:param core: the core from vapoursynth
:param identifier: plugin identifier. Example "tegaf.asi.xe"
:return Plugin or None
"""

return getattr(
core,
core.get_plugins().get(identifier, {}).get("namespace", ""),
None
)


def vpy_source_filter(path):
import runpy
runpy.run_path(path, {}, "__vapoursynth__")
Expand Down

0 comments on commit a61caca

Please sign in to comment.