diff options
Diffstat (limited to 'archipack')
-rw-r--r-- | archipack/__init__.py | 2 | ||||
-rw-r--r-- | archipack/archipack_gl.py | 8 | ||||
-rw-r--r-- | archipack/archipack_manipulator.py | 2 | ||||
-rw-r--r-- | archipack/archipack_material.py | 2 | ||||
-rw-r--r-- | archipack/archipack_preset.py | 2 | ||||
-rw-r--r-- | archipack/archipack_rendering.py | 4 | ||||
-rw-r--r-- | archipack/archipack_thumbs.py | 2 | ||||
-rw-r--r-- | archipack/archipack_wall2.py | 2 |
8 files changed, 12 insertions, 12 deletions
diff --git a/archipack/__init__.py b/archipack/__init__.py index 6c30d218..705468b7 100644 --- a/archipack/__init__.py +++ b/archipack/__init__.py @@ -458,7 +458,7 @@ def menu_func(self, context): icons = icons_collection["main"] # either draw sub menu or right at end of this one - if context.user_preferences.addons[__name__].preferences.create_submenu: + if context.preferences.addons[__name__].preferences.create_submenu: layout.operator_context = 'INVOKE_REGION_WIN' layout.menu("ARCHIPACK_MT_create", icon_value=icons["archipack"].icon_id) else: diff --git a/archipack/archipack_gl.py b/archipack/archipack_gl.py index 578098f9..17211787 100644 --- a/archipack/archipack_gl.py +++ b/archipack/archipack_gl.py @@ -66,7 +66,7 @@ def get_prefs(context): global __name__ try: addon_name = __name__.split('.')[0] - prefs = context.user_preferences.addons[addon_name].preferences + prefs = context.preferences.addons[addon_name].preferences except: prefs = DefaultColorScheme pass @@ -325,7 +325,7 @@ class GlText(Gl): """ overall on-screen size in pixels """ - dpi, font_id = context.user_preferences.system.dpi, 0 + dpi, font_id = context.preferences.system.dpi, 0 if self.angle != 0: blf.enable(font_id, blf.ROTATION) blf.rotation(font_id, self.angle) @@ -437,7 +437,7 @@ class GlText(Gl): p = self.position_2d_from_coord(context, self.pts[0], render) # dirty fast assignment - dpi, font_id = context.user_preferences.system.dpi, 0 + dpi, font_id = context.preferences.system.dpi, 0 # self.cbuff[0:4] = self.colour @@ -1151,7 +1151,7 @@ class Screen(): def size(self, context): - system = context.user_preferences.system + system = context.preferences.system w = context.region.width h = context.region.height y_min = self.margin diff --git a/archipack/archipack_manipulator.py b/archipack/archipack_manipulator.py index be6c2ef2..2b9010d6 100644 --- a/archipack/archipack_manipulator.py +++ b/archipack/archipack_manipulator.py @@ -1956,7 +1956,7 @@ class archipack_manipulator(PropertyGroup): try: # retrieve addon name from imports addon_name = __name__.split('.')[0] - prefs = context.user_preferences.addons[addon_name].preferences + prefs = context.preferences.addons[addon_name].preferences arrow_size = prefs.arrow_size handle_size = prefs.handle_size except: diff --git a/archipack/archipack_material.py b/archipack/archipack_material.py index cbec80cd..71e41f32 100644 --- a/archipack/archipack_material.py +++ b/archipack/archipack_material.py @@ -132,7 +132,7 @@ class MatlibsManager(): prefs = None # retrieve addon name from imports addon_name = __name__.split('.')[0] - prefs = context.user_preferences.addons[addon_name].preferences + prefs = context.preferences.addons[addon_name].preferences return prefs @property diff --git a/archipack/archipack_preset.py b/archipack/archipack_preset.py index 8f1468b2..745b1826 100644 --- a/archipack/archipack_preset.py +++ b/archipack/archipack_preset.py @@ -539,7 +539,7 @@ class ArchipackPreset(AddPresetBase): def background_render(self, context, cls, preset): generator = os.path.dirname(os.path.realpath(__file__)) + os.path.sep + "archipack_thumbs.py" addon_name = __name__.split('.')[0] - matlib_path = context.user_preferences.addons[addon_name].preferences.matlib_path + matlib_path = context.preferences.addons[addon_name].preferences.matlib_path # Run external instance of blender like the original thumbnail generator. cmd = [ bpy.app.binary_path, diff --git a/archipack/archipack_rendering.py b/archipack/archipack_rendering.py index 533afffc..82ef9a18 100644 --- a/archipack/archipack_rendering.py +++ b/archipack/archipack_rendering.py @@ -56,7 +56,7 @@ class ARCHIPACK_OT_render_thumbs(Operator): def background_render(self, context, cls, preset): generator = path.dirname(path.realpath(__file__)) + path.sep + "archipack_thumbs.py" addon_name = __name__.split('.')[0] - matlib_path = context.user_preferences.addons[addon_name].preferences.matlib_path + matlib_path = context.preferences.addons[addon_name].preferences.matlib_path # Run external instance of blender like the original thumbnail generator. cmd = [ bpy.app.binary_path, @@ -174,7 +174,7 @@ class ARCHIPACK_OT_render_thumbs(Operator): def invoke(self, context, event): addon_name = __name__.split('.')[0] - matlib_path = context.user_preferences.addons[addon_name].preferences.matlib_path + matlib_path = context.preferences.addons[addon_name].preferences.matlib_path if matlib_path == '': self.report({'WARNING'}, "You should setup a default material library path in addon preferences") diff --git a/archipack/archipack_thumbs.py b/archipack/archipack_thumbs.py index 4ae4d020..c3cfea7d 100644 --- a/archipack/archipack_thumbs.py +++ b/archipack/archipack_thumbs.py @@ -223,7 +223,7 @@ if __name__ == "__main__": # log("### ENABLE %s ADDON ############################" % module) bpy.ops.wm.addon_enable(module=module) # log("### MATLIB PATH ############################") - bpy.context.user_preferences.addons[module].preferences.matlib_path = matlib + bpy.context.preferences.addons[module].preferences.matlib_path = matlib except: raise RuntimeError("module name not found") # log("### GENERATE ############################") diff --git a/archipack/archipack_wall2.py b/archipack/archipack_wall2.py index 750cd313..20f6e505 100644 --- a/archipack/archipack_wall2.py +++ b/archipack/archipack_wall2.py @@ -2263,7 +2263,7 @@ class ARCHIPACK_OT_wall2_draw(ArchipackDrawTool, Operator): def invoke(self, context, event): if context.mode == "OBJECT": - prefs = context.user_preferences.addons[__name__.split('.')[0]].preferences + prefs = context.preferences.addons[__name__.split('.')[0]].preferences self.max_style_draw_tool = prefs.max_style_draw_tool self.keymap = Keymaps(context) self.wall_part1 = GlPolygon((0.5, 0, 0, 0.2)) |