~ubuntu-branches/ubuntu/trusty/blender/trusty

« back to all changes in this revision

Viewing changes to release/scripts/modules/bpy/path.py

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    "display_name",
31
31
    "display_name_from_filepath",
32
32
    "ensure_ext",
 
33
    "extensions_image",
 
34
    "extensions_movie",
 
35
    "extensions_audio",
33
36
    "is_subdir",
34
37
    "module_names",
35
38
    "relpath",
39
42
import bpy as _bpy
40
43
import os as _os
41
44
 
 
45
from _bpy_path import (extensions_audio,
 
46
                       extensions_movie,
 
47
                       extensions_image,
 
48
                       )
 
49
 
42
50
 
43
51
def abspath(path, start=None, library=None):
44
52
    """
133
141
    mixed case names are kept as is. Intended for use with
134
142
    filenames and module names.
135
143
    """
136
 
 
137
 
    name = _os.path.splitext(name)[0]
138
 
 
139
144
    # string replacements
140
145
    name = name.replace("_colon_", ":")
141
146
 
154
159
    ensured to be utf8 compatible.
155
160
    """
156
161
 
157
 
    name = _os.path.splitext(basename(name))[0]
158
162
    name = _clean_utf8(name)
159
163
    return name
160
164
 
260
264
        elif filename.endswith(".py") and filename != "__init__.py":
261
265
            fullpath = join(path, filename)
262
266
            modules.append((filename[0:-3], fullpath))
263
 
        elif ("." not in filename):
 
267
        elif "." not in filename:
264
268
            directory = join(path, filename)
265
269
            fullpath = join(directory, "__init__.py")
266
270
            if isfile(fullpath):
268
272
                if recursive:
269
273
                    for mod_name, mod_path in module_names(directory, True):
270
274
                        modules.append(("%s.%s" % (filename, mod_name),
271
 
                                       mod_path,
272
 
                                       ))
 
275
                                        mod_path,
 
276
                                        ))
273
277
 
274
278
    return modules
275
279