diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-01-04 07:47:37 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-01-04 07:47:37 +0400 |
commit | 9dbe85c17ea0e3a9279780e51a9caea69ea056ed (patch) | |
tree | 2616faf930c04d57d1259798cf0bf081ae914e40 /release/scripts | |
parent | a50794e4f93cb2756fce5c585ad46327cfe27f46 (diff) |
expose common extensions for image/movie/audio types, since python scripts had to do this internally.
- bpy.path.extensions_image
- bpy.path.extensions_movie
- bpy.path.extensions_audio
eg:
if os.path.splitext(filename)[1].lower() in bpy.path.extensions_image:
... we have an image ...
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/modules/bpy/path.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/release/scripts/modules/bpy/path.py b/release/scripts/modules/bpy/path.py index d32b69b501c..69ed4314f6f 100644 --- a/release/scripts/modules/bpy/path.py +++ b/release/scripts/modules/bpy/path.py @@ -30,6 +30,9 @@ __all__ = ( "display_name", "display_name_from_filepath", "ensure_ext", + "extensions_image", + "extensions_movie", + "extensions_audio", "is_subdir", "module_names", "relpath", @@ -39,6 +42,10 @@ __all__ = ( import bpy as _bpy import os as _os +from _bpy_path import (extensions_audio, + extensions_movie, + extensions_image, + ) def abspath(path, start=None, library=None): """ |