~ubuntu-branches/ubuntu/utopic/blender/utopic-proposed

« back to all changes in this revision

Viewing changes to release/scripts/modules/addon_utils.py

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-02-19 11:24:23 UTC
  • mfrom: (14.2.23 sid)
  • Revision ID: package-import@ubuntu.com-20140219112423-rkmaz2m7ha06d4tk
Tags: 2.69-3ubuntu1
* Merge with Debian; remaining changes:
  - Configure without OpenImageIO on armhf, as it is not available on
    Ubuntu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
error_encoding = False
36
36
addons_fake_modules = {}
37
37
 
38
 
 
39
38
def paths():
40
39
    # RELEASE SCRIPTS: official scripts distributed in Blender releases
41
40
    addon_paths = _bpy.utils.script_paths("addons")
51
50
    return addon_paths
52
51
 
53
52
 
54
 
def modules(module_cache):
 
53
def modules_refresh(module_cache=addons_fake_modules):
55
54
    global error_duplicates
56
55
    global error_encoding
57
56
    import os
184
183
        del module_cache[mod_stale]
185
184
    del modules_stale
186
185
 
 
186
 
 
187
def modules(module_cache=addons_fake_modules, refresh=True):
 
188
    if refresh:
 
189
        modules_refresh(module_cache)
 
190
 
187
191
    mod_list = list(module_cache.values())
188
192
    mod_list.sort(key=lambda mod: (mod.bl_info["category"],
189
193
                                   mod.bl_info["name"],
370
374
    """
371
375
    import sys
372
376
 
 
377
    # initializes addons_fake_modules
 
378
    modules_refresh()
 
379
 
373
380
    # RELEASE SCRIPTS: official scripts distributed in Blender releases
374
381
    paths_list = paths()
375
382