diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-07-31 07:15:37 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-07-31 07:15:37 +0400 |
commit | f4293067c1420827ddfa62e62430870c6b790a8a (patch) | |
tree | 6ad74d1ea760e4450dd27236a0f7ed3987d4283b /release/scripts/modules/bpy_extras/image_utils.py | |
parent | 670f58023c478995ed055e194482ab288db436a7 (diff) |
py api: sphinx doc corrections, pep8 cleanup and style edits, also added __all__ to some modules which were missing it.
Diffstat (limited to 'release/scripts/modules/bpy_extras/image_utils.py')
-rw-r--r-- | release/scripts/modules/bpy_extras/image_utils.py | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/release/scripts/modules/bpy_extras/image_utils.py b/release/scripts/modules/bpy_extras/image_utils.py index e56c1c651c4..eab75c3bd16 100644 --- a/release/scripts/modules/bpy_extras/image_utils.py +++ b/release/scripts/modules/bpy_extras/image_utils.py @@ -16,11 +16,11 @@ # # ##### END GPL LICENSE BLOCK ##### -# <pep8 compliant> +# <pep8-80 compliant> __all__ = ( "load_image", -) + ) # limited replacement for BPyImage.comprehensiveImageLoad @@ -33,8 +33,8 @@ def load_image(imagepath, verbose=False, ): """ - Return an image from the file path with options to search multiple paths and - return a placeholder if its not found. + Return an image from the file path with options to search multiple paths + and return a placeholder if its not found. :arg filepath: The image filename If a path precedes it, this will be searched as well. @@ -51,9 +51,10 @@ def load_image(imagepath, :type recursive: bool :arg ncase_cmp: on non windows systems, find the correct case for the file. :type ncase_cmp: bool - :arg convert_callback: a function that takes an existing path and returns a new one. - Use this when loading image formats blender may not support, the CONVERT_CALLBACK - can take the path for a GIF (for example), convert it to a PNG and return the PNG's path. + :arg convert_callback: a function that takes an existing path and returns + a new one. Use this when loading image formats blender may not support, + the CONVERT_CALLBACK can take the path for a GIF (for example), + convert it to a PNG and return the PNG's path. For formats blender can read, simply return the path that is given. :type convert_callback: function :return: an image or None @@ -92,7 +93,9 @@ def load_image(imagepath, for filepath_test in variants: if ncase_cmp: - ncase_variants = filepath_test, bpy.path.resolve_ncase(filepath_test) + ncase_variants = (filepath_test, + bpy.path.resolve_ncase(filepath_test), + ) else: ncase_variants = (filepath_test, ) |