Skip to content

Commit

Permalink
Merge pull request #25 from pehala/fix_export
Browse files Browse the repository at this point in the history
Fix export
  • Loading branch information
pehala authored Jan 30, 2023
2 parents e7f97f9 + 13ff69a commit 3b11a19
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion animationCombiner/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"name": "Animation Combiner",
"author": "phala",
"description": "Blender plugin for crafting new animations from existing ones",
"version": (0, 0, 2),
"version": (0, 0, 2, 1),
"blender": (3, 0, 0),
"location": "View3D -> AnimationCombiner",
"warning": "",
Expand Down
5 changes: 3 additions & 2 deletions animationCombiner/parsers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ def _register_parser(func=None, *, extensions: Collection[str] = None, collectio
def _find_parser_for_path(path: PathLike, collection):
"""Return descendant of AnimationLoader that is registered for that path"""
path = Path(path)
if not path.exists() or not path.is_file():
raise ParserError(f"Path {path} must exists and must be a file")
extension = path.suffix
if extension not in collection:
raise ParserError(f"Extension {extension} is not recognized")
Expand All @@ -83,6 +81,9 @@ def _find_parser_for_path(path: PathLike, collection):

def find_parser_for_path(path: PathLike) -> Type["AnimationLoader"]:
"""Return descendant of AnimationLoader that is registered for that path"""
path = Path(path)
if not path.exists() or not path.is_file():
raise ParserError(f"Path {path} must exists and must be a file")
return _find_parser_for_path(path, PARSERS)


Expand Down

0 comments on commit 3b11a19

Please sign in to comment.