diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2017-03-28 11:41:10 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2017-03-28 11:41:10 +0300 |
commit | 885260117d6a9080ce073a1fb402b7af060f8645 (patch) | |
tree | 1769a4c180115a0fdda86d5554159c43691f461b /release | |
parent | 6d21970aa06a31398ed4a78b1c596f30a0b9ee87 (diff) | |
parent | e1909958d9ec48333a7bfd0d34aede66efc9b1ad (diff) |
Merge branch 'master' into blender2.8
Conflicts:
source/blender/blenloader/intern/readfile.c
source/blender/windowmanager/intern/wm_window.c
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/modules/bl_app_override/__init__.py | 2 | ||||
-rw-r--r-- | release/scripts/modules/bpy/utils/__init__.py | 43 | ||||
-rw-r--r-- | release/scripts/startup/bl_operators/wm.py | 32 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_userpref.py | 6 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 1 |
5 files changed, 37 insertions, 47 deletions
diff --git a/release/scripts/modules/bl_app_override/__init__.py b/release/scripts/modules/bl_app_override/__init__.py index efd7c525e62..66857701669 100644 --- a/release/scripts/modules/bl_app_override/__init__.py +++ b/release/scripts/modules/bl_app_override/__init__.py @@ -47,7 +47,7 @@ def ui_draw_filter_register( ui_ignore_operator=None, ui_ignore_property=None, ui_ignore_menu=None, - ui_ignore_label=None, + ui_ignore_label=None ): import bpy diff --git a/release/scripts/modules/bpy/utils/__init__.py b/release/scripts/modules/bpy/utils/__init__.py index 65a2f278465..1d555ae7123 100644 --- a/release/scripts/modules/bpy/utils/__init__.py +++ b/release/scripts/modules/bpy/utils/__init__.py @@ -50,18 +50,18 @@ __all__ = ( "unregister_class", "unregister_module", "user_resource", - ) +) from _bpy import ( - _utils_units as units, - blend_paths, - escape_identifier, - register_class, - resource_path, - script_paths as _bpy_script_paths, - unregister_class, - user_resource as _user_resource, - ) + _utils_units as units, + blend_paths, + escape_identifier, + register_class, + resource_path, + script_paths as _bpy_script_paths, + unregister_class, + user_resource as _user_resource, +) import bpy as _bpy import os as _os @@ -143,7 +143,7 @@ def load_scripts(reload_scripts=False, refresh_scripts=False): as modules. :type refresh_scripts: bool """ - use_time = _bpy.app.debug_python + use_time = use_class_register_check = _bpy.app.debug_python if use_time: import time @@ -162,7 +162,8 @@ def load_scripts(reload_scripts=False, refresh_scripts=False): for module_name in [ext.module for ext in _user_preferences.addons]: _addon_utils.disable(module_name) - # *AFTER* unregistering all add-ons, otherwise all calls to unregister_module() will silently fail (do nothing). + # *AFTER* unregistering all add-ons, otherwise all calls to + # unregister_module() will silently fail (do nothing). _bpy_types.TypeMap.clear() def register_module_call(mod): @@ -276,13 +277,21 @@ def load_scripts(reload_scripts=False, refresh_scripts=False): if use_time: print("Python Script Load Time %.4f" % (time.time() - t_main)) + if use_class_register_check: + for cls in _bpy.types.bpy_struct.__subclasses__(): + if getattr(cls, "is_registered", False): + for subcls in cls.__subclasses__(): + if not subcls.is_registered: + print( + "Warning, unregistered class: %s(%s)" % + (subcls.__name__, cls.__name__) + ) + # base scripts -_scripts = _os.path.join(_os.path.dirname(__file__), - _os.path.pardir, - _os.path.pardir, - ) -_scripts = (_os.path.normpath(_scripts), ) +_scripts = ( + _os.path.dirname(_os.path.dirname(_os.path.dirname(__file__))), +) def script_path_user(): diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index 7827e7ab5e2..17ec778a275 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -2240,13 +2240,8 @@ class WM_OT_app_template_install(Operator): default=True, options={'HIDDEN'}, ) - filter_python = BoolProperty( - name="Filter python", - default=True, - options={'HIDDEN'}, - ) filter_glob = StringProperty( - default="*.py;*.zip", + default="*.zip", options={'HIDDEN'}, ) @@ -2256,7 +2251,7 @@ class WM_OT_app_template_install(Operator): import shutil import os - pyfile = self.filepath + filepath = self.filepath path_app_templates = bpy.utils.user_resource( 'SCRIPTS', os.path.join("startup", "bl_app_templates_user"), @@ -2276,9 +2271,9 @@ class WM_OT_app_template_install(Operator): app_templates_old = set(os.listdir(path_app_templates)) # check to see if the file is in compressed format (.zip) - if zipfile.is_zipfile(pyfile): + if zipfile.is_zipfile(filepath): try: - file_to_extract = zipfile.ZipFile(pyfile, 'r') + file_to_extract = zipfile.ZipFile(filepath, 'r') except: traceback.print_exc() return {'CANCELLED'} @@ -2300,20 +2295,9 @@ class WM_OT_app_template_install(Operator): return {'CANCELLED'} else: - path_dest = os.path.join(path_app_templates, os.path.basename(pyfile)) - - if self.overwrite: - module_filesystem_remove(path_app_templates, os.path.basename(pyfile)) - elif os.path.exists(path_dest): - self.report({'WARNING'}, "File already installed to %r\n" % path_dest) - return {'CANCELLED'} - - # if not compressed file just copy into the addon path - try: - shutil.copyfile(pyfile, path_dest) - except: - traceback.print_exc() - return {'CANCELLED'} + # Only support installing zipfiles + self.report({'WARNING'}, "Expected a zip-file %r\n" % filepath) + return {'CANCELLED'} app_templates_new = set(os.listdir(path_app_templates)) - app_templates_old @@ -2323,7 +2307,7 @@ class WM_OT_app_template_install(Operator): # print message msg = ( tip_("Template Installed (%s) from %r into %r") % - (", ".join(sorted(app_templates_new)), pyfile, path_app_templates) + (", ".join(sorted(app_templates_new)), filepath, path_app_templates) ) print(msg) self.report({'INFO'}, msg) diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index f4e2cf006b2..e50beba50d8 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -217,6 +217,7 @@ class USERPREF_PT_interface(Panel): col = row.column() col.label(text="Display:") + col.prop(view, "ui_scale", text="Scale") col.prop(view, "show_tooltips") col.prop(view, "show_tooltips_python") col.prop(view, "show_object_info", text="Object Info") @@ -467,11 +468,6 @@ class USERPREF_PT_system(Panel): col = colsplit.column() col.label(text="General:") - col.prop(system, "dpi") - col.label("Virtual Pixel Mode:") - col.prop(system, "virtual_pixel_mode", text="") - - col.separator() col.prop(system, "frame_server_port") col.prop(system, "scrollback", text="Console Scrollback") diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 03c660807a9..1ede823e6d8 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3870,6 +3870,7 @@ classes = ( INFO_MT_edit_armature_add, INFO_MT_armature_add, INFO_MT_lamp_add, + INFO_MT_camera_add, INFO_MT_add, VIEW3D_MT_object, VIEW3D_MT_object_animation, |