- generate sphinx docs for bpy_extras module

- add in support to doc generator for automatically generating docs for submodules.
This commit is contained in:
Campbell Barton
2011-05-28 07:47:58 +00:00
parent 20ae95422e
commit ecf2d1ff4e
6 changed files with 128 additions and 22 deletions

View File

@@ -18,10 +18,20 @@
# <pep8 compliant>
__all__ = (
"image_load",
)
def image_load(filepath, dirpath, place_holder=False, recursive=False, convert_callback=None):
import bpy
import os
try:
return bpy.data.images.load(filepath)
except RuntimeError:
return bpy.data.images.new("Untitled", 128, 128)
if place_holder:
image = bpy.data.images.new(os.path.basename(filepath), 128, 128)
# allow the path to be resolved later
image.filepath = filepath
return image